From 7e31703e4de93af1730b19eb71397b12cf21d02b Mon Sep 17 00:00:00 2001 From: Bob Copeland Date: Mon, 1 Sep 2014 00:23:23 -0400 Subject: [PATCH] nl80211: Add support for sta_add flags_mask Signed-off-by: Javier Lopez Signed-off-by: Javier Cardona Signed-off-by: Jason Mobarak Signed-off-by: Bob Copeland --- src/drivers/driver.h | 1 + src/drivers/driver_nl80211.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index f382d231b..94006ac0c 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1124,6 +1124,7 @@ struct hostapd_sta_add_params { int vht_opmode_enabled; u8 vht_opmode; u32 flags; /* bitmask of WPA_STA_* flags */ + u32 flags_mask; /* unset bits in flags */ int set; /* Set STA parameters instead of add */ u8 qosinfo; const u8 *ext_capab; diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 70d6c30ee..0e4fac721 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -7764,8 +7764,8 @@ static int wpa_driver_nl80211_sta_add(void *priv, } os_memset(&upd, 0, sizeof(upd)); - upd.mask = sta_flags_nl80211(params->flags); - upd.set = upd.mask; + upd.set = sta_flags_nl80211(params->flags); + upd.mask = upd.set | sta_flags_nl80211(params->flags_mask); wpa_printf(MSG_DEBUG, " * flags set=0x%x mask=0x%x", upd.set, upd.mask); NLA_PUT(msg, NL80211_ATTR_STA_FLAGS2, sizeof(upd), &upd);