mac80211: Do not disconnect on invalid operating class
authorIlan Peer <ilan.peer@intel.com>
Mon, 19 Feb 2018 12:48:42 +0000 (14:48 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Feb 2018 13:53:14 +0000 (14:53 +0100)
commit191da271ac260700db3e5b4bb982a17ca78769d6
tree28f17b9811f92d9e2a785cc5a87a16d873942d5e
parent3027a8e799b20fc922496a12f8ad2f9f36a8a696
mac80211: Do not disconnect on invalid operating class

Some APs include a non global operating class in their extended channel
switch information element. In such a case, as the operating class is not
known, mac80211 would decide to disconnect.

However the specification states that the operating class needs to be
taken from Annex E, but it does not specify from which table it should be
taken, so it is valid for an AP to use a non global operating class.

To avoid possibly unneeded disconnection, in such a case ignore the
operating class and assume that the current band is used, and if the
resulting channel and band configuration is invalid disconnect.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/spectmgmt.c