summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mac80211_hwsim.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-09-02 16:12:39 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-09-03 17:03:39 +0200
commit419bd7a7aa4972b0c761707bf36c4021ddc34c4f (patch)
treec837adedc3f24c9dbd41cea8cef7c3e2582d34d2 /drivers/net/wireless/mac80211_hwsim.c
parentwifi: mac80211: fix double SW scan stop (diff)
downloadlinux-419bd7a7aa4972b0c761707bf36c4021ddc34c4f.tar.xz
linux-419bd7a7aa4972b0c761707bf36c4021ddc34c4f.zip
wifi: mac80211_hwsim: warn on invalid link address
Catch the bugs fixed in mac80211 by the previous commits and warn if an invalid address is added (or removed). 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 70a72a03398a..a75420d92816 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1299,6 +1299,8 @@ static void mac80211_hwsim_config_mac_nl(struct ieee80211_hw *hw,
struct sk_buff *skb;
void *msg_head;
+ WARN_ON(!is_valid_ether_addr(addr));
+
if (!_portid && !hwsim_virtio_enabled)
return;