Commit a0ab9c31 authored by Sean Wang's avatar Sean Wang Committed by Felix Fietkau

wifi: mt76: mt7921: add chanctx parameter to mt76_connac_mcu_uni_add_bss signature

Add a chanctx parameter to mt76_connac_mcu_uni_add_bss signature to allow
the firmware binds the BSS into the specific channel context.
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent c1eab241
...@@ -1119,7 +1119,7 @@ mt7615_mcu_uni_add_bss(struct mt7615_phy *phy, struct ieee80211_vif *vif, ...@@ -1119,7 +1119,7 @@ mt7615_mcu_uni_add_bss(struct mt7615_phy *phy, struct ieee80211_vif *vif,
struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv; struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv;
return mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid, return mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid,
enable); enable, NULL);
} }
static inline int static inline int
......
...@@ -1432,10 +1432,11 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_uni_set_chctx); ...@@ -1432,10 +1432,11 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_uni_set_chctx);
int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy, int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
struct mt76_wcid *wcid, struct mt76_wcid *wcid,
bool enable) bool enable,
struct ieee80211_chanctx_conf *ctx)
{ {
struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv; struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
struct cfg80211_chan_def *chandef = &phy->chandef; struct cfg80211_chan_def *chandef = ctx ? &ctx->def : &phy->chandef;
enum nl80211_band band = chandef->chan->band; enum nl80211_band band = chandef->chan->band;
struct mt76_dev *mdev = phy->dev; struct mt76_dev *mdev = phy->dev;
struct { struct {
...@@ -1552,7 +1553,7 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy, ...@@ -1552,7 +1553,7 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
return err; return err;
} }
return mt76_connac_mcu_uni_set_chctx(phy, mvif, NULL); return mt76_connac_mcu_uni_set_chctx(phy, mvif, ctx);
} }
EXPORT_SYMBOL_GPL(mt76_connac_mcu_uni_add_bss); EXPORT_SYMBOL_GPL(mt76_connac_mcu_uni_add_bss);
......
...@@ -1753,7 +1753,8 @@ int mt76_connac_mcu_uni_set_chctx(struct mt76_phy *phy, ...@@ -1753,7 +1753,8 @@ int mt76_connac_mcu_uni_set_chctx(struct mt76_phy *phy,
int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy, int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
struct mt76_wcid *wcid, struct mt76_wcid *wcid,
bool enable); bool enable,
struct ieee80211_chanctx_conf *ctx);
int mt76_connac_mcu_sta_cmd(struct mt76_phy *phy, int mt76_connac_mcu_sta_cmd(struct mt76_phy *phy,
struct mt76_sta_cmd_info *info); struct mt76_sta_cmd_info *info);
void mt76_connac_mcu_beacon_loss_iter(void *priv, u8 *mac, void mt76_connac_mcu_beacon_loss_iter(void *priv, u8 *mac,
......
...@@ -866,7 +866,7 @@ mt7921_vif_connect_iter(void *priv, u8 *mac, ...@@ -866,7 +866,7 @@ mt7921_vif_connect_iter(void *priv, u8 *mac,
if (vif->type == NL80211_IFTYPE_AP) { if (vif->type == NL80211_IFTYPE_AP) {
mt76_connac_mcu_uni_add_bss(dev->phy.mt76, vif, &mvif->sta.wcid, mt76_connac_mcu_uni_add_bss(dev->phy.mt76, vif, &mvif->sta.wcid,
true); true, NULL);
mt7921_mcu_sta_update(dev, NULL, vif, true, mt7921_mcu_sta_update(dev, NULL, vif, true,
MT76_STA_INFO_STATE_NONE); MT76_STA_INFO_STATE_NONE);
mt7921_mcu_uni_add_beacon_offload(dev, hw, vif, true); mt7921_mcu_uni_add_beacon_offload(dev, hw, vif, true);
......
...@@ -748,7 +748,7 @@ void mt7921_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif, ...@@ -748,7 +748,7 @@ void mt7921_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif,
if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
mt76_connac_mcu_uni_add_bss(&dev->mphy, vif, &mvif->sta.wcid, mt76_connac_mcu_uni_add_bss(&dev->mphy, vif, &mvif->sta.wcid,
true); true, NULL);
mt7921_mac_wtbl_update(dev, msta->wcid.idx, mt7921_mac_wtbl_update(dev, msta->wcid.idx,
MT_WTBL_UPDATE_ADM_COUNT_CLEAR); MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
...@@ -780,7 +780,8 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif, ...@@ -780,7 +780,8 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
ewma_rssi_init(&mvif->rssi); ewma_rssi_init(&mvif->rssi);
if (!sta->tdls) if (!sta->tdls)
mt76_connac_mcu_uni_add_bss(&dev->mphy, vif, mt76_connac_mcu_uni_add_bss(&dev->mphy, vif,
&mvif->sta.wcid, false); &mvif->sta.wcid, false,
NULL);
} }
spin_lock_bh(&dev->sta_poll_lock); spin_lock_bh(&dev->sta_poll_lock);
...@@ -1534,7 +1535,7 @@ mt7921_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -1534,7 +1535,7 @@ mt7921_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
mt7921_mutex_acquire(dev); mt7921_mutex_acquire(dev);
err = mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid, err = mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid,
true); true, NULL);
if (err) if (err)
goto out; goto out;
...@@ -1565,7 +1566,8 @@ mt7921_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, ...@@ -1565,7 +1566,8 @@ mt7921_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (err) if (err)
goto out; goto out;
mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid, false); mt76_connac_mcu_uni_add_bss(phy->mt76, vif, &mvif->sta.wcid, false,
NULL);
out: out:
mt7921_mutex_release(dev); mt7921_mutex_release(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment