From 3765db635c184e5d0d5d1d4d5db4404ed7a404ed Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Thu, 26 Mar 2020 22:19:19 +0530 Subject: [PATCH] qcacmn: Add ini to enable/disable self roaming Currently the driver allows roaming to the BSSID which it is already connected, which can lead to many unexpected behaviour, for eg. if the SAP to which the DUT is connected turns off, then the DUT would try to roam to other BSSID of the same SSID, and in case the SAP turns on back in time, then the DUT would re-associate to the same BSSID. Now if the subnet may change, and since the DHCP does not happen again in roaming, it would then lead to NUD failure. Fix is to introduce an ini to allow/disallow roaming to the same BSSID. Change-Id: I38887bbfb74c4856a06956591be4159734f7fbf0 CRs-Fixed: 2650346 --- wmi/inc/wmi_unified_param.h | 2 ++ wmi/src/wmi_unified_roam_tlv.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index c42ceec5a369..93c6724f64ad 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1650,6 +1650,7 @@ struct roam_fils_params { * @mode: stores flags for scan * @vdev_id: vdev id * @roam_offload_enabled: flag for offload enable + * @disable_self_roam: disable roaming to self BSSID * @psk_pmk: pre shared key/pairwise master key * @pmk_len: length of PMK * @prefer_5ghz: prefer select 5G candidate @@ -1692,6 +1693,7 @@ struct roam_offload_scan_params { uint32_t vdev_id; #ifdef WLAN_FEATURE_ROAM_OFFLOAD uint8_t roam_offload_enabled; + bool disable_self_roam; uint8_t psk_pmk[WMI_ROAM_SCAN_PSK_SIZE]; uint32_t pmk_len; uint8_t prefer_5ghz; diff --git a/wmi/src/wmi_unified_roam_tlv.c b/wmi/src/wmi_unified_roam_tlv.c index 707957f408ba..1c4f4d6d7537 100644 --- a/wmi/src/wmi_unified_roam_tlv.c +++ b/wmi/src/wmi_unified_roam_tlv.c @@ -1221,7 +1221,8 @@ send_roam_scan_offload_mode_cmd_tlv(wmi_unified_t wmi_handle, roam_req->reassoc_failure_timeout; roam_offload_params->roam_candidate_validity_time = roam_req->rct_validity_timer; - + roam_offload_params->roam_to_current_bss_disable = + roam_req->disable_self_roam; /* Fill the capabilities */ roam_offload_params->capability = req_offload_params->capability;