[6319] | 1 | /** @file wlan_mac_sta_join.h |
---|
| 2 | * @brief Join FSM |
---|
| 3 | * |
---|
| 4 | * This contains code for the STA join process. |
---|
| 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 | |
---|
| 15 | /*************************** Constant Definitions ****************************/ |
---|
| 16 | #ifndef WLAN_MAC_STA_JOIN_H_ |
---|
| 17 | #define WLAN_MAC_STA_JOIN_H_ |
---|
| 18 | |
---|
| 19 | /***************************** Include Files *********************************/ |
---|
| 20 | #include "xil_types.h" |
---|
| 21 | |
---|
| 22 | //Forward declarations |
---|
| 23 | struct network_info_t; |
---|
| 24 | |
---|
| 25 | // Join Timing Parameters |
---|
| 26 | // These defines set the join timing parameters at boot. |
---|
| 27 | // |
---|
| 28 | #define BSS_SEARCH_POLL_INTERVAL_USEC 10000 |
---|
| 29 | #define BSS_ATTEMPT_POLL_INTERVAL_USEC 50000 |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | /*********************** Global Structure Definitions ************************/ |
---|
| 33 | |
---|
| 34 | typedef struct join_parameters_t{ |
---|
| 35 | char * ssid; // Mandatory: SSID string |
---|
| 36 | u8 bssid[MAC_ADDR_LEN]; // Optional: BSSID address, 00-00-00-00-00-00 interpreted as "ignore" |
---|
| 37 | u8 channel; // Optional: Channel number, 0 interpreted as "ignore" |
---|
| 38 | } join_parameters_t; |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | /*************************** Function Prototypes *****************************/ |
---|
| 42 | |
---|
| 43 | int wlan_mac_sta_join_init(); |
---|
| 44 | |
---|
| 45 | void wlan_mac_sta_set_join_success_callback(function_ptr_t callback); |
---|
| 46 | |
---|
| 47 | volatile join_parameters_t* wlan_mac_sta_get_join_parameters(); |
---|
| 48 | volatile struct network_info_t* wlan_mac_sta_get_attempt_network_info(); |
---|
| 49 | |
---|
| 50 | void wlan_mac_sta_join(); |
---|
| 51 | void wlan_mac_sta_join_return_to_idle(); |
---|
| 52 | |
---|
| 53 | void wlan_mac_sta_join_bss_attempt_poll(u32 aid); |
---|
| 54 | |
---|
| 55 | u32 wlan_mac_sta_is_joining(); |
---|
| 56 | void wlan_mac_sta_successfully_authenticated(u8* bssid); |
---|
| 57 | void wlan_mac_sta_successfully_associated(u8* bssid, u16 AID); |
---|
| 58 | |
---|
| 59 | #endif |
---|