summaryrefslogtreecommitdiff
path: root/net/mac80211/tdls.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2014-07-17 17:14:23 +0300
committerJohannes Berg <johannes.berg@intel.com>2014-07-21 12:14:04 +0200
commit40b861a0eeb06bbfa472b456482ebf89b6886926 (patch)
treeba907a8dd7e5f7ac8f16e4308c16afca577fc641 /net/mac80211/tdls.c
parentdd8c0b03d35be7effe20c9e5fda7e231e2c88e19 (diff)
mac80211: add QoS IE during TDLS setup start
If QoS is supported by the card, add an appropriate IE to TDLS setup- request and setup-response frames. Consolidate the setting of the WMM info IE across mac80211. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tdls.c')
-rw-r--r--net/mac80211/tdls.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index 398a41302972..bfd8fc4a6b2f 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -100,6 +100,7 @@ ieee80211_tdls_add_setup_start_ies(struct ieee80211_sub_if_data *sdata,
const u8 *extra_ies, size_t extra_ies_len)
{
enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
+ struct ieee80211_local *local = sdata->local;
size_t offset = 0, noffset;
u8 *pos;
@@ -126,6 +127,11 @@ ieee80211_tdls_add_setup_start_ies(struct ieee80211_sub_if_data *sdata,
ieee80211_tdls_add_ext_capab(skb);
+ /* add the QoS element if we support it */
+ if (local->hw.queues >= IEEE80211_NUM_ACS &&
+ action_code != WLAN_PUB_ACTION_TDLS_DISCOVER_RES)
+ ieee80211_add_wmm_info_ie(skb_put(skb, 9), 0); /* no U-APSD */
+
/* add any custom IEs that go before HT capabilities */
if (extra_ies_len) {
static const u8 before_ht_cap[] = {
@@ -310,6 +316,7 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev,
sizeof(struct ieee80211_tdls_data)) +
50 + /* supported rates */
7 + /* ext capab */
+ 26 + /* max(WMM-info, WMM-param) */
extra_ies_len +
sizeof(struct ieee80211_tdls_lnkie));
if (!skb)