]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix managed mode channel flags handling
authorJohannes Berg <johannes.berg@intel.com>
Mon, 26 Nov 2012 10:57:41 +0000 (11:57 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 26 Nov 2012 11:37:38 +0000 (12:37 +0100)
commit537b43347891660139da5a897663be7d64f12e13
tree3052dd1c94c25dcd1260675fa6bad534fc1dd994
parent7cf162e8a10f0b4dae8a582d123aad13e5dc30da
mac80211: fix managed mode channel flags handling

If ieee80211_prep_channel() decides that HT should be
disabled (because the HT IEs from the AP were invalid)
it will set the IEEE80211_STA_DISABLE_HT to not send
HT capabilities to the AP when associating. If this
happens during authentication, the flag will be lost
and we send HT frames, even if the channel config was
set up for non-HT. This can lead to issues.

Fix this by always resetting the ifmgd flags to zero
when the channel context is released so that the flag
resetting in ieee80211_mgd_assoc() isn't necessary.

To make the code a bit easier move the call to release
the channel in ieee80211_set_disassoc() to the end of
the function together with the flag resetting (which
needs to be at the end to avoid timers setting flags.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c