summaryrefslogtreecommitdiff
path: root/qcwcn
diff options
context:
space:
mode:
authorHu Wang <huw@codeaurora.org>2019-02-21 10:22:22 +0800
committerHsiu-Chang Chen <hsiuchangchen@google.com>2022-02-08 10:11:38 +0000
commit0b7bf060c54fc6757066c121fcc247f7583792b3 (patch)
tree477242316614fdf3e498fa917b98d177c6319bd7 /qcwcn
parentae5cfbdd6952dc9879015f7187467b4ecbb8cc9f (diff)
downloadwlan-0b7bf060c54fc6757066c121fcc247f7583792b3.tar.gz
WiFi-Hal: De-couple roaming feature with Gscan
Per WiFi HAL design, roaming feature should have nothing to do with Gscan, but in current impl, these two are tightly coupled: - Roaming capabilities is queried by vendor cmd GSCAN_GET_CAPABILITY. - Set blacklist bssid returns error if Gscan not supported So de-couple roaming feature with Gscan by: - Set default roaming capabilities if Gscan not supported. - Set blacklist bssid returns error if Roaming not supported. Bug: 215795211 Test: Get roaming capabilities correctly on all related projects CRs-Fixed: 2405118 Change-Id: I9f96546538dd4d07a1f930f107c0024436907927
Diffstat (limited to 'qcwcn')
-rw-r--r--qcwcn/wifi_hal/roam.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/qcwcn/wifi_hal/roam.cpp b/qcwcn/wifi_hal/roam.cpp
index 047df5a..4ba140c 100644
--- a/qcwcn/wifi_hal/roam.cpp
+++ b/qcwcn/wifi_hal/roam.cpp
@@ -19,6 +19,9 @@
#include "common.h"
#include "roamcommand.h"
+#define WLAN_ROAM_MAX_NUM_WHITE_LIST 4
+#define WLAN_ROAM_MAX_NUM_BLACK_LIST 16
+
RoamCommand::RoamCommand(wifi_handle handle, int id, u32 vendor_id, u32 subcmd)
: WifiVendorCommand(handle, id, vendor_id, subcmd)
{
@@ -65,8 +68,8 @@ wifi_error wifi_set_bssid_blacklist(wifi_request_id id,
wifi_handle wifiHandle = getWifiHandle(iface);
hal_info *info = getHalInfo(wifiHandle);
- if (!(info->supported_feature_set & WIFI_FEATURE_GSCAN)) {
- ALOGE("%s: GSCAN is not supported by driver",
+ if (!(info->supported_feature_set & WIFI_FEATURE_CONTROL_ROAMING)) {
+ ALOGE("%s: Roaming is not supported by driver",
__FUNCTION__);
return WIFI_ERROR_NOT_SUPPORTED;
}
@@ -246,6 +249,17 @@ wifi_error wifi_get_roaming_capabilities(wifi_interface_handle iface,
return WIFI_ERROR_INVALID_ARGS;
}
+ // Per WiFi HAL design, roaming feature should have nothing to do with Gscan
+ // But for current driver impl, roaming_capa is provided as part of
+ // GSCAN_GET_CAPABILITY query, so if Gscan is not supported, roaming_capa
+ // is not set (uses initial value 0).
+ // To de-couple roaming with Gscan, set default values for roaming_capa
+ // if Gscan is not supported.
+ // TODO: removes below if driver has new API to get roaming_capa.
+ if (!(info->supported_feature_set & WIFI_FEATURE_GSCAN)) {
+ info->capa.roaming_capa.max_whitelist_size = WLAN_ROAM_MAX_NUM_WHITE_LIST;
+ info->capa.roaming_capa.max_blacklist_size = WLAN_ROAM_MAX_NUM_BLACK_LIST;
+ }
memcpy(caps, &info->capa.roaming_capa, sizeof(wifi_roaming_capabilities));
return WIFI_SUCCESS;