[][MAC80211][WiFi7][misc][fix mt7988-mt7996-mac980211 release build fail]

[Description]
Fix mt7988-mt7996-mac980211 release build fail

[Release-log]
N/A

Change-Id: I4e247202ad308ed70e7ed59f8a21d62fddfbac9f
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8041650
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/patches/0011-wifi-mt76-mt7996-add-IEEE80211_RC_SMPS_CHANGED-handl.patch b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/patches/0011-wifi-mt76-mt7996-add-IEEE80211_RC_SMPS_CHANGED-handl.patch
new file mode 100644
index 0000000..310479f
--- /dev/null
+++ b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/patches/0011-wifi-mt76-mt7996-add-IEEE80211_RC_SMPS_CHANGED-handl.patch
@@ -0,0 +1,72 @@
+From c308bd889a207eff9382126f697da59243b593e4 Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu@mediatek.com>
+Date: Mon, 24 Jul 2023 16:32:03 +0800
+Subject: [PATCH 11/22] wifi: mt76: mt7996: add IEEE80211_RC_SMPS_CHANGED
+ handler
+
+Send mcu command to firmware to handle smps mode.
+
+Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
+---
+ mt7996/mac.c    | 4 +++-
+ mt7996/mcu.c    | 8 +++++---
+ mt7996/mt7996.h | 2 ++
+ 3 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/mt7996/mac.c b/mt7996/mac.c
+index 38822402b..fd1edf140 100644
+--- a/mt7996/mac.c
++++ b/mt7996/mac.c
+@@ -2162,7 +2162,9 @@ void mt7996_mac_sta_rc_work(struct work_struct *work)
+ 			       IEEE80211_RC_BW_CHANGED))
+ 			mt7996_mcu_add_rate_ctrl(dev, vif, sta, true);
+ 
+-		/* TODO: smps change */
++		if (changed & IEEE80211_RC_SMPS_CHANGED)
++			mt7996_mcu_set_fixed_field(dev, vif, sta, NULL,
++						   RATE_PARAM_MMPS_UPDATE);
+ 
+ 		spin_lock_bh(&dev->mt76.sta_poll_lock);
+ 	}
+diff --git a/mt7996/mcu.c b/mt7996/mcu.c
+index 653c1d2b7..a5cfd40f9 100644
+--- a/mt7996/mcu.c
++++ b/mt7996/mcu.c
+@@ -1680,9 +1680,8 @@ int mt7996_mcu_set_fixed_rate_ctrl(struct mt7996_dev *dev,
+ 				     MCU_WM_UNI_CMD(RA), true);
+ }
+ 
+-static int
+-mt7996_mcu_set_fixed_field(struct mt7996_dev *dev, struct ieee80211_vif *vif,
+-			   struct ieee80211_sta *sta, void *data, u32 field)
++int mt7996_mcu_set_fixed_field(struct mt7996_dev *dev, struct ieee80211_vif *vif,
++			       struct ieee80211_sta *sta, void *data, u32 field)
+ {
+ 	struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
+ 	struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv;
+@@ -1710,6 +1709,9 @@ mt7996_mcu_set_fixed_field(struct mt7996_dev *dev, struct ieee80211_vif *vif,
+ 		if (phy)
+ 			ra->phy = *phy;
+ 		break;
++	case RATE_PARAM_MMPS_UPDATE:
++		ra->mmps_mode = mt7996_mcu_get_mmps_mode(sta->deflink.smps_mode);
++		break;
+ 	default:
+ 		break;
+ 	}
+diff --git a/mt7996/mt7996.h b/mt7996/mt7996.h
+index 56e2cef1a..890f522d9 100644
+--- a/mt7996/mt7996.h
++++ b/mt7996/mt7996.h
+@@ -397,6 +397,8 @@ int mt7996_mcu_add_obss_spr(struct mt7996_phy *phy, struct ieee80211_vif *vif,
+ int mt7996_mcu_add_rate_ctrl(struct mt7996_dev *dev, struct ieee80211_vif *vif,
+ 			     struct ieee80211_sta *sta, bool changed);
+ int mt7996_set_channel(struct mt7996_phy *phy);
++int mt7996_mcu_set_fixed_field(struct mt7996_dev *dev, struct ieee80211_vif *vif,
++			       struct ieee80211_sta *sta, void *data, u32 field);
+ int mt7996_mcu_set_chan_info(struct mt7996_phy *phy, u16 tag);
+ int mt7996_mcu_set_tx(struct mt7996_dev *dev, struct ieee80211_vif *vif);
+ int mt7996_mcu_set_fixed_rate_ctrl(struct mt7996_dev *dev,
+-- 
+2.39.2
+