aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.c
diff options
context:
space:
mode:
authorBeni Lev <beni.lev@intel.com>2018-08-26 17:45:04 (GMT)
committerJouni Malinen <j@w1.fi>2018-09-02 15:16:30 (GMT)
commit077232f603dbbef3ac06b33cc793d346be8c5af8 (patch)
treeb6bfbbf9000c380725e4da55a217474ab0f4bd26 /wpa_supplicant/wpa_supplicant.c
parent2ac4333404f153e5ef2786c06823b1531b035193 (diff)
downloadhostap-077232f603dbbef3ac06b33cc793d346be8c5af8.zip
hostap-077232f603dbbef3ac06b33cc793d346be8c5af8.tar.gz
hostap-077232f603dbbef3ac06b33cc793d346be8c5af8.tar.bz2
OCE: Add OCE capability attribute only when associating to an OCE AP
Signed-off-by: Beni Lev <beni.lev@intel.com>
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r--wpa_supplicant/wpa_supplicant.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 8bd2727..2180238 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2444,6 +2444,9 @@ static u8 * wpas_populate_assoc_ies(
size_t max_wpa_ie_len = 500;
size_t wpa_ie_len;
int algs = WPA_AUTH_ALG_OPEN;
+#ifdef CONFIG_MBO
+ const u8 *mbo_ie;
+#endif
#ifdef CONFIG_FILS
const u8 *realm, *username, *rrk;
size_t realm_len, username_len, rrk_len;
@@ -2699,11 +2702,14 @@ static u8 * wpas_populate_assoc_ies(
#endif /* CONFIG_FST */
#ifdef CONFIG_MBO
- if (bss && wpa_bss_get_vendor_ie(bss, MBO_IE_VENDOR_TYPE)) {
+ mbo_ie = bss ? wpa_bss_get_vendor_ie(bss, MBO_IE_VENDOR_TYPE) : NULL;
+ if (mbo_ie) {
int len;
len = wpas_mbo_ie(wpa_s, wpa_ie + wpa_ie_len,
- max_wpa_ie_len - wpa_ie_len);
+ max_wpa_ie_len - wpa_ie_len,
+ !!mbo_attr_from_mbo_ie(mbo_ie,
+ OCE_ATTR_ID_CAPA_IND));
if (len >= 0)
wpa_ie_len += len;
}