[][MAC80211][WiFi6][Rebase Patches][Fix patch fail on mt76-2024-02-04]

[Description]
Fix patch fail on mt76-2024-02-04

[Release-log]
N/A

Change-Id: Ia7f04d93a65e6b4a294fd6cccc60850a94e8689c
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8643211
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-add-post-channel-switch-for-DFS-cha.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-add-post-channel-switch-for-DFS-cha.patch
new file mode 100644
index 0000000..360c308
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-add-post-channel-switch-for-DFS-cha.patch
@@ -0,0 +1,54 @@
+From d66d0f22529ac2b2f63f67a4251759f18e12ba83 Mon Sep 17 00:00:00 2001
+From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+Date: Thu, 16 Nov 2023 14:41:54 +0800
+Subject: [PATCH 07/13] wifi: mt76: mt7915: add post channel switch for DFS
+ channel switching
+
+Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+---
+ mt7915/main.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/mt7915/main.c b/mt7915/main.c
+index f363a30..dfaee4c 100644
+--- a/mt7915/main.c
++++ b/mt7915/main.c
+@@ -736,6 +736,27 @@ mt7915_channel_switch_beacon(struct ieee80211_hw *hw,
+ 	mutex_unlock(&dev->mt76.mutex);
+ }
+ 
++static int
++mt7915_post_channel_switch(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
++{
++	struct mt7915_phy *phy = mt7915_hw_phy(hw);
++	struct cfg80211_chan_def *chandef = &phy->mt76->chandef;
++	int ret;
++
++	ret = cfg80211_chandef_dfs_required(hw->wiphy, chandef, NL80211_IFTYPE_AP);
++	if (ret <= 0)
++		goto out;
++
++	ieee80211_stop_queues(hw);
++	ret = mt7915_set_channel(phy);
++	if (ret)
++		goto out;
++	ieee80211_wake_queues(hw);
++
++out:
++	return ret;
++}
++
+ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+ 		       struct ieee80211_sta *sta)
+ {
+@@ -1697,6 +1718,7 @@ const struct ieee80211_ops mt7915_ops = {
+ 	.get_txpower = mt76_get_txpower,
+ 	.set_sar_specs = mt7915_set_sar_specs,
+ 	.channel_switch_beacon = mt7915_channel_switch_beacon,
++	.post_channel_switch = mt7915_post_channel_switch,
+ 	.get_stats = mt7915_get_stats,
+ 	.get_et_sset_count = mt7915_get_et_sset_count,
+ 	.get_et_stats = mt7915_get_et_stats,
+-- 
+2.18.0
+