Merge "[Change and sync linux version from OpenWRT]"
diff --git a/recipes-kernel/linux-mac80211/files/patches/build/060-no_local_ssb_bcma.patch b/recipes-kernel/linux-mac80211/files/patches/build/060-no_local_ssb_bcma.patch
index 3967d73..19a60d7 100644
--- a/recipes-kernel/linux-mac80211/files/patches/build/060-no_local_ssb_bcma.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/build/060-no_local_ssb_bcma.patch
@@ -1,6 +1,6 @@
--- a/local-symbols
+++ b/local-symbols
-@@ -421,43 +421,6 @@ USB_VL600=
+@@ -428,43 +428,6 @@ USB_VL600=
USB_NET_CH9200=
USB_NET_AQC111=
USB_RTL8153_ECM=
@@ -192,7 +192,7 @@
select BRCMUTIL
--- a/Kconfig.local
+++ b/Kconfig.local
-@@ -1267,117 +1267,6 @@ config BACKPORTED_USB_NET_AQC111
+@@ -1288,117 +1288,6 @@ config BACKPORTED_USB_NET_AQC111
config BACKPORTED_USB_RTL8153_ECM
tristate
default USB_RTL8153_ECM
@@ -312,7 +312,7 @@
default USB_ACM
--- a/Kconfig.sources
+++ b/Kconfig.sources
-@@ -7,9 +7,6 @@ source "$BACKPORT_DIR/net/mac80211/Kconf
+@@ -9,9 +9,6 @@ source "$BACKPORT_DIR/drivers/bus/mhi/Kc
source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
@@ -324,9 +324,9 @@
source "$BACKPORT_DIR/drivers/staging/Kconfig"
--- a/Makefile.kernel
+++ b/Makefile.kernel
-@@ -40,8 +40,6 @@ obj-y += compat/
- obj-$(CPTCFG_CFG80211) += net/wireless/
- obj-$(CPTCFG_MAC80211) += net/mac80211/
+@@ -42,8 +42,6 @@ obj-$(CPTCFG_MAC80211) += net/mac80211/
+ obj-$(CPTCFG_QRTR) += net/qrtr/
+ obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
obj-$(CPTCFG_WLAN) += drivers/net/wireless/
-obj-$(CPTCFG_SSB) += drivers/ssb/
-obj-$(CPTCFG_BCMA) += drivers/bcma/
diff --git a/recipes-kernel/linux-mac80211/files/patches/build/070-headers-fix-lockdep_assert_not_held.patch b/recipes-kernel/linux-mac80211/files/patches/build/070-headers-fix-lockdep_assert_not_held.patch
deleted file mode 100644
index d946efa..0000000
--- a/recipes-kernel/linux-mac80211/files/patches/build/070-headers-fix-lockdep_assert_not_held.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
-Date: Fri, 11 Mar 2022 18:21:04 +0100
-Subject: [PATCH] headers: fix lockdep_assert_not_held()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-LOCK_STATE_HELD define was omitted during backport of
-lockdep_assert_not_held() which leads to build failures of kernels with
-CONFIG_LOCKDEP=y:
-
- backports-5.15.8-1/backport-include/linux/lockdep.h:16:47: error: 'LOCK_STATE_HELD' undeclared (first use in this function)
-
-Fix it by adding missing LOCK_STATE_HELD define.
-
-References: https://github.com/openwrt/openwrt/pull/9373
-References: https://lore.kernel.org/backports/20220311194800.452-1-ynezz@true.cz/T/#u
-Fixes: af58b27b1b1a ("headers: Add lockdep_assert_not_held()")
-Reported-by: Oskari Rauta <oskari.rauta@gmail.com>
-Signed-off-by: Petr Štetiar <ynezz@true.cz>
----
- backport-include/linux/lockdep.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/backport-include/linux/lockdep.h b/backport-include/linux/lockdep.h
-index ed5ea67894e4..842e24b7ff8f 100644
---- a/backport-include/linux/lockdep.h
-+++ b/backport-include/linux/lockdep.h
-@@ -11,6 +11,9 @@ struct lockdep_map { };
-
- #ifndef lockdep_assert_not_held
- #ifdef CONFIG_LOCKDEP
-+#ifndef LOCK_STATE_HELD
-+#define LOCK_STATE_HELD 1
-+#endif /* LOCK_STATE_HELD */
- #define lockdep_assert_not_held(l) do { \
- WARN_ON(debug_locks && \
- lockdep_is_held(l) == LOCK_STATE_HELD); \
diff --git a/recipes-kernel/linux-mac80211/files/patches/build/build.inc b/recipes-kernel/linux-mac80211/files/patches/build/build.inc
index 7653c70..74229d1 100644
--- a/recipes-kernel/linux-mac80211/files/patches/build/build.inc
+++ b/recipes-kernel/linux-mac80211/files/patches/build/build.inc
@@ -8,5 +8,4 @@
file://015-ipw200-mtu.patch \
file://050-lib80211_option.patch \
file://060-no_local_ssb_bcma.patch \
- file://070-headers-fix-lockdep_assert_not_held.patch \
"
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch
index 638da14..5307fd3 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch
@@ -2,7 +2,7 @@
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -1316,7 +1316,6 @@ static int ieee80211_stop_ap(struct wiph
+@@ -1319,7 +1319,6 @@ static int ieee80211_stop_ap(struct wiph
sdata->vif.bss_conf.ftmr_params = NULL;
__sta_info_flush(sdata, true);
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/150-disable_addr_notifier.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/150-disable_addr_notifier.patch
index e93efa4..2dc6ab3 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/150-disable_addr_notifier.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/150-disable_addr_notifier.patch
@@ -18,7 +18,7 @@
static int ieee80211_ifa6_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
-@@ -1324,14 +1324,14 @@ int ieee80211_register_hw(struct ieee802
+@@ -1321,14 +1321,14 @@ int ieee80211_register_hw(struct ieee802
wiphy_unlock(hw->wiphy);
rtnl_unlock();
@@ -35,7 +35,7 @@
local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
result = register_inet6addr_notifier(&local->ifa6_notifier);
if (result)
-@@ -1340,13 +1340,13 @@ int ieee80211_register_hw(struct ieee802
+@@ -1337,13 +1337,13 @@ int ieee80211_register_hw(struct ieee802
return 0;
@@ -52,7 +52,7 @@
fail_ifa:
#endif
wiphy_unregister(local->hw.wiphy);
-@@ -1374,10 +1374,10 @@ void ieee80211_unregister_hw(struct ieee
+@@ -1371,10 +1371,10 @@ void ieee80211_unregister_hw(struct ieee
tasklet_kill(&local->tx_pending_tasklet);
tasklet_kill(&local->tasklet);
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/300-mac80211-fix-rate-control-for-retransmitted-frames.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/300-mac80211-fix-rate-control-for-retransmitted-frames.patch
deleted file mode 100644
index 98dfe88..0000000
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/300-mac80211-fix-rate-control-for-retransmitted-frames.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Mon, 22 Nov 2021 21:39:38 +0100
-Subject: [PATCH] mac80211: fix rate control for retransmitted frames
-
-Since retransmission clears info->control, rate control needs to be called
-again, otherwise the driver might crash due to invalid rates.
-
-Cc: stable@vger.kernel.org # 5.14+
-Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
-Reported-by: Robert W <rwbugreport@lost-in-the-void.net>
-Fixes: 03c3911d2d67 ("mac80211: call ieee80211_tx_h_rate_ctrl() when dequeue")
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/net/mac80211/tx.c
-+++ b/net/mac80211/tx.c
-@@ -1821,15 +1821,15 @@ static int invoke_tx_handlers_late(struc
- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
- ieee80211_tx_result res = TX_CONTINUE;
-
-+ if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
-+ CALL_TXH(ieee80211_tx_h_rate_ctrl);
-+
- if (unlikely(info->flags & IEEE80211_TX_INTFL_RETRANSMISSION)) {
- __skb_queue_tail(&tx->skbs, tx->skb);
- tx->skb = NULL;
- goto txh_done;
- }
-
-- if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
-- CALL_TXH(ieee80211_tx_h_rate_ctrl);
--
- CALL_TXH(ieee80211_tx_h_michael_mic_add);
- CALL_TXH(ieee80211_tx_h_sequence);
- CALL_TXH(ieee80211_tx_h_fragment);
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/302-mac80211-fix-regression-in-SSN-handling-of-addba-tx.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/302-mac80211-fix-regression-in-SSN-handling-of-addba-tx.patch
deleted file mode 100644
index dc8afb9..0000000
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/302-mac80211-fix-regression-in-SSN-handling-of-addba-tx.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Wed, 24 Nov 2021 10:30:41 +0100
-Subject: [PATCH] mac80211: fix regression in SSN handling of addba tx
-
-Some drivers that do their own sequence number allocation (e.g. ath9k) rely
-on being able to modify params->ssn on starting tx ampdu sessions.
-This was broken by a change that modified it to use sta->tid_seq[tid] instead.
-
-Cc: stable@vger.kernel.org
-Fixes: 31d8bb4e07f8 ("mac80211: agg-tx: refactor sending addba")
-Reported-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/net/mac80211/agg-tx.c
-+++ b/net/mac80211/agg-tx.c
-@@ -480,8 +480,7 @@ static void ieee80211_send_addba_with_ti
-
- /* send AddBA request */
- ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
-- tid_tx->dialog_token,
-- sta->tid_seq[tid] >> 4,
-+ tid_tx->dialog_token, tid_tx->ssn,
- buf_size, tid_tx->timeout);
-
- WARN_ON(test_and_set_bit(HT_AGG_STATE_SENT_ADDBA, &tid_tx->state));
-@@ -523,6 +522,7 @@ void ieee80211_tx_ba_session_handle_star
-
- params.ssn = sta->tid_seq[tid] >> 4;
- ret = drv_ampdu_action(local, sdata, ¶ms);
-+ tid_tx->ssn = params.ssn;
- if (ret == IEEE80211_AMPDU_TX_START_DELAY_ADDBA) {
- return;
- } else if (ret == IEEE80211_AMPDU_TX_START_IMMEDIATE) {
---- a/net/mac80211/sta_info.h
-+++ b/net/mac80211/sta_info.h
-@@ -199,6 +199,7 @@ struct tid_ampdu_tx {
- u8 stop_initiator;
- bool tx_stop;
- u16 buf_size;
-+ u16 ssn;
-
- u16 failed_bar_ssn;
- bool bar_pending;
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/303-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/303-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch
index 1ceb2be..777c93c 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/303-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/303-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch
@@ -52,7 +52,7 @@
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2948,6 +2948,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
+@@ -2949,6 +2949,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
if (!fwd_skb)
goto out;
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/304-mac80211-send-ADDBA-requests-using-the-tid-queue-of-.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/304-mac80211-send-ADDBA-requests-using-the-tid-queue-of-.patch
deleted file mode 100644
index 1c21328..0000000
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/304-mac80211-send-ADDBA-requests-using-the-tid-queue-of-.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Thu, 2 Dec 2021 13:30:05 +0100
-Subject: [PATCH] mac80211: send ADDBA requests using the tid/queue of the
- aggregation session
-
-Sending them out on a different queue can cause a race condition where a
-number of packets in the queue may be discarded by the receiver, because
-the ADDBA request is sent too early.
-This affects any driver with software A-MPDU setup which does not allocate
-packet seqno in hardware on tx, regardless of whether iTXQ is used or not.
-The only driver I've seen that explicitly deals with this issue internally
-is mwl8k.
-
-Cc: stable@vger.kernel.org
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/net/mac80211/agg-tx.c
-+++ b/net/mac80211/agg-tx.c
-@@ -106,7 +106,7 @@ static void ieee80211_send_addba_request
- mgmt->u.action.u.addba_req.start_seq_num =
- cpu_to_le16(start_seq_num << 4);
-
-- ieee80211_tx_skb(sdata, skb);
-+ ieee80211_tx_skb_tid(sdata, skb, tid);
- }
-
- void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/305-mac80211-agg-tx-don-t-schedule_and_wake_txq-under-st.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/305-mac80211-agg-tx-don-t-schedule_and_wake_txq-under-st.patch
deleted file mode 100644
index 008ee49..0000000
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/305-mac80211-agg-tx-don-t-schedule_and_wake_txq-under-st.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From: Johannes Berg <johannes.berg@intel.com>
-Date: Mon, 29 Nov 2021 15:32:47 +0200
-Subject: [PATCH] mac80211: agg-tx: don't schedule_and_wake_txq() under
- sta->lock
-
-When we call ieee80211_agg_start_txq(), that will in turn call
-schedule_and_wake_txq(). Called from ieee80211_stop_tx_ba_cb()
-this is done under sta->lock, which leads to certain circular
-lock dependencies, as reported by Chris Murphy:
-https://lore.kernel.org/r/CAJCQCtSXJ5qA4bqSPY=oLRMbv-irihVvP7A2uGutEbXQVkoNaw@mail.gmail.com
-
-In general, ieee80211_agg_start_txq() is usually not called
-with sta->lock held, only in this one place. But it's always
-called with sta->ampdu_mlme.mtx held, and that's therefore
-clearly sufficient.
-
-Change ieee80211_stop_tx_ba_cb() to also call it without the
-sta->lock held, by factoring it out of ieee80211_remove_tid_tx()
-(which is only called in this one place).
-
-This breaks the locking chain and makes it less likely that
-we'll have similar locking chain problems in the future.
-
-Reported-by: Chris Murphy <lists@colorremedies.com>
-Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
----
-
---- a/net/mac80211/agg-tx.c
-+++ b/net/mac80211/agg-tx.c
-@@ -9,7 +9,7 @@
- * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
- * Copyright 2007-2010, Intel Corporation
- * Copyright(c) 2015-2017 Intel Deutschland GmbH
-- * Copyright (C) 2018 - 2020 Intel Corporation
-+ * Copyright (C) 2018 - 2021 Intel Corporation
- */
-
- #include <linux/ieee80211.h>
-@@ -213,6 +213,8 @@ ieee80211_agg_start_txq(struct sta_info
- struct ieee80211_txq *txq = sta->sta.txq[tid];
- struct txq_info *txqi;
-
-+ lockdep_assert_held(&sta->ampdu_mlme.mtx);
-+
- if (!txq)
- return;
-
-@@ -290,7 +292,6 @@ static void ieee80211_remove_tid_tx(stru
- ieee80211_assign_tid_tx(sta, tid, NULL);
-
- ieee80211_agg_splice_finish(sta->sdata, tid);
-- ieee80211_agg_start_txq(sta, tid, false);
-
- kfree_rcu(tid_tx, rcu_head);
- }
-@@ -889,6 +890,7 @@ void ieee80211_stop_tx_ba_cb(struct sta_
- {
- struct ieee80211_sub_if_data *sdata = sta->sdata;
- bool send_delba = false;
-+ bool start_txq = false;
-
- ht_dbg(sdata, "Stopping Tx BA session for %pM tid %d\n",
- sta->sta.addr, tid);
-@@ -906,10 +908,14 @@ void ieee80211_stop_tx_ba_cb(struct sta_
- send_delba = true;
-
- ieee80211_remove_tid_tx(sta, tid);
-+ start_txq = true;
-
- unlock_sta:
- spin_unlock_bh(&sta->lock);
-
-+ if (start_txq)
-+ ieee80211_agg_start_txq(sta, tid, false);
-+
- if (send_delba)
- ieee80211_send_delba(sdata, sta->sta.addr, tid,
- WLAN_BACK_INITIATOR, WLAN_REASON_QSTA_NOT_USE);
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/307-mac80211_hwsim-make-6-GHz-channels-usable.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/307-mac80211_hwsim-make-6-GHz-channels-usable.patch
index 9c7417e..c534d15 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/307-mac80211_hwsim-make-6-GHz-channels-usable.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/307-mac80211_hwsim-make-6-GHz-channels-usable.patch
@@ -11,7 +11,7 @@
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -2992,15 +2992,19 @@ static void mac80211_hwsim_he_capab(stru
+@@ -3001,15 +3001,19 @@ static void mac80211_hwsim_he_capab(stru
{
u16 n_iftype_data;
@@ -34,7 +34,7 @@
return;
}
-@@ -3290,6 +3294,12 @@ static int mac80211_hwsim_new_radio(stru
+@@ -3299,6 +3303,12 @@ static int mac80211_hwsim_new_radio(stru
sband->vht_cap.vht_mcs.tx_mcs_map =
sband->vht_cap.vht_mcs.rx_mcs_map;
break;
@@ -47,7 +47,7 @@
case NL80211_BAND_S1GHZ:
memcpy(&sband->s1g_cap, &hwsim_s1g_cap,
sizeof(sband->s1g_cap));
-@@ -3300,6 +3310,13 @@ static int mac80211_hwsim_new_radio(stru
+@@ -3309,6 +3319,13 @@ static int mac80211_hwsim_new_radio(stru
continue;
}
@@ -61,7 +61,7 @@
sband->ht_cap.ht_supported = true;
sband->ht_cap.cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
IEEE80211_HT_CAP_GRN_FLD |
-@@ -3313,10 +3330,6 @@ static int mac80211_hwsim_new_radio(stru
+@@ -3322,10 +3339,6 @@ static int mac80211_hwsim_new_radio(stru
sband->ht_cap.mcs.rx_mask[0] = 0xff;
sband->ht_cap.mcs.rx_mask[1] = 0xff;
sband->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/308-mac80211-add-support-for-.ndo_fill_forward_path.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/308-mac80211-add-support-for-.ndo_fill_forward_path.patch
index 2f3c1a2..272d84f 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/308-mac80211-add-support-for-.ndo_fill_forward_path.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/308-mac80211-add-support-for-.ndo_fill_forward_path.patch
@@ -38,10 +38,10 @@
/**
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
-@@ -1483,4 +1483,28 @@ static inline void drv_twt_teardown_requ
+@@ -1486,4 +1486,28 @@ static inline void drv_twt_teardown_requ
trace_drv_return_void(local);
}
-
+
+#if LINUX_VERSION_IS_GEQ(5,10,0)
+static inline int drv_net_fill_forward_path(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
@@ -69,7 +69,7 @@
#endif /* __MAC80211_DRIVER_OPS */
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -1465,7 +1465,7 @@ struct ieee80211_local {
+@@ -1485,7 +1485,7 @@ struct ieee80211_local {
};
static inline struct ieee80211_sub_if_data *
@@ -147,7 +147,7 @@
static const struct net_device_ops ieee80211_dataif_8023_ops = {
#if LINUX_VERSION_IS_LESS(4,10,0)
.ndo_change_mtu = __change_mtu,
-@@ -839,7 +901,9 @@ static const struct net_device_ops ieee8
+@@ -839,7 +899,9 @@ static const struct net_device_ops ieee8
#else
.ndo_get_stats64 = bp_ieee80211_get_stats64,
#endif
@@ -163,7 +163,7 @@
@@ -2892,6 +2892,15 @@ TRACE_EVENT(drv_twt_teardown_request,
)
);
-
+
+#if LINUX_VERSION_IS_GEQ(5,10,0)
+DEFINE_EVENT(sta_event, drv_net_fill_forward_path,
+ TP_PROTO(struct ieee80211_local *local,
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch
index 8e6b301..4fc8b59 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch
@@ -221,7 +221,7 @@
#endif /* __LINUX_NL80211_H */
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -439,6 +439,16 @@ sar_policy[NL80211_SAR_ATTR_MAX + 1] = {
+@@ -442,6 +442,16 @@ sar_policy[NL80211_SAR_ATTR_MAX + 1] = {
[NL80211_SAR_ATTR_SPECS] = NLA_POLICY_NESTED_ARRAY(sar_specs_policy),
};
@@ -238,7 +238,7 @@
static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
[0] = { .strict_start_type = NL80211_ATTR_HE_OBSS_PD },
[NL80211_ATTR_WIPHY] = { .type = NLA_U32 },
-@@ -780,6 +790,9 @@ static const struct nla_policy nl80211_p
+@@ -783,6 +793,9 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_COLOR_CHANGE_COUNT] = { .type = NLA_U8 },
[NL80211_ATTR_COLOR_CHANGE_COLOR] = { .type = NLA_U8 },
[NL80211_ATTR_COLOR_CHANGE_ELEMS] = NLA_POLICY_NESTED(nl80211_policy),
@@ -248,7 +248,7 @@
};
/* policy for the key attributes */
-@@ -2228,6 +2241,35 @@ fail:
+@@ -2231,6 +2244,35 @@ fail:
return -ENOBUFS;
}
@@ -284,7 +284,7 @@
struct nl80211_dump_wiphy_state {
s64 filter_wiphy;
long start;
-@@ -2813,6 +2855,9 @@ static int nl80211_send_wiphy(struct cfg
+@@ -2816,6 +2858,9 @@ static int nl80211_send_wiphy(struct cfg
if (nl80211_put_sar_specs(rdev, msg))
goto nla_put_failure;
@@ -294,7 +294,7 @@
/* done */
state->split_start = 0;
break;
-@@ -5002,6 +5047,96 @@ static int validate_beacon_tx_rate(struc
+@@ -5005,6 +5050,96 @@ static int validate_beacon_tx_rate(struc
return 0;
}
@@ -391,7 +391,7 @@
static int nl80211_parse_beacon(struct cfg80211_registered_device *rdev,
struct nlattr *attrs[],
struct cfg80211_beacon_data *bcn)
-@@ -5082,6 +5217,17 @@ static int nl80211_parse_beacon(struct c
+@@ -5085,6 +5220,17 @@ static int nl80211_parse_beacon(struct c
bcn->ftm_responder = -1;
}
@@ -409,7 +409,7 @@
return 0;
}
-@@ -5538,6 +5684,17 @@ static int nl80211_start_ap(struct sk_bu
+@@ -5541,6 +5687,17 @@ static int nl80211_start_ap(struct sk_bu
goto out;
}
@@ -427,7 +427,7 @@
nl80211_calculate_ap_params(¶ms);
if (info->attrs[NL80211_ATTR_EXTERNAL_AUTH_SUPPORT])
-@@ -5559,6 +5716,11 @@ static int nl80211_start_ap(struct sk_bu
+@@ -5562,6 +5719,11 @@ static int nl80211_start_ap(struct sk_bu
out:
kfree(params.acl);
@@ -439,7 +439,7 @@
return err;
}
-@@ -5583,12 +5745,14 @@ static int nl80211_set_beacon(struct sk_
+@@ -5586,12 +5748,14 @@ static int nl80211_set_beacon(struct sk_
err = nl80211_parse_beacon(rdev, info->attrs, ¶ms);
if (err)
@@ -455,7 +455,7 @@
return err;
}
-@@ -9265,12 +9429,14 @@ static int nl80211_channel_switch(struct
+@@ -9268,12 +9432,14 @@ static int nl80211_channel_switch(struct
err = nl80211_parse_beacon(rdev, info->attrs, ¶ms.beacon_after);
if (err)
@@ -473,7 +473,7 @@
err = nla_parse_nested_deprecated(csa_attrs, NL80211_ATTR_MAX,
info->attrs[NL80211_ATTR_CSA_IES],
-@@ -9389,6 +9555,8 @@ skip_beacons:
+@@ -9392,6 +9558,8 @@ skip_beacons:
wdev_unlock(wdev);
free:
@@ -482,7 +482,7 @@
kfree(csa_attrs);
return err;
}
-@@ -14924,6 +15092,8 @@ static int nl80211_color_change(struct s
+@@ -14939,6 +15107,8 @@ static int nl80211_color_change(struct s
wdev_unlock(wdev);
out:
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch
index 032bcf7..90c56b4 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch
@@ -119,7 +119,7 @@
NUM_NL80211_EXT_FEATURES,
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
-@@ -552,6 +552,7 @@ use_default_name:
+@@ -543,6 +543,7 @@ use_default_name:
INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work);
INIT_WORK(&rdev->conn_work, cfg80211_conn_work);
INIT_WORK(&rdev->event_work, cfg80211_event_work);
@@ -127,7 +127,7 @@
init_waitqueue_head(&rdev->dev_wait);
-@@ -1214,6 +1215,8 @@ void __cfg80211_leave(struct cfg80211_re
+@@ -1205,6 +1206,8 @@ void __cfg80211_leave(struct cfg80211_re
cfg80211_pmsr_wdev_down(wdev);
@@ -286,7 +286,7 @@
+}
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -793,6 +793,7 @@ static const struct nla_policy nl80211_p
+@@ -796,6 +796,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_MBSSID_CONFIG] =
NLA_POLICY_NESTED(nl80211_mbssid_config_policy),
[NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED },
@@ -294,7 +294,7 @@
};
/* policy for the key attributes */
-@@ -9269,12 +9270,6 @@ static int nl80211_start_radar_detection
+@@ -9272,12 +9273,6 @@ static int nl80211_start_radar_detection
if (err)
return err;
@@ -307,7 +307,7 @@
err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype);
if (err < 0)
return err;
-@@ -9285,6 +9280,16 @@ static int nl80211_start_radar_detection
+@@ -9288,6 +9283,16 @@ static int nl80211_start_radar_detection
if (!cfg80211_chandef_dfs_usable(wiphy, &chandef))
return -EINVAL;
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/315-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/315-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch
index e58c3b9..b1a1d2c 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/315-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/315-cfg80211-move-offchan_cac_event-to-a-dedicated-work.patch
@@ -43,7 +43,7 @@
* cfg80211_gtk_rekey_notify - notify userspace about driver rekeying
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
-@@ -552,7 +552,9 @@ use_default_name:
+@@ -543,7 +543,9 @@ use_default_name:
INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work);
INIT_WORK(&rdev->conn_work, cfg80211_conn_work);
INIT_WORK(&rdev->event_work, cfg80211_event_work);
@@ -54,7 +54,7 @@
init_waitqueue_head(&rdev->dev_wait);
-@@ -1062,11 +1064,13 @@ void wiphy_unregister(struct wiphy *wiph
+@@ -1053,11 +1055,13 @@ void wiphy_unregister(struct wiphy *wiph
cancel_work_sync(&rdev->conn_work);
flush_work(&rdev->event_work);
cancel_delayed_work_sync(&rdev->dfs_update_channels_wk);
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch
index ae97947..567743d 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch
@@ -118,7 +118,7 @@
NL80211_RADAR_CAC_ABORTED);
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -9260,42 +9260,60 @@ static int nl80211_start_radar_detection
+@@ -9263,42 +9263,60 @@ static int nl80211_start_radar_detection
struct cfg80211_chan_def chandef;
enum nl80211_dfs_regions dfs_region;
unsigned int cac_time_ms;
@@ -198,7 +198,7 @@
cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef);
if (WARN_ON(!cac_time_ms))
-@@ -9308,6 +9326,9 @@ static int nl80211_start_radar_detection
+@@ -9311,6 +9329,9 @@ static int nl80211_start_radar_detection
wdev->cac_start_time = jiffies;
wdev->cac_time_ms = cac_time_ms;
}
@@ -208,7 +208,7 @@
return err;
}
-@@ -15926,7 +15947,8 @@ static const struct genl_small_ops nl802
+@@ -15941,7 +15962,8 @@ static const struct genl_small_ops nl802
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = nl80211_start_radar_detection,
.flags = GENL_UNS_ADMIN_PERM,
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch
index a73e81b..c3a4c0d 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch
@@ -204,7 +204,7 @@
bool cfg80211_any_wiphy_oper_chan(struct wiphy *wiphy,
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
-@@ -552,9 +552,10 @@ use_default_name:
+@@ -543,9 +543,10 @@ use_default_name:
INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work);
INIT_WORK(&rdev->conn_work, cfg80211_conn_work);
INIT_WORK(&rdev->event_work, cfg80211_event_work);
@@ -218,7 +218,7 @@
init_waitqueue_head(&rdev->dev_wait);
-@@ -1064,13 +1065,13 @@ void wiphy_unregister(struct wiphy *wiph
+@@ -1055,13 +1056,13 @@ void wiphy_unregister(struct wiphy *wiph
cancel_work_sync(&rdev->conn_work);
flush_work(&rdev->event_work);
cancel_delayed_work_sync(&rdev->dfs_update_channels_wk);
@@ -234,7 +234,7 @@
#ifdef CONFIG_PM
if (rdev->wiphy.wowlan_config && rdev->ops->set_wakeup)
-@@ -1219,7 +1220,7 @@ void __cfg80211_leave(struct cfg80211_re
+@@ -1210,7 +1211,7 @@ void __cfg80211_leave(struct cfg80211_re
cfg80211_pmsr_wdev_down(wdev);
@@ -472,7 +472,7 @@
}
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -793,7 +793,7 @@ static const struct nla_policy nl80211_p
+@@ -796,7 +796,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_MBSSID_CONFIG] =
NLA_POLICY_NESTED(nl80211_mbssid_config_policy),
[NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED },
@@ -481,7 +481,7 @@
};
/* policy for the key attributes */
-@@ -9288,9 +9288,9 @@ static int nl80211_start_radar_detection
+@@ -9291,9 +9291,9 @@ static int nl80211_start_radar_detection
goto unlock;
}
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/321-mac80211-fix-EAPoL-rekey-fail-in-802.3-rx-path.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/321-mac80211-fix-EAPoL-rekey-fail-in-802.3-rx-path.patch
deleted file mode 100644
index 932403d..0000000
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/321-mac80211-fix-EAPoL-rekey-fail-in-802.3-rx-path.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From: Deren Wu <deren.wu@mediatek.com>
-Date: Sun, 13 Feb 2022 00:20:15 +0800
-Subject: [PATCH] mac80211: fix EAPoL rekey fail in 802.3 rx path
-
-mac80211 set capability NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211
-to upper layer by default. That means we should pass EAPoL packets through
-nl80211 path only, and should not send the EAPoL skb to netdevice diretly.
-At the meanwhile, wpa_supplicant would not regist sock to listen EAPoL skb
-on the netdevice.
-
-However, there is no contorl_port_protocol handler in mac80211 for 802.3 RX
-packets, mac80211 driver would pass up the EAPoL rekey frame to netdevice
-and wpa_supplicant would be never interactive with this kind of packets,
-if SUPPORTS_RX_DECAP_OFFLOAD is enabled. This causes STA always rekey fail
-if EAPoL frame go through 802.3 path.
-
-To avoid this problem, align the same process as 802.11 type to handle
-this frame before put it into network stack.
-
-Fixes: 80a915ec4427 ("mac80211: add rx decapsulation offload support")
-Signed-off-by: Deren Wu <deren.wu@mediatek.com>
----
-
---- a/net/mac80211/rx.c
-+++ b/net/mac80211/rx.c
-@@ -4523,16 +4523,7 @@ static void ieee80211_rx_8023(struct iee
-
- /* deliver to local stack */
- skb->protocol = eth_type_trans(skb, fast_rx->dev);
-- memset(skb->cb, 0, sizeof(skb->cb));
-- if (rx->list)
--#if LINUX_VERSION_IS_GEQ(4,19,0)
-- list_add_tail(&skb->list, rx->list);
--#else
-- __skb_queue_tail(rx->list, skb);
--#endif
-- else
-- netif_receive_skb(skb);
--
-+ ieee80211_deliver_skb_to_local_stack(skb, rx);
- }
-
- static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx,
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/322-mac80211-fix-forwarded-mesh-frames-AC-queue-selectio.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/322-mac80211-fix-forwarded-mesh-frames-AC-queue-selectio.patch
deleted file mode 100644
index 50693f7..0000000
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/322-mac80211-fix-forwarded-mesh-frames-AC-queue-selectio.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From: Nicolas Escande <nico.escande@gmail.com>
-Date: Mon, 14 Feb 2022 18:32:14 +0100
-Subject: [PATCH] mac80211: fix forwarded mesh frames AC & queue selection
-
-There are two problems with the current code that have been highlighted
-with the AQL feature that is now enbaled by default.
-
-First problem is in ieee80211_rx_h_mesh_fwding(),
-ieee80211_select_queue_80211() is used on received packets to choose
-the sending AC queue of the forwarding packet although this function
-should only be called on TX packet (it uses ieee80211_tx_info).
-This ends with forwarded mesh packets been sent on unrelated random AC
-queue. To fix that, AC queue can directly be infered from skb->priority
-which has been extracted from QOS info (see ieee80211_parse_qos()).
-
-Second problem is the value of queue_mapping set on forwarded mesh
-frames via skb_set_queue_mapping() is not the AC of the packet but a
-hardware queue index. This may or may not work depending on AC to HW
-queue mapping which is driver specific.
-
-Both of these issues lead to improper AC selection while forwarding
-mesh packets but more importantly due to improper airtime accounting
-(which is done on a per STA, per AC basis) caused traffic stall with
-the introduction of AQL.
-
-Fixes: cf44012810cc ("mac80211: fix unnecessary frame drops in mesh fwding")
-Fixes: d3c1597b8d1b ("mac80211: fix forwarded mesh frame queue mapping")
-Co-developed-by: Remi Pommarel <repk@triplefau.lt>
-Signed-off-by: Remi Pommarel <repk@triplefau.lt>
-Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
----
-
---- a/net/mac80211/rx.c
-+++ b/net/mac80211/rx.c
-@@ -2921,13 +2921,13 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
- ether_addr_equal(sdata->vif.addr, hdr->addr3))
- return RX_CONTINUE;
-
-- ac = ieee80211_select_queue_80211(sdata, skb, hdr);
-+ ac = ieee802_1d_to_ac[skb->priority];
- q = sdata->vif.hw_queue[ac];
- if (ieee80211_queue_stopped(&local->hw, q)) {
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_congestion);
- return RX_DROP_MONITOR;
- }
-- skb_set_queue_mapping(skb, q);
-+ skb_set_queue_mapping(skb, ac);
-
- if (!--mesh_hdr->ttl) {
- if (!is_multicast_ether_addr(hdr->addr1))
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch
index c76f4ae..fdbcce9 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch
@@ -106,7 +106,7 @@
if (csa) {
new->cntdwn_current_counter = csa->count;
-@@ -1329,8 +1366,11 @@ static int ieee80211_stop_ap(struct wiph
+@@ -1332,8 +1369,11 @@ static int ieee80211_stop_ap(struct wiph
mutex_unlock(&local->mtx);
@@ -246,7 +246,7 @@
struct rcu_head rcu_head;
};
-@@ -1063,6 +1064,20 @@ ieee80211_vif_get_shift(struct ieee80211
+@@ -1083,6 +1084,20 @@ ieee80211_vif_get_shift(struct ieee80211
return shift;
}
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/329-mac80211-minstrel_ht-fix-where-rate-stats-are-stored.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/329-mac80211-minstrel_ht-fix-where-rate-stats-are-stored.patch
new file mode 100644
index 0000000..d7832ac
--- /dev/null
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/329-mac80211-minstrel_ht-fix-where-rate-stats-are-stored.patch
@@ -0,0 +1,61 @@
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Mon, 4 Apr 2022 18:54:14 +0200
+Subject: [PATCH] mac80211: minstrel_ht: fix where rate stats are stored (fixes
+ debugfs output)
+
+Using an ath9k card the debugfs output of minstrel_ht looks like the following
+(note the zero values for the first four rates sum-of success/attempts):
+
+ best ____________rate__________ ____statistics___ _____last____ ______sum-of________
+mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob)] [retry|suc|att] [#success | #attempts]
+OFDM 1 DP 6.0M 272 1640 5.2 3.1 53.8 3 0 0 0 0
+OFDM 1 C 9.0M 273 1104 7.7 4.6 53.8 4 0 0 0 0
+OFDM 1 B 12.0M 274 836 10.0 6.0 53.8 4 0 0 0 0
+OFDM 1 A S 18.0M 275 568 14.3 8.5 53.8 5 0 0 0 0
+OFDM 1 S 24.0M 276 436 18.1 0.0 0.0 5 0 1 80 1778
+OFDM 1 36.0M 277 300 24.9 0.0 0.0 0 0 1 0 107
+OFDM 1 S 48.0M 278 236 30.4 0.0 0.0 0 0 0 0 75
+OFDM 1 54.0M 279 212 33.0 0.0 0.0 0 0 0 0 72
+
+Total packet count:: ideal 16582 lookaround 885
+Average # of aggregated frames per A-MPDU: 1.0
+
+Debugging showed that the rate statistics for the first four rates where
+stored in the MINSTREL_CCK_GROUP instead of the MINSTREL_OFDM_GROUP because
+in minstrel_ht_get_stats() the supported check was not honoured as done in
+various other places, e.g net/mac80211/rc80211_minstrel_ht_debugfs.c:
+
+ 74 if (!(mi->supported[i] & BIT(j)))
+ 75 continue;
+
+With the patch applied the output looks good:
+
+ best ____________rate__________ ____statistics___ _____last____ ______sum-of________
+mode guard # rate [name idx airtime max_tp] [avg(tp) avg(prob)] [retry|suc|att] [#success | #attempts]
+OFDM 1 D 6.0M 272 1640 5.2 5.2 100.0 3 0 0 1 1
+OFDM 1 C 9.0M 273 1104 7.7 7.7 100.0 4 0 0 38 38
+OFDM 1 B 12.0M 274 836 10.0 9.9 89.5 4 2 2 372 395
+OFDM 1 A P 18.0M 275 568 14.3 14.3 97.2 5 52 53 6956 7181
+OFDM 1 S 24.0M 276 436 18.1 0.0 0.0 0 0 1 6 163
+OFDM 1 36.0M 277 300 24.9 0.0 0.0 0 0 1 0 35
+OFDM 1 S 48.0M 278 236 30.4 0.0 0.0 0 0 0 0 38
+OFDM 1 S 54.0M 279 212 33.0 0.0 0.0 0 0 0 0 38
+
+Total packet count:: ideal 7097 lookaround 287
+Average # of aggregated frames per A-MPDU: 1.0
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+
+--- a/net/mac80211/rc80211_minstrel_ht.c
++++ b/net/mac80211/rc80211_minstrel_ht.c
+@@ -364,6 +364,9 @@ minstrel_ht_get_stats(struct minstrel_pr
+
+ group = MINSTREL_CCK_GROUP;
+ for (idx = 0; idx < ARRAY_SIZE(mp->cck_rates); idx++) {
++ if (!(mi->supported[group] & BIT(idx)))
++ continue;
++
+ if (rate->idx != mp->cck_rates[idx])
+ continue;
+
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/400-allow-ibss-mixed.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/400-allow-ibss-mixed.patch
index d12c8ad..f2ed528 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/400-allow-ibss-mixed.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/400-allow-ibss-mixed.patch
@@ -5,7 +5,7 @@
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
-@@ -634,21 +634,6 @@ static int wiphy_verify_combinations(str
+@@ -625,21 +625,6 @@ static int wiphy_verify_combinations(str
c->limits[j].max > 1))
return -EINVAL;
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/500-mac80211_configure_antenna_gain.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/500-mac80211_configure_antenna_gain.patch
index c4acfd1..612b9d6 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/500-mac80211_configure_antenna_gain.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/500-mac80211_configure_antenna_gain.patch
@@ -87,7 +87,7 @@
CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump)
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -1444,6 +1444,7 @@ struct ieee80211_local {
+@@ -1464,6 +1464,7 @@ struct ieee80211_local {
int dynamic_ps_forced_timeout;
int user_power_level; /* in dBm, for all interfaces */
@@ -129,7 +129,7 @@
local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -794,6 +794,7 @@ static const struct nla_policy nl80211_p
+@@ -797,6 +797,7 @@ static const struct nla_policy nl80211_p
NLA_POLICY_NESTED(nl80211_mbssid_config_policy),
[NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED },
[NL80211_ATTR_RADAR_BACKGROUND] = { .type = NLA_FLAG },
@@ -137,7 +137,7 @@
};
/* policy for the key attributes */
-@@ -3374,6 +3375,22 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -3377,6 +3378,22 @@ static int nl80211_set_wiphy(struct sk_b
if (result)
goto out;
}
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/901-mac80211-check-twt-responder-when-setu-twt.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/901-mac80211-check-twt-responder-when-setu-twt.patch
new file mode 100644
index 0000000..e2f24b4
--- /dev/null
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/901-mac80211-check-twt-responder-when-setu-twt.patch
@@ -0,0 +1,26 @@
+From fa2d47980f56462c5767a0ad9537f3e58f5864f4 Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu@mediatek.com>
+Date: Tue, 18 Jan 2022 20:29:44 +0800
+Subject: [PATCH] mac80211: do not setup twt when twt responder is false
+
+---
+ net/mac80211/rx.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
+index 41c3f22..3961270 100644
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -3231,6 +3231,9 @@ ieee80211_process_rx_twt_action(struct ieee80211_rx_data *rx)
+ if (sdata->vif.type != NL80211_IFTYPE_AP)
+ return false;
+
++ if (!sdata->vif.bss_conf.twt_responder)
++ return false;
++
+ if (!rx->local->ops->add_twt_setup)
+ return false;
+
+--
+2.29.2
+
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/902-nl80211-internal-extend-CAC-time-for-weather-radar-c.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/902-nl80211-internal-extend-CAC-time-for-weather-radar-c.patch
new file mode 100644
index 0000000..04b3270
--- /dev/null
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/902-nl80211-internal-extend-CAC-time-for-weather-radar-c.patch
@@ -0,0 +1,31 @@
+From 686d2b968461c441f18ae18eec36980728706b87 Mon Sep 17 00:00:00 2001
+From: Shayne Chen <shayne.chen@mediatek.com>
+Date: Tue, 29 Mar 2022 16:06:30 +0800
+Subject: [PATCH] nl80211: internal: extend CAC time for weather radar channels
+
+Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
+---
+ net/wireless/nl80211.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
+index f54cb1a..07f8d3a 100644
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -9336,6 +9336,13 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
+ if (WARN_ON(!cac_time_ms))
+ cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
+
++ if ((dfs_region == NL80211_DFS_ETSI) &&
++ ((chandef.width == NL80211_CHAN_WIDTH_160) &&
++ (chandef.center_freq2 >= 5580 && chandef.center_freq2 <= 5640)) ||
++ (chandef.center_freq1 >= 5580 && chandef.center_freq1 <= 5640))
++ cac_time_ms = 600000;
++ pr_info("%s: region = %u, cetner freq1 = %u, center freq2 = %u, cac time ms = %u\n", __func__, dfs_region, chandef.center_freq1, chandef.center_freq2, cac_time_ms);
++
+ err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
+ if (!err) {
+ wdev->chandef = chandef;
+--
+2.25.1
+
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/903-mac80211-it-s-invalid-case-when-frag_threshold-is-gr.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/903-mac80211-it-s-invalid-case-when-frag_threshold-is-gr.patch
new file mode 100755
index 0000000..2f1d96c
--- /dev/null
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/903-mac80211-it-s-invalid-case-when-frag_threshold-is-gr.patch
@@ -0,0 +1,28 @@
+From a0b3ac0fe37b3f2bcc5a9593524556b971bb98f5 Mon Sep 17 00:00:00 2001
+From: Bo Jiao <Bo.Jiao@mediatek.com>
+Date: Fri, 1 Apr 2022 09:15:21 +0800
+Subject: [PATCH] mac80211: it's invalid case when frag_threshold is greater
+ than 2346
+
+Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
+---
+ net/wireless/nl80211.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
+index f54cb1a..10f3131 100644
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -3478,6 +3478,9 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
+ goto out;
+ }
+
++ if (frag_threshold >= 2346)
++ frag_threshold = (u32) -1;
++
+ if (frag_threshold != (u32) -1) {
+ /*
+ * Fragments (apart from the last one) are required to
+--
+2.18.0
+
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/subsys.inc b/recipes-kernel/linux-mac80211/files/patches/subsys/subsys.inc
index aae370f..855289d 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/subsys.inc
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/subsys.inc
@@ -4,12 +4,8 @@
file://120-cfg80211_allow_perm_addr_change.patch \
file://150-disable_addr_notifier.patch \
file://210-ap_scan.patch \
- file://300-mac80211-fix-rate-control-for-retransmitted-frames.patch \
file://301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch \
- file://302-mac80211-fix-regression-in-SSN-handling-of-addba-tx.patch \
file://303-mac80211-set-up-the-fwd_skb-dev-for-mesh-forwarding.patch \
- file://304-mac80211-send-ADDBA-requests-using-the-tid-queue-of-.patch \
- file://305-mac80211-agg-tx-don-t-schedule_and_wake_txq-under-st.patch \
file://306-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch \
file://307-mac80211_hwsim-make-6-GHz-channels-usable.patch \
file://308-mac80211-add-support-for-.ndo_fill_forward_path.patch \
@@ -25,13 +21,15 @@
file://318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch \
file://319-mac80211-introduce-set_radar_offchan-callback.patch \
file://320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch \
- file://321-mac80211-fix-EAPoL-rekey-fail-in-802.3-rx-path.patch \
- file://322-mac80211-fix-forwarded-mesh-frames-AC-queue-selectio.patch \
file://323-mac80211-MBSSID-support-in-interface-handling.patch \
file://324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch \
file://325-mac80211-MBSSID-channel-switch.patch \
file://326-mac80211-update-bssid_indicator-in-ieee80211_assign_.patch \
+ file://329-mac80211-minstrel_ht-fix-where-rate-stats-are-stored.patch \
file://400-allow-ibss-mixed.patch \
file://500-mac80211_configure_antenna_gain.patch \
file://782-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch \
+ file://901-mac80211-check-twt-responder-when-setu-twt.patch \
+ file://902-nl80211-internal-extend-CAC-time-for-weather-radar-c.patch \
+ file://903-mac80211-it-s-invalid-case-when-frag_threshold-is-gr.patch \
"
diff --git a/recipes-kernel/linux-mac80211/linux-mac80211.bb b/recipes-kernel/linux-mac80211/linux-mac80211.bb
index 35a5a5f..50abb23 100644
--- a/recipes-kernel/linux-mac80211/linux-mac80211.bb
+++ b/recipes-kernel/linux-mac80211/linux-mac80211.bb
@@ -6,14 +6,14 @@
inherit module
-PV = "5.15.8"
+PV = "5.15.33"
SRC_URI = " \
https://cdn.kernel.org/pub/linux/kernel/projects/backports/stable/v${PV}/backports-${PV}-1.tar.xz \
file://config \
file://0001-rdkb-fix_build_issue-mac80211-without_depmod.patch;apply=no \
"
-SRC_URI[sha256sum] = "9f71b659c034f19d156532ec780fcb606cee3c4ccc42e2f8ef18dd3e9f1b6820"
+SRC_URI[sha256sum] = "1b6b3bded4c81814ebebe2d194c2f8966d2399005b85ebb0557285b6e73f5422"
DEPENDS += "virtual/kernel"
DEPENDS += "bison-native coreutils-native flex-native"