summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuibing Dai <shuibing@google.com>2023-01-04 16:49:34 -0800
committerShuibing Dai <shuibing@google.com>2023-01-05 18:15:24 -0800
commit38ea4fc71787d10e4ce26aee788b90885524162e (patch)
tree1016cd010f021d057e04509b7af65bfdcfef17a2
parent163659c76831db3da720d2aa7c511c1110c750c9 (diff)
downloadlibhardware_legacy-38ea4fc71787d10e4ce26aee788b90885524162e.tar.gz
Add a new function in wifi_hal_fn table for wifi indoor/dfs channel usage
Vendor can enable/disable STA-connected indoor or DFS channels for WFA Go, SAP and Wi-Fi Aware. Bug: 207669954 Test: m android.hardware.wifi-update-api Change-Id: Ifc6646b01b0fec082ee8f92ba483f0d4102610df
-rw-r--r--include/hardware_legacy/wifi_hal.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h
index efb1d77..ab24f90 100644
--- a/include/hardware_legacy/wifi_hal.h
+++ b/include/hardware_legacy/wifi_hal.h
@@ -234,6 +234,12 @@ typedef enum {
WIFI_ACCESS_CATEGORY_VOICE = 3
} wifi_access_category;
+/* Channel category mask */
+typedef enum {
+ WIFI_INDOOR_CHANNEL = 1 << 0,
+ WIFI_DFS_CHANNEL = 1 << 1,
+} wifi_channel_category;
+
/* Antenna configuration */
typedef enum {
WIFI_ANTENNA_UNSPECIFIED = 0,
@@ -1182,6 +1188,16 @@ typedef struct {
wifi_error (*wifi_get_supported_iface_concurrency_matrix)(
wifi_handle handle, wifi_iface_concurrency_matrix *matrix);
+ /**@brief wifi_enable_sta_channel_for_peer_network
+ * enable or disable the feature of allowing current STA-connected
+ * channel for WFA GO, SAP and Wi-Fi Aware when the regulatory allows.
+ * @param handle global wifi_handle
+ * @param channelCategoryEnableFlag bitmask of |wifi_channel_category|.
+ * @return Synchronous wifi_error
+ */
+ wifi_error (*wifi_enable_sta_channel_for_peer_network)(
+ wifi_handle handle, u32 channelCategoryEnableFlag);
+
/*
* when adding new functions make sure to add stubs in
* hal_tool.cpp::init_wifi_stub_hal_func_table