aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/util.c
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@adapt-ip.com>2020-09-08 12:03:05 -0700
committerJohannes Berg <johannes.berg@intel.com>2020-09-18 12:30:57 +0200
commit1d47f1198d58117735edc6b8b1a687db47883f1e (patch)
treee0baff5ba0d71f0ecc4905797e351b96a939c97c /net/wireless/util.c
parentcfg80211: regulatory: handle S1G channels (diff)
downloadlinux-dev-1d47f1198d58117735edc6b8b1a687db47883f1e.tar.xz
linux-dev-1d47f1198d58117735edc6b8b1a687db47883f1e.zip
nl80211: correctly validate S1G beacon head
The S1G beacon has a different header size than regular beacons, so adjust the beacon head validator. Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com> Link: https://lore.kernel.org/r/20200908190323.15814-5-thomas@adapt-ip.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to '')
-rw-r--r--net/wireless/util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 4a9ff9ef513f..49e7c0cbbf62 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -399,6 +399,11 @@ unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc)
{
unsigned int hdrlen = 24;
+ if (ieee80211_is_ext(fc)) {
+ hdrlen = 4;
+ goto out;
+ }
+
if (ieee80211_is_data(fc)) {
if (ieee80211_has_a4(fc))
hdrlen = 30;