mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 14:21:47 +00:00
mac80211: fix no-op authorized transitions
When userspace attempts to authorize a station that is already authorized, nothing happens as you'd expect. Similarly, when it unauthorizes a station that is associated, nothing happens. However, when it unauthorizes a station that isn't even associated yet, we erroneously try to move the station to associated. This seems to happen occasionally as a result of a race when wpa_supplicant attempts to unauthorize the port in managed mode. Particularly with my new patches to keep stations, it can then move a station into ASSOCIATED state before we have really associated, which is really confusing. I introduced this bug in "mac80211: refactor station state transitions" Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
dfd00c4c8f
commit
543d1b92d5
@ -791,7 +791,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
|
|||||||
if (set & BIT(NL80211_STA_FLAG_AUTHORIZED))
|
if (set & BIT(NL80211_STA_FLAG_AUTHORIZED))
|
||||||
ret = sta_info_move_state_checked(sta,
|
ret = sta_info_move_state_checked(sta,
|
||||||
IEEE80211_STA_AUTHORIZED);
|
IEEE80211_STA_AUTHORIZED);
|
||||||
else
|
else if (test_sta_flag(sta, WLAN_STA_AUTHORIZED))
|
||||||
ret = sta_info_move_state_checked(sta,
|
ret = sta_info_move_state_checked(sta,
|
||||||
IEEE80211_STA_ASSOC);
|
IEEE80211_STA_ASSOC);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
Loading…
Reference in New Issue
Block a user