projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2af81d6
)
mac80211: correct header length calculation
author
Fred Chou
<fred.chou.nd@gmail.com>
Tue, 20 Jan 2015 02:17:27 +0000
(10:17 +0800)
committer
Johannes Berg
<johannes.berg@intel.com>
Fri, 23 Jan 2015 09:52:48 +0000
(10:52 +0100)
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>
net/wireless/util.c
patch
|
blob
|
blame
|
history
diff --git
a/net/wireless/util.c
b/net/wireless/util.c
index d0ac795445b7e40dc92ebb1e0bd9095fc4bab048..5488c3662f7d7671c184215ae1d74faf0190b126 100644
(file)
--- 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