mac80211: TDLS: change BW calculation for WIDER_BW peers
authorArik Nemtsov <arik@wizery.com>
Wed, 2 Mar 2016 21:28:32 +0000 (23:28 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 5 Apr 2016 08:50:52 +0000 (10:50 +0200)
commit59021c675995281d453eee45b3e2e1e3edbc0ec2
tree3aa795ecea3d0d712419121d978733649b14c760
parentdb8d99774c2682559b7648857697b9b588c6795a
mac80211: TDLS: change BW calculation for WIDER_BW peers

The previous approach simply ignored chandef restrictions when calculating
the appropriate peer BW for a WIDER_BW peer. This could result in a
regulatory violation if both peers indicated 80MHz support, but the
regdomain forbade it.

Change the approach to setting a WIDER_BW peer's BW. Don't exempt it from
the chandef width at first. If during TDLS negotiation the chandef width
is upgraded, update the peer's BW to match.

Fixes: 0fabfaafec3a ("mac80211: upgrade BW of TDLS peers when possible")
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/tdls.c
net/mac80211/vht.c