diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-05-02 18:59:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-14 16:29:33 -0400 |
commit | 3434fbd39862d471c92b66c28cd449deea8e9f90 (patch) | |
tree | 8a759cac10a7aa9400dfb2c3ab5153af1f7a10d5 /net/mac80211/mlme.c | |
parent | ca21614d4c7a176d3723ac211873020b3722dbda (diff) |
mac80211: require four hardware queues for QoS/HT
This patch makes mac80211 only announce QoS/HT support when
the underlying hardware has four (or more) queues.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Ron Rindjunksi <ron.rindjunksi@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 55b85ae5bc11..108c6fc42fe2 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -272,6 +272,12 @@ static void ieee80211_sta_wmm_params(struct net_device *dev, | |||
272 | int count; | 272 | int count; |
273 | u8 *pos; | 273 | u8 *pos; |
274 | 274 | ||
275 | if (!(ifsta->flags & IEEE80211_STA_WMM_ENABLED)) | ||
276 | return; | ||
277 | |||
278 | if (!wmm_param) | ||
279 | return; | ||
280 | |||
275 | if (wmm_param_len < 8 || wmm_param[5] /* version */ != 1) | 281 | if (wmm_param_len < 8 || wmm_param[5] /* version */ != 1) |
276 | return; | 282 | return; |
277 | count = wmm_param[6] & 0x0f; | 283 | count = wmm_param[6] & 0x0f; |
@@ -763,8 +769,10 @@ static void ieee80211_send_assoc(struct net_device *dev, | |||
763 | *pos++ = 1; /* WME ver */ | 769 | *pos++ = 1; /* WME ver */ |
764 | *pos++ = 0; | 770 | *pos++ = 0; |
765 | } | 771 | } |
772 | |||
766 | /* wmm support is a must to HT */ | 773 | /* wmm support is a must to HT */ |
767 | if (wmm && sband->ht_info.ht_supported) { | 774 | if (wmm && (ifsta->flags & IEEE80211_STA_WMM_ENABLED) && |
775 | sband->ht_info.ht_supported) { | ||
768 | __le16 tmp = cpu_to_le16(sband->ht_info.cap); | 776 | __le16 tmp = cpu_to_le16(sband->ht_info.cap); |
769 | pos = skb_put(skb, sizeof(struct ieee80211_ht_cap)+2); | 777 | pos = skb_put(skb, sizeof(struct ieee80211_ht_cap)+2); |
770 | *pos++ = WLAN_EID_HT_CAPABILITY; | 778 | *pos++ = WLAN_EID_HT_CAPABILITY; |
@@ -2021,7 +2029,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
2021 | else | 2029 | else |
2022 | sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE; | 2030 | sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE; |
2023 | 2031 | ||
2024 | if (elems.ht_cap_elem && elems.ht_info_elem && elems.wmm_param) { | 2032 | if (elems.ht_cap_elem && elems.ht_info_elem && elems.wmm_param && |
2033 | (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { | ||
2025 | struct ieee80211_ht_bss_info bss_info; | 2034 | struct ieee80211_ht_bss_info bss_info; |
2026 | ieee80211_ht_cap_ie_to_ht_info( | 2035 | ieee80211_ht_cap_ie_to_ht_info( |
2027 | (struct ieee80211_ht_cap *) | 2036 | (struct ieee80211_ht_cap *) |
@@ -2034,7 +2043,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
2034 | 2043 | ||
2035 | rate_control_rate_init(sta, local); | 2044 | rate_control_rate_init(sta, local); |
2036 | 2045 | ||
2037 | if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { | 2046 | if (elems.wmm_param) { |
2038 | sta->flags |= WLAN_STA_WME; | 2047 | sta->flags |= WLAN_STA_WME; |
2039 | rcu_read_unlock(); | 2048 | rcu_read_unlock(); |
2040 | ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param, | 2049 | ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param, |
@@ -2817,10 +2826,8 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev, | |||
2817 | 2826 | ||
2818 | ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, &elems); | 2827 | ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, &elems); |
2819 | 2828 | ||
2820 | if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) { | 2829 | ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param, |
2821 | ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param, | 2830 | elems.wmm_param_len); |
2822 | elems.wmm_param_len); | ||
2823 | } | ||
2824 | 2831 | ||
2825 | /* Do not send changes to driver if we are scanning. This removes | 2832 | /* Do not send changes to driver if we are scanning. This removes |
2826 | * requirement that driver's bss_info_changed function needs to be | 2833 | * requirement that driver's bss_info_changed function needs to be |