mac80211: update to wireless-testing 2013-04-16 + backports
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 610-rt2x00-fix-rt3352-ext-pa.patch
index bf070e68f3be84c5c3ae89ee7b0ad998b0bb4c88..7c76b5a9fd2da7c38c9ad79827fd17aed9b57a1c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
-@@ -2249,15 +2249,18 @@ static void rt2800_config_channel(struct
+@@ -2622,15 +2622,18 @@ static void rt2800_config_channel(struct
        /*
         * Change BBP settings
         */
@@ -22,7 +22,7 @@
                rt2800_bbp_write(rt2x00dev, 86, 0);
        }
  
-@@ -3670,6 +3673,7 @@ static int rt2800_init_bbp(struct rt2x00
+@@ -4203,6 +4206,7 @@ static int rt2800_init_bbp(struct rt2x00
                rt2800_bbp_write(rt2x00dev, 120, 0x50);
  
        if (rt2x00_rt(rt2x00dev, RT3290) ||
@@ -30,7 +30,7 @@
            rt2x00_rt(rt2x00dev, RT5390) ||
            rt2x00_rt(rt2x00dev, RT5392))
                rt2800_bbp_write(rt2x00dev, 128, 0x12);
-@@ -3976,6 +3980,12 @@ static void rt2800_init_rfcsr_3290(struc
+@@ -4507,6 +4511,12 @@ static void rt2800_init_rfcsr_3290(struc
  
  static void rt2800_init_rfcsr_3352(struct rt2x00_dev *rt2x00dev)
  {
@@ -43,7 +43,7 @@
        rt2800_rfcsr_write(rt2x00dev, 0, 0xf0);
        rt2800_rfcsr_write(rt2x00dev, 1, 0x23);
        rt2800_rfcsr_write(rt2x00dev, 2, 0x50);
-@@ -4009,15 +4019,30 @@ static void rt2800_init_rfcsr_3352(struc
+@@ -4540,15 +4550,30 @@ static void rt2800_init_rfcsr_3352(struc
        rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
        rt2800_rfcsr_write(rt2x00dev, 32, 0x80);
        rt2800_rfcsr_write(rt2x00dev, 33, 0x00);
@@ -77,7 +77,7 @@
        rt2800_rfcsr_write(rt2x00dev, 43, 0xdb);
        rt2800_rfcsr_write(rt2x00dev, 44, 0xdb);
        rt2800_rfcsr_write(rt2x00dev, 45, 0xdb);
-@@ -4025,15 +4050,20 @@ static void rt2800_init_rfcsr_3352(struc
+@@ -4556,15 +4581,20 @@ static void rt2800_init_rfcsr_3352(struc
        rt2800_rfcsr_write(rt2x00dev, 47, 0x0d);
        rt2800_rfcsr_write(rt2x00dev, 48, 0x14);
        rt2800_rfcsr_write(rt2x00dev, 49, 0x00);
        rt2800_rfcsr_write(rt2x00dev, 59, 0x00);
        rt2800_rfcsr_write(rt2x00dev, 60, 0x00);
        rt2800_rfcsr_write(rt2x00dev, 61, 0x00);
-@@ -4949,7 +4979,8 @@ static int rt2800_init_eeprom(struct rt2
+@@ -5534,7 +5564,8 @@ static int rt2800_init_eeprom(struct rt2
        /*
         * Detect if this device has Bluetooth co-existence.
         */
                __set_bit(CAPABILITY_BT_COEXIST, &rt2x00dev->cap_flags);
  
        /*
-@@ -4978,6 +5009,22 @@ static int rt2800_init_eeprom(struct rt2
+@@ -5563,6 +5594,22 @@ static int rt2800_init_eeprom(struct rt2
                                        EIRP_MAX_TX_POWER_LIMIT)
                __set_bit(CAPABILITY_POWER_LIMIT, &rt2x00dev->cap_flags);
  
  
 --- a/drivers/net/wireless/rt2x00/rt2800.h
 +++ b/drivers/net/wireless/rt2x00/rt2800.h
-@@ -2117,6 +2117,12 @@ struct mac_iveiv_entry {
+@@ -2153,6 +2153,12 @@ struct mac_iveiv_entry {
  #define RFCSR31_RX_CALIB              FIELD8(0x7f)
  
  /*
   * RFCSR 38:
   */
  #define RFCSR38_RX_LO1_EN             FIELD8(0x20)
-@@ -2127,6 +2133,18 @@ struct mac_iveiv_entry {
+@@ -2163,6 +2169,18 @@ struct mac_iveiv_entry {
  #define RFCSR39_RX_LO2_EN             FIELD8(0x80)
  
  /*
   * RFCSR 49:
   */
  #define RFCSR49_TX                    FIELD8(0x3f)
-@@ -2135,6 +2153,8 @@ struct mac_iveiv_entry {
+@@ -2172,6 +2190,8 @@ struct mac_iveiv_entry {
   * RFCSR 50:
   */
  #define RFCSR50_TX                    FIELD8(0x3f)
 +#define RFCSR50_TX0_EXT_PA            FIELD8(0x02)
 +#define RFCSR50_TX1_EXT_PA            FIELD8(0x10)
+ #define RFCSR50_EP                    FIELD8(0xc0)
  
  /*
-  * RF registers
-@@ -2222,6 +2242,8 @@ struct mac_iveiv_entry {
+@@ -2260,6 +2280,8 @@ struct mac_iveiv_entry {
   * INTERNAL_TX_ALC: 0: disable, 1: enable
   * BT_COEXIST: 0: disable, 1: enable
   * DAC_TEST: 0: disable, 1: enable
   */
  #define       EEPROM_NIC_CONF1                0x001b
  #define EEPROM_NIC_CONF1_HW_RADIO             FIELD16(0x0001)
-@@ -2239,6 +2261,8 @@ struct mac_iveiv_entry {
+@@ -2277,6 +2299,8 @@ struct mac_iveiv_entry {
  #define EEPROM_NIC_CONF1_INTERNAL_TX_ALC              FIELD16(0x2000)
  #define EEPROM_NIC_CONF1_BT_COEXIST           FIELD16(0x4000)
  #define EEPROM_NIC_CONF1_DAC_TEST             FIELD16(0x8000)
   * EEPROM frequency
 --- a/drivers/net/wireless/rt2x00/rt2x00.h
 +++ b/drivers/net/wireless/rt2x00/rt2x00.h
-@@ -740,6 +740,8 @@ enum rt2x00_capability_flags {
+@@ -741,6 +741,8 @@ enum rt2x00_capability_flags {
        CAPABILITY_DOUBLE_ANTENNA,
        CAPABILITY_BT_COEXIST,
        CAPABILITY_VCO_RECALIBRATION,