00001 00012 #ifndef _SCANU_H_ 00013 #define _SCANU_H_ 00014 00020 #include "co_int.h" 00021 #include "co_bool.h" 00022 #include "hal_desc.h" 00023 00024 // for ke_task_id_t 00025 #include "ke_msg.h" 00026 00027 // for mac_scan_result and other structures 00028 #include "mac.h" 00029 00030 #include "hal_dma.h" 00031 00033 #define SCANU_MAX_IE_LEN 200 00034 00036 #define SCANU_MAX_RESULTS 32 00037 00039 #define SCANU_MAX_NONTXED_BSSID_PER_BEACON 16 00040 00041 struct rxu_mgt_ind; 00042 00044 struct scanu_mbssid_profile_tag 00045 { 00047 uint32_t ssid_ie_addr; 00049 uint16_t capa; 00051 uint8_t bssid_index; 00052 }; 00053 00055 struct scanu_mbssids_tag 00056 { 00058 struct scanu_mbssid_profile_tag bssids[SCANU_MAX_NONTXED_BSSID_PER_BEACON]; 00060 uint8_t max_bssid_ind; 00062 uint8_t mbssid_cnt; 00063 }; 00064 00068 struct scanu_env_tag 00069 { 00071 struct scanu_start_req const *param; 00073 struct hal_dma_desc_tag dma_desc; 00075 uint16_t result_cnt; 00077 struct mac_scan_result scan_result[SCANU_MAX_RESULTS]; 00079 ke_task_id_t src_id; 00081 bool joining; 00083 uint8_t band; 00085 struct mac_addr bssid; 00087 struct mac_ssid ssid; 00089 struct mac_addr ref_bssid; 00090 #if (NX_P2P) 00092 bool p2p_scan; 00093 #endif //(NX_P2P) 00095 bool join_status; 00097 struct scanu_mbssids_tag mbssids; 00098 }; 00099 00101 struct scanu_add_ie_tag 00102 { 00104 struct dma_desc dma_desc; 00106 uint32_t buf[SCANU_MAX_IE_LEN/4]; 00107 }; 00108 00110 #define SCAN_ENABLE_TIME 2000000 00111 00113 extern struct scanu_env_tag scanu_env; 00114 00116 extern struct scanu_add_ie_tag scanu_add_ie; 00117 00124 void scanu_init(void); 00125 00138 int scanu_frame_handler(struct rxu_mgt_ind const *frame); 00139 00153 struct mac_scan_result* scanu_find_result(struct mac_addr const *bssid_ptr, 00154 bool allocate); 00155 00165 struct mac_scan_result *scanu_search_by_bssid(struct mac_addr const *bssid); 00166 00178 struct mac_scan_result *scanu_search_by_ssid(struct mac_ssid const *ssid); 00179 00185 void scanu_start(void); 00186 00192 void scanu_scan_next(void); 00193 00201 void scanu_confirm(uint8_t status); 00202 00203 00205 00206 #endif // _SCANU_H_
1.6.1