#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 {
} 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;
* 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
*
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
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);