mac80211: add TDLS supported channels correctly
authorArik Nemtsov <arik@wizery.com>
Wed, 7 Jan 2015 14:45:07 +0000 (16:45 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 14 Jan 2015 08:34:33 +0000 (09:34 +0100)
commit50075892ba30c4c19c41235b5308ee5a1e2125d7
treef83c564dd090c586fe5936d35e063574204fcd73
parent3b24f4c65386dc0f2efb41027bc6e410ea2c0049
mac80211: add TDLS supported channels correctly

The function adding the supported channels IE during a TDLS connection had
several issues:
1. If the entire subband is usable, the function exitted the loop without
   adding it
2. The function only checked chandef_usable, ignoring flags like RADAR
   which would prevent TDLS off-channel communcation.
3. HT20 was explicitly required in the chandef, while not a requirement
   for TDLS off-channel.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tdls.c