mac80211: fix channel selection bug
authorJohannes Berg <johannes.berg@intel.com>
Sat, 9 Feb 2013 20:46:34 +0000 (21:46 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 11 Feb 2013 10:12:26 +0000 (11:12 +0100)
commit3d9646d0abd02c552f6f15c302b31aa321c2fa8b
treee76144304e1cbe85580626355a16e1cf2dcb91d0
parentd601cd8d950c85032cefdcda162b8cd2cda363bb
mac80211: fix channel selection bug

When trying to connect to an AP that advertises HT but not
VHT, the mac80211 code erroneously uses the configuration
from the AP as is instead of checking it against regulatory
and local capabilities. This can lead to using an invalid
or even inexistent channel (like 11/HT40+).

Additionally, the return flags from downgrading must be
ORed together, to collect them from all of the downgrades.
Also clarify the message.

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