00001 00012 #ifndef TDLS_H_ 00013 #define TDLS_H_ 00014 00015 #if NX_UMAC_PRESENT && NX_TDLS 00016 00025 /* 00026 * INCLUDE FILES 00027 **************************************************************************************** 00028 */ 00029 // standard includes 00030 #include "co_int.h" 00031 #include "co_bool.h" 00032 00033 #include "co_utils.h" 00034 #include "ke_timer.h" 00035 #include "tdls_task.h" 00036 #include "hal_desc.h" 00037 #include "hal_machw.h" 00038 #include "hal_dma.h" 00039 #include "sta_mgmt.h" 00040 00041 /* 00042 * DEFINES 00043 **************************************************************************************** 00044 */ 00046 #define TDLS_PTI_RSP_TOUT_US 5000000 00048 #define TDLS_KEEP_ALIVE_US 10000000 00050 #define TDLS_CHSW_SWITCH_TIME_US 5000 00052 #define TDLS_CHSW_TX_FRAME_TIME_US 1000 00054 #define TDLS_MAX_CHSW_SWITCH_TIME_US 15000 00056 #define TDLS_CHSW_REQ_DELAY_US 10000 00058 #define TDLS_KA_RETRIES 2 00060 #define TDLS_CHSW_REQ_DELAY_AP_TRAFFIC_US 20000 00061 00062 // Forward declaration 00063 struct vif_info_tag; 00064 00065 /* 00066 * ENUMERATIONS 00067 **************************************************************************************** 00068 */ 00069 00070 00071 /* 00072 * GLOBAL VARIABLES 00073 **************************************************************************************** 00074 */ 00075 00076 00077 /* 00078 * FUNCTION PROTOTYPES 00079 **************************************************************************************** 00080 */ 00081 00095 __INLINE uint32_t tdls_get_dt_us(uint32_t next_tbtt, uint32_t now) 00096 { 00097 return (uint32_t)((0xFFFFFFFF - now) + next_tbtt + 1) - TDLS_CHSW_REQ_DELAY_US; 00098 } 00099 00112 bool tdls_check_frame(uint8_t *frame, struct vif_info_tag *vif, uint8_t sta_idx); 00113 00126 void tdls_chsw_req_evt(void *env); 00127 00138 void tdls_send_chan_switch_base_ind(struct chan_ctxt_tag *roc_chan_ctxt); 00139 00150 void tdls_send_peer_ps_ind(struct vif_info_tag *vif, bool ps_on, uint8_t sta_idx); 00151 00161 void tdls_peer_traffic_ind_tx_cfm(void *env, uint32_t status); 00162 00173 void tdls_add_sta(struct sta_info_tag *sta, bool initiator, bool chsw_allowed); 00174 00183 void tdls_del_sta(struct sta_info_tag *sta); 00184 00185 00186 #endif // NX_UMAC_PRESENT && NX_TDLS 00187 00189 00190 #endif // TDLS_H_
1.6.1