diff options
author | Sunil Ravi <sunilravi@google.com> | 2021-06-11 17:20:03 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-06-11 17:20:03 +0000 |
commit | 9b01cfb3eec622ea34207d70736008f2c37c6ada (patch) | |
tree | df62ff1734323d161ae070c66affb1e8ce5938c7 | |
parent | d6745fdffacac932bccc2c9ab5cb558f42647055 (diff) | |
parent | 84bb3e1228904b25a01763cfafbe3e365d92db4a (diff) | |
download | wpa_supplicant_8-9b01cfb3eec622ea34207d70736008f2c37c6ada.tar.gz |
Decouple btm_offload feature from MBO feature am: 84bb3e1228
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/wpa_supplicant_8/+/14937871
Change-Id: I3b5151dc782b61c1ec5cc6d474a5616750be1a00
-rw-r--r-- | wpa_supplicant/config.c | 4 | ||||
-rw-r--r-- | wpa_supplicant/config.h | 5 | ||||
-rw-r--r-- | wpa_supplicant/wnm_sta.c | 16 |
3 files changed, 11 insertions, 14 deletions
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index 59019469..16936317 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -4384,8 +4384,8 @@ struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface, config->disassoc_imminent_rssi_threshold = DEFAULT_DISASSOC_IMMINENT_RSSI_THRESHOLD; config->oce = DEFAULT_OCE_SUPPORT; - config->btm_offload = DEFAULT_BTM_OFFLOAD; #endif /* CONFIG_MBO */ + config->btm_offload = DEFAULT_BTM_OFFLOAD; if (ctrl_interface) config->ctrl_interface = os_strdup(ctrl_interface); @@ -5188,8 +5188,8 @@ static const struct global_parse_data global_fields[] = { MBO_CELL_CAPA_NOT_SUPPORTED), 0 }, { INT_RANGE(disassoc_imminent_rssi_threshold, -120, 0), 0 }, { INT_RANGE(oce, 0, 3), 0 }, - { INT_RANGE(btm_offload, 0, 1), CFG_CHANGED_DISABLE_BTM_NOTIFY }, #endif /* CONFIG_MBO */ + { INT_RANGE(btm_offload, 0, 1), CFG_CHANGED_DISABLE_BTM_NOTIFY }, { INT(gas_address3), 0 }, { INT_RANGE(ftm_responder, 0, 1), 0 }, { INT_RANGE(ftm_initiator, 0, 1), 0 }, diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h index 7e693430..914b5d9c 100644 --- a/wpa_supplicant/config.h +++ b/wpa_supplicant/config.h @@ -1476,15 +1476,14 @@ struct wpa_config { * - Set BIT(1) to enable OCE in STA-CFON mode */ unsigned int oce; - +#endif /* CONFIG_MBO */ /** * btm_offload - Set where to perform roaming logic * - Set to 0 to handle fully roaming logic in supplicant * - Set to 1 to skip roaming logic in supplicant for firmware roaming * just parse BTM frame and notify framework */ - int btm_offload; -#endif /* CONFIG_MBO */ + int btm_offload; /** * gas_address3 - GAS Address3 field behavior diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c index 1b6c1b44..155e8f47 100644 --- a/wpa_supplicant/wnm_sta.c +++ b/wpa_supplicant/wnm_sta.c @@ -1465,17 +1465,15 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s, vendor = get_ie(pos, end - pos, WLAN_EID_VENDOR_SPECIFIC); if (vendor) { wpas_mbo_ie_trans_req(wpa_s, vendor + 2, vendor[1]); - if (wpa_s->conf->btm_offload) { - wpa_msg(wpa_s, MSG_INFO, - "WNM: Notify BSS Transition Management Request frame status"); - wpa_s->bss_tm_status = WNM_BSS_TM_ACCEPT; - wpas_notify_bss_tm_status(wpa_s); - /* since it could be referenced in the scan result logic, initialize it */ - wpa_s->wnm_mbo_trans_reason_present = 0; - return; - } } #endif /* CONFIG_MBO */ + if (wpa_s->conf->btm_offload) { + wpa_printf(MSG_INFO, + "WNM: BTM offload enabled. Notify status and return"); + wpa_s->bss_tm_status = WNM_BSS_TM_ACCEPT; + wpas_notify_bss_tm_status(wpa_s); + return; + } if (wpa_s->wnm_mode & WNM_BSS_TM_REQ_DISASSOC_IMMINENT) { wpa_msg(wpa_s, MSG_INFO, "WNM: Disassociation Imminent - " |