aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-12-01 18:22:44 (GMT)
committerJouni Malinen <j@w1.fi>2017-12-01 18:22:44 (GMT)
commita2426829ce426de82d2fa47071ca41ea81c43307 (patch)
tree1c9f2b43ed3845bdb61cd4fd0c64099cd7623542
parentce83008c79917d3f8bbb388e64f582e2cdf30e3b (diff)
downloadhostap-a2426829ce426de82d2fa47071ca41ea81c43307.zip
hostap-a2426829ce426de82d2fa47071ca41ea81c43307.tar.gz
hostap-a2426829ce426de82d2fa47071ca41ea81c43307.tar.bz2
nl80211: Fix NL80211_ATTR_SMPS_MODE encoding
This nl80211 attribute uses NLA_U8 policy in cfg80211 and hostapd/wpa_supplicant needs to use same size when writing the attribute. This fixes AP mode regression triggered by kernel commit "net: netlink: Update attr validation to require exact length for some types" in v4.15-rc1 that resulted in the following debug log entry when trying to enable beaconing: nl80211: Beacon set failed: -34 (Numerical result out of range) Fixes: da1080d7215f ("nl80211: Advertise and configure SMPS modes") Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/drivers/driver_nl80211.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 2ce03ed..7571e77 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3957,7 +3957,7 @@ static int wpa_driver_nl80211_set_ap(void *priv,
smps_mode = NL80211_SMPS_OFF;
break;
}
- if (nla_put_u32(msg, NL80211_ATTR_SMPS_MODE, smps_mode))
+ if (nla_put_u8(msg, NL80211_ATTR_SMPS_MODE, smps_mode))
goto fail;
}