From 3b9ce80ce96aeaeacab5e26442987df45584a049 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 27 Sep 2011 20:56:12 +0200 Subject: cfg80211/mac80211: apply station uAPSD parameters selectively Currently, when hostapd sets the station as authorized we also overwrite its uAPSD parameter. This obviously leads to buggy behaviour (later, with my patches that actually add uAPSD support). To fix this, only apply those parameters if they were actually set in nl80211, and to achieve that add a bitmap of things to apply. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- net/mac80211/cfg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'net/mac80211/cfg.c') diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 8fef3cddbc4f..13061ebc93ef 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -714,8 +714,10 @@ static void sta_apply_parameters(struct ieee80211_local *local, } spin_unlock_irqrestore(&sta->flaglock, flags); - sta->sta.uapsd_queues = params->uapsd_queues; - sta->sta.max_sp = params->max_sp; + if (params->sta_modify_mask & STATION_PARAM_APPLY_UAPSD) { + sta->sta.uapsd_queues = params->uapsd_queues; + sta->sta.max_sp = params->max_sp; + } /* * cfg80211 validates this (1-2007) and allows setting the AID -- cgit v1.2.3