1 | /** @file wlan_mac_scan.h |
---|
2 | * @brief Scan FSM |
---|
3 | * |
---|
4 | * This contains code for the active scan finite state machine. |
---|
5 | * |
---|
6 | * @copyright Copyright 2014-2019, Mango Communications. All rights reserved. |
---|
7 | * Distributed under the Mango Communications Reference Design License |
---|
8 | * See LICENSE.txt included in the design archive or |
---|
9 | * at http://mangocomm.com/802.11/license |
---|
10 | * |
---|
11 | * This file is part of the Mango 802.11 Reference Design (https://mangocomm.com/802.11) |
---|
12 | */ |
---|
13 | |
---|
14 | /***************************** Include Files *********************************/ |
---|
15 | |
---|
16 | |
---|
17 | /*************************** Constant Definitions ****************************/ |
---|
18 | #ifndef WLAN_MAC_SCAN_H_ |
---|
19 | #define WLAN_MAC_SCAN_H_ |
---|
20 | |
---|
21 | #include "wlan_mac_high_sw_config.h" |
---|
22 | #include "wlan_common_types.h" |
---|
23 | #include "xil_types.h" |
---|
24 | |
---|
25 | // Scan Timing Parameters |
---|
26 | // These defines set the scan timing parameters at boot. |
---|
27 | // |
---|
28 | #define DEFAULT_SCAN_PROBE_TX_INTERVAL_USEC 20000 |
---|
29 | #define DEFAULT_SCAN_TIME_PER_CHANNEL_USEC 150000 |
---|
30 | |
---|
31 | |
---|
32 | |
---|
33 | /*********************** Global Structure Definitions ************************/ |
---|
34 | |
---|
35 | typedef struct scan_parameters_t{ |
---|
36 | u32 time_per_channel_usec; |
---|
37 | u32 probe_tx_interval_usec; |
---|
38 | u8* channel_vec; |
---|
39 | u32 channel_vec_len; |
---|
40 | char* ssid; |
---|
41 | } scan_parameters_t; |
---|
42 | |
---|
43 | |
---|
44 | /*************************** Function Prototypes *****************************/ |
---|
45 | |
---|
46 | int wlan_mac_scan_init(); |
---|
47 | |
---|
48 | void wlan_mac_scan_set_tx_probe_request_callback(function_ptr_t callback); |
---|
49 | void wlan_mac_scan_set_state_change_callback(function_ptr_t callback); |
---|
50 | |
---|
51 | volatile scan_parameters_t* wlan_mac_scan_get_parameters(); |
---|
52 | |
---|
53 | void wlan_mac_scan_start(); |
---|
54 | void wlan_mac_scan_stop(); |
---|
55 | void wlan_mac_scan_pause(); |
---|
56 | void wlan_mac_scan_resume(); |
---|
57 | |
---|
58 | u32 wlan_mac_scan_is_scanning(); |
---|
59 | int wlan_mac_scan_get_num_scans(); |
---|
60 | |
---|
61 | |
---|
62 | #endif |
---|