diff options
author | Fred Chou <fred.chou.nd@gmail.com> | 2015-01-19 21:17:27 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-23 04:52:48 -0500 |
commit | fb142f4bbb7d718b3d9cc8f27c909b4809545f5c (patch) | |
tree | fb9e6cb19663ef7aa3b8b4dceac82524f46c732c /net/wireless | |
parent | 2af81d6718f5ec92b1d787e0fe79b0d3b6f78601 (diff) |
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.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) | |||
308 | goto out; | 308 | goto out; |
309 | } | 309 | } |
310 | 310 | ||
311 | if (ieee80211_is_mgmt(fc)) { | ||
312 | if (ieee80211_has_order(fc)) | ||
313 | hdrlen += IEEE80211_HT_CTL_LEN; | ||
314 | goto out; | ||
315 | } | ||
316 | |||
311 | if (ieee80211_is_ctl(fc)) { | 317 | if (ieee80211_is_ctl(fc)) { |
312 | /* | 318 | /* |
313 | * ACK and CTS are 10 bytes, all others 16. To see how | 319 | * ACK and CTS are 10 bytes, all others 16. To see how |