wifi: mt76: add multi-radio support to scanning code

When scanning on a phy/vif combination that does not have an active link,
create a temporary link in order to ensure that we have a valid wcid.

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2024-10-27 08:52:59 +01:00
parent aeedee5c0a
commit fc0ff17b53
3 changed files with 77 additions and 2 deletions
+6
View File
@@ -782,6 +782,7 @@ struct mt76_vif_link {
u8 basic_rates_idx;
u8 mcast_rates_idx;
u8 beacon_rates_idx;
bool offchannel;
struct ieee80211_chanctx_conf *ctx;
struct mt76_wcid *wcid;
struct mt76_vif_data *mvif;
@@ -947,6 +948,7 @@ struct mt76_dev {
struct cfg80211_scan_request *req;
struct ieee80211_channel *chan;
struct ieee80211_vif *vif;
struct mt76_vif_link *mlink;
struct mt76_phy *phy;
int chan_idx;
} scan;
@@ -1576,6 +1578,10 @@ int mt76_set_channel(struct mt76_phy *phy, struct cfg80211_chan_def *chandef,
bool offchannel);
void mt76_scan_work(struct work_struct *work);
void mt76_abort_scan(struct mt76_dev *dev);
struct mt76_vif_link *mt76_get_vif_phy_link(struct mt76_phy *phy,
struct ieee80211_vif *vif);
void mt76_put_vif_phy_link(struct mt76_phy *phy, struct ieee80211_vif *vif,
struct mt76_vif_link *mlink);
/* usb */
static inline bool mt76u_urb_error(struct urb *urb)