[][MAC80211][mt76][Fix AP crash when a station connects to AP]
[Description]
Fix AP crash when a station connects to AP.
[Release-log]
N/A
Change-Id: I0bd701989d034137cd438c6d8aa88aa25130b754
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7119694
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch
index 8788a80..1c216ec 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch
@@ -84,12 +84,12 @@
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
bool ext_phy = mvif->phy != &dev->phy;
+#ifdef CONFIG_MTK_VENDOR
-+ struct mt7915_phy *phy;
++ struct mt7915_phy *phy = ext_phy ? mt7915_ext_phy(dev) : &dev->phy;
+#endif
int ret, idx;
idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
-@@ -705,7 +708,17 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -705,7 +708,15 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
#ifdef CONFIG_MTK_VENDOR
mt7915_vendor_amnt_sta_remove(mvif->phy, sta);
#endif
@@ -99,10 +99,8 @@
+ return ret;
+
+#ifdef CONFIG_MTK_VENDOR
-+ if (phy->muru_onoff & MUMIMO_DL_CERT) {
-+ phy = mvif->mt76.band_idx ? mt7915_ext_phy(dev) : &dev->phy;
++ if (phy->muru_onoff & MUMIMO_DL_CERT)
+ mt7915_mcu_set_mimo(phy, 0);
-+ }
+#endif
+ return 0;
}