[6319] | 1 | /** @file wlan_mac_ibss.h |
---|
| 2 | * @brief Independent BSS |
---|
| 3 | * |
---|
| 4 | * This contains code for the 802.11 IBSS node (ad hoc). |
---|
| 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 | /*************************** Constant Definitions ****************************/ |
---|
| 17 | #ifndef WLAN_MAC_IBSS_H_ |
---|
| 18 | #define WLAN_MAC_IBSS_H_ |
---|
| 19 | |
---|
| 20 | #include "xil_types.h" |
---|
| 21 | |
---|
| 22 | //Forward declarations |
---|
| 23 | struct bss_config_t; |
---|
| 24 | struct station_info_t; |
---|
| 25 | struct rx_common_entry; |
---|
| 26 | struct network_info_t; |
---|
| 27 | enum scan_state_t; |
---|
| 28 | struct eth_rx_queue_buffer_t; |
---|
| 29 | |
---|
| 30 | //----------------------------------------------- |
---|
| 31 | // Enable the WLAN UART Menu |
---|
| 32 | #define WLAN_USE_UART_MENU |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | //----------------------------------------------- |
---|
| 36 | // Common Defines |
---|
| 37 | #define NUM_BASIC_RATES_MAX 10 |
---|
| 38 | |
---|
| 39 | #define MAX_TX_QUEUE_LEN 150 /// Maximum number of entries in any Tx queue |
---|
| 40 | #define MAX_NUM_PEERS 15 /// Maximum number of peers allowed |
---|
| 41 | |
---|
| 42 | //----------------------------------------------- |
---|
| 43 | // Timing parameters |
---|
| 44 | |
---|
| 45 | // Period for checking association table for stale associations |
---|
| 46 | #define ASSOCIATION_CHECK_INTERVAL_MS (1000) |
---|
| 47 | #define ASSOCIATION_CHECK_INTERVAL_US (ASSOCIATION_CHECK_INTERVAL_MS * 1000) |
---|
| 48 | |
---|
| 49 | // Timeout for last reception for an association; timed-out associations are subject to de-association |
---|
| 50 | #define ASSOCIATION_TIMEOUT_S (300) |
---|
| 51 | #define ASSOCIATION_TIMEOUT_US (ASSOCIATION_TIMEOUT_S * 1000000) |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | /*********************** Global Structure Definitions ************************/ |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | /*************************** Function Prototypes *****************************/ |
---|
| 58 | int main(); |
---|
| 59 | void handle_cpu_low_reboot(); |
---|
| 60 | u32 configure_bss(struct bss_config_t* bss_config, u32 update_mask); |
---|
| 61 | |
---|
| 62 | void remove_inactive_station_infos(); |
---|
| 63 | |
---|
| 64 | void ltg_event(u32 id, void* callback_arg); |
---|
| 65 | void association_timestamp_adjust(s64 timestamp_diff); |
---|
| 66 | |
---|
| 67 | int ethernet_receive(struct eth_rx_queue_buffer_t* eth_rx_queue_buffer); |
---|
| 68 | |
---|
| 69 | u32 mpdu_rx_process(void* pkt_buf_addr, struct station_info_t* station_info, struct rx_common_entry* rx_event_log_entry); |
---|
| 70 | struct network_info_t* active_network_info_getter(); |
---|
| 71 | void process_scan_state_change(enum scan_state_t scan_state); |
---|
| 72 | void poll_tx_queues(); |
---|
| 73 | void purge_all_wireless_tx_queue(); |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | void uart_rx(u8 rxByte); |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | #endif /* WLAN_MAC_STA_H_ */ |
---|