diff options
author | Arik Nemtsov <arik@wizery.com> | 2014-11-09 11:50:14 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-11-19 12:44:58 -0500 |
commit | 78632a17eaa7a5abdc22aac8ca5932d6cad59984 (patch) | |
tree | 63f58a844da238091c67dea13d278af851b34237 /net/mac80211/tdls.c | |
parent | 2cedd87960a809dd9bf683f72123b7dce6736f07 (diff) |
cfg/mac80211: define TDLS channel switch feature bit
Define some related TDLS protocol constants and advertise channel switch
support in the extended-capabilities IE when the feature bit is defined.
Actually supporting TDLS channel-switching also requires support for
some new nl80211 commands, to be introduced by future patches.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tdls.c')
-rw-r--r-- | net/mac80211/tdls.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index 30a4c1004010..4554bdc72c91 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c | |||
@@ -35,16 +35,19 @@ void ieee80211_tdls_peer_del_work(struct work_struct *wk) | |||
35 | mutex_unlock(&local->mtx); | 35 | mutex_unlock(&local->mtx); |
36 | } | 36 | } |
37 | 37 | ||
38 | static void ieee80211_tdls_add_ext_capab(struct sk_buff *skb) | 38 | static void ieee80211_tdls_add_ext_capab(struct ieee80211_local *local, |
39 | struct sk_buff *skb) | ||
39 | { | 40 | { |
40 | u8 *pos = (void *)skb_put(skb, 7); | 41 | u8 *pos = (void *)skb_put(skb, 7); |
42 | bool chan_switch = local->hw.wiphy->features & | ||
43 | NL80211_FEATURE_TDLS_CHANNEL_SWITCH; | ||
41 | 44 | ||
42 | *pos++ = WLAN_EID_EXT_CAPABILITY; | 45 | *pos++ = WLAN_EID_EXT_CAPABILITY; |
43 | *pos++ = 5; /* len */ | 46 | *pos++ = 5; /* len */ |
44 | *pos++ = 0x0; | 47 | *pos++ = 0x0; |
45 | *pos++ = 0x0; | 48 | *pos++ = 0x0; |
46 | *pos++ = 0x0; | 49 | *pos++ = 0x0; |
47 | *pos++ = 0x0; | 50 | *pos++ = chan_switch ? WLAN_EXT_CAPA4_TDLS_CHAN_SWITCH : 0; |
48 | *pos++ = WLAN_EXT_CAPA5_TDLS_ENABLED; | 51 | *pos++ = WLAN_EXT_CAPA5_TDLS_ENABLED; |
49 | } | 52 | } |
50 | 53 | ||
@@ -289,7 +292,7 @@ ieee80211_tdls_add_setup_start_ies(struct ieee80211_sub_if_data *sdata, | |||
289 | offset = noffset; | 292 | offset = noffset; |
290 | } | 293 | } |
291 | 294 | ||
292 | ieee80211_tdls_add_ext_capab(skb); | 295 | ieee80211_tdls_add_ext_capab(local, skb); |
293 | 296 | ||
294 | /* add the QoS element if we support it */ | 297 | /* add the QoS element if we support it */ |
295 | if (local->hw.queues >= IEEE80211_NUM_ACS && | 298 | if (local->hw.queues >= IEEE80211_NUM_ACS && |