mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 18:12:25 -04:00
wifi: mt76: mt7925: add mt7925_mac_link_sta_assoc to associate per-link STA
The mt7925_mac_link_sta_add function currently associates the per-link STA. We will extend this function when we implement the MLO functionality. This patch only includes structural changes and does not involve any logic changes. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/20240613030241.5771-44-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
@@ -767,32 +767,43 @@ int mt7925_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt7925_mac_sta_add);
|
||||
|
||||
void mt7925_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta)
|
||||
static void mt7925_mac_link_sta_assoc(struct mt76_dev *mdev,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_link_sta *link_sta)
|
||||
{
|
||||
struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76);
|
||||
struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv;
|
||||
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
|
||||
struct ieee80211_bss_conf *link_conf;
|
||||
struct mt792x_link_sta *mlink;
|
||||
struct mt792x_sta *msta;
|
||||
|
||||
msta = (struct mt792x_sta *)link_sta->sta->drv_priv;
|
||||
mlink = mt792x_sta_to_link(msta, link_sta->link_id);
|
||||
|
||||
mt792x_mutex_acquire(dev);
|
||||
|
||||
link_conf = mt792x_vif_to_bss_conf(vif, vif->bss_conf.link_id);
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
|
||||
if (vif->type == NL80211_IFTYPE_STATION && !link_sta->sta->tdls)
|
||||
mt7925_mcu_add_bss_info(&dev->phy, mvif->bss_conf.mt76.ctx,
|
||||
link_conf, &sta->deflink, true);
|
||||
link_conf, link_sta, true);
|
||||
|
||||
ewma_avg_signal_init(&msta->deflink.avg_ack_signal);
|
||||
ewma_avg_signal_init(&mlink->avg_ack_signal);
|
||||
|
||||
mt7925_mac_wtbl_update(dev, msta->deflink.wcid.idx,
|
||||
mt7925_mac_wtbl_update(dev, mlink->wcid.idx,
|
||||
MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
|
||||
memset(msta->deflink.airtime_ac, 0, sizeof(msta->deflink.airtime_ac));
|
||||
memset(mlink->airtime_ac, 0, sizeof(mlink->airtime_ac));
|
||||
|
||||
mt7925_mcu_sta_update(dev, &sta->deflink, vif, true, MT76_STA_INFO_STATE_ASSOC);
|
||||
mt7925_mcu_sta_update(dev, link_sta, vif, true, MT76_STA_INFO_STATE_ASSOC);
|
||||
|
||||
mt792x_mutex_release(dev);
|
||||
}
|
||||
|
||||
void mt7925_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
mt7925_mac_link_sta_assoc(mdev, vif, &sta->deflink);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt7925_mac_sta_assoc);
|
||||
|
||||
void mt7925_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
|
||||
|
||||
Reference in New Issue
Block a user