From 59d9c3a145d6b7578ec4591954d19bc8afe29098 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 20 May 2019 09:55:05 +0200 Subject: [PATCH] nl80211: Allow HE Capability to be set for a STA Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin --- src/drivers/driver.h | 2 ++ src/drivers/driver_nl80211.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 496bd522e..edf0b370a 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1791,6 +1791,8 @@ struct hostapd_sta_add_params { const struct ieee80211_vht_capabilities *vht_capabilities; int vht_opmode_enabled; u8 vht_opmode; + const struct ieee80211_he_capabilities *he_capab; + size_t he_capab_len; u32 flags; /* bitmask of WPA_STA_* flags */ u32 flags_mask; /* unset bits in flags */ #ifdef CONFIG_MESH diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 3556b6d69..534942c91 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -4559,6 +4559,14 @@ static int wpa_driver_nl80211_sta_add(void *priv, goto fail; } + if (params->he_capab) { + wpa_hexdump(MSG_DEBUG, " * he_capab", + params->he_capab, params->he_capab_len); + if (nla_put(msg, NL80211_ATTR_HE_CAPABILITY, + params->he_capab_len, params->he_capab)) + goto fail; + } + if (params->ext_capab) { wpa_hexdump(MSG_DEBUG, " * ext_capab", params->ext_capab, params->ext_capab_len);