summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrerepa Viswanadham <dham@google.com>2015-05-01 11:02:19 -0700
committerPrerepa Viswanadham <dham@google.com>2015-05-01 11:02:19 -0700
commita9c3179c442621caad86b9f51f91706fb2037dac (patch)
tree85c073943dbd10e97dee05f48e131dcac3a8d319
parent5f06aa3bbaf785d1045d378f906a746a09047a39 (diff)
parent778ad703da9bb791e1a43ad673f4e5a9e38db1d3 (diff)
downloadhardware_libhardware_legacy-a9c3179c442621caad86b9f51f91706fb2037dac.zip
hardware_libhardware_legacy-a9c3179c442621caad86b9f51f91706fb2037dac.tar.gz
hardware_libhardware_legacy-a9c3179c442621caad86b9f51f91706fb2037dac.tar.bz2
Merge commit '778ad70' into master_merge
Change-Id: I2928bb3e4c82d13caf3a1cd4b15f1d17969a610d
-rw-r--r--include/hardware_legacy/tdls.h36
-rw-r--r--include/hardware_legacy/wifi_hal.h6
2 files changed, 30 insertions, 12 deletions
diff --git a/include/hardware_legacy/tdls.h b/include/hardware_legacy/tdls.h
index c1cd33e..9ac225a 100644
--- a/include/hardware_legacy/tdls.h
+++ b/include/hardware_legacy/tdls.h
@@ -5,13 +5,14 @@
#define _TDLS_H_
typedef enum {
- WIFI_TDLS_DISABLED, /* TDLS is not enabled, or is disabled now */
- WIFI_TDLS_ENABLED, /* TDLS is enabled, but not yet tried */
- WIFI_TDLS_TRYING, /* Direct link is being attempted (optional) */
- WIFI_TDLS_ESTABLISHED, /* Direct link is established */
- WIFI_TDLS_ESTABLISHED_OFF_CHANNEL, /* Direct link is established using MCC */
- WIFI_TDLS_DROPPED, /* Direct link was established, but is now dropped */
- WIFI_TDLS_FAILED /* Direct link failed */
+ WIFI_TDLS_DISABLED = 1, /* TDLS is not enabled, default status for all STAs */
+ WIFI_TDLS_ENABLED, /* TDLS is enabled, but not yet tried */
+ WIFI_TDLS_ESTABLISHED, /* Direct link is established */
+ WIFI_TDLS_ESTABLISHED_OFF_CHANNEL, /* Direct link is established using MCC */
+ WIFI_TDLS_DROPPED, /* Direct link was established,
+ * but is temporarily dropped now */
+ WIFI_TDLS_FAILED /* TDLS permanent failed. Inform error to upper layer
+ * and go back to WIFI_TDLS_DISABLED */
} wifi_tdls_state;
typedef enum {
@@ -38,7 +39,15 @@ typedef struct {
} wifi_tdls_status;
typedef struct {
- /* on_tdls_state_changed - reports state to TDLS link
+ int max_concurrent_tdls_session_num; /* Maximum TDLS session number can be supported by the
+ * Firmware and hardware*/
+ int is_global_tdls_supported; /* 1 -- support, 0 -- not support */
+ int is_per_mac_tdls_supported; /* 1 -- support, 0 -- not support */
+ int is_off_channel_tdls_supported; /* 1 -- support, 0 -- not support */
+} wifi_tdls_capabilities;
+
+typedef struct {
+ /* on_tdls_state_changed - reports state of TDLS link to framework
* Report this event when the state of TDLS link changes */
void (*on_tdls_state_changed)(mac_addr addr, wifi_tdls_status status);
} wifi_tdls_handler;
@@ -49,12 +58,12 @@ typedef struct {
* params specifies hints, which provide more information about
* why TDLS is being sought. The firmware should do its best to
* honor the hints before downgrading regular AP link
+ * If upper layer has no specific values, this should be NULL
*
- * On successful completion, must fire on_tdls_state_changed event
- * to indicate the status of TDLS operation.
+ * handler is used to inform the upper layer about the status change and the corresponding reason
*/
wifi_error wifi_enable_tdls(wifi_interface_handle iface, mac_addr addr,
- wifi_tdls_params params, wifi_tdls_handler handler);
+ wifi_tdls_params *params, wifi_tdls_handler handler);
/* wifi_disable_tdls - disables TDLS-auto mode for a specific route
*
@@ -70,4 +79,7 @@ wifi_error wifi_disable_tdls(wifi_interface_handle iface, mac_addr addr);
wifi_error wifi_get_tdls_status(wifi_interface_handle iface, mac_addr addr,
wifi_tdls_status *status);
-#endif \ No newline at end of file
+/* return the current HW + Firmware combination's TDLS capabilities */
+wifi_error wifi_get_tdls_capabilities(wifi_interface_handle iface,
+ wifi_tdls_capabilities *capabilities);
+#endif
diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h
index 2478330..63db82b 100644
--- a/include/hardware_legacy/wifi_hal.h
+++ b/include/hardware_legacy/wifi_hal.h
@@ -216,6 +216,12 @@ typedef struct {
wifi_error (* wifi_get_ring_data)(wifi_interface_handle iface, char *ring_name);
wifi_error (* wifi_get_driver_version)(wifi_interface_handle iface, char **buffer,
int *buffer_size);
+ wifi_error (* wifi_enable_tdls)(wifi_interface_handle, mac_addr, wifi_tdls_params *,
+ wifi_tdls_handler);
+ wifi_error (* wifi_disable_tdls)(wifi_interface_handle, mac_addr);
+ wifi_error (*wifi_get_tdls_status) (wifi_interface_handle, mac_addr, wifi_tdls_status *);
+ wifi_error (*wifi_get_tdls_capabilities)(wifi_interface_handle iface,
+ wifi_tdls_capabilities *capabilities);
} wifi_hal_fn;
wifi_error init_wifi_vendor_hal_func_table(wifi_hal_fn *fn);
#ifdef __cplusplus