[][MAC80211][core][mac80211: make 4addr null frames using min_rate for WDS]

[Description]
Fix WDS issue

WDS needs 4addr packets to trigger AP for wlan0.sta creation.
However, the 4addr null frame is sent at a high rate so that AP can't receive it.
This PATCHES switches to use min_rate.

[Release-log]
N/A

Change-Id: I16244c69e4fddfaba7305d36eb7df664ef67d367
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6250138
diff --git a/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/912-mac80211-make-4addr-null-frames-using-min-rate-for-WDS.patch b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/912-mac80211-make-4addr-null-frames-using-min-rate-for-WDS.patch
new file mode 100644
index 0000000..62a7d3f
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mac80211/patches/subsys/912-mac80211-make-4addr-null-frames-using-min-rate-for-WDS.patch
@@ -0,0 +1,30 @@
+From de1d3b1259574aac2dcb4d830c34030bc20cc280 Mon Sep 17 00:00:00 2001
+From: Lian Chen <lian.chen@mediatek.com>
+Date: Thu, 14 Jul 2022 16:33:58 +0800
+Subject: [PATCH] wifi: mac80211: make 4addr null frames using min_rate for WDS
+
+WDS needs 4addr packets to trigger AP for wlan0.sta creation.
+However, the 4addr null frame is sent at a high rate
+so that AP can't receive it.
+This PATCHES switches to use min_rate.
+
+Signed-off-by: Lian Chen <lian.chen@mediatek.com>
+---
+ net/mac80211/mlme.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
+index c833245..09f54be 100644
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -1133,6 +1133,7 @@ void ieee80211_send_4addr_nullfunc(struct ieee80211_local *local,
+ 	memcpy(nullfunc->addr4, sdata->vif.addr, ETH_ALEN);
+ 
+ 	IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
++	IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_USE_MINRATE;
+ 	ieee80211_tx_skb(sdata, skb);
+ }
+ 
+-- 
+2.18.0
+
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0010-mt76-mt7915-4addr-null-frame-using-fixed-rate-to-suc.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0010-mt76-mt7915-4addr-null-frame-using-fixed-rate-to-suc.patch
deleted file mode 100644
index aa3aeae..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0010-mt76-mt7915-4addr-null-frame-using-fixed-rate-to-suc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 924bfa3aeb7330cbf5c14c9a0ddebb9567e5f77c Mon Sep 17 00:00:00 2001
-From: "lian.chen" <lian.chen@mediatek.com>
-Date: Wed, 22 Jun 2022 10:31:55 +0800
-Subject: [PATCH 10/12] mt76: mt7915: 4addr null frame using fixed rate to
- success WDS
-
----
- mt76_connac_mac.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
-index af2b33d..27eaf22 100644
---- a/mt76_connac_mac.c
-+++ b/mt76_connac_mac.c
-@@ -393,7 +393,8 @@ mt76_connac2_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi,
- 	}
- 
- 	if (!ieee80211_is_data(fc) || multicast ||
--	    info->flags & IEEE80211_TX_CTL_USE_MINRATE)
-+	    info->flags & IEEE80211_TX_CTL_USE_MINRATE ||
-+	    (ieee80211_is_nullfunc(fc) && ieee80211_has_a4(fc)))
- 		val |= MT_TXD2_FIX_RATE;
- 
- 	txwi[2] |= cpu_to_le32(val);
--- 
-2.18.0
-