ieee80211: fix HE SPR size calculation
authorJohannes Berg <johannes.berg@intel.com>
Wed, 25 Mar 2020 08:09:19 +0000 (09:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:02:09 +0000 (11:02 +0200)
commit74fdc220e2f176d9ba979487ccb9adc3281d2862
tree239d0afa3b4c2cab9cda91dbcf4231cf77ce5600
parenteaca61f5f85061d20b8e41ec247eb9aef147b8dc
ieee80211: fix HE SPR size calculation

commit 575a97acc3b7446094b0dcaf6285c7c6934c2477 upstream.

The he_sr_control field is just a u8, so le32_to_cpu()
shouldn't be applied to it; this was evidently copied
from ieee80211_he_oper_size(). Fix it, and also adjust
the type of the local variable.

Fixes: ef11a931bd1c ("mac80211: HE: add Spatial Reuse element parsing support")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200325090918.dfe483b49e06.Ia53622f23b2610a2ae6ea39a199866196fe946c1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/ieee80211.h