Commit b8375cf1 authored by Andrei Otcheretianski's avatar Andrei Otcheretianski Committed by Johannes Berg

wifi: mac80211_hwsim: Ack link addressed frames

Do address matching with link addresses as well.
Signed-off-by: default avatarAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 1d4c0f04
...@@ -1198,10 +1198,27 @@ struct mac80211_hwsim_addr_match_data { ...@@ -1198,10 +1198,27 @@ struct mac80211_hwsim_addr_match_data {
static void mac80211_hwsim_addr_iter(void *data, u8 *mac, static void mac80211_hwsim_addr_iter(void *data, u8 *mac,
struct ieee80211_vif *vif) struct ieee80211_vif *vif)
{ {
int i;
struct mac80211_hwsim_addr_match_data *md = data; 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; 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, static bool mac80211_hwsim_addr_match(struct mac80211_hwsim_data *data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment