aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-09-27 14:56:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-30 15:57:03 -0400
commit3b9ce80ce96aeaeacab5e26442987df45584a049 (patch)
tree525b1ad3c3486d271877d830cc895172689cc592 /net
parentffca287118d8c9a0a62e16a5ed96ff004caadeda (diff)
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 <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/cfg.c6
-rw-r--r--net/wireless/nl80211.c2
2 files changed, 6 insertions, 2 deletions
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,
714 } 714 }
715 spin_unlock_irqrestore(&sta->flaglock, flags); 715 spin_unlock_irqrestore(&sta->flaglock, flags);
716 716
717 sta->sta.uapsd_queues = params->uapsd_queues; 717 if (params->sta_modify_mask & STATION_PARAM_APPLY_UAPSD) {
718 sta->sta.max_sp = params->max_sp; 718 sta->sta.uapsd_queues = params->uapsd_queues;
719 sta->sta.max_sp = params->max_sp;
720 }
719 721
720 /* 722 /*
721 * cfg80211 validates this (1-2007) and allows setting the AID 723 * cfg80211 validates this (1-2007) and allows setting the AID
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b85075761e24..3799623e7f46 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2643,6 +2643,8 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
2643 2643
2644 if (params.max_sp & ~IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK) 2644 if (params.max_sp & ~IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK)
2645 return -EINVAL; 2645 return -EINVAL;
2646
2647 params.sta_modify_mask |= STATION_PARAM_APPLY_UAPSD;
2646 } 2648 }
2647 2649
2648 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && 2650 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&