diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-08 09:02:05 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-12 14:22:13 -0400 |
commit | 76f0303d61b3c7f1918ab63a64e77450a4418a60 (patch) | |
tree | 00f94eb0479a0459a71179e8d89d97b52442299a /net/mac80211 | |
parent | 4e74bfdb30f79e9bf87aa359eff29fbdb93cc12a (diff) |
mac80211: simplify wmm check during association
Instead of setting assoc_data->wmm_used solely
based on the BSS also take into account our own
capabilities and later check those.
Also rename "wmm_used" and "uapsd_used" to just
"wmm" and "uapsd".
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 3c62ded64e32..173c1396070d 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -407,7 +407,7 @@ struct ieee80211_mgd_assoc_data { | |||
407 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 407 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
408 | u8 ssid_len; | 408 | u8 ssid_len; |
409 | u8 supp_rates_len; | 409 | u8 supp_rates_len; |
410 | bool wmm_used, uapsd_used; | 410 | bool wmm, uapsd; |
411 | bool have_beacon; | 411 | bool have_beacon; |
412 | bool sent_assoc; | 412 | bool sent_assoc; |
413 | bool synced; | 413 | bool synced; |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 5dfc1e8a1a22..b60768368ce5 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -570,8 +570,8 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
570 | offset = noffset; | 570 | offset = noffset; |
571 | } | 571 | } |
572 | 572 | ||
573 | if (assoc_data->wmm_used && local->hw.queues >= 4) { | 573 | if (assoc_data->wmm) { |
574 | if (assoc_data->uapsd_used) { | 574 | if (assoc_data->uapsd) { |
575 | qos_info = local->uapsd_queues; | 575 | qos_info = local->uapsd_queues; |
576 | qos_info |= (local->uapsd_max_sp_len << | 576 | qos_info |= (local->uapsd_max_sp_len << |
577 | IEEE80211_WMM_IE_STA_QOSINFO_SP_SHIFT); | 577 | IEEE80211_WMM_IE_STA_QOSINFO_SP_SHIFT); |
@@ -3305,7 +3305,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3305 | ifmgd->ap_smps = ifmgd->req_smps; | 3305 | ifmgd->ap_smps = ifmgd->req_smps; |
3306 | 3306 | ||
3307 | assoc_data->capability = req->bss->capability; | 3307 | assoc_data->capability = req->bss->capability; |
3308 | assoc_data->wmm_used = bss->wmm_used; | 3308 | assoc_data->wmm = bss->wmm_used && (local->hw.queues >= 4); |
3309 | assoc_data->supp_rates = bss->supp_rates; | 3309 | assoc_data->supp_rates = bss->supp_rates; |
3310 | assoc_data->supp_rates_len = bss->supp_rates_len; | 3310 | assoc_data->supp_rates_len = bss->supp_rates_len; |
3311 | assoc_data->ht_information_ie = | 3311 | assoc_data->ht_information_ie = |
@@ -3313,10 +3313,10 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3313 | 3313 | ||
3314 | if (bss->wmm_used && bss->uapsd_supported && | 3314 | if (bss->wmm_used && bss->uapsd_supported && |
3315 | (sdata->local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)) { | 3315 | (sdata->local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)) { |
3316 | assoc_data->uapsd_used = true; | 3316 | assoc_data->uapsd = true; |
3317 | ifmgd->flags |= IEEE80211_STA_UAPSD_ENABLED; | 3317 | ifmgd->flags |= IEEE80211_STA_UAPSD_ENABLED; |
3318 | } else { | 3318 | } else { |
3319 | assoc_data->uapsd_used = false; | 3319 | assoc_data->uapsd = false; |
3320 | ifmgd->flags &= ~IEEE80211_STA_UAPSD_ENABLED; | 3320 | ifmgd->flags &= ~IEEE80211_STA_UAPSD_ENABLED; |
3321 | } | 3321 | } |
3322 | 3322 | ||