mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: Add vif_cfg_changed callback
Introduce vif_cfg_changed mac80211 callback as preliminary patch to enable MLO support in MT7996 driver. Co-developed-by: Bo Jiao <[email protected]> Signed-off-by: Bo Jiao <[email protected]> Co-developed-by: Peter Chiu <[email protected]> Signed-off-by: Peter Chiu <[email protected]> Co-developed-by: Shayne Chen <[email protected]> Signed-off-by: Shayne Chen <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
915938e83c
commit
3e06380a43
+34
-1
@@ -677,6 +677,39 @@ mt7996_update_mu_group(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
mt76_wr(dev, MT_WF_PHYRX_BAND_GID_TAB_POS3(band), mu[3]);
|
||||
}
|
||||
|
||||
static void
|
||||
mt7996_vif_cfg_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
u64 changed)
|
||||
{
|
||||
struct mt7996_dev *dev = mt7996_hw_dev(hw);
|
||||
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
|
||||
if ((changed & BSS_CHANGED_ASSOC) && vif->cfg.assoc) {
|
||||
struct ieee80211_bss_conf *link_conf;
|
||||
unsigned long link_id;
|
||||
|
||||
for_each_vif_active_link(vif, link_conf, link_id) {
|
||||
struct mt7996_vif_link *link;
|
||||
|
||||
link = mt7996_vif_link(dev, vif, link_id);
|
||||
if (!link)
|
||||
continue;
|
||||
|
||||
if (!link->phy)
|
||||
continue;
|
||||
|
||||
mt7996_mcu_add_bss_info(link->phy, vif, link_conf,
|
||||
&link->mt76, true);
|
||||
mt7996_mcu_add_sta(dev, vif, &link->mt76, NULL,
|
||||
CONN_STATE_PORT_SECURE,
|
||||
!!(changed & BSS_CHANGED_BSSID));
|
||||
}
|
||||
}
|
||||
|
||||
mutex_unlock(&dev->mt76.mutex);
|
||||
}
|
||||
|
||||
static void mt7996_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info,
|
||||
@@ -703,7 +736,6 @@ static void mt7996_bss_info_changed(struct ieee80211_hw *hw,
|
||||
* and then peer references bss_info_rfch to set bandwidth cap.
|
||||
*/
|
||||
if ((changed & BSS_CHANGED_BSSID && !is_zero_ether_addr(info->bssid)) ||
|
||||
(changed & BSS_CHANGED_ASSOC && vif->cfg.assoc) ||
|
||||
(changed & BSS_CHANGED_BEACON_ENABLED && info->enable_beacon)) {
|
||||
mt7996_mcu_add_bss_info(phy, vif, info, mvif, true);
|
||||
mt7996_mcu_add_sta(dev, vif, mvif, NULL, CONN_STATE_PORT_SECURE,
|
||||
@@ -1685,6 +1717,7 @@ const struct ieee80211_ops mt7996_ops = {
|
||||
.conf_tx = mt7996_conf_tx,
|
||||
.configure_filter = mt7996_configure_filter,
|
||||
.bss_info_changed = mt7996_bss_info_changed,
|
||||
.vif_cfg_changed = mt7996_vif_cfg_changed,
|
||||
.sta_state = mt76_sta_state,
|
||||
.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
|
||||
.sta_rc_update = mt7996_sta_rc_update,
|
||||
|
||||
Reference in New Issue
Block a user