diff options
| author | Felix Fietkau <nbd@nbd.name> | 2025-03-11 11:36:41 +0100 |
|---|---|---|
| committer | Felix Fietkau <nbd@nbd.name> | 2025-03-19 14:47:04 +0100 |
| commit | 3ba20af886d1f604dceeb4d4c8ff872e2c4e885e (patch) | |
| tree | 095a8a6dca16fe5cc7f1e5f0595847afb2f593e8 /drivers/net/wireless/mediatek/mt76/channel.c | |
| parent | 0337355cc217215ba7c4e5a858c8f73c1a78bab4 (diff) | |
wifi: mt76: scan: set vif offchannel link for scanning/roc
The driver needs to know what vif link to use
Link: https://patch.msgid.link/20250311103646.43346-4-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/channel.c')
| -rw-r--r-- | drivers/net/wireless/mediatek/mt76/channel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/channel.c b/drivers/net/wireless/mediatek/mt76/channel.c index 6a35c6ebd823..e7b839e74290 100644 --- a/drivers/net/wireless/mediatek/mt76/channel.c +++ b/drivers/net/wireless/mediatek/mt76/channel.c @@ -293,6 +293,7 @@ struct mt76_vif_link *mt76_get_vif_phy_link(struct mt76_phy *phy, kfree(mlink); return ERR_PTR(ret); } + rcu_assign_pointer(mvif->offchannel_link, mlink); return mlink; } @@ -301,10 +302,12 @@ void mt76_put_vif_phy_link(struct mt76_phy *phy, struct ieee80211_vif *vif, struct mt76_vif_link *mlink) { struct mt76_dev *dev = phy->dev; + struct mt76_vif_data *mvif = mlink->mvif; if (IS_ERR_OR_NULL(mlink) || !mlink->offchannel) return; + rcu_assign_pointer(mvif->offchannel_link, NULL); dev->drv->vif_link_remove(phy, vif, &vif->bss_conf, mlink); kfree(mlink); } |
