00001
00013 #ifndef _SCAN_TASK_H_
00014 #define _SCAN_TASK_H_
00015
00025
00026
00027
00028
00029 #include "co_int.h"
00030 #include "co_bool.h"
00031
00032
00033 #include "ke_task.h"
00034
00035 #include "mac.h"
00036 #include "phy.h"
00037 #include "scan.h"
00038
00039 #if NX_HW_SCAN
00040
00041
00042
00043
00045 #define SCAN_IDX_MAX 1
00046
00048 enum scan_state_tag
00049 {
00051 SCAN_IDLE,
00053 SCAN_WAIT_IE_DWNLD,
00055 SCAN_WAIT_CHANNEL,
00057 SCAN_WAIT_BEACON_PROBE_RSP,
00059 SCAN_STATE_MAX
00060 };
00061
00063 enum scan_msg_tag
00064 {
00066 SCAN_START_REQ = KE_FIRST_MSG(TASK_SCAN),
00068 SCAN_START_CFM,
00070 SCAN_DONE_IND,
00072 SCAN_CANCEL_REQ,
00074 SCAN_CANCEL_CFM,
00075
00076
00077
00078
00079 SCAN_TIMER,
00080
00082 SCAN_MAX,
00083 };
00084
00086 struct scan_start_req
00087 {
00089 struct mac_chan_def chan[SCAN_CHANNEL_MAX];
00091 struct mac_ssid ssid[SCAN_SSID_MAX];
00093 struct mac_addr bssid;
00096 uint32_t add_ies;
00098 uint16_t add_ie_len;
00100 uint8_t vif_idx;
00102 uint8_t chan_cnt;
00104 uint8_t ssid_cnt;
00106 bool no_cck;
00107 };
00108
00110 struct scan_start_cfm
00111 {
00113 uint8_t status;
00114 };
00115
00117 struct scan_cancel_cfm
00118 {
00120 uint8_t status;
00121 };
00122
00123
00124
00125
00126
00127 extern const struct ke_state_handler scan_default_handler;
00128
00129 extern ke_state_t scan_state[SCAN_IDX_MAX];
00130 #endif
00131
00133
00134 #endif // _MM_TASK_H_