]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Use correct u8 size for NL80211_ATTR_SMPS_MODE
authorJohannes Berg <johannes.berg@intel.com>
Fri, 26 Oct 2018 13:50:48 +0000 (15:50 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 22 Nov 2018 13:53:30 +0000 (15:53 +0200)
Back in December 2017, Jouni fixed the output side since that was
causing a kernel message to be printed, but the input side should
also be fixed, otherwise it will not work correctly on big-endian
platforms.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
src/drivers/driver_nl80211_event.c

index 5b8efbc172cbe3eeb97126e2b42fddf708f28916..bac83898db908c438081274492fc51f4464a297e 100644 (file)
@@ -2271,7 +2271,7 @@ static void nl80211_sta_opmode_change_event(struct wpa_driver_nl80211_data *drv,
        ed.sta_opmode.addr = nla_data(tb[NL80211_ATTR_MAC]);
 
        if (tb[NL80211_ATTR_SMPS_MODE]) {
-               smps_mode = nla_get_u32(tb[NL80211_ATTR_SMPS_MODE]);
+               smps_mode = nla_get_u8(tb[NL80211_ATTR_SMPS_MODE]);
                switch (smps_mode) {
                case NL80211_SMPS_OFF:
                        ed.sta_opmode.smps_mode = SMPS_OFF;