1 | /** @file wlan_platform_high.h |
---|
2 | * @brief High Platform Defines for 802.11 Ref design |
---|
3 | * |
---|
4 | * @copyright Copyright 2014-2019, Mango Communications. All rights reserved. |
---|
5 | * Distributed under the Mango Communications Reference Design License |
---|
6 | * See LICENSE.txt included in the design archive or |
---|
7 | * at http://mangocomm.com/802.11/license |
---|
8 | * |
---|
9 | * This file is part of the Mango 802.11 Reference Design (https://mangocomm.com/802.11) |
---|
10 | */ |
---|
11 | |
---|
12 | #ifndef WLAN_PLATFORM_HIGH_H_ |
---|
13 | #define WLAN_PLATFORM_HIGH_H_ |
---|
14 | |
---|
15 | #include "xil_types.h" |
---|
16 | #include "xstatus.h" |
---|
17 | #include "wlan_common_types.h" |
---|
18 | #include "wlan_high_types.h" |
---|
19 | #include "wlan_platform_intc.h" |
---|
20 | #include "wlan_mac_high_sw_config.h" |
---|
21 | |
---|
22 | // Forward declarations |
---|
23 | struct eth_tx_queue_buffer_t; |
---|
24 | |
---|
25 | #if WLAN_SW_CONFIG_ENABLE_WLAN_EXP |
---|
26 | struct cmd_resp_hdr_t; |
---|
27 | #endif |
---|
28 | |
---|
29 | //--------------------------------------- |
---|
30 | // Platform information struct |
---|
31 | typedef struct platform_high_dev_info_t{ |
---|
32 | u32 aux_bram_baseaddr; |
---|
33 | u32 aux_bram_size; |
---|
34 | u32 dram_baseaddr; |
---|
35 | u32 dram_size; |
---|
36 | u32 cdma_dev_id; |
---|
37 | u32 mailbox_int_id; |
---|
38 | u32 timer_dur_us; |
---|
39 | } platform_high_dev_info_t; |
---|
40 | |
---|
41 | typedef enum userio_disp_status_t{ |
---|
42 | USERIO_DISP_STATUS_IDENTIFY = 0, |
---|
43 | USERIO_DISP_STATUS_APPLICATION_ROLE = 1, |
---|
44 | USERIO_DISP_STATUS_MEMBER_LIST_UPDATE = 2, |
---|
45 | USERIO_DISP_STATUS_WLAN_EXP_CONFIGURE = 3, |
---|
46 | USERIO_DISP_STATUS_CPU_ERROR = 255 |
---|
47 | } userio_disp_high_status_t; |
---|
48 | |
---|
49 | //--------------------------------------- |
---|
50 | // Public functions that WLAN MAC High Framework directly calls |
---|
51 | void wlan_platform_cpu_high_init(); |
---|
52 | platform_high_dev_info_t wlan_platform_high_get_dev_info(); |
---|
53 | int wlan_platform_high_init(); |
---|
54 | void wlan_platform_free_queue_entry_notify(); |
---|
55 | void wlan_platform_high_poll(); |
---|
56 | int wlan_platform_high_copy_info(u8* dest); |
---|
57 | |
---|
58 | |
---|
59 | // User IO functions |
---|
60 | void wlan_platform_high_userio_disp_status(userio_disp_high_status_t status, int status_param); |
---|
61 | |
---|
62 | // SW interrupt functions |
---|
63 | void wlan_platform_assert_sw_intr(u32 intr_mask); |
---|
64 | void wlan_platform_clear_sw_intr(u32 intr_mask); |
---|
65 | void wlan_platform_set_sw_intr_mask(u32 intr_mask); |
---|
66 | void wlan_platform_clear_sw_intr_mask(u32 intr_mask); |
---|
67 | |
---|
68 | #if WLAN_SW_CONFIG_ENABLE_WLAN_EXP |
---|
69 | int wlan_platform_wlan_exp_process_node_cmd(struct cmd_resp_hdr_t* cmd_hdr, struct eth_tx_queue_buffer_t* eth_tx_queue_buffer, u8* cmd_processed); |
---|
70 | #endif |
---|
71 | |
---|
72 | #if WLAN_SW_CONFIG_ENABLE_ETH_BRIDGE |
---|
73 | int wlan_platform_portal_eth_send( struct eth_tx_queue_buffer_t* eth_tx_queue_buffer ); |
---|
74 | int wlan_platform_portal_eth_get_mtu(); |
---|
75 | #endif //WLAN_SW_CONFIG_ENABLE_ETH_BRIDGE |
---|
76 | |
---|
77 | #if WLAN_SW_CONFIG_ENABLE_WLAN_EXP |
---|
78 | int wlan_platform_wlan_exp_eth_send( struct eth_tx_queue_buffer_t* eth_tx_queue_buffer ); |
---|
79 | int wlan_platform_wlan_exp_eth_get_mtu(); |
---|
80 | #endif //WLAN_SW_CONFIG_ENABLE_WLAN_EXP |
---|
81 | |
---|
82 | #endif /* WLAN_PLATFORM_HIGH_H_ */ |
---|