diff options
author | Andrei Otcheretianski <andrei.otcheretianski@intel.com> | 2022-06-22 15:02:37 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-07-15 12:43:14 +0300 |
commit | b8375cf15834721c4534c118c5a201b92c1c385b (patch) | |
tree | a8d0e92dd16c4e8eedd292cfda44e7024c309b81 /drivers/net/wireless/mac80211_hwsim.c | |
parent | 1d4c0f0405ee8cf8ecbf743d640133af58e56e21 (diff) | |
download | linux-b8375cf15834721c4534c118c5a201b92c1c385b.tar.xz |
wifi: mac80211_hwsim: Ack link addressed frames
Do address matching with link addresses as well.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 6bad95eeb709..737f8ed56d94 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -1198,10 +1198,27 @@ struct mac80211_hwsim_addr_match_data { static void mac80211_hwsim_addr_iter(void *data, u8 *mac, struct ieee80211_vif *vif) { + int i; struct mac80211_hwsim_addr_match_data *md = data; - if (memcmp(mac, md->addr, ETH_ALEN) == 0) + if (memcmp(mac, md->addr, ETH_ALEN) == 0) { md->ret = true; + return; + } + + /* Match the link address */ + for (i = 0; i < ARRAY_SIZE(vif->link_conf); i++) { + struct ieee80211_bss_conf *conf; + + conf = rcu_dereference(vif->link_conf[i]); + if (!conf) + continue; + + if (memcmp(conf->addr, md->addr, ETH_ALEN) == 0) { + md->ret = true; + return; + } + } } static bool mac80211_hwsim_addr_match(struct mac80211_hwsim_data *data, |