diff options
-rw-r--r-- | net/mac80211/ibss.c | 13 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 1 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 11 | ||||
-rw-r--r-- | net/mac80211/tdls.c | 7 | ||||
-rw-r--r-- | net/mac80211/util.c | 15 |
5 files changed, 26 insertions, 21 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 713485f9effc..9713dc54ea4b 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -189,17 +189,8 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata, | |||
189 | chandef, 0); | 189 | chandef, 0); |
190 | } | 190 | } |
191 | 191 | ||
192 | if (local->hw.queues >= IEEE80211_NUM_ACS) { | 192 | if (local->hw.queues >= IEEE80211_NUM_ACS) |
193 | *pos++ = WLAN_EID_VENDOR_SPECIFIC; | 193 | pos = ieee80211_add_wmm_info_ie(pos, 0); /* U-APSD not in use */ |
194 | *pos++ = 7; /* len */ | ||
195 | *pos++ = 0x00; /* Microsoft OUI 00:50:F2 */ | ||
196 | *pos++ = 0x50; | ||
197 | *pos++ = 0xf2; | ||
198 | *pos++ = 2; /* WME */ | ||
199 | *pos++ = 0; /* WME info */ | ||
200 | *pos++ = 1; /* WME ver */ | ||
201 | *pos++ = 0; /* U-APSD no in use */ | ||
202 | } | ||
203 | 194 | ||
204 | presp->head_len = pos - presp->head; | 195 | presp->head_len = pos - presp->head; |
205 | if (WARN_ON(presp->head_len > frame_len)) | 196 | if (WARN_ON(presp->head_len > frame_len)) |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 9e025e1184cc..cb874760e99f 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1824,6 +1824,7 @@ int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, | |||
1824 | int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, | 1824 | int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, |
1825 | struct sk_buff *skb, bool need_basic, | 1825 | struct sk_buff *skb, bool need_basic, |
1826 | enum ieee80211_band band); | 1826 | enum ieee80211_band band); |
1827 | u8 *ieee80211_add_wmm_info_ie(u8 *buf, u8 qosinfo); | ||
1827 | 1828 | ||
1828 | /* channel management */ | 1829 | /* channel management */ |
1829 | void ieee80211_ht_oper_to_chandef(struct ieee80211_channel *control_chan, | 1830 | void ieee80211_ht_oper_to_chandef(struct ieee80211_channel *control_chan, |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 931330bbe00c..d863ff8b6e41 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -830,16 +830,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
830 | qos_info = 0; | 830 | qos_info = 0; |
831 | } | 831 | } |
832 | 832 | ||
833 | pos = skb_put(skb, 9); | 833 | pos = ieee80211_add_wmm_info_ie(skb_put(skb, 9), qos_info); |
834 | *pos++ = WLAN_EID_VENDOR_SPECIFIC; | ||
835 | *pos++ = 7; /* len */ | ||
836 | *pos++ = 0x00; /* Microsoft OUI 00:50:F2 */ | ||
837 | *pos++ = 0x50; | ||
838 | *pos++ = 0xf2; | ||
839 | *pos++ = 2; /* WME */ | ||
840 | *pos++ = 0; /* WME info */ | ||
841 | *pos++ = 1; /* WME ver */ | ||
842 | *pos++ = qos_info; | ||
843 | } | 834 | } |
844 | 835 | ||
845 | /* add any remaining custom (i.e. vendor specific here) IEs */ | 836 | /* add any remaining custom (i.e. vendor specific here) IEs */ |
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, | |||
100 | const u8 *extra_ies, size_t extra_ies_len) | 100 | const u8 *extra_ies, size_t extra_ies_len) |
101 | { | 101 | { |
102 | enum ieee80211_band band = ieee80211_get_sdata_band(sdata); | 102 | enum ieee80211_band band = ieee80211_get_sdata_band(sdata); |
103 | struct ieee80211_local *local = sdata->local; | ||
103 | size_t offset = 0, noffset; | 104 | size_t offset = 0, noffset; |
104 | u8 *pos; | 105 | u8 *pos; |
105 | 106 | ||
@@ -126,6 +127,11 @@ ieee80211_tdls_add_setup_start_ies(struct ieee80211_sub_if_data *sdata, | |||
126 | 127 | ||
127 | ieee80211_tdls_add_ext_capab(skb); | 128 | ieee80211_tdls_add_ext_capab(skb); |
128 | 129 | ||
130 | /* add the QoS element if we support it */ | ||
131 | if (local->hw.queues >= IEEE80211_NUM_ACS && | ||
132 | action_code != WLAN_PUB_ACTION_TDLS_DISCOVER_RES) | ||
133 | ieee80211_add_wmm_info_ie(skb_put(skb, 9), 0); /* no U-APSD */ | ||
134 | |||
129 | /* add any custom IEs that go before HT capabilities */ | 135 | /* add any custom IEs that go before HT capabilities */ |
130 | if (extra_ies_len) { | 136 | if (extra_ies_len) { |
131 | static const u8 before_ht_cap[] = { | 137 | static const u8 before_ht_cap[] = { |
@@ -310,6 +316,7 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev, | |||
310 | sizeof(struct ieee80211_tdls_data)) + | 316 | sizeof(struct ieee80211_tdls_data)) + |
311 | 50 + /* supported rates */ | 317 | 50 + /* supported rates */ |
312 | 7 + /* ext capab */ | 318 | 7 + /* ext capab */ |
319 | 26 + /* max(WMM-info, WMM-param) */ | ||
313 | extra_ies_len + | 320 | extra_ies_len + |
314 | sizeof(struct ieee80211_tdls_lnkie)); | 321 | sizeof(struct ieee80211_tdls_lnkie)); |
315 | if (!skb) | 322 | if (!skb) |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index ea79668c2e5f..08ce77664082 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -3082,3 +3082,18 @@ int ieee80211_max_num_channels(struct ieee80211_local *local) | |||
3082 | 3082 | ||
3083 | return max_num_different_channels; | 3083 | return max_num_different_channels; |
3084 | } | 3084 | } |
3085 | |||
3086 | u8 *ieee80211_add_wmm_info_ie(u8 *buf, u8 qosinfo) | ||
3087 | { | ||
3088 | *buf++ = WLAN_EID_VENDOR_SPECIFIC; | ||
3089 | *buf++ = 7; /* len */ | ||
3090 | *buf++ = 0x00; /* Microsoft OUI 00:50:F2 */ | ||
3091 | *buf++ = 0x50; | ||
3092 | *buf++ = 0xf2; | ||
3093 | *buf++ = 2; /* WME */ | ||
3094 | *buf++ = 0; /* WME info */ | ||
3095 | *buf++ = 1; /* WME ver */ | ||
3096 | *buf++ = qosinfo; /* U-APSD no in use */ | ||
3097 | |||
3098 | return buf; | ||
3099 | } | ||