wifi: mac80211_hwsim: check STA magic in change_sta_links
authorJohannes Berg <johannes.berg@intel.com>
Fri, 2 Sep 2022 14:12:35 +0000 (16:12 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Sat, 3 Sep 2022 15:02:05 +0000 (17:02 +0200)
Just as an additional check that mac80211 isn't doing
anything strange, add a check of the STA magic (which
gets assigned when the station is added, and cleared
when the station is removed).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c

index 87176b205fc110e5a963a7aca0fd8f150d7449ad..48b1c39c1c05e2cd74c0fdba390b838b6884781b 100644 (file)
@@ -3021,6 +3021,8 @@ static int mac80211_hwsim_change_sta_links(struct ieee80211_hw *hw,
                                           struct ieee80211_sta *sta,
                                           u16 old_links, u16 new_links)
 {
+       hwsim_check_sta_magic(sta);
+
        return 0;
 }