summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorFred Chou <fred.chou.nd@gmail.com>2015-01-20 10:17:27 +0800
committerJohannes Berg <johannes.berg@intel.com>2015-01-23 10:52:48 +0100
commitfb142f4bbb7d718b3d9cc8f27c909b4809545f5c (patch)
treefb9e6cb19663ef7aa3b8b4dceac82524f46c732c /net/wireless
parent2af81d6718f5ec92b1d787e0fe79b0d3b6f78601 (diff)
downloadop-kernel-dev-fb142f4bbb7d718b3d9cc8f27c909b4809545f5c.zip
op-kernel-dev-fb142f4bbb7d718b3d9cc8f27c909b4809545f5c.tar.gz
mac80211: correct header length calculation
HT Control field may also be present in management frames, as defined in 8.2.4.1.10 of 802.11-2012. Account for this in calculation of header length. Signed-off-by: Fred Chou <fred.chou.nd@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index d0ac795..5488c36 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -308,6 +308,12 @@ unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc)
goto out;
}
+ if (ieee80211_is_mgmt(fc)) {
+ if (ieee80211_has_order(fc))
+ hdrlen += IEEE80211_HT_CTL_LEN;
+ goto out;
+ }
+
if (ieee80211_is_ctl(fc)) {
/*
* ACK and CTS are 10 bytes, all others 16. To see how
OpenPOWER on IntegriCloud