diff options
author | Fred Chou <fred.chou.nd@gmail.com> | 2015-01-20 05:17:27 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-23 12:52:48 +0300 |
commit | fb142f4bbb7d718b3d9cc8f27c909b4809545f5c (patch) | |
tree | fb9e6cb19663ef7aa3b8b4dceac82524f46c732c /net/wireless/util.c | |
parent | 2af81d6718f5ec92b1d787e0fe79b0d3b6f78601 (diff) | |
download | linux-fb142f4bbb7d718b3d9cc8f27c909b4809545f5c.tar.xz |
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/util.c')
-rw-r--r-- | net/wireless/util.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index d0ac795445b7..5488c3662f7d 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 |