aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.c
diff options
context:
space:
mode:
authorAnkita Bajaj <bankita@codeaurora.org>2019-04-02 09:02:50 (GMT)
committerJouni Malinen <j@w1.fi>2019-04-05 17:56:03 (GMT)
commit822c756e8c7253da897f18d914e1460acd0e4846 (patch)
tree09fdf17e45053846b60aa9629f0b5df61fbf9b7c /wpa_supplicant/wpa_supplicant.c
parent74f8e768f222cb585a7d0a6bfbabd48967df3008 (diff)
downloadhostap-822c756e8c7253da897f18d914e1460acd0e4846.zip
hostap-822c756e8c7253da897f18d914e1460acd0e4846.tar.gz
hostap-822c756e8c7253da897f18d914e1460acd0e4846.tar.bz2
MBO: Update connect params with new MBO attributes to driver
MBO attributes Non-preferred channel list and Cellular capabilities are updated using WNM-Notification Request frame to the current connected BSS. These same attributes need to be added in the (Re)Association Request frame sent by the station when roaming, including the case where the driver/firmware takes care of SME/MLME operations during roaming, so we need to update the MBO IE to the driver. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r--wpa_supplicant/wpa_supplicant.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 7c9f581..a34e022 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2959,6 +2959,34 @@ static void wpas_update_fils_connect_params(struct wpa_supplicant *wpa_s)
#endif /* CONFIG_FILS && IEEE8021X_EAPOL */
+#ifdef CONFIG_MBO
+void wpas_update_mbo_connect_params(struct wpa_supplicant *wpa_s)
+{
+ struct wpa_driver_associate_params params;
+ u8 *wpa_ie;
+
+ /*
+ * Update MBO connect params only in case of change of MBO attributes
+ * when connected, if the AP support MBO.
+ */
+
+ if (wpa_s->wpa_state != WPA_COMPLETED || !wpa_s->current_ssid ||
+ !wpa_s->current_bss ||
+ !wpa_bss_get_vendor_ie(wpa_s->current_bss, MBO_IE_VENDOR_TYPE))
+ return;
+
+ os_memset(&params, 0, sizeof(params));
+ wpa_ie = wpas_populate_assoc_ies(wpa_s, wpa_s->current_bss,
+ wpa_s->current_ssid, &params, NULL);
+ if (!wpa_ie)
+ return;
+
+ wpa_drv_update_connect_params(wpa_s, &params, WPA_DRV_UPDATE_ASSOC_IES);
+ os_free(wpa_ie);
+}
+#endif /* CONFIG_MBO */
+
+
static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
{
struct wpa_connect_work *cwork = work->ctx;