summaryrefslogtreecommitdiffstats
path: root/net/wireless/util.c
diff options
context:
space:
mode:
authorAndriy Tkachuk <andrit@ukr.net>2010-01-20 12:55:06 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-01-22 22:11:27 +0100
commitd0dd2de0d055f0ffb1e2ecdc21380de9d12a85e2 (patch)
treecb3d3e77e62c22032f0fac4c58e8f304f08f5061 /net/wireless/util.c
parentcfg80211: export multiple MAC addresses in sysfs (diff)
downloadlinux-d0dd2de0d055f0ffb1e2ecdc21380de9d12a85e2.tar.xz
linux-d0dd2de0d055f0ffb1e2ecdc21380de9d12a85e2.zip
mac80211: Account HT Control field in Data frame hdrlen according to 802.11n-2009
ieee80211_hdrlen() should account account new HT Control field in 802.11 data frame header introduced by IEEE 802.11n standard. According to 802.11n-2009 HT Control field is present in data frames when both of following are met: 1. It is QoS data frame. 2. Order bit is set in Frame Control field. The change might be totally compatible with legacy non-11n aware frames, because 802.11-2007 standard states that "all QoS STAs set this subfield to 0". Signed-off-by: Andriy V. Tkachuk <andrit@ukr.net> Acked-by : Benoit Papillault <benoit.papillault@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r--net/wireless/util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 23557c1d0a9c..be2ab8c59e3a 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -227,8 +227,11 @@ unsigned int ieee80211_hdrlen(__le16 fc)
if (ieee80211_is_data(fc)) {
if (ieee80211_has_a4(fc))
hdrlen = 30;
- if (ieee80211_is_data_qos(fc))
+ if (ieee80211_is_data_qos(fc)) {
hdrlen += IEEE80211_QOS_CTL_LEN;
+ if (ieee80211_has_order(fc))
+ hdrlen += IEEE80211_HT_CTL_LEN;
+ }
goto out;
}