mac80211: refresh patches
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 24 Aug 2019 15:16:05 +0000 (17:16 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 24 Aug 2019 21:23:31 +0000 (23:23 +0200)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
15 files changed:
package/kernel/mac80211/patches/rt2x00/011-rt2x00-clear-up-IV-s-on-key-removal.patch
package/kernel/mac80211/patches/rt2x00/015-rt2x00-do-not-set-IEEE80211_TX_STAT_AMPDU_NO_BACK-on-tx-status.patch
package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch
package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch
package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch
package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch
package/kernel/mac80211/patches/rt2x00/610-rt2x00-change-led-polarity-from-OF.patch
package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch
package/kernel/mac80211/patches/rt2x00/650-rt2x00-add-support-for-external-PA-on-MT7620.patch
package/kernel/mac80211/patches/rt2x00/982-rt2x00-add-rf-self-txdc-calibration.patch
package/kernel/mac80211/patches/rt2x00/983-rt2x00-add-r-calibration.patch
package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch
package/kernel/mac80211/patches/rt2x00/985-rt2x00-add-rxiq-calibration.patch
package/kernel/mac80211/patches/rt2x00/986-rt2x00-add-TX-LOFT-calibration.patch
package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch

index 06430b0ec9771309465fcc284aa9b56e14e6e3d4..7f3f139e9f8eed91ef7ff6424564cc1747d324d6 100644 (file)
@@ -25,11 +25,9 @@ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
  drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 19 ++++++++++++-------
  1 file changed, 12 insertions(+), 7 deletions(-)
 
-diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-index ecbe78b8027b..28e2de04834e 100644
 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -1654,13 +1654,18 @@ static void rt2800_config_wcid_attr_cipher(struct rt2x00_dev *rt2x00dev,
+@@ -1654,13 +1654,18 @@ static void rt2800_config_wcid_attr_ciph
  
        offset = MAC_IVEIV_ENTRY(key->hw_key_idx);
  
index 9ac115fd97721ad62bf8ba03920a69862a8f6682..a4497df4755216c72cb46cd0764ca5ce83b68564 100644 (file)
@@ -36,11 +36,9 @@ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
  drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 3 ---
  1 file changed, 3 deletions(-)
 
-diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-index 9d158237ac67..c3eab767bc21 100644
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -371,9 +371,6 @@ static void rt2x00lib_fill_tx_status(struct rt2x00_dev *rt2x00dev,
+@@ -371,9 +371,6 @@ static void rt2x00lib_fill_tx_status(str
                                  IEEE80211_TX_CTL_AMPDU;
                tx_info->status.ampdu_len = 1;
                tx_info->status.ampdu_ack_len = success ? 1 : 0;
index 964c243f9197661fe5690a10514cbf64683c6460..b388fb9e5d73a7494c9172cd89652735864676fd 100644 (file)
        DECLARE_KFIFO_PTR(txstatus_fifo, u32);
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1421,6 +1421,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
+@@ -1418,6 +1418,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
        INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
        INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
  
        /*
         * Let the driver probe the device to detect the capabilities.
         */
-@@ -1564,6 +1568,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
+@@ -1561,6 +1565,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
         * Free the driver data.
         */
        kfree(rt2x00dev->drv_data);
index 513b692a1de14cd36a27e75232208cf4caeeec89..8a885fad8653b0045122339245735ced2e87addd 100644 (file)
@@ -12,7 +12,7 @@
  #endif /* _RT2X00_PLATFORM_H */
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1015,6 +1015,22 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -1012,6 +1012,22 @@ static int rt2x00lib_probe_hw_modes(stru
        unsigned int num_rates;
        unsigned int i;
  
index f694b061d8e09277e5fe635efcadbb05c982d240..b5b2c6103797af2fe64fa36595b8bba86465e782 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -993,8 +993,13 @@ static void rt2x00lib_rate(struct ieee80
+@@ -990,8 +990,13 @@ static void rt2x00lib_rate(struct ieee80
  
  void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr)
  {
index 07f7d34941d2a3eb6027d4c60c3e75f5a5e757b8..ff8b2c947b0c8af8a6f3d10d147b9e3fc542eabf 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1019,6 +1019,16 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -1016,6 +1016,16 @@ static int rt2x00lib_probe_hw_modes(stru
        struct ieee80211_rate *rates;
        unsigned int num_rates;
        unsigned int i;
index 76a2d1c2caddc0a93ba68de7471168299501078c..93043dc61677dc7559667c063870ccb28c79c7f9 100644 (file)
@@ -8,7 +8,7 @@
  
  #include "rt2x00.h"
  #include "rt2800lib.h"
-@@ -9535,6 +9536,17 @@ static int rt2800_init_eeprom(struct rt2
+@@ -9540,6 +9541,17 @@ static int rt2800_init_eeprom(struct rt2
        rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
        rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
  
index aa2b25ba7f5da5a539978ff3770e4ac4444fdaa7..d909a2e6c62ff6da833f4240ff22a0bc78ca56e4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1359,7 +1359,7 @@ static inline void rt2x00lib_set_if_comb
+@@ -1356,7 +1356,7 @@ static inline void rt2x00lib_set_if_comb
         */
        if_limit = &rt2x00dev->if_limits_ap;
        if_limit->max = rt2x00dev->ops->max_ap_intf;
index 2d733a3180dcc8a1457e0f1f39a0e1e5200dde66..55c256a2f83ce91347643aef96459554c0131736 100644 (file)
@@ -30,7 +30,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
   * EEPROM LNA
 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -4360,6 +4360,45 @@ static void rt2800_config_channel(struct
+@@ -4365,6 +4365,45 @@ static void rt2800_config_channel(struct
                rt2800_iq_calibrate(rt2x00dev, rf->channel);
        }
  
@@ -76,7 +76,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
        bbp = rt2800_bbp_read(rt2x00dev, 4);
        rt2x00_set_field8(&bbp, BBP4_BANDWIDTH, 2 * conf_is_ht40(conf));
        rt2800_bbp_write(rt2x00dev, 4, bbp);
-@@ -9564,7 +9603,8 @@ static int rt2800_init_eeprom(struct rt2
+@@ -9569,7 +9608,8 @@ static int rt2800_init_eeprom(struct rt2
         */
        eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1);
  
@@ -86,7 +86,7 @@ Signed-off-by: Tomislav Po=C5=BEega <pozega.tomislav@gmail.com>
                if (rt2x00_get_field16(eeprom,
                    EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352))
                    __set_bit(CAPABILITY_EXTERNAL_PA_TX0,
-@@ -9575,6 +9615,18 @@ static int rt2800_init_eeprom(struct rt2
+@@ -9580,6 +9620,18 @@ static int rt2800_init_eeprom(struct rt2
                              &rt2x00dev->cap_flags);
        }
  
index e8e28eac0552b93f52351205170b0e5591c36afb..40d44b648c8b54887b772dcd4bc063a971e5c014 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -8426,6 +8426,58 @@ static void rt2800_init_rfcsr_5592(struc
+@@ -8431,6 +8431,58 @@ static void rt2800_init_rfcsr_5592(struc
        rt2800_led_open_drain_enable(rt2x00dev);
  }
  
@@ -59,7 +59,7 @@
  static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
                                       bool set_bw, bool is_ht40)
  {
-@@ -9033,6 +9085,7 @@ static void rt2800_init_rfcsr_6352(struc
+@@ -9038,6 +9090,7 @@ static void rt2800_init_rfcsr_6352(struc
        rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00);
        rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C);
  
index da4d9a39e3626a4df8fadec5d244092df73d1599..dd0ab2c4ecf831c052ecc626019f19832b8ffb54 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -8478,6 +8478,160 @@ void rt2800_rf_self_txdc_cal(struct rt2x
+@@ -8483,6 +8483,160 @@ void rt2800_rf_self_txdc_cal(struct rt2x
  }
  EXPORT_SYMBOL_GPL(rt2800_rf_self_txdc_cal);
  
  static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
                                       bool set_bw, bool is_ht40)
  {
-@@ -9085,6 +9239,7 @@ static void rt2800_init_rfcsr_6352(struc
+@@ -9090,6 +9244,7 @@ static void rt2800_init_rfcsr_6352(struc
        rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00);
        rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C);
  
index 1dd4746be95fa1054acf0a16c0e2c8a50c98a425..c4f184efc55ea0e98e8a6788f75bb882bc7f1f6e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -8632,6 +8632,71 @@ void rt2800_r_calibration(struct rt2x00_
+@@ -8637,6 +8637,71 @@ void rt2800_r_calibration(struct rt2x00_
  }
  EXPORT_SYMBOL_GPL(rt2800_r_calibration);
  
@@ -72,7 +72,7 @@
  static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
                                       bool set_bw, bool is_ht40)
  {
-@@ -9241,6 +9306,7 @@ static void rt2800_init_rfcsr_6352(struc
+@@ -9246,6 +9311,7 @@ static void rt2800_init_rfcsr_6352(struc
  
        rt2800_r_calibration(rt2x00dev);
        rt2800_rf_self_txdc_cal(rt2x00dev);
index e820d1c264680c94829dac8b3a74ef02883fd1ab..ca21f55beef37dd3eacf1f1e748b7dea3f2ee97a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -8697,6 +8697,386 @@ void rt2800_rxdcoc_calibration(struct rt
+@@ -8702,6 +8702,386 @@ void rt2800_rxdcoc_calibration(struct rt
  }
  EXPORT_SYMBOL_GPL(rt2800_rxdcoc_calibration);
  
  static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
                                       bool set_bw, bool is_ht40)
  {
-@@ -9309,6 +9689,7 @@ static void rt2800_init_rfcsr_6352(struc
+@@ -9314,6 +9694,7 @@ static void rt2800_init_rfcsr_6352(struc
        rt2800_rxdcoc_calibration(rt2x00dev);
        rt2800_bw_filter_calibration(rt2x00dev, true);
        rt2800_bw_filter_calibration(rt2x00dev, false);
index 7048a84dbc71ac26c583e90482a6920ace1f0f5d..89b49325de03685b01590491fb72847c1368bd71 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -9077,6 +9077,954 @@ restore_value:
+@@ -9082,6 +9082,954 @@ restore_value:
  }
  EXPORT_SYMBOL_GPL(rt2800_rxiq_calibration);
  
  static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev,
                                       bool set_bw, bool is_ht40)
  {
-@@ -9689,6 +10637,7 @@ static void rt2800_init_rfcsr_6352(struc
+@@ -9694,6 +10642,7 @@ static void rt2800_init_rfcsr_6352(struc
        rt2800_rxdcoc_calibration(rt2x00dev);
        rt2800_bw_filter_calibration(rt2x00dev, true);
        rt2800_bw_filter_calibration(rt2x00dev, false);
index e2fbdc6787fd65585a12143b6d7e5d4d6bbc0cab..b0c527a68c271bb3c3a0c889e7798d8d6236d20c 100644 (file)
@@ -67,14 +67,20 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        struct ieee80211_hdr *hdr;
 -      bool enc_tailroom;
 -      int tail_need = 0;
-+      int head_need, head_max;
-+      int tail_need, tail_max;
-+      bool enc_tailroom = false;
+-
 -      hdr = (struct ieee80211_hdr *) skb->data;
 -      enc_tailroom = may_encrypt &&
 -                     (sdata->crypto_tx_tailroom_needed_cnt ||
 -                      ieee80211_is_mgmt(hdr->frame_control));
+-
+-      if (enc_tailroom) {
+-              tail_need = IEEE80211_ENCRYPT_TAILROOM;
+-              tail_need -= skb_tailroom(skb);
+-              tail_need = max_t(int, tail_need, 0);
++      int head_need, head_max;
++      int tail_need, tail_max;
++      bool enc_tailroom = false;
++
 +      if (sdata && !hdr_len &&
 +          !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)) {
 +              hdr = (struct ieee80211_hdr *) skb->data;
@@ -82,11 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +                              ieee80211_is_mgmt(hdr->frame_control));
 +              hdr_len += sdata->encrypt_headroom;
 +      }
--      if (enc_tailroom) {
--              tail_need = IEEE80211_ENCRYPT_TAILROOM;
--              tail_need -= skb_tailroom(skb);
--              tail_need = max_t(int, tail_need, 0);
++
 +      head_need = head_max = hdr_len;
 +      tail_need = tail_max = 0;
 +      if (!sdata) {
@@ -129,13 +131,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -      bool may_encrypt;
 -
 -      may_encrypt = !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT);
--
 -      headroom = local->tx_headroom;
 -      if (may_encrypt)
 -              headroom += sdata->encrypt_headroom;
 -      headroom -= skb_headroom(skb);
 -      headroom = max_t(int, 0, headroom);
+-
 -      if (ieee80211_skb_resize(sdata, skb, headroom, may_encrypt)) {
 +      if (ieee80211_skb_resize(local, sdata, skb, 0, 0)) {
                ieee80211_free_txskb(&local->hw, skb);
@@ -146,7 +148,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        skb_pull(skb, skip_header_bytes);
 -      head_need = hdrlen + encaps_len + meshhdrlen - skb_headroom(skb);
--
++      head_need = hdrlen + encaps_len + meshhdrlen;
 -      /*
 -       * So we need to modify the skb header and hence need a copy of
 -       * that. The head_need variable above doesn't, so far, include
@@ -158,8 +161,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -       * the ever needed space. Also, if we need to reallocate it anyway,
 -       * make it big enough for everything we may ever need.
 -       */
-+      head_need = hdrlen + encaps_len + meshhdrlen;
+-
 -      if (head_need > 0 || skb_cloned(skb)) {
 -              head_need += sdata->encrypt_headroom;
 -              head_need += local->tx_headroom;