diff options
author | Andrei Otcheretianski <andrei.otcheretianski@intel.com> | 2022-06-14 13:41:30 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-07-15 11:43:12 +0200 |
commit | 912fa56b27631ba4d9b6c59a9f6d7c53ae2795b2 (patch) | |
tree | 63f1dcdd4576c8bc1f6006949ae109ad437d68f8 /drivers | |
parent | 0bd509325508aad1bf01967d618ada7d8da14d4d (diff) |
wifi: mac80211_hwsim: Support link channel matching on rx
Accept frames from all the links' channels.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 31c8a77932dc..4f22f3df161c 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -1474,15 +1474,25 @@ static void mac80211_hwsim_tx_iter(void *_data, u8 *addr, struct ieee80211_vif *vif) { struct tx_iter_data *data = _data; + int i; - if (!vif->bss_conf.chanctx_conf) - return; + for (i = 0; i < ARRAY_SIZE(vif->link_conf); i++) { + struct ieee80211_bss_conf *conf = vif->link_conf[i]; + struct ieee80211_chanctx_conf *chanctx; - if (!hwsim_chans_compat(data->channel, - rcu_dereference(vif->bss_conf.chanctx_conf)->def.chan)) - return; + if (!conf) + continue; + + chanctx = rcu_dereference(conf->chanctx_conf); + if (!chanctx) + continue; + + if (!hwsim_chans_compat(data->channel, chanctx->def.chan)) + continue; - data->receive = true; + data->receive = true; + return; + } } static void mac80211_hwsim_add_vendor_rtap(struct sk_buff *skb) |