Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: make sta.wme indicate whether QoS is used

Indicating just the peer's capability is fairly pointless
if the local device doesn't support it. Make the variable
track both combined, and remove the 'local support' check
in the TX path.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+8 -6
+2 -1
include/net/mac80211.h
··· 1557 1557 * @supp_rates: Bitmap of supported rates (per band) 1558 1558 * @ht_cap: HT capabilities of this STA; restricted to our own capabilities 1559 1559 * @vht_cap: VHT capabilities of this STA; restricted to our own capabilities 1560 - * @wme: indicates whether the STA supports QoS/WME. 1560 + * @wme: indicates whether the STA supports QoS/WME (if local devices does, 1561 + * otherwise always false) 1561 1562 * @drv_priv: data area for driver use, will always be aligned to 1562 1563 * sizeof(void *), size is determined in hw information. 1563 1564 * @uapsd_queues: bitmap of queues configured for uapsd. Only valid
+2 -1
net/mac80211/cfg.c
··· 1073 1073 clear_sta_flag(sta, WLAN_STA_SHORT_PREAMBLE); 1074 1074 } 1075 1075 1076 - if (mask & BIT(NL80211_STA_FLAG_WME)) 1076 + if (mask & BIT(NL80211_STA_FLAG_WME) && 1077 + local->hw.queues >= IEEE80211_NUM_ACS) 1077 1078 sta->sta.wme = set & BIT(NL80211_STA_FLAG_WME); 1078 1079 1079 1080 if (mask & BIT(NL80211_STA_FLAG_MFP)) {
+1 -1
net/mac80211/ibss.c
··· 1016 1016 } 1017 1017 } 1018 1018 1019 - if (sta && elems->wmm_info) 1019 + if (sta && elems->wmm_info && local->hw.queues >= IEEE80211_NUM_ACS) 1020 1020 sta->sta.wme = true; 1021 1021 1022 1022 if (sta && elems->ht_operation && elems->ht_cap_elem &&
+1 -1
net/mac80211/mlme.c
··· 2990 2990 sta->sta.mfp = false; 2991 2991 } 2992 2992 2993 - sta->sta.wme = elems.wmm_param; 2993 + sta->sta.wme = elems.wmm_param && local->hw.queues >= IEEE80211_NUM_ACS; 2994 2994 2995 2995 err = sta_info_move_state(sta, IEEE80211_STA_ASSOC); 2996 2996 if (!err && !(ifmgd->flags & IEEE80211_STA_CONTROL_PORT))
+2 -2
net/mac80211/tx.c
··· 2088 2088 if (ieee80211_vif_is_mesh(&sdata->vif)) 2089 2089 wme_sta = true; 2090 2090 2091 - /* receiver and we are QoS enabled, use a QoS type frame */ 2092 - if (wme_sta && local->hw.queues >= IEEE80211_NUM_ACS) { 2091 + /* receiver does QoS (which also means we do) use it */ 2092 + if (wme_sta) { 2093 2093 fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA); 2094 2094 hdrlen += 2; 2095 2095 }