summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuang Luong <qal@google.com>2020-11-25 17:49:00 -0800
committerQuang Luong <qal@google.com>2020-12-04 18:18:52 -0800
commit85f84d379618f9387fe7d4cbbce184987e026cef (patch)
tree0039350aada3b010f1d4edc01fa2d5a62674dcba
parente7d9ae1c91179153d51cf8108da85531d4245892 (diff)
downloadlibhardware_legacy-85f84d379618f9387fe7d4cbbce184987e026cef.tar.gz
libhardware_legacy(wifi): Add coex APIs
Bug: 153651001 Test: build Change-Id: Id7f551fd2446a0484e229145a14ef27facaeab97
-rw-r--r--include/hardware_legacy/wifi_hal.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h
index c25dacf..7c56ecd 100644
--- a/include/hardware_legacy/wifi_hal.h
+++ b/include/hardware_legacy/wifi_hal.h
@@ -278,7 +278,7 @@ typedef enum {
WIFI_DUAL_STA_NON_TRANSIENT_UNBIASED = 1
} wifi_multi_sta_use_case;
-wifi_error wifi_multi_sta_set_use_case(wifi_handle hande, wifi_multi_sta_use_case use_case);
+wifi_error wifi_multi_sta_set_use_case(wifi_handle handle, wifi_multi_sta_use_case use_case);
/* Configuration events */
@@ -409,6 +409,24 @@ typedef struct wlan_driver_wake_reason_cnt_t {
RX_MULTICAST_WAKE_DATA_CNT rx_multicast_wake_pkt_info;
} WLAN_DRIVER_WAKE_REASON_CNT;
+/* Wi-Fi coex channel avoidance support */
+
+#define WIFI_COEX_NO_POWER_CAP (int32_t)0x7FFFFFF
+
+/**
+ * Representation of a Wi-Fi channel to be avoided for Wi-Fi coex channel avoidance.
+ *
+ * band is represented as an WLAN_MAC* enum value defined in wlan_mac_band.
+ * If power_cap_dbm is WIFI_COEX_NO_POWER_CAP, then no power cap should be applied if the specified
+ * channel is used.
+ */
+typedef struct {
+ wlan_mac_band band;
+ u32 channel;
+ s32 power_cap_dbm;
+} wifi_coex_unsafe_channel;
+
+
/* include various feature headers */
#include "gscan.h"
@@ -664,9 +682,17 @@ typedef struct {
* When there are 2 simultaneous STA connections, this use case hint
* indicates what STA + STA use-case is being enabled by the framework.
*/
- wifi_error (*wifi_multi_sta_set_use_case)(wifi_handle hande,
+ wifi_error (*wifi_multi_sta_set_use_case)(wifi_handle handle,
wifi_multi_sta_use_case use_case);
+ /**
+ * Invoked to indicate that the following list of wifi_coex_unsafe_channel should be avoided
+ * with the specified restrictions.
+ */
+ wifi_error (*wifi_set_coex_unsafe_channels)(wifi_handle handle, u32 num_channels,
+ wifi_coex_unsafe_channel *unsafeChannels,
+ u32 restrictions);
+
/*
* when adding new functions make sure to add stubs in
* hal_tool.cpp::init_wifi_stub_hal_func_table