diff options
author | xinhe <xinhe@google.com> | 2015-04-14 12:57:58 -0700 |
---|---|---|
committer | xinhe <xinhe@google.com> | 2015-04-22 10:48:20 -0700 |
commit | 778ad703da9bb791e1a43ad673f4e5a9e38db1d3 (patch) | |
tree | ced6be983f8bc8680464637f000b9fd2940900a2 | |
parent | 93d458f0357b246d8d8e33799abea0fbaf5c3587 (diff) | |
download | platform_hardware_libhardware_legacy-778ad703da9bb791e1a43ad673f4e5a9e38db1d3.tar.gz platform_hardware_libhardware_legacy-778ad703da9bb791e1a43ad673f4e5a9e38db1d3.tar.bz2 platform_hardware_libhardware_legacy-778ad703da9bb791e1a43ad673f4e5a9e38db1d3.zip |
TDLS enhancement HAL interface update
Bug:15152152
Change-Id: I8432177ac457c6559cf2c0d2a8bbc8ea8773a2a9
-rw-r--r-- | include/hardware_legacy/tdls.h | 36 | ||||
-rw-r--r-- | include/hardware_legacy/wifi_hal.h | 6 |
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 4a290d9..0755834 100644 --- a/include/hardware_legacy/wifi_hal.h +++ b/include/hardware_legacy/wifi_hal.h @@ -200,6 +200,12 @@ typedef struct { wifi_error (* wifi_set_epno_list)(int, wifi_interface_info *, int, wifi_epno_network *, wifi_epno_handler); wifi_error (* wifi_set_country_code)(wifi_interface_handle, const char *); + 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); |