Search Linux Wireless

[PATCH 1/2] mac80211: add interface for disabling/enabling QoS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add BSS_CHANGE_QOS and bss_conf->qos_disabled flags to pass to drivers
when want to disable QoS (aka WMM, WME).

When AP do not provide QoS parameters, we should assume that it not
supporting QoS and we should not send QoS frames to it.

Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
---
 include/net/mac80211.h |    4 ++++
 net/mac80211/mlme.c    |    6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 45d7d44..0315ffc 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -144,6 +144,7 @@ struct ieee80211_low_level_stats {
  *	new beacon (beaconing modes)
  * @BSS_CHANGED_BEACON_ENABLED: Beaconing should be
  *	enabled/disabled (beaconing modes)
+ * @BSS_CHANGED_QOS: QoS should be enabled/disabled
  */
 enum ieee80211_bss_change {
 	BSS_CHANGED_ASSOC		= 1<<0,
@@ -156,6 +157,7 @@ enum ieee80211_bss_change {
 	BSS_CHANGED_BSSID		= 1<<7,
 	BSS_CHANGED_BEACON		= 1<<8,
 	BSS_CHANGED_BEACON_ENABLED	= 1<<9,
+	BSS_CHANGED_QOS			= 1<<10,
 };
 
 /**
@@ -183,6 +185,7 @@ enum ieee80211_bss_change {
  *	the current band.
  * @bssid: The BSSID for this BSS
  * @enable_beacon: whether beaconing should be enabled or not
+ * @qos_disabled: whether QoS (aka WMM) should be disabled or not
  * @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info).
  *	This field is only valid when the channel type is one of the HT types.
  */
@@ -196,6 +199,7 @@ struct ieee80211_bss_conf {
 	bool use_short_preamble;
 	bool use_short_slot;
 	bool enable_beacon;
+	bool qos_disabled;
 	u8 dtim_period;
 	u16 beacon_int;
 	u16 assoc_capability;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index be5f723..8bd2b05 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1129,8 +1129,10 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
 	if (elems.wmm_param)
 		ieee80211_sta_wmm_params(local, ifmgd, elems.wmm_param,
 					 elems.wmm_param_len);
-	else
-		ieee80211_set_wmm_default(sdata);
+	else {
+		changed |= BSS_CHANGED_QOS;
+		bss_conf->qos_disabled = true;
+	}
 
 	local->oper_channel = wk->chan;
 
-- 
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux