summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2022-06-22 14:11:06 +0200
committerFelix Fietkau <nbd@nbd.name>2022-07-11 13:40:03 +0200
commitdf6b739fd7d15371357c32d4b1190e681434a096 (patch)
treea01a0444b8e7ba0be441ba87aa0c7487f724234b /drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
parent18fced2017d8b8a21a484640f5880bd7ec0d62ec (diff)
downloadlinux-stable-df6b739fd7d15371357c32d4b1190e681434a096.tar.gz
linux-stable-df6b739fd7d15371357c32d4b1190e681434a096.tar.bz2
linux-stable-df6b739fd7d15371357c32d4b1190e681434a096.zip
mt76: mt7615: add sta_rec with EXTRA_INFO_NEW for the first time only
Set EXTRA_INFO_NEW for the first time only to prevent adding the same starec entry, otherwise the entry might be removed in fw. Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/mcu.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7615/mcu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 194e9ccd4a73..989b2a41b670 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -844,6 +844,7 @@ mt7615_mcu_wtbl_sta_add(struct mt7615_phy *phy, struct ieee80211_vif *vif,
struct mt7615_dev *dev = phy->dev;
struct wtbl_req_hdr *wtbl_hdr;
struct mt7615_sta *msta;
+ bool new_entry = true;
int cmd, err;
msta = sta ? (struct mt7615_sta *)sta->drv_priv : &mvif->sta;
@@ -853,7 +854,13 @@ mt7615_mcu_wtbl_sta_add(struct mt7615_phy *phy, struct ieee80211_vif *vif,
if (IS_ERR(sskb))
return PTR_ERR(sskb);
- mt76_connac_mcu_sta_basic_tlv(sskb, vif, sta, enable, true);
+ if (!sta) {
+ if (mvif->sta_added)
+ new_entry = false;
+ else
+ mvif->sta_added = true;
+ }
+ mt76_connac_mcu_sta_basic_tlv(sskb, vif, sta, enable, new_entry);
if (enable && sta)
mt76_connac_mcu_sta_tlv(phy->mt76, sskb, sta, vif, 0,
MT76_STA_INFO_STATE_ASSOC);