[6319] | 1 | #ifndef WLAN_PLATFORM_COMMON_H_ |
---|
| 2 | #define WLAN_PLATFORM_COMMON_H_ |
---|
| 3 | |
---|
| 4 | #include "xil_types.h" |
---|
| 5 | #include "wlan_common_types.h" |
---|
| 6 | |
---|
| 7 | //----------------------------------------------- |
---|
| 8 | // Hardware information struct to share data between the |
---|
| 9 | // low and high CPUs |
---|
| 10 | |
---|
| 11 | typedef struct wlan_mac_hw_info_t { |
---|
| 12 | u32 platform_id; |
---|
| 13 | u32 platform_config; |
---|
| 14 | const char* serial_number_prefix; |
---|
| 15 | u32 serial_number; |
---|
| 16 | u8 hw_addr_wlan[MAC_ADDR_LEN]; |
---|
| 17 | u8 hw_addr_wlan_exp[MAC_ADDR_LEN]; |
---|
| 18 | } wlan_mac_hw_info_t; |
---|
| 19 | |
---|
| 20 | //--------------------------------------- |
---|
| 21 | // Platform information struct |
---|
| 22 | typedef struct platform_common_dev_info_t{ |
---|
| 23 | u32 platform_id; |
---|
| 24 | u32 cpu_id; |
---|
| 25 | u32 is_cpu_high; |
---|
| 26 | u32 is_cpu_low; |
---|
| 27 | u32 mailbox_dev_id; |
---|
| 28 | u32 pkt_buf_mutex_dev_id; |
---|
| 29 | u32 tx_pkt_buf_baseaddr; |
---|
| 30 | u32 rx_pkt_buf_baseaddr; |
---|
| 31 | s8 tx_power_min_dbm; |
---|
| 32 | s8 tx_power_max_dbm; |
---|
| 33 | u16 reserved; |
---|
| 34 | u32 tx_analog_latency_100ns; |
---|
| 35 | u32 tx_radio_prep_latency_100ns; |
---|
| 36 | u32 rx_analog_latency_100ns; |
---|
| 37 | u32 capabilities_flags; |
---|
| 38 | } platform_common_dev_info_t; |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | #define PLATFORM_CAPABILITIES_FLAGS_SUPPORTS_PER_TX_POWER 0x00000001 |
---|
| 42 | |
---|
| 43 | // Common platform init functions |
---|
| 44 | platform_common_dev_info_t wlan_platform_common_get_dev_info(); |
---|
| 45 | int wlan_platform_common_init(); |
---|
| 46 | wlan_mac_hw_info_t wlan_platform_get_hw_info(); |
---|
| 47 | |
---|
| 48 | // User IO functions |
---|
| 49 | u32 wlan_platform_userio_get_state(); |
---|
| 50 | |
---|
| 51 | // Temperature functions |
---|
| 52 | u32 wlan_platform_get_current_temp(); |
---|
| 53 | u32 wlan_platform_get_min_temp(); |
---|
| 54 | u32 wlan_platform_get_max_temp(); |
---|
| 55 | |
---|
| 56 | // MAC time functions |
---|
| 57 | u64 get_mac_time_usec(); |
---|
| 58 | void set_mac_time_usec(u64 new_time); |
---|
| 59 | void apply_mac_time_delta_usec(s64 time_delta); |
---|
| 60 | u64 get_system_time_usec(); |
---|
| 61 | void wlan_usleep(u64 delay); |
---|
| 62 | |
---|
| 63 | #endif /* WLAN_PLATFORM_COMMON_H_ */ |
---|