[PATCH] mac80211: Update to version 5.10.16-1
Hauke Mehrtens
hauke at hauke-m.de
Sun Feb 14 14:57:23 EST 2021
The removed patches were applied upstream.
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
The refreshed patches are looking strange, it reverts many changes from this commit:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=ed1e234d87fc2fc1561b02dcc2f67a464721fc6f
I refreshed the patches like this:
make package/mac80211/{clean,refresh} V=99
package/kernel/mac80211/Makefile | 6 +-
.../ath/080-ath10k_thermal_config.patch | 2 +-
..._hw-issue-external-reset-for-QCA955x.patch | 51 +++++++------
.../patches/ath/402-ath_regd_optional.patch | 2 +-
.../patches/ath/530-ath9k_extra_leds.patch | 12 +--
.../ath/551-ath9k_ubnt_uap_plus_hsr.patch | 2 +-
...rolling-support-for-various-chipsets.patch | 16 ++--
...62-brcmfmac-Disable-power-management.patch | 2 +-
.../mac80211/patches/brcm/998-survey.patch | 8 +-
.../patches/build/050-lib80211_option.patch | 4 +-
.../602-rt2x00-introduce-rt2x00eeprom.patch | 2 +-
...-differentiate-based-on-SoC-CHIP_VER.patch | 75 ++++++++++---------
...ave-survey-for-every-channel-visited.patch | 14 ++--
.../100-remove-cryptoapi-dependencies.patch | 10 +--
...ot-maintain-a-backlog-sorted-list-of.patch | 31 ++++----
...ryption-key-selection-for-802.3-xmit.patch | 53 -------------
...ac80211-fix-fast-rx-encryption-check.patch | 21 ------
...add-rx-decapsulation-offload-support.patch | 2 +-
...-a-mistake-check-for-rx_stats-update.patch | 28 -------
...drop-tx-nulldata-packets-on-encrypte.patch | 25 -------
...l_ht-improve-ampdu-length-estimation.patch | 6 +-
...l_ht-significantly-redesign-the-rate.patch | 16 ++--
...-station-rate-table-updates-on-assoc.patch | 38 ----------
.../500-mac80211_configure_antenna_gain.patch | 2 +-
24 files changed, 138 insertions(+), 290 deletions(-)
delete mode 100644 package/kernel/mac80211/patches/subsys/313-mac80211-fix-encryption-key-selection-for-802.3-xmit.patch
delete mode 100644 package/kernel/mac80211/patches/subsys/314-mac80211-fix-fast-rx-encryption-check.patch
delete mode 100644 package/kernel/mac80211/patches/subsys/316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch
delete mode 100644 package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch
delete mode 100644 package/kernel/mac80211/patches/subsys/353-mac80211-fix-station-rate-table-updates-on-assoc.patch
diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 06fe948fa2ad..f6ad06452f44 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
-PKG_VERSION:=5.10-rc6-1
+PKG_VERSION:=5.10.16-1
PKG_RELEASE:=1
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10-rc6/
-PKG_HASH:=24c1e84dc1e7bb52d4f67ce481c242f29212a4ceb7833af30e3c279a3f710832
+PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.16/
+PKG_HASH:=12856db780c5023edc47e2d18486eb3346bb7c82f1f2fc48deb3b163142f7d2d
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
diff --git a/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch b/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch
index 55d48daa7989..de6f9d9bb079 100644
--- a/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch
+++ b/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch
@@ -37,7 +37,7 @@
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
--- a/local-symbols
+++ b/local-symbols
-@@ -143,6 +143,7 @@ ATH10K_SNOC=
+@@ -142,6 +142,7 @@ ATH10K_SNOC=
ATH10K_DEBUG=
ATH10K_DEBUGFS=
ATH10K_SPECTRAL=
diff --git a/package/kernel/mac80211/patches/ath/351-ath9k_hw-issue-external-reset-for-QCA955x.patch b/package/kernel/mac80211/patches/ath/351-ath9k_hw-issue-external-reset-for-QCA955x.patch
index d3248f958b5f..5f265b84c26e 100644
--- a/package/kernel/mac80211/patches/ath/351-ath9k_hw-issue-external-reset-for-QCA955x.patch
+++ b/package/kernel/mac80211/patches/ath/351-ath9k_hw-issue-external-reset-for-QCA955x.patch
@@ -29,6 +29,21 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
- npend = ath9k_hw_numtxpending(ah, i);
- if (npend)
- break;
+- }
+-
+- if (ah->external_reset &&
+- (npend || type == ATH9K_RESET_COLD)) {
+- int reset_err = 0;
+-
+- ath_dbg(ath9k_hw_common(ah), RESET,
+- "reset MAC via external reset\n");
+-
+- reset_err = ah->external_reset();
+- if (reset_err) {
+- ath_err(ath9k_hw_common(ah),
+- "External reset failed, err=%d\n",
+- reset_err);
+- return false;
+ if (type == ATH9K_RESET_COLD)
+ return true;
+
@@ -44,47 +59,35 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
+ for (i = 0; i < AR_NUM_QCU; i++) {
+ if (ath9k_hw_numtxpending(ah, i))
+ return true;
-+ }
- }
-
-- if (ah->external_reset &&
-- (npend || type == ATH9K_RESET_COLD)) {
-- int reset_err = 0;
+ }
++ }
++
+ return false;
+}
-
-- ath_dbg(ath9k_hw_common(ah), RESET,
-- "reset MAC via external reset\n");
++
+static bool ath9k_hw_external_reset(struct ath_hw *ah, int type)
+{
+ int err;
-
-- reset_err = ah->external_reset();
-- if (reset_err) {
-- ath_err(ath9k_hw_common(ah),
-- "External reset failed, err=%d\n",
-- reset_err);
-- return false;
-- }
++
+ if (!ah->external_reset || !ath9k_hw_need_external_reset(ah, type))
+ return true;
-
-- REG_WRITE(ah, AR_RTC_RESET, 1);
++
+ ath_dbg(ath9k_hw_common(ah), RESET,
+ "reset MAC via external reset\n");
-+
+
+- REG_WRITE(ah, AR_RTC_RESET, 1);
+ err = ah->external_reset();
+ if (err) {
+ ath_err(ath9k_hw_common(ah),
+ "External reset failed, err=%d\n", err);
+ return false;
-+ }
-+
+ }
+
+ if (AR_SREV_9550(ah)) {
+ REG_WRITE(ah, AR_RTC_RESET, 0);
+ udelay(10);
- }
-
++ }
++
+ REG_WRITE(ah, AR_RTC_RESET, 1);
+ udelay(10);
+
diff --git a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch
index 3c9180b1137c..bf87d3551a18 100644
--- a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch
+++ b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch
@@ -82,7 +82,7 @@
help
--- a/local-symbols
+++ b/local-symbols
-@@ -86,6 +86,7 @@ ADM8211=
+@@ -85,6 +85,7 @@ ADM8211=
ATH_COMMON=
WLAN_VENDOR_ATH=
ATH_DEBUG=
diff --git a/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch
index 30b6bdc78ee9..1f194830642e 100644
--- a/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch
+++ b/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch
@@ -103,8 +103,7 @@
+ GFP_KERNEL);
+ if (!led)
+ return -ENOMEM;
-
-- ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
++
+ led->gpio = gpio = (struct gpio_led *) (led + 1);
+ _name = (char *) (led->gpio + 1);
+
@@ -117,7 +116,8 @@
+ ret = ath_add_led(sc, led);
+ if (unlikely(ret < 0))
+ kfree(led);
-+
+
+- ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
+ return ret;
}
@@ -125,11 +125,11 @@
{
- if (!sc->led_registered)
- return;
--
-- ath_led_brightness(&sc->led_cdev, LED_OFF);
-- led_classdev_unregister(&sc->led_cdev);
+ struct ath_led *led;
+- ath_led_brightness(&sc->led_cdev, LED_OFF);
+- led_classdev_unregister(&sc->led_cdev);
+-
- ath9k_hw_gpio_free(sc->sc_ah, sc->sc_ah->led_pin);
+ while (!list_empty(&sc->leds)) {
+ led = list_first_entry(&sc->leds, struct ath_led, list);
diff --git a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
index 96187be3d5fd..7e3e1236f788 100644
--- a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
+++ b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch
@@ -371,7 +371,7 @@
--- a/local-symbols
+++ b/local-symbols
-@@ -113,6 +113,7 @@ ATH9K_WOW=
+@@ -112,6 +112,7 @@ ATH9K_WOW=
ATH9K_RFKILL=
ATH9K_CHANNEL_CONTEXT=
ATH9K_PCOEM=
diff --git a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
index 511cf5922216..ab7cb669bb0f 100644
--- a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
+++ b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
@@ -114,7 +114,7 @@ v13:
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
--- a/local-symbols
+++ b/local-symbols
-@@ -146,6 +146,7 @@ ATH10K_DEBUG=
+@@ -145,6 +145,7 @@ ATH10K_DEBUG=
ATH10K_DEBUGFS=
ATH10K_SPECTRAL=
ATH10K_THERMAL=
@@ -456,7 +456,7 @@ v13:
{
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
-@@ -4583,6 +4583,8 @@ static const struct wmi_ops wmi_tlv_ops
+@@ -4585,6 +4585,8 @@ static const struct wmi_ops wmi_tlv_ops
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
@@ -467,7 +467,7 @@ v13:
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
-@@ -7463,6 +7463,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
+@@ -7468,6 +7468,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
return skb;
}
@@ -517,7 +517,7 @@ v13:
static struct sk_buff *
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
enum wmi_sta_ps_mode psmode)
-@@ -9151,6 +9194,9 @@ static const struct wmi_ops wmi_ops = {
+@@ -9156,6 +9199,9 @@ static const struct wmi_ops wmi_ops = {
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
.gen_echo = ath10k_wmi_op_gen_echo,
@@ -527,7 +527,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
-@@ -9221,6 +9267,8 @@ static const struct wmi_ops wmi_10_1_ops
+@@ -9226,6 +9272,8 @@ static const struct wmi_ops wmi_10_1_ops
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
.gen_echo = ath10k_wmi_op_gen_echo,
@@ -536,7 +536,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
-@@ -9293,6 +9341,8 @@ static const struct wmi_ops wmi_10_2_ops
+@@ -9298,6 +9346,8 @@ static const struct wmi_ops wmi_10_2_ops
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
@@ -545,7 +545,7 @@ v13:
/* .gen_pdev_enable_adaptive_cca not implemented */
};
-@@ -9364,6 +9414,8 @@ static const struct wmi_ops wmi_10_2_4_o
+@@ -9369,6 +9419,8 @@ static const struct wmi_ops wmi_10_2_4_o
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
@@ -554,7 +554,7 @@ v13:
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
-@@ -9445,6 +9497,8 @@ static const struct wmi_ops wmi_10_4_ops
+@@ -9450,6 +9502,8 @@ static const struct wmi_ops wmi_10_4_ops
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
.gen_echo = ath10k_wmi_op_gen_echo,
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
diff --git a/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch b/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch
index b5112bd68217..e640849e6ad4 100644
--- a/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch
+++ b/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch
@@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -2957,6 +2957,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
+@@ -2958,6 +2958,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
* preference in cfg struct to apply this to
* FW later while initializing the dongle
*/
diff --git a/package/kernel/mac80211/patches/brcm/998-survey.patch b/package/kernel/mac80211/patches/brcm/998-survey.patch
index cf70644e1d72..9e9f4bbf8fbb 100644
--- a/package/kernel/mac80211/patches/brcm/998-survey.patch
+++ b/package/kernel/mac80211/patches/brcm/998-survey.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -2909,6 +2909,63 @@ done:
+@@ -2910,6 +2910,63 @@ done:
}
static int
@@ -64,7 +64,7 @@
brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
int idx, u8 *mac, struct station_info *sinfo)
{
-@@ -3004,6 +3061,7 @@ static s32 brcmf_inform_single_bss(struc
+@@ -3005,6 +3062,7 @@ static s32 brcmf_inform_single_bss(struc
struct brcmu_chan ch;
u16 channel;
u32 freq;
@@ -72,7 +72,7 @@
u16 notify_capability;
u16 notify_interval;
u8 *notify_ie;
-@@ -3028,6 +3086,17 @@ static s32 brcmf_inform_single_bss(struc
+@@ -3029,6 +3087,17 @@ static s32 brcmf_inform_single_bss(struc
band = NL80211_BAND_5GHZ;
freq = ieee80211_channel_to_frequency(channel, band);
@@ -90,7 +90,7 @@
bss_data.chan = ieee80211_get_channel(wiphy, freq);
bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20;
bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime());
-@@ -5514,6 +5583,7 @@ static struct cfg80211_ops brcmf_cfg8021
+@@ -5515,6 +5584,7 @@ static struct cfg80211_ops brcmf_cfg8021
.leave_ibss = brcmf_cfg80211_leave_ibss,
.get_station = brcmf_cfg80211_get_station,
.dump_station = brcmf_cfg80211_dump_station,
diff --git a/package/kernel/mac80211/patches/build/050-lib80211_option.patch b/package/kernel/mac80211/patches/build/050-lib80211_option.patch
index b2465b0d7e19..c1b1bc757f2d 100644
--- a/package/kernel/mac80211/patches/build/050-lib80211_option.patch
+++ b/package/kernel/mac80211/patches/build/050-lib80211_option.patch
@@ -1,6 +1,6 @@
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
-@@ -187,7 +187,7 @@ config CFG80211_WEXT_EXPORT
+@@ -188,7 +188,7 @@ config CFG80211_WEXT_EXPORT
endif # CFG80211
config LIB80211
@@ -9,7 +9,7 @@
depends on m
default n
help
-@@ -197,19 +197,19 @@ config LIB80211
+@@ -198,19 +198,19 @@ config LIB80211
Drivers should select this themselves if needed.
config LIB80211_CRYPT_WEP
diff --git a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch
index 1c52132da65c..e74d9a9aa0d8 100644
--- a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch
+++ b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch
@@ -1,6 +1,6 @@
--- a/local-symbols
+++ b/local-symbols
-@@ -333,6 +333,7 @@ RT2X00_LIB_FIRMWARE=
+@@ -332,6 +332,7 @@ RT2X00_LIB_FIRMWARE=
RT2X00_LIB_CRYPTO=
RT2X00_LIB_LEDS=
RT2X00_LIB_DEBUGFS=
diff --git a/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch b/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch
index c82258c2b699..3de00b226787 100644
--- a/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch
+++ b/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch
@@ -22,15 +22,16 @@
- rfcsr = rt2800_rfcsr_read(rt2x00dev, 16);
- rt2x00_set_field8(&rfcsr, RFCSR16_SDM_MODE_MT7620, 0x80);
- rt2800_rfcsr_write(rt2x00dev, 16, rfcsr);
+-
+- rfcsr = rt2800_rfcsr_read(rt2x00dev, 21);
+- rt2x00_set_field8(&rfcsr, RFCSR21_BIT8, 1);
+- rt2800_rfcsr_write(rt2x00dev, 21, rfcsr);
+ if (rt2800_hw_get_chipver(rt2x00dev) > 1) {
+ /* Default: XO=20MHz , SDM mode */
+ rfcsr = rt2800_rfcsr_read(rt2x00dev, 16);
+ rt2x00_set_field8(&rfcsr, RFCSR16_SDM_MODE_MT7620, 0x80);
+ rt2800_rfcsr_write(rt2x00dev, 16, rfcsr);
-
-- rfcsr = rt2800_rfcsr_read(rt2x00dev, 21);
-- rt2x00_set_field8(&rfcsr, RFCSR21_BIT8, 1);
-- rt2800_rfcsr_write(rt2x00dev, 21, rfcsr);
++
+ rfcsr = rt2800_rfcsr_read(rt2x00dev, 21);
+ rt2x00_set_field8(&rfcsr, RFCSR21_BIT8, 1);
+ rt2800_rfcsr_write(rt2x00dev, 21, rfcsr);
@@ -216,6 +217,10 @@
- rt2800_rfcsr_write(rt2x00dev, 28, 0x61);
- rt2800_rfcsr_write(rt2x00dev, 29, 0xB5);
- rt2800_rfcsr_write(rt2x00dev, 43, 0x02);
+-
+- rt2800_rfcsr_write(rt2x00dev, 28, 0x62);
+- rt2800_rfcsr_write(rt2x00dev, 29, 0xAD);
+- rt2800_rfcsr_write(rt2x00dev, 39, 0x80);
+ if (rt2800_hw_get_chipver(rt2x00dev) > 1) {
+ rt2800_rfcsr_write(rt2x00dev, 11, 0x21);
+ if (rt2800_clk_is_20mhz(rt2x00dev))
@@ -239,10 +244,7 @@
+ rt2800_rfcsr_write(rt2x00dev, 29, 0xB5);
+ rt2800_rfcsr_write(rt2x00dev, 43, 0x02);
+ }
-
-- rt2800_rfcsr_write(rt2x00dev, 28, 0x62);
-- rt2800_rfcsr_write(rt2x00dev, 29, 0xAD);
-- rt2800_rfcsr_write(rt2x00dev, 39, 0x80);
++
+ if (rt2800_hw_get_chipver(rt2x00dev) > 1 &&
+ rt2800_hw_get_chipeco(rt2x00dev) >= 2) {
+ rt2800_rfcsr_write(rt2x00dev, 28, 0x62);
@@ -286,6 +288,33 @@
- rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B);
- rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xF7);
- rt2800_rfcsr_write_chanreg(rt2x00dev, 61, 0x09);
+-
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x51);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x06);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA7);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x2C);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x64);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 8, 0x51);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x36);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x53);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16);
+-
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x6C);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFC);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x1F);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 54, 0x27);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B);
+-
+- /* Initialize RF channel register for DRQFN */
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xD3);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xE3);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xE5);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x28);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x68);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xF7);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x02);
+- rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xC7);
+ if (rt2800_hw_get_chipver(rt2x00dev) > 1) {
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x47);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x71);
@@ -318,16 +347,7 @@
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xF7);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 61, 0x09);
+ }
-
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x51);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x06);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA7);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x2C);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x64);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 8, 0x51);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x36);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x53);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16);
++
+ if (rt2800_hw_get_chipver(rt2x00dev) > 1 &&
+ rt2800_hw_get_chipeco(rt2x00dev) >= 2) {
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x51);
@@ -339,13 +359,7 @@
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x36);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x53);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16);
-
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x6C);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFC);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x1F);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 54, 0x27);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B);
++
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x6C);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFC);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x1F);
@@ -353,16 +367,7 @@
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B);
+ }
-
-- /* Initialize RF channel register for DRQFN */
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xD3);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xE3);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xE5);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x28);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x68);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xF7);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x02);
-- rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xC7);
++
+ if (rt2800_hw_get_chippkg(rt2x00dev) == 0 &&
+ rt2800_hw_get_chipver(rt2x00dev) == 1) {
+ /* Initialize RF channel register for DRQFN */
diff --git a/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch b/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch
index 205c10b641d5..31a7baeee755 100644
--- a/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch
+++ b/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch
@@ -53,20 +53,22 @@
- idle = rt2800_register_read(rt2x00dev, CH_IDLE_STA);
- busy = rt2800_register_read(rt2x00dev, CH_BUSY_STA);
- busy_ext = rt2800_register_read(rt2x00dev, CH_BUSY_STA_SEC);
-+ survey->channel = &rt2x00dev->bands[band].channels[idx];
-
+-
- if (idle || busy) {
- survey->filled = SURVEY_INFO_TIME |
- SURVEY_INFO_TIME_BUSY |
- SURVEY_INFO_TIME_EXT_BUSY;
-+ survey->filled = SURVEY_INFO_TIME |
-+ SURVEY_INFO_TIME_BUSY |
-+ SURVEY_INFO_TIME_EXT_BUSY;
-
+-
- survey->time = (idle + busy) / 1000;
- survey->time_busy = busy / 1000;
- survey->time_ext_busy = busy_ext / 1000;
- }
++ survey->channel = &rt2x00dev->bands[band].channels[idx];
++
++ survey->filled = SURVEY_INFO_TIME |
++ SURVEY_INFO_TIME_BUSY |
++ SURVEY_INFO_TIME_EXT_BUSY;
++
+ survey->time = div_u64(chan_survey->time_idle + chan_survey->time_busy, 1000);
+ survey->time_busy = div_u64(chan_survey->time_busy, 1000);
+ survey->time_ext_busy = div_u64(chan_survey->time_ext_busy, 1000);
diff --git a/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch b/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch
index ac78e62ccce3..7b036e4e4c0f 100644
--- a/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch
+++ b/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch
@@ -166,7 +166,8 @@
#define AES_CCM_H
-#include "aead_api.h"
--
++#include <linux/crypto.h>
+
-#define CCM_AAD_LEN 32
-
-static inline struct crypto_aead *
@@ -194,8 +195,7 @@
- be16_to_cpup((__be16 *)aad),
- data, data_len, mic);
-}
-+#include <linux/crypto.h>
-
+-
-static inline void ieee80211_aes_key_free(struct crypto_aead *tfm)
-{
- return aead_key_free(tfm);
@@ -331,10 +331,10 @@
#define AES_GCM_H
-#include "aead_api.h"
--
--#define GCM_AAD_LEN 32
+#include <linux/crypto.h>
+-#define GCM_AAD_LEN 32
+-
-static inline int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm,
- u8 *j_0, u8 *aad, u8 *data,
- size_t data_len, u8 *mic)
diff --git a/package/kernel/mac80211/patches/subsys/312-net-fq_impl-do-not-maintain-a-backlog-sorted-list-of.patch b/package/kernel/mac80211/patches/subsys/312-net-fq_impl-do-not-maintain-a-backlog-sorted-list-of.patch
index 0e923991db65..08e5cbb5b904 100644
--- a/package/kernel/mac80211/patches/subsys/312-net-fq_impl-do-not-maintain-a-backlog-sorted-list-of.patch
+++ b/package/kernel/mac80211/patches/subsys/312-net-fq_impl-do-not-maintain-a-backlog-sorted-list-of.patch
@@ -133,34 +133,37 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
-static void fq_recalc_backlog(struct fq *fq,
- struct fq_tin *tin,
- struct fq_flow *flow)
-+static struct fq_flow *fq_find_fattest_flow(struct fq *fq)
- {
+-{
- struct fq_flow *i;
-+ struct fq_tin *tin;
-+ struct fq_flow *flow = NULL;
-+ u32 len = 0;
-+ int i;
-
+-
- if (list_empty(&flow->backlogchain))
- list_add_tail(&flow->backlogchain, &fq->backlogs);
-+ for_each_set_bit(i, fq->flows_bitmap, fq->flows_cnt) {
-+ struct fq_flow *cur = &fq->flows[i];
-+ unsigned int cur_len;
-
+-
- i = flow;
- list_for_each_entry_continue_reverse(i, &fq->backlogs,
- backlogchain)
- if (i->backlog > flow->backlog)
- break;
++static struct fq_flow *fq_find_fattest_flow(struct fq *fq)
++{
++ struct fq_tin *tin;
++ struct fq_flow *flow = NULL;
++ u32 len = 0;
++ int i;
++
++ for_each_set_bit(i, fq->flows_bitmap, fq->flows_cnt) {
++ struct fq_flow *cur = &fq->flows[i];
++ unsigned int cur_len;
++
+ cur_len = cur->backlog;
+ if (cur_len <= len)
+ continue;
-
-- list_move(&flow->backlogchain, &i->backlogchain);
++
+ flow = cur;
+ len = cur_len;
+ }
-+
+
+- list_move(&flow->backlogchain, &i->backlogchain);
+ list_for_each_entry(tin, &fq->tin_backlog, tin_list) {
+ unsigned int cur_len = tin->default_flow.backlog;
+
diff --git a/package/kernel/mac80211/patches/subsys/313-mac80211-fix-encryption-key-selection-for-802.3-xmit.patch b/package/kernel/mac80211/patches/subsys/313-mac80211-fix-encryption-key-selection-for-802.3-xmit.patch
deleted file mode 100644
index 5ae9ca8b933c..000000000000
--- a/package/kernel/mac80211/patches/subsys/313-mac80211-fix-encryption-key-selection-for-802.3-xmit.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Wed, 16 Dec 2020 21:23:24 +0100
-Subject: [PATCH] mac80211: fix encryption key selection for 802.3 xmit
-
-When using WEP, the default unicast key needs to be selected, instead of
-the STA PTK.
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/net/mac80211/tx.c
-+++ b/net/mac80211/tx.c
-@@ -4262,7 +4262,6 @@ netdev_tx_t ieee80211_subif_start_xmit_8
- struct ethhdr *ehdr = (struct ethhdr *)skb->data;
- struct ieee80211_key *key;
- struct sta_info *sta;
-- bool offload = true;
-
- if (unlikely(skb->len < ETH_HLEN)) {
- kfree_skb(skb);
-@@ -4278,18 +4277,22 @@ netdev_tx_t ieee80211_subif_start_xmit_8
-
- if (unlikely(IS_ERR_OR_NULL(sta) || !sta->uploaded ||
- !test_sta_flag(sta, WLAN_STA_AUTHORIZED) ||
-- sdata->control_port_protocol == ehdr->h_proto))
-- offload = false;
-- else if ((key = rcu_dereference(sta->ptk[sta->ptk_idx])) &&
-- (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) ||
-- key->conf.cipher == WLAN_CIPHER_SUITE_TKIP))
-- offload = false;
-+ sdata->control_port_protocol == ehdr->h_proto))
-+ goto skip_offload;
-
-- if (offload)
-- ieee80211_8023_xmit(sdata, dev, sta, key, skb);
-- else
-- ieee80211_subif_start_xmit(skb, dev);
-+ key = rcu_dereference(sta->ptk[sta->ptk_idx]);
-+ if (!key)
-+ key = rcu_dereference(sdata->default_unicast_key);
-+
-+ if (key && (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) ||
-+ key->conf.cipher == WLAN_CIPHER_SUITE_TKIP))
-+ goto skip_offload;
-+
-+ ieee80211_8023_xmit(sdata, dev, sta, key, skb);
-+ goto out;
-
-+skip_offload:
-+ ieee80211_subif_start_xmit(skb, dev);
- out:
- rcu_read_unlock();
-
diff --git a/package/kernel/mac80211/patches/subsys/314-mac80211-fix-fast-rx-encryption-check.patch b/package/kernel/mac80211/patches/subsys/314-mac80211-fix-fast-rx-encryption-check.patch
deleted file mode 100644
index 679960b83c61..000000000000
--- a/package/kernel/mac80211/patches/subsys/314-mac80211-fix-fast-rx-encryption-check.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Wed, 16 Dec 2020 21:24:19 +0100
-Subject: [PATCH] mac80211: fix fast-rx encryption check
-
-When using WEP, the default unicast key needs to be selected, instead of
-the STA PTK.
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/net/mac80211/rx.c
-+++ b/net/mac80211/rx.c
-@@ -4195,6 +4195,8 @@ void ieee80211_check_fast_rx(struct sta_
-
- rcu_read_lock();
- key = rcu_dereference(sta->ptk[sta->ptk_idx]);
-+ if (!key)
-+ key = rcu_dereference(sdata->default_unicast_key);
- if (key) {
- switch (key->conf.cipher) {
- case WLAN_CIPHER_SUITE_TKIP:
diff --git a/package/kernel/mac80211/patches/subsys/315-mac80211-add-rx-decapsulation-offload-support.patch b/package/kernel/mac80211/patches/subsys/315-mac80211-add-rx-decapsulation-offload-support.patch
index 6f7c7bd74a1d..02486372e968 100644
--- a/package/kernel/mac80211/patches/subsys/315-mac80211-add-rx-decapsulation-offload-support.patch
+++ b/package/kernel/mac80211/patches/subsys/315-mac80211-add-rx-decapsulation-offload-support.patch
@@ -89,7 +89,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
/**
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
-@@ -409,6 +409,7 @@ static const char *hw_flag_names[] = {
+@@ -405,6 +405,7 @@ static const char *hw_flag_names[] = {
FLAG(SUPPORTS_ONLY_HE_MULTI_BSSID),
FLAG(AMPDU_KEYBORDER_SUPPORT),
FLAG(SUPPORTS_TX_ENCAP_OFFLOAD),
diff --git a/package/kernel/mac80211/patches/subsys/316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch b/package/kernel/mac80211/patches/subsys/316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch
deleted file mode 100644
index 91a602bd27a5..000000000000
--- a/package/kernel/mac80211/patches/subsys/316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Wen Gong <wgong at codeaurora.org>
-Date: Wed, 9 Dec 2020 11:06:29 +0800
-Subject: [PATCH] mac80211: fix a mistake check for rx_stats update
-
-It should be !is_multicast_ether_addr() in ieee80211_rx_h_sta_process()
-for the rx_stats update, below commit remove the !, this patch is to
-change it back.
-
-It lead the rx rate "iw wlan0 station dump" become invalid for some
-scenario when IEEE80211_HW_USES_RSS is set.
-
-Fixes: 09a740ce352e ("mac80211: receive and process S1G beacons")
-Signed-off-by: Wen Gong <wgong at codeaurora.org>
-Link: https://lore.kernel.org/r/1607483189-3891-1-git-send-email-wgong@codeaurora.org
-Signed-off-by: Johannes Berg <johannes.berg at intel.com>
----
-
---- a/net/mac80211/rx.c
-+++ b/net/mac80211/rx.c
-@@ -1758,7 +1758,7 @@ ieee80211_rx_h_sta_process(struct ieee80
- } else if (rx->sdata->vif.type == NL80211_IFTYPE_OCB) {
- sta->rx_stats.last_rx = jiffies;
- } else if (!ieee80211_is_s1g_beacon(hdr->frame_control) &&
-- is_multicast_ether_addr(hdr->addr1)) {
-+ !is_multicast_ether_addr(hdr->addr1)) {
- /*
- * Mesh beacons will update last_rx when if they are found to
- * match the current local configuration when processed.
diff --git a/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch b/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch
deleted file mode 100644
index d05217d1f8bc..000000000000
--- a/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Fri, 18 Dec 2020 20:08:06 +0100
-Subject: [PATCH] mac80211: do not drop tx nulldata packets on encrypted links
-
-ieee80211_tx_h_select_key drops any non-mgmt packets without a key when
-encryption is used. This is wrong for nulldata packets that can't be
-encrypted and are sent out for probing clients and indicating 4-address
-mode.
-
-Reported-by: Sebastian Gottschall <s.gottschall at dd-wrt.com>
-Fixes: a0761a301746 ("mac80211: drop data frames without key on encrypted links")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/net/mac80211/tx.c
-+++ b/net/mac80211/tx.c
-@@ -662,7 +662,7 @@ ieee80211_tx_h_select_key(struct ieee802
- if (!skip_hw && tx->key &&
- tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
- info->control.hw_key = &tx->key->conf;
-- } else if (!ieee80211_is_mgmt(hdr->frame_control) && tx->sta &&
-+ } else if (ieee80211_is_data_present(hdr->frame_control) && tx->sta &&
- test_sta_flag(tx->sta, WLAN_STA_USES_ENCRYPTION)) {
- return TX_DROP;
- }
diff --git a/package/kernel/mac80211/patches/subsys/341-mac80211-minstrel_ht-improve-ampdu-length-estimation.patch b/package/kernel/mac80211/patches/subsys/341-mac80211-minstrel_ht-improve-ampdu-length-estimation.patch
index f450ca9ca93e..a8e6e8995449 100644
--- a/package/kernel/mac80211/patches/subsys/341-mac80211-minstrel_ht-improve-ampdu-length-estimation.patch
+++ b/package/kernel/mac80211/patches/subsys/341-mac80211-minstrel_ht-improve-ampdu-length-estimation.patch
@@ -27,8 +27,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
- if (!mi->avg_ampdu_len)
- return AVG_AMPDU_SIZE;
+ int duration;
-
-- return MINSTREL_TRUNC(mi->avg_ampdu_len);
++
+ if (mi->avg_ampdu_len)
+ return MINSTREL_TRUNC(mi->avg_ampdu_len);
+
@@ -36,7 +35,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
+ return 1;
+
+ duration = minstrel_get_duration(mi->max_tp_rate[0]);
-+
+
+- return MINSTREL_TRUNC(mi->avg_ampdu_len);
+ if (duration > 400 * 1000)
+ return 2;
+
diff --git a/package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch b/package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch
index 7af13661a871..09f6fd221444 100644
--- a/package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch
+++ b/package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch
@@ -179,14 +179,14 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
+ if (!rate)
return;
- }
-
+-
- i = 0;
- if (n_rates > 1) {
- random = prandom_u32();
- i = random % n_rates;
- }
- probe_rate = rates[i];
--
+
-out:
- mi->sample_rate = probe_rate;
+ mi->sample_rate = rate;
@@ -584,13 +584,13 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
-
- if (!(mi->supported[sample_group] & BIT(sample_idx)))
- return -1;
--
++ u8 seq;
+
- mrs = &mg->rates[sample_idx];
- sample_idx += MI_RATE(sample_group, 0);
-
- tp_rate1 = mi->max_tp_rate[0];
-+ u8 seq;
-
+-
- /* Set tp_rate2 to the second highest max_tp_rate */
- if (minstrel_get_duration(mi->max_tp_rate[0]) >
- minstrel_get_duration(mi->max_tp_rate[1])) {
@@ -673,8 +673,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
- else
- sample_idx = minstrel_get_sample_rate(mp, mi);
+ return;
-
-- if (sample_idx < 0)
++
+ if (mp->hw->max_rates == 1 && mp->sample_switch &&
+ (mi->total_packets_cur >= SAMPLE_SWITCH_THR ||
+ mp->sample_switch == 1))
@@ -682,7 +681,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
+
+ if (time_is_before_jiffies(mi->sample_time))
+ return;
-+
+
+- if (sample_idx < 0)
+ mi->sample_time = jiffies + MINSTREL_SAMPLE_INTERVAL;
+ sample_idx = minstrel_ht_get_sample_rate(mp, mi);
+ if (!sample_idx)
diff --git a/package/kernel/mac80211/patches/subsys/353-mac80211-fix-station-rate-table-updates-on-assoc.patch b/package/kernel/mac80211/patches/subsys/353-mac80211-fix-station-rate-table-updates-on-assoc.patch
deleted file mode 100644
index 7df24fa4bdc3..000000000000
--- a/package/kernel/mac80211/patches/subsys/353-mac80211-fix-station-rate-table-updates-on-assoc.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Mon, 1 Feb 2021 00:59:14 +0100
-Subject: [PATCH] mac80211: fix station rate table updates on assoc
-
-If the driver uses .sta_add, station entries are only uploaded after the sta
-is in assoc state. Fix early station rate table updates by deferring them
-until the sta has been uploaded
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/net/mac80211/driver-ops.c
-+++ b/net/mac80211/driver-ops.c
-@@ -125,8 +125,11 @@ int drv_sta_state(struct ieee80211_local
- } else if (old_state == IEEE80211_STA_AUTH &&
- new_state == IEEE80211_STA_ASSOC) {
- ret = drv_sta_add(local, sdata, &sta->sta);
-- if (ret == 0)
-+ if (ret == 0) {
- sta->uploaded = true;
-+ if (rcu_dereference(sta->sta.rates))
-+ drv_sta_rate_tbl_update(local, sdata, &sta->sta);
-+ }
- } else if (old_state == IEEE80211_STA_ASSOC &&
- new_state == IEEE80211_STA_AUTH) {
- drv_sta_remove(local, sdata, &sta->sta);
---- a/net/mac80211/rate.c
-+++ b/net/mac80211/rate.c
-@@ -960,7 +960,8 @@ int rate_control_set_rates(struct ieee80
- if (old)
- kfree_rcu(old, rcu_head);
-
-- drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta);
-+ if (sta->uploaded)
-+ drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta);
-
- ieee80211_sta_set_expected_throughput(pubsta, sta_get_expected_throughput(sta));
-
diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch
index 48c70f8db2f2..7cd0417363c3 100644
--- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch
+++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch
@@ -87,7 +87,7 @@
CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -1400,6 +1400,7 @@ struct ieee80211_local {
+@@ -1401,6 +1401,7 @@ struct ieee80211_local {
int dynamic_ps_forced_timeout;
int user_power_level; /* in dBm, for all interfaces */
--
2.20.1
More information about the openwrt-devel
mailing list