mac80211: update to backports-4.14-rc2
[openwrt/staging/lynxis.git] / package / kernel / mac80211 / patches / 600-05-rt2x00-rt2800lib-add-channel-configuration-function-.patch
index 266a3fba50b15e20ef1f04c7ce32a76ceec51c89..1d6e312037344ec1eb2aa091050b50907136c4ed 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -2709,6 +2709,211 @@ static void rt2800_config_channel_rf3053
+@@ -2713,6 +2713,211 @@ static void rt2800_config_channel_rf3053
        }
  }
  
@@ -50,7 +50,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +
 +      rt2800_rfcsr_write(rt2x00dev, 13, 0x12);
 +
-+      rt2800_rfcsr_read(rt2x00dev, 1, &rfcsr);
++      rfcsr = rt2800_rfcsr_read(rt2x00dev, 1);
 +      rt2x00_set_field8(&rfcsr, RFCSR1_RX0_PD, 0);
 +      rt2x00_set_field8(&rfcsr, RFCSR1_TX0_PD, 0);
 +      rt2x00_set_field8(&rfcsr, RFCSR1_RX1_PD, 0);
@@ -87,7 +87,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +
 +      rt2800_freq_cal_mode1(rt2x00dev);
 +
-+      rt2800_rfcsr_read(rt2x00dev, 30, &rfcsr);
++      rfcsr = rt2800_rfcsr_read(rt2x00dev, 30);
 +      if (!conf_is_ht40(conf))
 +              rfcsr &= ~(0x06);
 +      else
@@ -110,7 +110,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +              rt2800_rfcsr_write(rt2x00dev, 34, 0x20);
 +
 +      /* loopback RF_BS */
-+      rt2800_rfcsr_read(rt2x00dev, 36, &rfcsr);
++      rfcsr = rt2800_rfcsr_read(rt2x00dev, 36);
 +      if (rf->channel <= 14)
 +              rt2x00_set_field8(&rfcsr, RFCSR36_RF_BS, 1);
 +      else
@@ -158,13 +158,13 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +
 +      rt2800_rfcsr_write(rt2x00dev, 50, 0x86);
 +
-+      rt2800_rfcsr_read(rt2x00dev, 51, &rfcsr);
++      rfcsr = rt2800_rfcsr_read(rt2x00dev, 51);
 +      if (rf->channel <= 14)
 +              rt2800_rfcsr_write(rt2x00dev, 51, 0x75);
 +      else
 +              rt2800_rfcsr_write(rt2x00dev, 51, 0x51);
 +
-+      rt2800_rfcsr_read(rt2x00dev, 52, &rfcsr);
++      rfcsr = rt2800_rfcsr_read(rt2x00dev, 52);
 +      if (rf->channel <= 14)
 +              rt2800_rfcsr_write(rt2x00dev, 52, 0x45);
 +      else
@@ -194,25 +194,25 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +            ((info->default_power2 & 0xe0) >> 1);
 +      rt2800_bbp_write(rt2x00dev, 109, bbp);
 +
-+      rt2800_bbp_read(rt2x00dev, 110, &bbp);
++      bbp = rt2800_bbp_read(rt2x00dev, 110);
 +      bbp &= 0x0f;
 +      bbp |= (info->default_power3 & 0xe0) >> 1;
 +      rt2800_bbp_write(rt2x00dev, 110, bbp);
 +
-+      rt2800_rfcsr_read(rt2x00dev, 57, &rfcsr);
++      rfcsr = rt2800_rfcsr_read(rt2x00dev, 57);
 +      if (rf->channel <= 14)
 +              rt2800_rfcsr_write(rt2x00dev, 57, 0x6e);
 +      else
 +              rt2800_rfcsr_write(rt2x00dev, 57, 0x3e);
 +
 +      /* Enable RF tuning */
-+      rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr);
++      rfcsr = rt2800_rfcsr_read(rt2x00dev, 3);
 +      rt2x00_set_field8(&rfcsr, RFCSR3_VCOCAL_EN, 1);
 +      rt2800_rfcsr_write(rt2x00dev, 3, rfcsr);
 +
 +      udelay(2000);
 +
-+      rt2800_bbp_read(rt2x00dev, 49, &bbp);
++      bbp = rt2800_bbp_read(rt2x00dev, 49);
 +      /* clear update flag */
 +      rt2800_bbp_write(rt2x00dev, 49, bbp & 0xfe);
 +      rt2800_bbp_write(rt2x00dev, 49, bbp);
@@ -223,7 +223,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  #define POWER_BOUND           0x27
  #define POWER_BOUND_5G                0x2b
  
-@@ -3567,6 +3772,9 @@ static void rt2800_config_channel(struct
+@@ -3570,6 +3775,9 @@ static void rt2800_config_channel(struct
        case RF3322:
                rt2800_config_channel_rf3322(rt2x00dev, conf, rf, info);
                break;