diff options
author | Deren Wu <deren.wu@mediatek.com> | 2024-06-12 20:01:55 -0700 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2024-07-09 23:01:47 +0200 |
commit | 30e89baeb01fc765824ed931b33b0faf4d8d1461 (patch) | |
tree | 7c755c6bd4cb0f7d42560e18b5c03edd3df70a09 /drivers/net/wireless/mediatek/mt76/mt792x_core.c | |
parent | 0321e45737b8a1a7571edad9b4173fbb7b86c0ed (diff) |
wifi: mt76: mt792x: add struct mt792x_bss_conf
We are introducing a new structure, mt792x_bss_conf, to manage per-link
configurations in preparation for future STA support of Multi-Link
Operation (MLO).
The patch does not include any logic changes, only structural changes.
We have moved relevant parameters from the mt7921x_vif structure such
as to mt76 of mt76_vif structure, rssi and Tx queue parameters to
mt7921x_bss_conf structure. We can access those members to configure the
BSS for this interface, whether it is our own BSS or the one we are
associated with.
However, we have not yet created the per-link BSS configuration indexed by
link ID for Multi-Link Device (MLD) support. This step needs to be
extended before adding MLD support for AP mode.
Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Link: https://patch.msgid.link/20240613030241.5771-2-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt792x_core.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt792x_core.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt792x_core.c b/drivers/net/wireless/mediatek/mt76/mt792x_core.c index 4adca99eb9b8..9eeaf3344217 100644 --- a/drivers/net/wireless/mediatek/mt76/mt792x_core.c +++ b/drivers/net/wireless/mediatek/mt76/mt792x_core.c @@ -128,8 +128,8 @@ void mt792x_remove_interface(struct ieee80211_hw *hw, rcu_assign_pointer(dev->mt76.wcid[idx], NULL); - dev->mt76.vif_mask &= ~BIT_ULL(mvif->mt76.idx); - phy->omac_mask &= ~BIT_ULL(mvif->mt76.omac_idx); + dev->mt76.vif_mask &= ~BIT_ULL(mvif->bss_conf.mt76.idx); + phy->omac_mask &= ~BIT_ULL(mvif->bss_conf.mt76.omac_idx); mt792x_mutex_release(dev); spin_lock_bh(&dev->mt76.sta_poll_lock); @@ -149,7 +149,7 @@ int mt792x_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, /* no need to update right away, we'll get BSS_CHANGED_QOS */ queue = mt76_connac_lmac_mapping(queue); - mvif->queue_params[queue] = *params; + mvif->bss_conf.queue_params[queue] = *params; return 0; } @@ -178,7 +178,7 @@ u64 mt792x_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; struct mt792x_dev *dev = mt792x_hw_dev(hw); - u8 omac_idx = mvif->mt76.omac_idx; + u8 omac_idx = mvif->bss_conf.mt76.omac_idx; union { u64 t64; u32 t32[2]; @@ -204,7 +204,7 @@ void mt792x_set_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif, { struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; struct mt792x_dev *dev = mt792x_hw_dev(hw); - u8 omac_idx = mvif->mt76.omac_idx; + u8 omac_idx = mvif->bss_conf.mt76.omac_idx; union { u64 t64; u32 t32[2]; @@ -265,7 +265,7 @@ int mt792x_assign_vif_chanctx(struct ieee80211_hw *hw, struct mt792x_dev *dev = mt792x_hw_dev(hw); mutex_lock(&dev->mt76.mutex); - mvif->mt76.ctx = ctx; + mvif->bss_conf.mt76.ctx = ctx; mutex_unlock(&dev->mt76.mutex); return 0; @@ -281,7 +281,7 @@ void mt792x_unassign_vif_chanctx(struct ieee80211_hw *hw, struct mt792x_dev *dev = mt792x_hw_dev(hw); mutex_lock(&dev->mt76.mutex); - mvif->mt76.ctx = NULL; + mvif->bss_conf.mt76.ctx = NULL; mutex_unlock(&dev->mt76.mutex); } EXPORT_SYMBOL_GPL(mt792x_unassign_vif_chanctx); @@ -405,7 +405,7 @@ mt792x_ethtool_worker(void *wi_data, struct ieee80211_sta *sta) struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv; struct mt76_ethtool_worker_info *wi = wi_data; - if (msta->vif->mt76.idx != wi->idx) + if (msta->vif->bss_conf.mt76.idx != wi->idx) return; mt76_ethtool_worker(wi, &msta->wcid.stats, true); @@ -421,7 +421,7 @@ void mt792x_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct mt76_mib_stats *mib = &phy->mib; struct mt76_ethtool_worker_info wi = { .data = data, - .idx = mvif->mt76.idx, + .idx = mvif->bss_conf.mt76.idx, }; int i, ei = 0; |