[rdk-b][common][bsp][Refactor and sync kernel/wifi from Openwrt]

[Description]
Refactor and sync kernel/wifi from Openwrt

[Release-log]
N/A

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 19a60d7..089ff21 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
-@@ -428,43 +428,6 @@ USB_VL600=
+@@ -451,43 +451,6 @@ USB_VL600=
  USB_NET_CH9200=
  USB_NET_AQC111=
  USB_RTL8153_ECM=
@@ -192,7 +192,7 @@
  	select BRCMUTIL
 --- a/Kconfig.local
 +++ b/Kconfig.local
-@@ -1288,117 +1288,6 @@ config BACKPORTED_USB_NET_AQC111
+@@ -1357,117 +1357,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
-@@ -9,9 +9,6 @@ source "$BACKPORT_DIR/drivers/bus/mhi/Kc
+@@ -10,9 +10,6 @@ source "$BACKPORT_DIR/drivers/soc/qcom/K
  source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
  source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
  
@@ -324,8 +324,8 @@
  source "$BACKPORT_DIR/drivers/staging/Kconfig"
 --- a/Makefile.kernel
 +++ b/Makefile.kernel
-@@ -42,8 +42,6 @@ obj-$(CPTCFG_MAC80211) += net/mac80211/
- obj-$(CPTCFG_QRTR) += net/qrtr/
+@@ -43,8 +43,6 @@ obj-$(CPTCFG_QRTR) += net/qrtr/
+ obj-$(CPTCFG_QCOM_QMI_HELPERS) += drivers/soc/qcom/
  obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
  obj-$(CPTCFG_WLAN) += drivers/net/wireless/
 -obj-$(CPTCFG_SSB) += drivers/ssb/
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 777c93c..1ceb2be 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
-@@ -2949,6 +2949,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
+@@ -2948,6 +2948,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
  	if (!fwd_skb)
  		goto out;
  
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 c534d15..fba0912 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
-@@ -3001,15 +3001,19 @@ static void mac80211_hwsim_he_capab(stru
+@@ -3004,15 +3004,19 @@ static void mac80211_hwsim_he_capab(stru
  {
  	u16 n_iftype_data;
  
@@ -34,7 +34,7 @@
  		return;
  	}
  
-@@ -3299,6 +3303,12 @@ static int mac80211_hwsim_new_radio(stru
+@@ -3302,6 +3306,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));
-@@ -3309,6 +3319,13 @@ static int mac80211_hwsim_new_radio(stru
+@@ -3312,6 +3322,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 |
-@@ -3322,10 +3339,6 @@ static int mac80211_hwsim_new_radio(stru
+@@ -3325,10 +3342,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 272d84f..4b9d874 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
@@ -69,7 +69,7 @@
  #endif /* __MAC80211_DRIVER_OPS */
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -1485,7 +1485,7 @@ struct ieee80211_local {
+@@ -1490,7 +1490,7 @@ struct ieee80211_local {
  };
  
  static inline struct ieee80211_sub_if_data *
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/310-mac80211-minstrel_ht-reduce-fluctuations-in-rate-pro.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/310-mac80211-minstrel_ht-reduce-fluctuations-in-rate-pro.patch
index 16bcbc2..3be43b8 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/310-mac80211-minstrel_ht-reduce-fluctuations-in-rate-pro.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/310-mac80211-minstrel_ht-reduce-fluctuations-in-rate-pro.patch
@@ -18,7 +18,7 @@
 
 --- a/net/mac80211/rc80211_minstrel_ht.c
 +++ b/net/mac80211/rc80211_minstrel_ht.c
-@@ -700,7 +700,8 @@ minstrel_ht_calc_rate_stats(struct minst
+@@ -703,7 +703,8 @@ minstrel_ht_calc_rate_stats(struct minst
  	unsigned int cur_prob;
  
  	if (unlikely(mrs->attempts > 0)) {
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/311-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/311-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch
index a6817bd..13bed48 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/311-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/311-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch
@@ -18,7 +18,7 @@
 
 --- a/net/mac80211/rc80211_minstrel_ht.c
 +++ b/net/mac80211/rc80211_minstrel_ht.c
-@@ -511,6 +511,14 @@ minstrel_ht_set_best_prob_rate(struct mi
+@@ -514,6 +514,14 @@ minstrel_ht_set_best_prob_rate(struct mi
  	int cur_tp_avg, cur_group, cur_idx;
  	int max_gpr_group, max_gpr_idx;
  	int max_gpr_tp_avg, max_gpr_prob;
@@ -33,7 +33,7 @@
  
  	cur_group = MI_RATE_GROUP(index);
  	cur_idx = MI_RATE_IDX(index);
-@@ -532,11 +540,6 @@ minstrel_ht_set_best_prob_rate(struct mi
+@@ -535,11 +543,6 @@ minstrel_ht_set_best_prob_rate(struct mi
  	    !minstrel_ht_is_legacy_group(max_tp_group))
  		return;
  
@@ -45,7 +45,7 @@
  	max_gpr_group = MI_RATE_GROUP(mg->max_group_prob_rate);
  	max_gpr_idx = MI_RATE_IDX(mg->max_group_prob_rate);
  	max_gpr_prob = mi->groups[max_gpr_group].rates[max_gpr_idx].prob_avg;
-@@ -594,40 +597,6 @@ minstrel_ht_assign_best_tp_rates(struct
+@@ -597,40 +600,6 @@ minstrel_ht_assign_best_tp_rates(struct
  
  }
  
@@ -86,7 +86,7 @@
  static u16
  __minstrel_ht_get_sample_rate(struct minstrel_ht_sta *mi,
  			      enum minstrel_sample_type type)
-@@ -1107,8 +1076,6 @@ minstrel_ht_update_stats(struct minstrel
+@@ -1110,8 +1079,6 @@ minstrel_ht_update_stats(struct minstrel
  
  	mi->max_prob_rate = tmp_max_prob_rate;
  
@@ -95,7 +95,7 @@
  	minstrel_ht_refill_sample_rates(mi);
  
  #ifdef CPTCFG_MAC80211_DEBUGFS
-@@ -1153,7 +1120,7 @@ minstrel_ht_txstat_valid(struct minstrel
+@@ -1156,7 +1123,7 @@ minstrel_ht_txstat_valid(struct minstrel
  }
  
  static void
@@ -104,7 +104,7 @@
  {
  	int group, orig_group;
  
-@@ -1168,11 +1135,7 @@ minstrel_downgrade_rate(struct minstrel_
+@@ -1171,11 +1138,7 @@ minstrel_downgrade_rate(struct minstrel_
  		    minstrel_mcs_groups[orig_group].streams)
  			continue;
  
@@ -117,7 +117,7 @@
  	}
  }
  
-@@ -1183,7 +1146,7 @@ minstrel_ht_tx_status(void *priv, struct
+@@ -1186,7 +1149,7 @@ minstrel_ht_tx_status(void *priv, struct
  	struct ieee80211_tx_info *info = st->info;
  	struct minstrel_ht_sta *mi = priv_sta;
  	struct ieee80211_tx_rate *ar = info->status.rates;
@@ -126,7 +126,7 @@
  	struct minstrel_priv *mp = priv;
  	u32 update_interval = mp->update_interval;
  	bool last, update = false;
-@@ -1233,18 +1196,13 @@ minstrel_ht_tx_status(void *priv, struct
+@@ -1236,18 +1199,13 @@ minstrel_ht_tx_status(void *priv, struct
  		/*
  		 * check for sudden death of spatial multiplexing,
  		 * downgrade to a lower number of streams if necessary.
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 4fc8b59..429886d 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
@@ -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 },
-@@ -783,6 +793,9 @@ static const struct nla_policy nl80211_p
+@@ -788,6 +798,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 */
-@@ -2231,6 +2244,35 @@ fail:
+@@ -2236,6 +2249,35 @@ fail:
  	return -ENOBUFS;
  }
  
@@ -284,7 +284,7 @@
  struct nl80211_dump_wiphy_state {
  	s64 filter_wiphy;
  	long start;
-@@ -2816,6 +2858,9 @@ static int nl80211_send_wiphy(struct cfg
+@@ -2821,6 +2863,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;
-@@ -5005,6 +5050,96 @@ static int validate_beacon_tx_rate(struc
+@@ -5020,6 +5065,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)
-@@ -5085,6 +5220,17 @@ static int nl80211_parse_beacon(struct c
+@@ -5100,6 +5235,17 @@ static int nl80211_parse_beacon(struct c
  		bcn->ftm_responder = -1;
  	}
  
@@ -409,7 +409,7 @@
  	return 0;
  }
  
-@@ -5541,6 +5687,17 @@ static int nl80211_start_ap(struct sk_bu
+@@ -5556,6 +5702,17 @@ static int nl80211_start_ap(struct sk_bu
  			goto out;
  	}
  
@@ -427,7 +427,7 @@
  	nl80211_calculate_ap_params(&params);
  
  	if (info->attrs[NL80211_ATTR_EXTERNAL_AUTH_SUPPORT])
-@@ -5562,6 +5719,11 @@ static int nl80211_start_ap(struct sk_bu
+@@ -5577,6 +5734,11 @@ static int nl80211_start_ap(struct sk_bu
  
  out:
  	kfree(params.acl);
@@ -439,7 +439,7 @@
  
  	return err;
  }
-@@ -5586,12 +5748,14 @@ static int nl80211_set_beacon(struct sk_
+@@ -5601,12 +5763,14 @@ static int nl80211_set_beacon(struct sk_
  
  	err = nl80211_parse_beacon(rdev, info->attrs, &params);
  	if (err)
@@ -455,7 +455,7 @@
  	return err;
  }
  
-@@ -9268,12 +9432,14 @@ static int nl80211_channel_switch(struct
+@@ -9283,12 +9447,14 @@ static int nl80211_channel_switch(struct
  
  	err = nl80211_parse_beacon(rdev, info->attrs, &params.beacon_after);
  	if (err)
@@ -473,7 +473,7 @@
  
  	err = nla_parse_nested_deprecated(csa_attrs, NL80211_ATTR_MAX,
  					  info->attrs[NL80211_ATTR_CSA_IES],
-@@ -9392,6 +9558,8 @@ skip_beacons:
+@@ -9407,6 +9573,8 @@ skip_beacons:
  	wdev_unlock(wdev);
  
  free:
@@ -482,7 +482,7 @@
  	kfree(csa_attrs);
  	return err;
  }
-@@ -14939,6 +15107,8 @@ static int nl80211_color_change(struct s
+@@ -14959,6 +15127,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 90c56b4..2038ee6 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
@@ -286,7 +286,7 @@
 +}
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -796,6 +796,7 @@ static const struct nla_policy nl80211_p
+@@ -801,6 +801,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 */
-@@ -9272,12 +9273,6 @@ static int nl80211_start_radar_detection
+@@ -9287,12 +9288,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;
-@@ -9288,6 +9283,16 @@ static int nl80211_start_radar_detection
+@@ -9303,6 +9298,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/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 567743d..a1b6e3c 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
-@@ -9263,42 +9263,60 @@ static int nl80211_start_radar_detection
+@@ -9278,42 +9278,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))
-@@ -9311,6 +9329,9 @@ static int nl80211_start_radar_detection
+@@ -9326,6 +9344,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;
  }
  
-@@ -15941,7 +15962,8 @@ static const struct genl_small_ops nl802
+@@ -15961,7 +15982,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 c3a4c0d..483b87c 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
@@ -472,7 +472,7 @@
  }
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -796,7 +796,7 @@ static const struct nla_policy nl80211_p
+@@ -801,7 +801,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 */
-@@ -9291,9 +9291,9 @@ static int nl80211_start_radar_detection
+@@ -9306,9 +9306,9 @@ static int nl80211_start_radar_detection
  		goto unlock;
  	}
  
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
deleted file mode 100644
index d7832ac..0000000
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/329-mac80211-minstrel_ht-fix-where-rate-stats-are-stored.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-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/330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch
index 1a66aa8..0ca5386 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch
@@ -359,7 +359,7 @@
  	struct work_struct csa_finalize_work;
  	bool csa_block_tx; /* write-protected by sdata_lock and local->mtx */
  	struct cfg80211_chan_def csa_chandef;
-@@ -1180,44 +1182,6 @@ enum mac80211_scan_state {
+@@ -1185,44 +1187,6 @@ enum mac80211_scan_state {
  	SCAN_ABORT,
  };
  
@@ -404,7 +404,7 @@
  DECLARE_STATIC_KEY_FALSE(aql_disable);
  
  struct ieee80211_local {
-@@ -1231,8 +1195,13 @@ struct ieee80211_local {
+@@ -1236,8 +1200,13 @@ struct ieee80211_local {
  	struct codel_params cparams;
  
  	/* protects active_txqs and txqi->schedule_order */
@@ -419,7 +419,7 @@
  	u32 aql_threshold;
  	atomic_t aql_total_pending_airtime;
  
-@@ -1649,125 +1618,6 @@ static inline bool txq_has_queue(struct
+@@ -1654,125 +1623,6 @@ static inline bool txq_has_queue(struct
  	return !(skb_queue_empty(&txqi->frags) && !txqi->tin.backlog_packets);
  }
  
@@ -545,7 +545,7 @@
  static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
  {
  	return ether_addr_equal(raddr, addr) ||
-@@ -2013,14 +1863,6 @@ int ieee80211_tx_control_port(struct wip
+@@ -2018,14 +1868,6 @@ int ieee80211_tx_control_port(struct wip
  			      u64 *cookie);
  int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
  			      const u8 *buf, size_t len);
@@ -594,7 +594,7 @@
  
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -1584,8 +1584,12 @@ static void sta_ps_start(struct sta_info
+@@ -1583,8 +1583,12 @@ static void sta_ps_start(struct sta_info
  
  	for (tid = 0; tid < IEEE80211_NUM_TIDS; tid++) {
  		struct ieee80211_txq *txq = sta->sta.txq[tid];
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch
index 89718a8..42e1671 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch
@@ -15,7 +15,7 @@
 
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -1211,6 +1211,7 @@ struct ieee80211_local {
+@@ -1216,6 +1216,7 @@ struct ieee80211_local {
  	u32 aql_txq_limit_high[IEEE80211_NUM_ACS];
  	u32 aql_threshold;
  	atomic_t aql_total_pending_airtime;
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/338-mac80211-fix-queue-selection-for-mesh-OCB-interfaces.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/338-mac80211-fix-queue-selection-for-mesh-OCB-interfaces.patch
deleted file mode 100644
index 9547db0..0000000
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/338-mac80211-fix-queue-selection-for-mesh-OCB-interfaces.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Sat, 2 Jul 2022 16:41:32 +0200
-Subject: [PATCH] mac80211: fix queue selection for mesh/OCB interfaces
-
-When using iTXQ, the code assumes that there is only one vif queue for
-broadcast packets, using the BE queue. Allowing non-BE queue marking
-violates that assumption and txq->ac == skb_queue_mapping is no longer
-guaranteed. This can cause issues with queue handling in the driver and
-also causes issues with the recent ATF change, resulting in an AQL
-underflow warning.
-
-Cc: stable@vger.kernel.org
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/net/mac80211/wme.c
-+++ b/net/mac80211/wme.c
-@@ -147,8 +147,8 @@ u16 __ieee80211_select_queue(struct ieee
- 	bool qos;
- 
- 	/* all mesh/ocb stations are required to support WME */
--	if (sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
--	    sdata->vif.type == NL80211_IFTYPE_OCB)
-+	if (sta && (sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
-+		    sdata->vif.type == NL80211_IFTYPE_OCB))
- 		qos = true;
- 	else if (sta)
- 		qos = sta->sta.wme;
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/350-bss-color-collision.patch b/recipes-kernel/linux-mac80211/files/patches/subsys/350-bss-color-collision.patch
index d2a4330..1e3486a 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/350-bss-color-collision.patch
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/350-bss-color-collision.patch
@@ -56,7 +56,7 @@
  
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -3181,6 +3181,49 @@ static void ieee80211_process_sa_query_r
+@@ -3180,6 +3180,49 @@ static void ieee80211_process_sa_query_r
  	ieee80211_tx_skb(sdata, skb);
  }
  
@@ -106,7 +106,7 @@
  static ieee80211_rx_result debug_noinline
  ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx)
  {
-@@ -3206,6 +3249,9 @@ ieee80211_rx_h_mgmt_check(struct ieee802
+@@ -3205,6 +3248,9 @@ ieee80211_rx_h_mgmt_check(struct ieee802
  	    !(rx->flags & IEEE80211_RX_BEACON_REPORTED)) {
  		int sig = 0;
  
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 171af5e..50c24a7 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
-@@ -1441,6 +1441,7 @@ struct ieee80211_local {
+@@ -1448,6 +1448,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
-@@ -797,6 +797,7 @@ static const struct nla_policy nl80211_p
+@@ -802,6 +802,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 */
-@@ -3377,6 +3378,22 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -3391,6 +3392,22 @@ static int nl80211_set_wiphy(struct sk_b
  		if (result)
  			goto out;
  	}
diff --git a/recipes-kernel/linux-mac80211/files/patches/subsys/subsys.inc b/recipes-kernel/linux-mac80211/files/patches/subsys/subsys.inc
index 45566ee..79cb4e6 100644
--- a/recipes-kernel/linux-mac80211/files/patches/subsys/subsys.inc
+++ b/recipes-kernel/linux-mac80211/files/patches/subsys/subsys.inc
@@ -26,7 +26,6 @@
     file://325-mac80211-MBSSID-channel-switch.patch \
     file://326-mac80211-update-bssid_indicator-in-ieee80211_assign_.patch \
     file://328-mac80211-do-not-wake-queues-on-a-vif-that-is-being-s.patch \
-    file://329-mac80211-minstrel_ht-fix-where-rate-stats-are-stored.patch \
     file://330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch \
     file://331-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch \
     file://332-mac80211-consider-aql_tx_pending-when-checking-airti.patch \
@@ -35,7 +34,6 @@
     file://335-mac80211-add-debugfs-file-to-display-per-phy-AQL-pen.patch \
     file://336-mac80211-only-accumulate-airtime-deficit-for-active-.patch \
     file://337-mac80211-increase-quantum-for-airtime-scheduler.patch \
-    file://338-mac80211-fix-queue-selection-for-mesh-OCB-interfaces.patch \
     file://339-mac80211-exclude-multicast-packets-from-AQL-pending-.patch \
     file://350-bss-color-collision.patch \
     file://400-allow-ibss-mixed.patch \