mac80211: fix radiotap vendor presence bitmap handling
authorJohannes Berg <johannes.berg@intel.com>
Sat, 15 Dec 2018 09:03:12 +0000 (11:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:46:05 +0000 (19:46 +0100)
commit2c2fb2411198b997ba2613bff49ec8cc60ddb511
treea555fd1592ca5c219d3fd6e0b08e2072a1147ca7
parente93ea07f482a772740f6ae2169d9cbee2ee6dfa1
mac80211: fix radiotap vendor presence bitmap handling

[ Upstream commit efc38dd7d5fa5c8cdd0c917c5d00947aa0539443 ]

Due to the alignment handling, it actually matters where in the code
we add the 4 bytes for the presence bitmap to the length; the first
field is the timestamp with 8 byte alignment so we need to add the
space for the extra vendor namespace presence bitmap *before* we do
any alignment for the fields.

Move the presence bitmap length accounting to the right place to fix
the alignment for the data properly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/rx.c