00001 00012 #ifndef _SCAN_H_ 00013 #define _SCAN_H_ 00014 00024 /* 00025 * INCLUDE FILES 00026 **************************************************************************************** 00027 */ 00028 // standard includes 00029 #include "co_int.h" 00030 #include "co_bool.h" 00031 #include "co_utils.h" 00032 00033 #include "mac.h" 00034 #include "ke_timer.h" 00035 #include "mm_task.h" 00036 #include "hal_desc.h" 00037 #include "hal_dma.h" 00038 00039 #include "dma.h" 00040 00041 /* 00042 * DEFINES 00043 **************************************************************************************** 00044 */ 00046 #define SCAN_SSID_MAX 2 00047 00049 #define SCAN_CHANNEL_MAX (MAC_DOMAINCHANNEL_24G_MAX + MAC_DOMAINCHANNEL_5G_MAX) 00050 00052 #define SCAN_MAX_IE_LEN 300 00053 00055 #define SCAN_ACTIVE_DURATION 30000 // 30 ms 00056 00058 #define SCAN_PASSIVE_DURATION 110000 // 120 ms 00059 00061 struct scan_probe_req_ie_tag 00062 { 00064 struct dma_desc dma_desc; 00066 struct tx_pbd pbd; 00068 uint32_t buf[SCAN_MAX_IE_LEN/4]; 00069 }; 00070 00072 struct scan_env_tag 00073 { 00075 struct hal_dma_desc_tag dma_desc; 00077 struct scan_start_req const *param; 00079 uint32_t ds_ie; 00081 ke_task_id_t req_id; 00083 uint8_t chan_idx; 00085 bool abort; 00086 }; 00087 00088 #if NX_HW_SCAN 00089 /* 00090 * GLOBAL VARIABLES 00091 **************************************************************************************** 00092 */ 00093 extern struct scan_env_tag scan_env; 00094 00096 extern struct scan_probe_req_ie_tag scan_probe_req_ie; 00097 00098 00099 /* 00100 * FUNCTION PROTOTYPES 00101 **************************************************************************************** 00102 */ 00109 void scan_init(void); 00110 00118 void scan_ie_download(struct scan_start_req const *param); 00119 00120 00126 void scan_set_channel_request(void); 00127 00128 00134 void scan_probe_req_tx(void); 00135 00144 void scan_send_cancel_cfm(uint8_t status, ke_task_id_t dest_id); 00145 00153 struct mac_chan_def const *scan_get_chan(void); 00154 #endif 00155 00157 00158 #endif // _SCAN_H_
1.6.1