mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: connac: fix UC entry is being overwritten
Fix UC entry is being overwritten by BC entry Tested-by: Deren Wu <[email protected]> Co-developed-by: Deren Wu <[email protected]> Signed-off-by: Deren Wu <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
624c681ef0
commit
a27dfcb63c
+5
-3
@@ -1148,12 +1148,14 @@ mt7615_mcu_sta_rx_ba(struct mt7615_dev *dev,
|
||||
|
||||
static int
|
||||
__mt7615_mcu_add_sta(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta, bool enable, int cmd)
|
||||
struct ieee80211_sta *sta, bool enable, int cmd,
|
||||
bool offload_fw)
|
||||
{
|
||||
struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv;
|
||||
struct mt76_sta_cmd_info info = {
|
||||
.sta = sta,
|
||||
.vif = vif,
|
||||
.offload_fw = offload_fw,
|
||||
.enable = enable,
|
||||
.cmd = cmd,
|
||||
};
|
||||
@@ -1167,7 +1169,7 @@ mt7615_mcu_add_sta(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta, bool enable)
|
||||
{
|
||||
return __mt7615_mcu_add_sta(phy->mt76, vif, sta, enable,
|
||||
MCU_EXT_CMD_STA_REC_UPDATE);
|
||||
MCU_EXT_CMD_STA_REC_UPDATE, false);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1302,7 +1304,7 @@ mt7615_mcu_uni_add_sta(struct mt7615_phy *phy, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta, bool enable)
|
||||
{
|
||||
return __mt7615_mcu_add_sta(phy->mt76, vif, sta, enable,
|
||||
MCU_UNI_CMD_STA_REC_UPDATE);
|
||||
MCU_UNI_CMD_STA_REC_UPDATE, true);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
+16
-16
@@ -879,14 +879,12 @@ int mt76_connac_mcu_add_sta_cmd(struct mt76_phy *phy,
|
||||
if (IS_ERR(skb))
|
||||
return PTR_ERR(skb);
|
||||
|
||||
mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta, info->enable);
|
||||
|
||||
if (!info->enable)
|
||||
goto out;
|
||||
|
||||
if (info->sta)
|
||||
mt76_connac_mcu_sta_tlv(phy, skb, info->sta, info->vif,
|
||||
info->rcpi);
|
||||
if (info->sta || !info->offload_fw)
|
||||
mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta,
|
||||
info->enable);
|
||||
if (info->sta && info->enable)
|
||||
mt76_connac_mcu_sta_tlv(phy, skb, info->sta,
|
||||
info->vif, info->rcpi);
|
||||
|
||||
sta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL,
|
||||
sizeof(struct tlv));
|
||||
@@ -897,15 +895,17 @@ int mt76_connac_mcu_add_sta_cmd(struct mt76_phy *phy,
|
||||
if (IS_ERR(wtbl_hdr))
|
||||
return PTR_ERR(wtbl_hdr);
|
||||
|
||||
mt76_connac_mcu_wtbl_generic_tlv(dev, skb, info->vif, info->sta,
|
||||
sta_wtbl, wtbl_hdr);
|
||||
mt76_connac_mcu_wtbl_hdr_trans_tlv(skb, info->vif, info->wcid,
|
||||
sta_wtbl, wtbl_hdr);
|
||||
if (info->sta)
|
||||
mt76_connac_mcu_wtbl_ht_tlv(dev, skb, info->sta, sta_wtbl,
|
||||
wtbl_hdr);
|
||||
if (info->enable) {
|
||||
mt76_connac_mcu_wtbl_generic_tlv(dev, skb, info->vif,
|
||||
info->sta, sta_wtbl,
|
||||
wtbl_hdr);
|
||||
mt76_connac_mcu_wtbl_hdr_trans_tlv(skb, info->vif, info->wcid,
|
||||
sta_wtbl, wtbl_hdr);
|
||||
if (info->sta)
|
||||
mt76_connac_mcu_wtbl_ht_tlv(dev, skb, info->sta,
|
||||
sta_wtbl, wtbl_hdr);
|
||||
}
|
||||
|
||||
out:
|
||||
return mt76_mcu_skb_send_msg(dev, skb, info->cmd, true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_connac_mcu_add_sta_cmd);
|
||||
|
||||
@@ -910,6 +910,7 @@ struct mt76_sta_cmd_info {
|
||||
|
||||
struct ieee80211_vif *vif;
|
||||
|
||||
bool offload_fw;
|
||||
bool enable;
|
||||
int cmd;
|
||||
u8 rcpi;
|
||||
|
||||
@@ -1277,6 +1277,7 @@ int mt7921_mcu_sta_add(struct mt7921_dev *dev, struct ieee80211_sta *sta,
|
||||
.vif = vif,
|
||||
.enable = enable,
|
||||
.cmd = MCU_UNI_CMD_STA_REC_UPDATE,
|
||||
.offload_fw = true,
|
||||
.rcpi = to_rcpi(rssi),
|
||||
};
|
||||
struct mt7921_sta *msta;
|
||||
|
||||
Reference in New Issue
Block a user