diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-09-07 05:50:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-14 13:56:43 -0400 |
commit | 4319e193271dc93241338eb0173fc26dc6c35465 (patch) | |
tree | fd8c4c1ae175f4404c26e41b43e1667d498e33ee /net/wireless | |
parent | ff620849110649b5f94989ddfd7a72b2bd43bd42 (diff) |
cfg80211: verify format of uAPSD information
The format is intended to be like the subfields
in the QoS Info field, verify that is the case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index f4cfd3abfbfd..11089541bb03 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2627,10 +2627,15 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info) | |||
2627 | if (tb[NL80211_STA_WME_UAPSD_QUEUES]) | 2627 | if (tb[NL80211_STA_WME_UAPSD_QUEUES]) |
2628 | params.uapsd_queues = | 2628 | params.uapsd_queues = |
2629 | nla_get_u8(tb[NL80211_STA_WME_UAPSD_QUEUES]); | 2629 | nla_get_u8(tb[NL80211_STA_WME_UAPSD_QUEUES]); |
2630 | if (params.uapsd_queues & ~IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK) | ||
2631 | return -EINVAL; | ||
2630 | 2632 | ||
2631 | if (tb[NL80211_STA_WME_MAX_SP]) | 2633 | if (tb[NL80211_STA_WME_MAX_SP]) |
2632 | params.max_sp = | 2634 | params.max_sp = |
2633 | nla_get_u8(tb[NL80211_STA_WME_MAX_SP]); | 2635 | nla_get_u8(tb[NL80211_STA_WME_MAX_SP]); |
2636 | |||
2637 | if (params.max_sp & ~IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK) | ||
2638 | return -EINVAL; | ||
2634 | } | 2639 | } |
2635 | 2640 | ||
2636 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && | 2641 | if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP && |