18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * This file is part of wl1251 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 1998-2007 Texas Instruments Incorporated 68c2ecf20Sopenharmony_ci * Copyright (C) 2008 Nokia Corporation 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef __WL1251_ACX_H__ 108c2ecf20Sopenharmony_ci#define __WL1251_ACX_H__ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include "wl1251.h" 138c2ecf20Sopenharmony_ci#include "cmd.h" 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/* Target's information element */ 168c2ecf20Sopenharmony_cistruct acx_header { 178c2ecf20Sopenharmony_ci struct wl1251_cmd_header cmd; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci /* acx (or information element) header */ 208c2ecf20Sopenharmony_ci u16 id; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci /* payload length (not including headers */ 238c2ecf20Sopenharmony_ci u16 len; 248c2ecf20Sopenharmony_ci} __packed; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_cistruct acx_error_counter { 278c2ecf20Sopenharmony_ci struct acx_header header; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci /* The number of PLCP errors since the last time this */ 308c2ecf20Sopenharmony_ci /* information element was interrogated. This field is */ 318c2ecf20Sopenharmony_ci /* automatically cleared when it is interrogated.*/ 328c2ecf20Sopenharmony_ci u32 PLCP_error; 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci /* The number of FCS errors since the last time this */ 358c2ecf20Sopenharmony_ci /* information element was interrogated. This field is */ 368c2ecf20Sopenharmony_ci /* automatically cleared when it is interrogated.*/ 378c2ecf20Sopenharmony_ci u32 FCS_error; 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci /* The number of MPDUs without PLCP header errors received*/ 408c2ecf20Sopenharmony_ci /* since the last time this information element was interrogated. */ 418c2ecf20Sopenharmony_ci /* This field is automatically cleared when it is interrogated.*/ 428c2ecf20Sopenharmony_ci u32 valid_frame; 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci /* the number of missed sequence numbers in the squentially */ 458c2ecf20Sopenharmony_ci /* values of frames seq numbers */ 468c2ecf20Sopenharmony_ci u32 seq_num_miss; 478c2ecf20Sopenharmony_ci} __packed; 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_cistruct acx_revision { 508c2ecf20Sopenharmony_ci struct acx_header header; 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci /* 538c2ecf20Sopenharmony_ci * The WiLink firmware version, an ASCII string x.x.x.x, 548c2ecf20Sopenharmony_ci * that uniquely identifies the current firmware. 558c2ecf20Sopenharmony_ci * The left most digit is incremented each time a 568c2ecf20Sopenharmony_ci * significant change is made to the firmware, such as 578c2ecf20Sopenharmony_ci * code redesign or new platform support. 588c2ecf20Sopenharmony_ci * The second digit is incremented when major enhancements 598c2ecf20Sopenharmony_ci * are added or major fixes are made. 608c2ecf20Sopenharmony_ci * The third digit is incremented for each GA release. 618c2ecf20Sopenharmony_ci * The fourth digit is incremented for each build. 628c2ecf20Sopenharmony_ci * The first two digits identify a firmware release version, 638c2ecf20Sopenharmony_ci * in other words, a unique set of features. 648c2ecf20Sopenharmony_ci * The first three digits identify a GA release. 658c2ecf20Sopenharmony_ci */ 668c2ecf20Sopenharmony_ci char fw_version[20]; 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci /* 698c2ecf20Sopenharmony_ci * This 4 byte field specifies the WiLink hardware version. 708c2ecf20Sopenharmony_ci * bits 0 - 15: Reserved. 718c2ecf20Sopenharmony_ci * bits 16 - 23: Version ID - The WiLink version ID 728c2ecf20Sopenharmony_ci * (1 = first spin, 2 = second spin, and so on). 738c2ecf20Sopenharmony_ci * bits 24 - 31: Chip ID - The WiLink chip ID. 748c2ecf20Sopenharmony_ci */ 758c2ecf20Sopenharmony_ci u32 hw_version; 768c2ecf20Sopenharmony_ci} __packed; 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_cienum wl1251_psm_mode { 798c2ecf20Sopenharmony_ci /* Active mode */ 808c2ecf20Sopenharmony_ci WL1251_PSM_CAM = 0, 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci /* Power save mode */ 838c2ecf20Sopenharmony_ci WL1251_PSM_PS = 1, 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci /* Extreme low power */ 868c2ecf20Sopenharmony_ci WL1251_PSM_ELP = 2, 878c2ecf20Sopenharmony_ci}; 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_cistruct acx_sleep_auth { 908c2ecf20Sopenharmony_ci struct acx_header header; 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci /* The sleep level authorization of the device. */ 938c2ecf20Sopenharmony_ci /* 0 - Always active*/ 948c2ecf20Sopenharmony_ci /* 1 - Power down mode: light / fast sleep*/ 958c2ecf20Sopenharmony_ci /* 2 - ELP mode: Deep / Max sleep*/ 968c2ecf20Sopenharmony_ci u8 sleep_auth; 978c2ecf20Sopenharmony_ci u8 padding[3]; 988c2ecf20Sopenharmony_ci} __packed; 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_cienum { 1018c2ecf20Sopenharmony_ci HOSTIF_PCI_MASTER_HOST_INDIRECT, 1028c2ecf20Sopenharmony_ci HOSTIF_PCI_MASTER_HOST_DIRECT, 1038c2ecf20Sopenharmony_ci HOSTIF_SLAVE, 1048c2ecf20Sopenharmony_ci HOSTIF_PKT_RING, 1058c2ecf20Sopenharmony_ci HOSTIF_DONTCARE = 0xFF 1068c2ecf20Sopenharmony_ci}; 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci#define DEFAULT_UCAST_PRIORITY 0 1098c2ecf20Sopenharmony_ci#define DEFAULT_RX_Q_PRIORITY 0 1108c2ecf20Sopenharmony_ci#define DEFAULT_NUM_STATIONS 1 1118c2ecf20Sopenharmony_ci#define DEFAULT_RXQ_PRIORITY 0 /* low 0 .. 15 high */ 1128c2ecf20Sopenharmony_ci#define DEFAULT_RXQ_TYPE 0x07 /* All frames, Data/Ctrl/Mgmt */ 1138c2ecf20Sopenharmony_ci#define TRACE_BUFFER_MAX_SIZE 256 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci#define DP_RX_PACKET_RING_CHUNK_SIZE 1600 1168c2ecf20Sopenharmony_ci#define DP_TX_PACKET_RING_CHUNK_SIZE 1600 1178c2ecf20Sopenharmony_ci#define DP_RX_PACKET_RING_CHUNK_NUM 2 1188c2ecf20Sopenharmony_ci#define DP_TX_PACKET_RING_CHUNK_NUM 2 1198c2ecf20Sopenharmony_ci#define DP_TX_COMPLETE_TIME_OUT 20 1208c2ecf20Sopenharmony_ci#define FW_TX_CMPLT_BLOCK_SIZE 16 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_cistruct acx_data_path_params { 1238c2ecf20Sopenharmony_ci struct acx_header header; 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci u16 rx_packet_ring_chunk_size; 1268c2ecf20Sopenharmony_ci u16 tx_packet_ring_chunk_size; 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ci u8 rx_packet_ring_chunk_num; 1298c2ecf20Sopenharmony_ci u8 tx_packet_ring_chunk_num; 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci /* 1328c2ecf20Sopenharmony_ci * Maximum number of packets that can be gathered 1338c2ecf20Sopenharmony_ci * in the TX complete ring before an interrupt 1348c2ecf20Sopenharmony_ci * is generated. 1358c2ecf20Sopenharmony_ci */ 1368c2ecf20Sopenharmony_ci u8 tx_complete_threshold; 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_ci /* Number of pending TX complete entries in cyclic ring.*/ 1398c2ecf20Sopenharmony_ci u8 tx_complete_ring_depth; 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci /* 1428c2ecf20Sopenharmony_ci * Max num microseconds since a packet enters the TX 1438c2ecf20Sopenharmony_ci * complete ring until an interrupt is generated. 1448c2ecf20Sopenharmony_ci */ 1458c2ecf20Sopenharmony_ci u32 tx_complete_timeout; 1468c2ecf20Sopenharmony_ci} __packed; 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_cistruct acx_data_path_params_resp { 1508c2ecf20Sopenharmony_ci struct acx_header header; 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci u16 rx_packet_ring_chunk_size; 1538c2ecf20Sopenharmony_ci u16 tx_packet_ring_chunk_size; 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_ci u8 rx_packet_ring_chunk_num; 1568c2ecf20Sopenharmony_ci u8 tx_packet_ring_chunk_num; 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci u8 pad[2]; 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci u32 rx_packet_ring_addr; 1618c2ecf20Sopenharmony_ci u32 tx_packet_ring_addr; 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_ci u32 rx_control_addr; 1648c2ecf20Sopenharmony_ci u32 tx_control_addr; 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ci u32 tx_complete_addr; 1678c2ecf20Sopenharmony_ci} __packed; 1688c2ecf20Sopenharmony_ci 1698c2ecf20Sopenharmony_ci#define TX_MSDU_LIFETIME_MIN 0 1708c2ecf20Sopenharmony_ci#define TX_MSDU_LIFETIME_MAX 3000 1718c2ecf20Sopenharmony_ci#define TX_MSDU_LIFETIME_DEF 512 1728c2ecf20Sopenharmony_ci#define RX_MSDU_LIFETIME_MIN 0 1738c2ecf20Sopenharmony_ci#define RX_MSDU_LIFETIME_MAX 0xFFFFFFFF 1748c2ecf20Sopenharmony_ci#define RX_MSDU_LIFETIME_DEF 512000 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_cistruct acx_rx_msdu_lifetime { 1778c2ecf20Sopenharmony_ci struct acx_header header; 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci /* 1808c2ecf20Sopenharmony_ci * The maximum amount of time, in TU, before the 1818c2ecf20Sopenharmony_ci * firmware discards the MSDU. 1828c2ecf20Sopenharmony_ci */ 1838c2ecf20Sopenharmony_ci u32 lifetime; 1848c2ecf20Sopenharmony_ci} __packed; 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci/* 1878c2ecf20Sopenharmony_ci * RX Config Options Table 1888c2ecf20Sopenharmony_ci * Bit Definition 1898c2ecf20Sopenharmony_ci * === ========== 1908c2ecf20Sopenharmony_ci * 31:14 Reserved 1918c2ecf20Sopenharmony_ci * 13 Copy RX Status - when set, write three receive status words 1928c2ecf20Sopenharmony_ci * to top of rx'd MPDUs. 1938c2ecf20Sopenharmony_ci * When cleared, do not write three status words (added rev 1.5) 1948c2ecf20Sopenharmony_ci * 12 Reserved 1958c2ecf20Sopenharmony_ci * 11 RX Complete upon FCS error - when set, give rx complete 1968c2ecf20Sopenharmony_ci * interrupt for FCS errors, after the rx filtering, e.g. unicast 1978c2ecf20Sopenharmony_ci * frames not to us with FCS error will not generate an interrupt. 1988c2ecf20Sopenharmony_ci * 10 SSID Filter Enable - When set, the WiLink discards all beacon, 1998c2ecf20Sopenharmony_ci * probe request, and probe response frames with an SSID that does 2008c2ecf20Sopenharmony_ci * not match the SSID specified by the host in the START/JOIN 2018c2ecf20Sopenharmony_ci * command. 2028c2ecf20Sopenharmony_ci * When clear, the WiLink receives frames with any SSID. 2038c2ecf20Sopenharmony_ci * 9 Broadcast Filter Enable - When set, the WiLink discards all 2048c2ecf20Sopenharmony_ci * broadcast frames. When clear, the WiLink receives all received 2058c2ecf20Sopenharmony_ci * broadcast frames. 2068c2ecf20Sopenharmony_ci * 8:6 Reserved 2078c2ecf20Sopenharmony_ci * 5 BSSID Filter Enable - When set, the WiLink discards any frames 2088c2ecf20Sopenharmony_ci * with a BSSID that does not match the BSSID specified by the 2098c2ecf20Sopenharmony_ci * host. 2108c2ecf20Sopenharmony_ci * When clear, the WiLink receives frames from any BSSID. 2118c2ecf20Sopenharmony_ci * 4 MAC Addr Filter - When set, the WiLink discards any frames 2128c2ecf20Sopenharmony_ci * with a destination address that does not match the MAC address 2138c2ecf20Sopenharmony_ci * of the adaptor. 2148c2ecf20Sopenharmony_ci * When clear, the WiLink receives frames destined to any MAC 2158c2ecf20Sopenharmony_ci * address. 2168c2ecf20Sopenharmony_ci * 3 Promiscuous - When set, the WiLink receives all valid frames 2178c2ecf20Sopenharmony_ci * (i.e., all frames that pass the FCS check). 2188c2ecf20Sopenharmony_ci * When clear, only frames that pass the other filters specified 2198c2ecf20Sopenharmony_ci * are received. 2208c2ecf20Sopenharmony_ci * 2 FCS - When set, the WiLink includes the FCS with the received 2218c2ecf20Sopenharmony_ci * frame. 2228c2ecf20Sopenharmony_ci * When cleared, the FCS is discarded. 2238c2ecf20Sopenharmony_ci * 1 PLCP header - When set, write all data from baseband to frame 2248c2ecf20Sopenharmony_ci * buffer including PHY header. 2258c2ecf20Sopenharmony_ci * 0 Reserved - Always equal to 0. 2268c2ecf20Sopenharmony_ci * 2278c2ecf20Sopenharmony_ci * RX Filter Options Table 2288c2ecf20Sopenharmony_ci * Bit Definition 2298c2ecf20Sopenharmony_ci * === ========== 2308c2ecf20Sopenharmony_ci * 31:12 Reserved - Always equal to 0. 2318c2ecf20Sopenharmony_ci * 11 Association - When set, the WiLink receives all association 2328c2ecf20Sopenharmony_ci * related frames (association request/response, reassocation 2338c2ecf20Sopenharmony_ci * request/response, and disassociation). When clear, these frames 2348c2ecf20Sopenharmony_ci * are discarded. 2358c2ecf20Sopenharmony_ci * 10 Auth/De auth - When set, the WiLink receives all authentication 2368c2ecf20Sopenharmony_ci * and de-authentication frames. When clear, these frames are 2378c2ecf20Sopenharmony_ci * discarded. 2388c2ecf20Sopenharmony_ci * 9 Beacon - When set, the WiLink receives all beacon frames. 2398c2ecf20Sopenharmony_ci * When clear, these frames are discarded. 2408c2ecf20Sopenharmony_ci * 8 Contention Free - When set, the WiLink receives all contention 2418c2ecf20Sopenharmony_ci * free frames. 2428c2ecf20Sopenharmony_ci * When clear, these frames are discarded. 2438c2ecf20Sopenharmony_ci * 7 Control - When set, the WiLink receives all control frames. 2448c2ecf20Sopenharmony_ci * When clear, these frames are discarded. 2458c2ecf20Sopenharmony_ci * 6 Data - When set, the WiLink receives all data frames. 2468c2ecf20Sopenharmony_ci * When clear, these frames are discarded. 2478c2ecf20Sopenharmony_ci * 5 FCS Error - When set, the WiLink receives frames that have FCS 2488c2ecf20Sopenharmony_ci * errors. 2498c2ecf20Sopenharmony_ci * When clear, these frames are discarded. 2508c2ecf20Sopenharmony_ci * 4 Management - When set, the WiLink receives all management 2518c2ecf20Sopenharmony_ci * frames. 2528c2ecf20Sopenharmony_ci * When clear, these frames are discarded. 2538c2ecf20Sopenharmony_ci * 3 Probe Request - When set, the WiLink receives all probe request 2548c2ecf20Sopenharmony_ci * frames. 2558c2ecf20Sopenharmony_ci * When clear, these frames are discarded. 2568c2ecf20Sopenharmony_ci * 2 Probe Response - When set, the WiLink receives all probe 2578c2ecf20Sopenharmony_ci * response frames. 2588c2ecf20Sopenharmony_ci * When clear, these frames are discarded. 2598c2ecf20Sopenharmony_ci * 1 RTS/CTS/ACK - When set, the WiLink receives all RTS, CTS and ACK 2608c2ecf20Sopenharmony_ci * frames. 2618c2ecf20Sopenharmony_ci * When clear, these frames are discarded. 2628c2ecf20Sopenharmony_ci * 0 Rsvd Type/Sub Type - When set, the WiLink receives all frames 2638c2ecf20Sopenharmony_ci * that have reserved frame types and sub types as defined by the 2648c2ecf20Sopenharmony_ci * 802.11 specification. 2658c2ecf20Sopenharmony_ci * When clear, these frames are discarded. 2668c2ecf20Sopenharmony_ci */ 2678c2ecf20Sopenharmony_cistruct acx_rx_config { 2688c2ecf20Sopenharmony_ci struct acx_header header; 2698c2ecf20Sopenharmony_ci 2708c2ecf20Sopenharmony_ci u32 config_options; 2718c2ecf20Sopenharmony_ci u32 filter_options; 2728c2ecf20Sopenharmony_ci} __packed; 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_cienum { 2758c2ecf20Sopenharmony_ci QOS_AC_BE = 0, 2768c2ecf20Sopenharmony_ci QOS_AC_BK, 2778c2ecf20Sopenharmony_ci QOS_AC_VI, 2788c2ecf20Sopenharmony_ci QOS_AC_VO, 2798c2ecf20Sopenharmony_ci QOS_HIGHEST_AC_INDEX = QOS_AC_VO, 2808c2ecf20Sopenharmony_ci}; 2818c2ecf20Sopenharmony_ci 2828c2ecf20Sopenharmony_ci#define MAX_NUM_OF_AC (QOS_HIGHEST_AC_INDEX+1) 2838c2ecf20Sopenharmony_ci#define FIRST_AC_INDEX QOS_AC_BE 2848c2ecf20Sopenharmony_ci#define MAX_NUM_OF_802_1d_TAGS 8 2858c2ecf20Sopenharmony_ci#define AC_PARAMS_MAX_TSID 15 2868c2ecf20Sopenharmony_ci#define MAX_APSD_CONF 0xffff 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_ci#define QOS_TX_HIGH_MIN (0) 2898c2ecf20Sopenharmony_ci#define QOS_TX_HIGH_MAX (100) 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_ci#define QOS_TX_HIGH_BK_DEF (25) 2928c2ecf20Sopenharmony_ci#define QOS_TX_HIGH_BE_DEF (35) 2938c2ecf20Sopenharmony_ci#define QOS_TX_HIGH_VI_DEF (35) 2948c2ecf20Sopenharmony_ci#define QOS_TX_HIGH_VO_DEF (35) 2958c2ecf20Sopenharmony_ci 2968c2ecf20Sopenharmony_ci#define QOS_TX_LOW_BK_DEF (15) 2978c2ecf20Sopenharmony_ci#define QOS_TX_LOW_BE_DEF (25) 2988c2ecf20Sopenharmony_ci#define QOS_TX_LOW_VI_DEF (25) 2998c2ecf20Sopenharmony_ci#define QOS_TX_LOW_VO_DEF (25) 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_cistruct acx_tx_queue_qos_config { 3028c2ecf20Sopenharmony_ci struct acx_header header; 3038c2ecf20Sopenharmony_ci 3048c2ecf20Sopenharmony_ci u8 qid; 3058c2ecf20Sopenharmony_ci u8 pad[3]; 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci /* Max number of blocks allowd in the queue */ 3088c2ecf20Sopenharmony_ci u16 high_threshold; 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_ci /* Lowest memory blocks guaranteed for this queue */ 3118c2ecf20Sopenharmony_ci u16 low_threshold; 3128c2ecf20Sopenharmony_ci} __packed; 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_cistruct acx_packet_detection { 3158c2ecf20Sopenharmony_ci struct acx_header header; 3168c2ecf20Sopenharmony_ci 3178c2ecf20Sopenharmony_ci u32 threshold; 3188c2ecf20Sopenharmony_ci} __packed; 3198c2ecf20Sopenharmony_ci 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_cienum acx_slot_type { 3228c2ecf20Sopenharmony_ci SLOT_TIME_LONG = 0, 3238c2ecf20Sopenharmony_ci SLOT_TIME_SHORT = 1, 3248c2ecf20Sopenharmony_ci DEFAULT_SLOT_TIME = SLOT_TIME_SHORT, 3258c2ecf20Sopenharmony_ci MAX_SLOT_TIMES = 0xFF 3268c2ecf20Sopenharmony_ci}; 3278c2ecf20Sopenharmony_ci 3288c2ecf20Sopenharmony_ci#define STATION_WONE_INDEX 0 3298c2ecf20Sopenharmony_ci 3308c2ecf20Sopenharmony_cistruct acx_slot { 3318c2ecf20Sopenharmony_ci struct acx_header header; 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ci u8 wone_index; /* Reserved */ 3348c2ecf20Sopenharmony_ci u8 slot_time; 3358c2ecf20Sopenharmony_ci u8 reserved[6]; 3368c2ecf20Sopenharmony_ci} __packed; 3378c2ecf20Sopenharmony_ci 3388c2ecf20Sopenharmony_ci 3398c2ecf20Sopenharmony_ci#define ACX_MC_ADDRESS_GROUP_MAX (8) 3408c2ecf20Sopenharmony_ci#define ACX_MC_ADDRESS_GROUP_MAX_LEN (ETH_ALEN * ACX_MC_ADDRESS_GROUP_MAX) 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_cistruct acx_dot11_grp_addr_tbl { 3438c2ecf20Sopenharmony_ci struct acx_header header; 3448c2ecf20Sopenharmony_ci 3458c2ecf20Sopenharmony_ci u8 enabled; 3468c2ecf20Sopenharmony_ci u8 num_groups; 3478c2ecf20Sopenharmony_ci u8 pad[2]; 3488c2ecf20Sopenharmony_ci u8 mac_table[ACX_MC_ADDRESS_GROUP_MAX_LEN]; 3498c2ecf20Sopenharmony_ci} __packed; 3508c2ecf20Sopenharmony_ci 3518c2ecf20Sopenharmony_ci 3528c2ecf20Sopenharmony_ci#define RX_TIMEOUT_PS_POLL_MIN 0 3538c2ecf20Sopenharmony_ci#define RX_TIMEOUT_PS_POLL_MAX (200000) 3548c2ecf20Sopenharmony_ci#define RX_TIMEOUT_PS_POLL_DEF (15) 3558c2ecf20Sopenharmony_ci#define RX_TIMEOUT_UPSD_MIN 0 3568c2ecf20Sopenharmony_ci#define RX_TIMEOUT_UPSD_MAX (200000) 3578c2ecf20Sopenharmony_ci#define RX_TIMEOUT_UPSD_DEF (15) 3588c2ecf20Sopenharmony_ci 3598c2ecf20Sopenharmony_cistruct acx_rx_timeout { 3608c2ecf20Sopenharmony_ci struct acx_header header; 3618c2ecf20Sopenharmony_ci 3628c2ecf20Sopenharmony_ci /* 3638c2ecf20Sopenharmony_ci * The longest time the STA will wait to receive 3648c2ecf20Sopenharmony_ci * traffic from the AP after a PS-poll has been 3658c2ecf20Sopenharmony_ci * transmitted. 3668c2ecf20Sopenharmony_ci */ 3678c2ecf20Sopenharmony_ci u16 ps_poll_timeout; 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ci /* 3708c2ecf20Sopenharmony_ci * The longest time the STA will wait to receive 3718c2ecf20Sopenharmony_ci * traffic from the AP after a frame has been sent 3728c2ecf20Sopenharmony_ci * from an UPSD enabled queue. 3738c2ecf20Sopenharmony_ci */ 3748c2ecf20Sopenharmony_ci u16 upsd_timeout; 3758c2ecf20Sopenharmony_ci} __packed; 3768c2ecf20Sopenharmony_ci 3778c2ecf20Sopenharmony_ci#define RTS_THRESHOLD_MIN 0 3788c2ecf20Sopenharmony_ci#define RTS_THRESHOLD_MAX 4096 3798c2ecf20Sopenharmony_ci#define RTS_THRESHOLD_DEF 2347 3808c2ecf20Sopenharmony_ci 3818c2ecf20Sopenharmony_cistruct acx_rts_threshold { 3828c2ecf20Sopenharmony_ci struct acx_header header; 3838c2ecf20Sopenharmony_ci 3848c2ecf20Sopenharmony_ci u16 threshold; 3858c2ecf20Sopenharmony_ci u8 pad[2]; 3868c2ecf20Sopenharmony_ci} __packed; 3878c2ecf20Sopenharmony_ci 3888c2ecf20Sopenharmony_cienum wl1251_acx_low_rssi_type { 3898c2ecf20Sopenharmony_ci /* 3908c2ecf20Sopenharmony_ci * The event is a "Level" indication which keeps triggering 3918c2ecf20Sopenharmony_ci * as long as the average RSSI is below the threshold. 3928c2ecf20Sopenharmony_ci */ 3938c2ecf20Sopenharmony_ci WL1251_ACX_LOW_RSSI_TYPE_LEVEL = 0, 3948c2ecf20Sopenharmony_ci 3958c2ecf20Sopenharmony_ci /* 3968c2ecf20Sopenharmony_ci * The event is an "Edge" indication which triggers 3978c2ecf20Sopenharmony_ci * only when the RSSI threshold is crossed from above. 3988c2ecf20Sopenharmony_ci */ 3998c2ecf20Sopenharmony_ci WL1251_ACX_LOW_RSSI_TYPE_EDGE = 1, 4008c2ecf20Sopenharmony_ci}; 4018c2ecf20Sopenharmony_ci 4028c2ecf20Sopenharmony_cistruct acx_low_rssi { 4038c2ecf20Sopenharmony_ci struct acx_header header; 4048c2ecf20Sopenharmony_ci 4058c2ecf20Sopenharmony_ci /* 4068c2ecf20Sopenharmony_ci * The threshold (in dBm) below (or above after low rssi 4078c2ecf20Sopenharmony_ci * indication) which the firmware generates an interrupt to the 4088c2ecf20Sopenharmony_ci * host. This parameter is signed. 4098c2ecf20Sopenharmony_ci */ 4108c2ecf20Sopenharmony_ci s8 threshold; 4118c2ecf20Sopenharmony_ci 4128c2ecf20Sopenharmony_ci /* 4138c2ecf20Sopenharmony_ci * The weight of the current RSSI sample, before adding the new 4148c2ecf20Sopenharmony_ci * sample, that is used to calculate the average RSSI. 4158c2ecf20Sopenharmony_ci */ 4168c2ecf20Sopenharmony_ci u8 weight; 4178c2ecf20Sopenharmony_ci 4188c2ecf20Sopenharmony_ci /* 4198c2ecf20Sopenharmony_ci * The number of Beacons/Probe response frames that will be 4208c2ecf20Sopenharmony_ci * received before issuing the Low or Regained RSSI event. 4218c2ecf20Sopenharmony_ci */ 4228c2ecf20Sopenharmony_ci u8 depth; 4238c2ecf20Sopenharmony_ci 4248c2ecf20Sopenharmony_ci /* 4258c2ecf20Sopenharmony_ci * Configures how the Low RSSI Event is triggered. Refer to 4268c2ecf20Sopenharmony_ci * enum wl1251_acx_low_rssi_type for more. 4278c2ecf20Sopenharmony_ci */ 4288c2ecf20Sopenharmony_ci u8 type; 4298c2ecf20Sopenharmony_ci} __packed; 4308c2ecf20Sopenharmony_ci 4318c2ecf20Sopenharmony_cistruct acx_beacon_filter_option { 4328c2ecf20Sopenharmony_ci struct acx_header header; 4338c2ecf20Sopenharmony_ci 4348c2ecf20Sopenharmony_ci u8 enable; 4358c2ecf20Sopenharmony_ci 4368c2ecf20Sopenharmony_ci /* 4378c2ecf20Sopenharmony_ci * The number of beacons without the unicast TIM 4388c2ecf20Sopenharmony_ci * bit set that the firmware buffers before 4398c2ecf20Sopenharmony_ci * signaling the host about ready frames. 4408c2ecf20Sopenharmony_ci * When set to 0 and the filter is enabled, beacons 4418c2ecf20Sopenharmony_ci * without the unicast TIM bit set are dropped. 4428c2ecf20Sopenharmony_ci */ 4438c2ecf20Sopenharmony_ci u8 max_num_beacons; 4448c2ecf20Sopenharmony_ci u8 pad[2]; 4458c2ecf20Sopenharmony_ci} __packed; 4468c2ecf20Sopenharmony_ci 4478c2ecf20Sopenharmony_ci/* 4488c2ecf20Sopenharmony_ci * ACXBeaconFilterEntry (not 221) 4498c2ecf20Sopenharmony_ci * Byte Offset Size (Bytes) Definition 4508c2ecf20Sopenharmony_ci * =========== ============ ========== 4518c2ecf20Sopenharmony_ci * 0 1 IE identifier 4528c2ecf20Sopenharmony_ci * 1 1 Treatment bit mask 4538c2ecf20Sopenharmony_ci * 4548c2ecf20Sopenharmony_ci * ACXBeaconFilterEntry (221) 4558c2ecf20Sopenharmony_ci * Byte Offset Size (Bytes) Definition 4568c2ecf20Sopenharmony_ci * =========== ============ ========== 4578c2ecf20Sopenharmony_ci * 0 1 IE identifier 4588c2ecf20Sopenharmony_ci * 1 1 Treatment bit mask 4598c2ecf20Sopenharmony_ci * 2 3 OUI 4608c2ecf20Sopenharmony_ci * 5 1 Type 4618c2ecf20Sopenharmony_ci * 6 2 Version 4628c2ecf20Sopenharmony_ci * 4638c2ecf20Sopenharmony_ci * 4648c2ecf20Sopenharmony_ci * Treatment bit mask - The information element handling: 4658c2ecf20Sopenharmony_ci * bit 0 - The information element is compared and transferred 4668c2ecf20Sopenharmony_ci * in case of change. 4678c2ecf20Sopenharmony_ci * bit 1 - The information element is transferred to the host 4688c2ecf20Sopenharmony_ci * with each appearance or disappearance. 4698c2ecf20Sopenharmony_ci * Note that both bits can be set at the same time. 4708c2ecf20Sopenharmony_ci */ 4718c2ecf20Sopenharmony_ci#define BEACON_FILTER_TABLE_MAX_IE_NUM (32) 4728c2ecf20Sopenharmony_ci#define BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM (6) 4738c2ecf20Sopenharmony_ci#define BEACON_FILTER_TABLE_IE_ENTRY_SIZE (2) 4748c2ecf20Sopenharmony_ci#define BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE (6) 4758c2ecf20Sopenharmony_ci#define BEACON_FILTER_TABLE_MAX_SIZE ((BEACON_FILTER_TABLE_MAX_IE_NUM * \ 4768c2ecf20Sopenharmony_ci BEACON_FILTER_TABLE_IE_ENTRY_SIZE) + \ 4778c2ecf20Sopenharmony_ci (BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * \ 4788c2ecf20Sopenharmony_ci BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE)) 4798c2ecf20Sopenharmony_ci 4808c2ecf20Sopenharmony_ci#define BEACON_RULE_PASS_ON_CHANGE BIT(0) 4818c2ecf20Sopenharmony_ci#define BEACON_RULE_PASS_ON_APPEARANCE BIT(1) 4828c2ecf20Sopenharmony_ci 4838c2ecf20Sopenharmony_ci#define BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN (37) 4848c2ecf20Sopenharmony_ci 4858c2ecf20Sopenharmony_cistruct acx_beacon_filter_ie_table { 4868c2ecf20Sopenharmony_ci struct acx_header header; 4878c2ecf20Sopenharmony_ci 4888c2ecf20Sopenharmony_ci u8 num_ie; 4898c2ecf20Sopenharmony_ci u8 pad[3]; 4908c2ecf20Sopenharmony_ci u8 table[BEACON_FILTER_TABLE_MAX_SIZE]; 4918c2ecf20Sopenharmony_ci} __packed; 4928c2ecf20Sopenharmony_ci 4938c2ecf20Sopenharmony_ci#define SYNCH_FAIL_DEFAULT_THRESHOLD 10 /* number of beacons */ 4948c2ecf20Sopenharmony_ci#define NO_BEACON_DEFAULT_TIMEOUT (500) /* in microseconds */ 4958c2ecf20Sopenharmony_ci 4968c2ecf20Sopenharmony_cistruct acx_conn_monit_params { 4978c2ecf20Sopenharmony_ci struct acx_header header; 4988c2ecf20Sopenharmony_ci 4998c2ecf20Sopenharmony_ci u32 synch_fail_thold; /* number of beacons missed */ 5008c2ecf20Sopenharmony_ci u32 bss_lose_timeout; /* number of TU's from synch fail */ 5018c2ecf20Sopenharmony_ci} __packed; 5028c2ecf20Sopenharmony_ci 5038c2ecf20Sopenharmony_cienum { 5048c2ecf20Sopenharmony_ci SG_ENABLE = 0, 5058c2ecf20Sopenharmony_ci SG_DISABLE, 5068c2ecf20Sopenharmony_ci SG_SENSE_NO_ACTIVITY, 5078c2ecf20Sopenharmony_ci SG_SENSE_ACTIVE 5088c2ecf20Sopenharmony_ci}; 5098c2ecf20Sopenharmony_ci 5108c2ecf20Sopenharmony_cistruct acx_bt_wlan_coex { 5118c2ecf20Sopenharmony_ci struct acx_header header; 5128c2ecf20Sopenharmony_ci 5138c2ecf20Sopenharmony_ci /* 5148c2ecf20Sopenharmony_ci * 0 -> PTA enabled 5158c2ecf20Sopenharmony_ci * 1 -> PTA disabled 5168c2ecf20Sopenharmony_ci * 2 -> sense no active mode, i.e. 5178c2ecf20Sopenharmony_ci * an interrupt is sent upon 5188c2ecf20Sopenharmony_ci * BT activity. 5198c2ecf20Sopenharmony_ci * 3 -> PTA is switched on in response 5208c2ecf20Sopenharmony_ci * to the interrupt sending. 5218c2ecf20Sopenharmony_ci */ 5228c2ecf20Sopenharmony_ci u8 enable; 5238c2ecf20Sopenharmony_ci u8 pad[3]; 5248c2ecf20Sopenharmony_ci} __packed; 5258c2ecf20Sopenharmony_ci 5268c2ecf20Sopenharmony_ci#define PTA_ANTENNA_TYPE_DEF (0) 5278c2ecf20Sopenharmony_ci#define PTA_BT_HP_MAXTIME_DEF (2000) 5288c2ecf20Sopenharmony_ci#define PTA_WLAN_HP_MAX_TIME_DEF (5000) 5298c2ecf20Sopenharmony_ci#define PTA_SENSE_DISABLE_TIMER_DEF (1350) 5308c2ecf20Sopenharmony_ci#define PTA_PROTECTIVE_RX_TIME_DEF (1500) 5318c2ecf20Sopenharmony_ci#define PTA_PROTECTIVE_TX_TIME_DEF (1500) 5328c2ecf20Sopenharmony_ci#define PTA_TIMEOUT_NEXT_BT_LP_PACKET_DEF (3000) 5338c2ecf20Sopenharmony_ci#define PTA_SIGNALING_TYPE_DEF (1) 5348c2ecf20Sopenharmony_ci#define PTA_AFH_LEVERAGE_ON_DEF (0) 5358c2ecf20Sopenharmony_ci#define PTA_NUMBER_QUIET_CYCLE_DEF (0) 5368c2ecf20Sopenharmony_ci#define PTA_MAX_NUM_CTS_DEF (3) 5378c2ecf20Sopenharmony_ci#define PTA_NUMBER_OF_WLAN_PACKETS_DEF (2) 5388c2ecf20Sopenharmony_ci#define PTA_NUMBER_OF_BT_PACKETS_DEF (2) 5398c2ecf20Sopenharmony_ci#define PTA_PROTECTIVE_RX_TIME_FAST_DEF (1500) 5408c2ecf20Sopenharmony_ci#define PTA_PROTECTIVE_TX_TIME_FAST_DEF (3000) 5418c2ecf20Sopenharmony_ci#define PTA_CYCLE_TIME_FAST_DEF (8700) 5428c2ecf20Sopenharmony_ci#define PTA_RX_FOR_AVALANCHE_DEF (5) 5438c2ecf20Sopenharmony_ci#define PTA_ELP_HP_DEF (0) 5448c2ecf20Sopenharmony_ci#define PTA_ANTI_STARVE_PERIOD_DEF (500) 5458c2ecf20Sopenharmony_ci#define PTA_ANTI_STARVE_NUM_CYCLE_DEF (4) 5468c2ecf20Sopenharmony_ci#define PTA_ALLOW_PA_SD_DEF (1) 5478c2ecf20Sopenharmony_ci#define PTA_TIME_BEFORE_BEACON_DEF (6300) 5488c2ecf20Sopenharmony_ci#define PTA_HPDM_MAX_TIME_DEF (1600) 5498c2ecf20Sopenharmony_ci#define PTA_TIME_OUT_NEXT_WLAN_DEF (2550) 5508c2ecf20Sopenharmony_ci#define PTA_AUTO_MODE_NO_CTS_DEF (0) 5518c2ecf20Sopenharmony_ci#define PTA_BT_HP_RESPECTED_DEF (3) 5528c2ecf20Sopenharmony_ci#define PTA_WLAN_RX_MIN_RATE_DEF (24) 5538c2ecf20Sopenharmony_ci#define PTA_ACK_MODE_DEF (1) 5548c2ecf20Sopenharmony_ci 5558c2ecf20Sopenharmony_cistruct acx_bt_wlan_coex_param { 5568c2ecf20Sopenharmony_ci struct acx_header header; 5578c2ecf20Sopenharmony_ci 5588c2ecf20Sopenharmony_ci /* 5598c2ecf20Sopenharmony_ci * The minimum rate of a received WLAN packet in the STA, 5608c2ecf20Sopenharmony_ci * during protective mode, of which a new BT-HP request 5618c2ecf20Sopenharmony_ci * during this Rx will always be respected and gain the antenna. 5628c2ecf20Sopenharmony_ci */ 5638c2ecf20Sopenharmony_ci u32 min_rate; 5648c2ecf20Sopenharmony_ci 5658c2ecf20Sopenharmony_ci /* Max time the BT HP will be respected. */ 5668c2ecf20Sopenharmony_ci u16 bt_hp_max_time; 5678c2ecf20Sopenharmony_ci 5688c2ecf20Sopenharmony_ci /* Max time the WLAN HP will be respected. */ 5698c2ecf20Sopenharmony_ci u16 wlan_hp_max_time; 5708c2ecf20Sopenharmony_ci 5718c2ecf20Sopenharmony_ci /* 5728c2ecf20Sopenharmony_ci * The time between the last BT activity 5738c2ecf20Sopenharmony_ci * and the moment when the sense mode returns 5748c2ecf20Sopenharmony_ci * to SENSE_INACTIVE. 5758c2ecf20Sopenharmony_ci */ 5768c2ecf20Sopenharmony_ci u16 sense_disable_timer; 5778c2ecf20Sopenharmony_ci 5788c2ecf20Sopenharmony_ci /* Time before the next BT HP instance */ 5798c2ecf20Sopenharmony_ci u16 rx_time_bt_hp; 5808c2ecf20Sopenharmony_ci u16 tx_time_bt_hp; 5818c2ecf20Sopenharmony_ci 5828c2ecf20Sopenharmony_ci /* range: 10-20000 default: 1500 */ 5838c2ecf20Sopenharmony_ci u16 rx_time_bt_hp_fast; 5848c2ecf20Sopenharmony_ci u16 tx_time_bt_hp_fast; 5858c2ecf20Sopenharmony_ci 5868c2ecf20Sopenharmony_ci /* range: 2000-65535 default: 8700 */ 5878c2ecf20Sopenharmony_ci u16 wlan_cycle_fast; 5888c2ecf20Sopenharmony_ci 5898c2ecf20Sopenharmony_ci /* range: 0 - 15000 (Msec) default: 1000 */ 5908c2ecf20Sopenharmony_ci u16 bt_anti_starvation_period; 5918c2ecf20Sopenharmony_ci 5928c2ecf20Sopenharmony_ci /* range 400-10000(Usec) default: 3000 */ 5938c2ecf20Sopenharmony_ci u16 next_bt_lp_packet; 5948c2ecf20Sopenharmony_ci 5958c2ecf20Sopenharmony_ci /* Deafult: worst case for BT DH5 traffic */ 5968c2ecf20Sopenharmony_ci u16 wake_up_beacon; 5978c2ecf20Sopenharmony_ci 5988c2ecf20Sopenharmony_ci /* range: 0-50000(Usec) default: 1050 */ 5998c2ecf20Sopenharmony_ci u16 hp_dm_max_guard_time; 6008c2ecf20Sopenharmony_ci 6018c2ecf20Sopenharmony_ci /* 6028c2ecf20Sopenharmony_ci * This is to prevent both BT & WLAN antenna 6038c2ecf20Sopenharmony_ci * starvation. 6048c2ecf20Sopenharmony_ci * Range: 100-50000(Usec) default:2550 6058c2ecf20Sopenharmony_ci */ 6068c2ecf20Sopenharmony_ci u16 next_wlan_packet; 6078c2ecf20Sopenharmony_ci 6088c2ecf20Sopenharmony_ci /* 0 -> shared antenna */ 6098c2ecf20Sopenharmony_ci u8 antenna_type; 6108c2ecf20Sopenharmony_ci 6118c2ecf20Sopenharmony_ci /* 6128c2ecf20Sopenharmony_ci * 0 -> TI legacy 6138c2ecf20Sopenharmony_ci * 1 -> Palau 6148c2ecf20Sopenharmony_ci */ 6158c2ecf20Sopenharmony_ci u8 signal_type; 6168c2ecf20Sopenharmony_ci 6178c2ecf20Sopenharmony_ci /* 6188c2ecf20Sopenharmony_ci * BT AFH status 6198c2ecf20Sopenharmony_ci * 0 -> no AFH 6208c2ecf20Sopenharmony_ci * 1 -> from dedicated GPIO 6218c2ecf20Sopenharmony_ci * 2 -> AFH on (from host) 6228c2ecf20Sopenharmony_ci */ 6238c2ecf20Sopenharmony_ci u8 afh_leverage_on; 6248c2ecf20Sopenharmony_ci 6258c2ecf20Sopenharmony_ci /* 6268c2ecf20Sopenharmony_ci * The number of cycles during which no 6278c2ecf20Sopenharmony_ci * TX will be sent after 1 cycle of RX 6288c2ecf20Sopenharmony_ci * transaction in protective mode 6298c2ecf20Sopenharmony_ci */ 6308c2ecf20Sopenharmony_ci u8 quiet_cycle_num; 6318c2ecf20Sopenharmony_ci 6328c2ecf20Sopenharmony_ci /* 6338c2ecf20Sopenharmony_ci * The maximum number of CTSs that will 6348c2ecf20Sopenharmony_ci * be sent for receiving RX packet in 6358c2ecf20Sopenharmony_ci * protective mode 6368c2ecf20Sopenharmony_ci */ 6378c2ecf20Sopenharmony_ci u8 max_cts; 6388c2ecf20Sopenharmony_ci 6398c2ecf20Sopenharmony_ci /* 6408c2ecf20Sopenharmony_ci * The number of WLAN packets 6418c2ecf20Sopenharmony_ci * transferred in common mode before 6428c2ecf20Sopenharmony_ci * switching to BT. 6438c2ecf20Sopenharmony_ci */ 6448c2ecf20Sopenharmony_ci u8 wlan_packets_num; 6458c2ecf20Sopenharmony_ci 6468c2ecf20Sopenharmony_ci /* 6478c2ecf20Sopenharmony_ci * The number of BT packets 6488c2ecf20Sopenharmony_ci * transferred in common mode before 6498c2ecf20Sopenharmony_ci * switching to WLAN. 6508c2ecf20Sopenharmony_ci */ 6518c2ecf20Sopenharmony_ci u8 bt_packets_num; 6528c2ecf20Sopenharmony_ci 6538c2ecf20Sopenharmony_ci /* range: 1-255 default: 5 */ 6548c2ecf20Sopenharmony_ci u8 missed_rx_avalanche; 6558c2ecf20Sopenharmony_ci 6568c2ecf20Sopenharmony_ci /* range: 0-1 default: 1 */ 6578c2ecf20Sopenharmony_ci u8 wlan_elp_hp; 6588c2ecf20Sopenharmony_ci 6598c2ecf20Sopenharmony_ci /* range: 0 - 15 default: 4 */ 6608c2ecf20Sopenharmony_ci u8 bt_anti_starvation_cycles; 6618c2ecf20Sopenharmony_ci 6628c2ecf20Sopenharmony_ci u8 ack_mode_dual_ant; 6638c2ecf20Sopenharmony_ci 6648c2ecf20Sopenharmony_ci /* 6658c2ecf20Sopenharmony_ci * Allow PA_SD assertion/de-assertion 6668c2ecf20Sopenharmony_ci * during enabled BT activity. 6678c2ecf20Sopenharmony_ci */ 6688c2ecf20Sopenharmony_ci u8 pa_sd_enable; 6698c2ecf20Sopenharmony_ci 6708c2ecf20Sopenharmony_ci /* 6718c2ecf20Sopenharmony_ci * Enable/Disable PTA in auto mode: 6728c2ecf20Sopenharmony_ci * Support Both Active & P.S modes 6738c2ecf20Sopenharmony_ci */ 6748c2ecf20Sopenharmony_ci u8 pta_auto_mode_enable; 6758c2ecf20Sopenharmony_ci 6768c2ecf20Sopenharmony_ci /* range: 0 - 20 default: 1 */ 6778c2ecf20Sopenharmony_ci u8 bt_hp_respected_num; 6788c2ecf20Sopenharmony_ci} __packed; 6798c2ecf20Sopenharmony_ci 6808c2ecf20Sopenharmony_ci#define CCA_THRSH_ENABLE_ENERGY_D 0x140A 6818c2ecf20Sopenharmony_ci#define CCA_THRSH_DISABLE_ENERGY_D 0xFFEF 6828c2ecf20Sopenharmony_ci 6838c2ecf20Sopenharmony_cistruct acx_energy_detection { 6848c2ecf20Sopenharmony_ci struct acx_header header; 6858c2ecf20Sopenharmony_ci 6868c2ecf20Sopenharmony_ci /* The RX Clear Channel Assessment threshold in the PHY */ 6878c2ecf20Sopenharmony_ci u16 rx_cca_threshold; 6888c2ecf20Sopenharmony_ci u8 tx_energy_detection; 6898c2ecf20Sopenharmony_ci u8 pad; 6908c2ecf20Sopenharmony_ci} __packed; 6918c2ecf20Sopenharmony_ci 6928c2ecf20Sopenharmony_ci#define BCN_RX_TIMEOUT_DEF_VALUE 10000 6938c2ecf20Sopenharmony_ci#define BROADCAST_RX_TIMEOUT_DEF_VALUE 20000 6948c2ecf20Sopenharmony_ci#define RX_BROADCAST_IN_PS_DEF_VALUE 1 6958c2ecf20Sopenharmony_ci#define CONSECUTIVE_PS_POLL_FAILURE_DEF 4 6968c2ecf20Sopenharmony_ci 6978c2ecf20Sopenharmony_cistruct acx_beacon_broadcast { 6988c2ecf20Sopenharmony_ci struct acx_header header; 6998c2ecf20Sopenharmony_ci 7008c2ecf20Sopenharmony_ci u16 beacon_rx_timeout; 7018c2ecf20Sopenharmony_ci u16 broadcast_timeout; 7028c2ecf20Sopenharmony_ci 7038c2ecf20Sopenharmony_ci /* Enables receiving of broadcast packets in PS mode */ 7048c2ecf20Sopenharmony_ci u8 rx_broadcast_in_ps; 7058c2ecf20Sopenharmony_ci 7068c2ecf20Sopenharmony_ci /* Consecutive PS Poll failures before updating the host */ 7078c2ecf20Sopenharmony_ci u8 ps_poll_threshold; 7088c2ecf20Sopenharmony_ci u8 pad[2]; 7098c2ecf20Sopenharmony_ci} __packed; 7108c2ecf20Sopenharmony_ci 7118c2ecf20Sopenharmony_cistruct acx_event_mask { 7128c2ecf20Sopenharmony_ci struct acx_header header; 7138c2ecf20Sopenharmony_ci 7148c2ecf20Sopenharmony_ci u32 event_mask; 7158c2ecf20Sopenharmony_ci u32 high_event_mask; /* Unused */ 7168c2ecf20Sopenharmony_ci} __packed; 7178c2ecf20Sopenharmony_ci 7188c2ecf20Sopenharmony_ci#define CFG_RX_FCS BIT(2) 7198c2ecf20Sopenharmony_ci#define CFG_RX_ALL_GOOD BIT(3) 7208c2ecf20Sopenharmony_ci#define CFG_UNI_FILTER_EN BIT(4) 7218c2ecf20Sopenharmony_ci#define CFG_BSSID_FILTER_EN BIT(5) 7228c2ecf20Sopenharmony_ci#define CFG_MC_FILTER_EN BIT(6) 7238c2ecf20Sopenharmony_ci#define CFG_MC_ADDR0_EN BIT(7) 7248c2ecf20Sopenharmony_ci#define CFG_MC_ADDR1_EN BIT(8) 7258c2ecf20Sopenharmony_ci#define CFG_BC_REJECT_EN BIT(9) 7268c2ecf20Sopenharmony_ci#define CFG_SSID_FILTER_EN BIT(10) 7278c2ecf20Sopenharmony_ci#define CFG_RX_INT_FCS_ERROR BIT(11) 7288c2ecf20Sopenharmony_ci#define CFG_RX_INT_ENCRYPTED BIT(12) 7298c2ecf20Sopenharmony_ci#define CFG_RX_WR_RX_STATUS BIT(13) 7308c2ecf20Sopenharmony_ci#define CFG_RX_FILTER_NULTI BIT(14) 7318c2ecf20Sopenharmony_ci#define CFG_RX_RESERVE BIT(15) 7328c2ecf20Sopenharmony_ci#define CFG_RX_TIMESTAMP_TSF BIT(16) 7338c2ecf20Sopenharmony_ci 7348c2ecf20Sopenharmony_ci#define CFG_RX_RSV_EN BIT(0) 7358c2ecf20Sopenharmony_ci#define CFG_RX_RCTS_ACK BIT(1) 7368c2ecf20Sopenharmony_ci#define CFG_RX_PRSP_EN BIT(2) 7378c2ecf20Sopenharmony_ci#define CFG_RX_PREQ_EN BIT(3) 7388c2ecf20Sopenharmony_ci#define CFG_RX_MGMT_EN BIT(4) 7398c2ecf20Sopenharmony_ci#define CFG_RX_FCS_ERROR BIT(5) 7408c2ecf20Sopenharmony_ci#define CFG_RX_DATA_EN BIT(6) 7418c2ecf20Sopenharmony_ci#define CFG_RX_CTL_EN BIT(7) 7428c2ecf20Sopenharmony_ci#define CFG_RX_CF_EN BIT(8) 7438c2ecf20Sopenharmony_ci#define CFG_RX_BCN_EN BIT(9) 7448c2ecf20Sopenharmony_ci#define CFG_RX_AUTH_EN BIT(10) 7458c2ecf20Sopenharmony_ci#define CFG_RX_ASSOC_EN BIT(11) 7468c2ecf20Sopenharmony_ci 7478c2ecf20Sopenharmony_ci#define SCAN_PASSIVE BIT(0) 7488c2ecf20Sopenharmony_ci#define SCAN_5GHZ_BAND BIT(1) 7498c2ecf20Sopenharmony_ci#define SCAN_TRIGGERED BIT(2) 7508c2ecf20Sopenharmony_ci#define SCAN_PRIORITY_HIGH BIT(3) 7518c2ecf20Sopenharmony_ci 7528c2ecf20Sopenharmony_cistruct acx_fw_gen_frame_rates { 7538c2ecf20Sopenharmony_ci struct acx_header header; 7548c2ecf20Sopenharmony_ci 7558c2ecf20Sopenharmony_ci u8 tx_ctrl_frame_rate; /* RATE_* */ 7568c2ecf20Sopenharmony_ci u8 tx_ctrl_frame_mod; /* CCK_* or PBCC_* */ 7578c2ecf20Sopenharmony_ci u8 tx_mgt_frame_rate; 7588c2ecf20Sopenharmony_ci u8 tx_mgt_frame_mod; 7598c2ecf20Sopenharmony_ci} __packed; 7608c2ecf20Sopenharmony_ci 7618c2ecf20Sopenharmony_ci/* STA MAC */ 7628c2ecf20Sopenharmony_cistruct acx_dot11_station_id { 7638c2ecf20Sopenharmony_ci struct acx_header header; 7648c2ecf20Sopenharmony_ci 7658c2ecf20Sopenharmony_ci u8 mac[ETH_ALEN]; 7668c2ecf20Sopenharmony_ci u8 pad[2]; 7678c2ecf20Sopenharmony_ci} __packed; 7688c2ecf20Sopenharmony_ci 7698c2ecf20Sopenharmony_cistruct acx_feature_config { 7708c2ecf20Sopenharmony_ci struct acx_header header; 7718c2ecf20Sopenharmony_ci 7728c2ecf20Sopenharmony_ci u32 options; 7738c2ecf20Sopenharmony_ci u32 data_flow_options; 7748c2ecf20Sopenharmony_ci} __packed; 7758c2ecf20Sopenharmony_ci 7768c2ecf20Sopenharmony_cistruct acx_current_tx_power { 7778c2ecf20Sopenharmony_ci struct acx_header header; 7788c2ecf20Sopenharmony_ci 7798c2ecf20Sopenharmony_ci u8 current_tx_power; 7808c2ecf20Sopenharmony_ci u8 padding[3]; 7818c2ecf20Sopenharmony_ci} __packed; 7828c2ecf20Sopenharmony_ci 7838c2ecf20Sopenharmony_cistruct acx_dot11_default_key { 7848c2ecf20Sopenharmony_ci struct acx_header header; 7858c2ecf20Sopenharmony_ci 7868c2ecf20Sopenharmony_ci u8 id; 7878c2ecf20Sopenharmony_ci u8 pad[3]; 7888c2ecf20Sopenharmony_ci} __packed; 7898c2ecf20Sopenharmony_ci 7908c2ecf20Sopenharmony_cistruct acx_tsf_info { 7918c2ecf20Sopenharmony_ci struct acx_header header; 7928c2ecf20Sopenharmony_ci 7938c2ecf20Sopenharmony_ci u32 current_tsf_msb; 7948c2ecf20Sopenharmony_ci u32 current_tsf_lsb; 7958c2ecf20Sopenharmony_ci u32 last_TBTT_msb; 7968c2ecf20Sopenharmony_ci u32 last_TBTT_lsb; 7978c2ecf20Sopenharmony_ci u8 last_dtim_count; 7988c2ecf20Sopenharmony_ci u8 pad[3]; 7998c2ecf20Sopenharmony_ci} __packed; 8008c2ecf20Sopenharmony_ci 8018c2ecf20Sopenharmony_cienum acx_wake_up_event { 8028c2ecf20Sopenharmony_ci WAKE_UP_EVENT_BEACON_BITMAP = 0x01, /* Wake on every Beacon*/ 8038c2ecf20Sopenharmony_ci WAKE_UP_EVENT_DTIM_BITMAP = 0x02, /* Wake on every DTIM*/ 8048c2ecf20Sopenharmony_ci WAKE_UP_EVENT_N_DTIM_BITMAP = 0x04, /* Wake on every Nth DTIM */ 8058c2ecf20Sopenharmony_ci WAKE_UP_EVENT_N_BEACONS_BITMAP = 0x08, /* Wake on every Nth Beacon */ 8068c2ecf20Sopenharmony_ci WAKE_UP_EVENT_BITS_MASK = 0x0F 8078c2ecf20Sopenharmony_ci}; 8088c2ecf20Sopenharmony_ci 8098c2ecf20Sopenharmony_cistruct acx_wake_up_condition { 8108c2ecf20Sopenharmony_ci struct acx_header header; 8118c2ecf20Sopenharmony_ci 8128c2ecf20Sopenharmony_ci u8 wake_up_event; /* Only one bit can be set */ 8138c2ecf20Sopenharmony_ci u8 listen_interval; 8148c2ecf20Sopenharmony_ci u8 pad[2]; 8158c2ecf20Sopenharmony_ci} __packed; 8168c2ecf20Sopenharmony_ci 8178c2ecf20Sopenharmony_cistruct acx_aid { 8188c2ecf20Sopenharmony_ci struct acx_header header; 8198c2ecf20Sopenharmony_ci 8208c2ecf20Sopenharmony_ci /* 8218c2ecf20Sopenharmony_ci * To be set when associated with an AP. 8228c2ecf20Sopenharmony_ci */ 8238c2ecf20Sopenharmony_ci u16 aid; 8248c2ecf20Sopenharmony_ci u8 pad[2]; 8258c2ecf20Sopenharmony_ci} __packed; 8268c2ecf20Sopenharmony_ci 8278c2ecf20Sopenharmony_cienum acx_preamble_type { 8288c2ecf20Sopenharmony_ci ACX_PREAMBLE_LONG = 0, 8298c2ecf20Sopenharmony_ci ACX_PREAMBLE_SHORT = 1 8308c2ecf20Sopenharmony_ci}; 8318c2ecf20Sopenharmony_ci 8328c2ecf20Sopenharmony_cistruct acx_preamble { 8338c2ecf20Sopenharmony_ci struct acx_header header; 8348c2ecf20Sopenharmony_ci 8358c2ecf20Sopenharmony_ci /* 8368c2ecf20Sopenharmony_ci * When set, the WiLink transmits the frames with a short preamble and 8378c2ecf20Sopenharmony_ci * when cleared, the WiLink transmits the frames with a long preamble. 8388c2ecf20Sopenharmony_ci */ 8398c2ecf20Sopenharmony_ci u8 preamble; 8408c2ecf20Sopenharmony_ci u8 padding[3]; 8418c2ecf20Sopenharmony_ci} __packed; 8428c2ecf20Sopenharmony_ci 8438c2ecf20Sopenharmony_cienum acx_ctsprotect_type { 8448c2ecf20Sopenharmony_ci CTSPROTECT_DISABLE = 0, 8458c2ecf20Sopenharmony_ci CTSPROTECT_ENABLE = 1 8468c2ecf20Sopenharmony_ci}; 8478c2ecf20Sopenharmony_ci 8488c2ecf20Sopenharmony_cistruct acx_ctsprotect { 8498c2ecf20Sopenharmony_ci struct acx_header header; 8508c2ecf20Sopenharmony_ci u8 ctsprotect; 8518c2ecf20Sopenharmony_ci u8 padding[3]; 8528c2ecf20Sopenharmony_ci} __packed; 8538c2ecf20Sopenharmony_ci 8548c2ecf20Sopenharmony_cistruct acx_tx_statistics { 8558c2ecf20Sopenharmony_ci u32 internal_desc_overflow; 8568c2ecf20Sopenharmony_ci} __packed; 8578c2ecf20Sopenharmony_ci 8588c2ecf20Sopenharmony_cistruct acx_rx_statistics { 8598c2ecf20Sopenharmony_ci u32 out_of_mem; 8608c2ecf20Sopenharmony_ci u32 hdr_overflow; 8618c2ecf20Sopenharmony_ci u32 hw_stuck; 8628c2ecf20Sopenharmony_ci u32 dropped; 8638c2ecf20Sopenharmony_ci u32 fcs_err; 8648c2ecf20Sopenharmony_ci u32 xfr_hint_trig; 8658c2ecf20Sopenharmony_ci u32 path_reset; 8668c2ecf20Sopenharmony_ci u32 reset_counter; 8678c2ecf20Sopenharmony_ci} __packed; 8688c2ecf20Sopenharmony_ci 8698c2ecf20Sopenharmony_cistruct acx_dma_statistics { 8708c2ecf20Sopenharmony_ci u32 rx_requested; 8718c2ecf20Sopenharmony_ci u32 rx_errors; 8728c2ecf20Sopenharmony_ci u32 tx_requested; 8738c2ecf20Sopenharmony_ci u32 tx_errors; 8748c2ecf20Sopenharmony_ci} __packed; 8758c2ecf20Sopenharmony_ci 8768c2ecf20Sopenharmony_cistruct acx_isr_statistics { 8778c2ecf20Sopenharmony_ci /* host command complete */ 8788c2ecf20Sopenharmony_ci u32 cmd_cmplt; 8798c2ecf20Sopenharmony_ci 8808c2ecf20Sopenharmony_ci /* fiqisr() */ 8818c2ecf20Sopenharmony_ci u32 fiqs; 8828c2ecf20Sopenharmony_ci 8838c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_RX_HEADER) */ 8848c2ecf20Sopenharmony_ci u32 rx_headers; 8858c2ecf20Sopenharmony_ci 8868c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_RX_CMPLT) */ 8878c2ecf20Sopenharmony_ci u32 rx_completes; 8888c2ecf20Sopenharmony_ci 8898c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_NO_RX_BUF) */ 8908c2ecf20Sopenharmony_ci u32 rx_mem_overflow; 8918c2ecf20Sopenharmony_ci 8928c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_S_RX_RDY) */ 8938c2ecf20Sopenharmony_ci u32 rx_rdys; 8948c2ecf20Sopenharmony_ci 8958c2ecf20Sopenharmony_ci /* irqisr() */ 8968c2ecf20Sopenharmony_ci u32 irqs; 8978c2ecf20Sopenharmony_ci 8988c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_TX_PROC) */ 8998c2ecf20Sopenharmony_ci u32 tx_procs; 9008c2ecf20Sopenharmony_ci 9018c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_DECRYPT_DONE) */ 9028c2ecf20Sopenharmony_ci u32 decrypt_done; 9038c2ecf20Sopenharmony_ci 9048c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_DMA0) */ 9058c2ecf20Sopenharmony_ci u32 dma0_done; 9068c2ecf20Sopenharmony_ci 9078c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_DMA1) */ 9088c2ecf20Sopenharmony_ci u32 dma1_done; 9098c2ecf20Sopenharmony_ci 9108c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_TX_EXC_CMPLT) */ 9118c2ecf20Sopenharmony_ci u32 tx_exch_complete; 9128c2ecf20Sopenharmony_ci 9138c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_COMMAND) */ 9148c2ecf20Sopenharmony_ci u32 commands; 9158c2ecf20Sopenharmony_ci 9168c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_RX_PROC) */ 9178c2ecf20Sopenharmony_ci u32 rx_procs; 9188c2ecf20Sopenharmony_ci 9198c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_PM_802) */ 9208c2ecf20Sopenharmony_ci u32 hw_pm_mode_changes; 9218c2ecf20Sopenharmony_ci 9228c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_ACKNOWLEDGE) */ 9238c2ecf20Sopenharmony_ci u32 host_acknowledges; 9248c2ecf20Sopenharmony_ci 9258c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_PM_PCI) */ 9268c2ecf20Sopenharmony_ci u32 pci_pm; 9278c2ecf20Sopenharmony_ci 9288c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_ACM_WAKEUP) */ 9298c2ecf20Sopenharmony_ci u32 wakeups; 9308c2ecf20Sopenharmony_ci 9318c2ecf20Sopenharmony_ci /* (INT_STS_ND & INT_TRIG_LOW_RSSI) */ 9328c2ecf20Sopenharmony_ci u32 low_rssi; 9338c2ecf20Sopenharmony_ci} __packed; 9348c2ecf20Sopenharmony_ci 9358c2ecf20Sopenharmony_cistruct acx_wep_statistics { 9368c2ecf20Sopenharmony_ci /* WEP address keys configured */ 9378c2ecf20Sopenharmony_ci u32 addr_key_count; 9388c2ecf20Sopenharmony_ci 9398c2ecf20Sopenharmony_ci /* default keys configured */ 9408c2ecf20Sopenharmony_ci u32 default_key_count; 9418c2ecf20Sopenharmony_ci 9428c2ecf20Sopenharmony_ci u32 reserved; 9438c2ecf20Sopenharmony_ci 9448c2ecf20Sopenharmony_ci /* number of times that WEP key not found on lookup */ 9458c2ecf20Sopenharmony_ci u32 key_not_found; 9468c2ecf20Sopenharmony_ci 9478c2ecf20Sopenharmony_ci /* number of times that WEP key decryption failed */ 9488c2ecf20Sopenharmony_ci u32 decrypt_fail; 9498c2ecf20Sopenharmony_ci 9508c2ecf20Sopenharmony_ci /* WEP packets decrypted */ 9518c2ecf20Sopenharmony_ci u32 packets; 9528c2ecf20Sopenharmony_ci 9538c2ecf20Sopenharmony_ci /* WEP decrypt interrupts */ 9548c2ecf20Sopenharmony_ci u32 interrupt; 9558c2ecf20Sopenharmony_ci} __packed; 9568c2ecf20Sopenharmony_ci 9578c2ecf20Sopenharmony_ci#define ACX_MISSED_BEACONS_SPREAD 10 9588c2ecf20Sopenharmony_ci 9598c2ecf20Sopenharmony_cistruct acx_pwr_statistics { 9608c2ecf20Sopenharmony_ci /* the amount of enters into power save mode (both PD & ELP) */ 9618c2ecf20Sopenharmony_ci u32 ps_enter; 9628c2ecf20Sopenharmony_ci 9638c2ecf20Sopenharmony_ci /* the amount of enters into ELP mode */ 9648c2ecf20Sopenharmony_ci u32 elp_enter; 9658c2ecf20Sopenharmony_ci 9668c2ecf20Sopenharmony_ci /* the amount of missing beacon interrupts to the host */ 9678c2ecf20Sopenharmony_ci u32 missing_bcns; 9688c2ecf20Sopenharmony_ci 9698c2ecf20Sopenharmony_ci /* the amount of wake on host-access times */ 9708c2ecf20Sopenharmony_ci u32 wake_on_host; 9718c2ecf20Sopenharmony_ci 9728c2ecf20Sopenharmony_ci /* the amount of wake on timer-expire */ 9738c2ecf20Sopenharmony_ci u32 wake_on_timer_exp; 9748c2ecf20Sopenharmony_ci 9758c2ecf20Sopenharmony_ci /* the number of packets that were transmitted with PS bit set */ 9768c2ecf20Sopenharmony_ci u32 tx_with_ps; 9778c2ecf20Sopenharmony_ci 9788c2ecf20Sopenharmony_ci /* the number of packets that were transmitted with PS bit clear */ 9798c2ecf20Sopenharmony_ci u32 tx_without_ps; 9808c2ecf20Sopenharmony_ci 9818c2ecf20Sopenharmony_ci /* the number of received beacons */ 9828c2ecf20Sopenharmony_ci u32 rcvd_beacons; 9838c2ecf20Sopenharmony_ci 9848c2ecf20Sopenharmony_ci /* the number of entering into PowerOn (power save off) */ 9858c2ecf20Sopenharmony_ci u32 power_save_off; 9868c2ecf20Sopenharmony_ci 9878c2ecf20Sopenharmony_ci /* the number of entries into power save mode */ 9888c2ecf20Sopenharmony_ci u16 enable_ps; 9898c2ecf20Sopenharmony_ci 9908c2ecf20Sopenharmony_ci /* 9918c2ecf20Sopenharmony_ci * the number of exits from power save, not including failed PS 9928c2ecf20Sopenharmony_ci * transitions 9938c2ecf20Sopenharmony_ci */ 9948c2ecf20Sopenharmony_ci u16 disable_ps; 9958c2ecf20Sopenharmony_ci 9968c2ecf20Sopenharmony_ci /* 9978c2ecf20Sopenharmony_ci * the number of times the TSF counter was adjusted because 9988c2ecf20Sopenharmony_ci * of drift 9998c2ecf20Sopenharmony_ci */ 10008c2ecf20Sopenharmony_ci u32 fix_tsf_ps; 10018c2ecf20Sopenharmony_ci 10028c2ecf20Sopenharmony_ci /* Gives statistics about the spread continuous missed beacons. 10038c2ecf20Sopenharmony_ci * The 16 LSB are dedicated for the PS mode. 10048c2ecf20Sopenharmony_ci * The 16 MSB are dedicated for the PS mode. 10058c2ecf20Sopenharmony_ci * cont_miss_bcns_spread[0] - single missed beacon. 10068c2ecf20Sopenharmony_ci * cont_miss_bcns_spread[1] - two continuous missed beacons. 10078c2ecf20Sopenharmony_ci * cont_miss_bcns_spread[2] - three continuous missed beacons. 10088c2ecf20Sopenharmony_ci * ... 10098c2ecf20Sopenharmony_ci * cont_miss_bcns_spread[9] - ten and more continuous missed beacons. 10108c2ecf20Sopenharmony_ci */ 10118c2ecf20Sopenharmony_ci u32 cont_miss_bcns_spread[ACX_MISSED_BEACONS_SPREAD]; 10128c2ecf20Sopenharmony_ci 10138c2ecf20Sopenharmony_ci /* the number of beacons in awake mode */ 10148c2ecf20Sopenharmony_ci u32 rcvd_awake_beacons; 10158c2ecf20Sopenharmony_ci} __packed; 10168c2ecf20Sopenharmony_ci 10178c2ecf20Sopenharmony_cistruct acx_mic_statistics { 10188c2ecf20Sopenharmony_ci u32 rx_pkts; 10198c2ecf20Sopenharmony_ci u32 calc_failure; 10208c2ecf20Sopenharmony_ci} __packed; 10218c2ecf20Sopenharmony_ci 10228c2ecf20Sopenharmony_cistruct acx_aes_statistics { 10238c2ecf20Sopenharmony_ci u32 encrypt_fail; 10248c2ecf20Sopenharmony_ci u32 decrypt_fail; 10258c2ecf20Sopenharmony_ci u32 encrypt_packets; 10268c2ecf20Sopenharmony_ci u32 decrypt_packets; 10278c2ecf20Sopenharmony_ci u32 encrypt_interrupt; 10288c2ecf20Sopenharmony_ci u32 decrypt_interrupt; 10298c2ecf20Sopenharmony_ci} __packed; 10308c2ecf20Sopenharmony_ci 10318c2ecf20Sopenharmony_cistruct acx_event_statistics { 10328c2ecf20Sopenharmony_ci u32 heart_beat; 10338c2ecf20Sopenharmony_ci u32 calibration; 10348c2ecf20Sopenharmony_ci u32 rx_mismatch; 10358c2ecf20Sopenharmony_ci u32 rx_mem_empty; 10368c2ecf20Sopenharmony_ci u32 rx_pool; 10378c2ecf20Sopenharmony_ci u32 oom_late; 10388c2ecf20Sopenharmony_ci u32 phy_transmit_error; 10398c2ecf20Sopenharmony_ci u32 tx_stuck; 10408c2ecf20Sopenharmony_ci} __packed; 10418c2ecf20Sopenharmony_ci 10428c2ecf20Sopenharmony_cistruct acx_ps_statistics { 10438c2ecf20Sopenharmony_ci u32 pspoll_timeouts; 10448c2ecf20Sopenharmony_ci u32 upsd_timeouts; 10458c2ecf20Sopenharmony_ci u32 upsd_max_sptime; 10468c2ecf20Sopenharmony_ci u32 upsd_max_apturn; 10478c2ecf20Sopenharmony_ci u32 pspoll_max_apturn; 10488c2ecf20Sopenharmony_ci u32 pspoll_utilization; 10498c2ecf20Sopenharmony_ci u32 upsd_utilization; 10508c2ecf20Sopenharmony_ci} __packed; 10518c2ecf20Sopenharmony_ci 10528c2ecf20Sopenharmony_cistruct acx_rxpipe_statistics { 10538c2ecf20Sopenharmony_ci u32 rx_prep_beacon_drop; 10548c2ecf20Sopenharmony_ci u32 descr_host_int_trig_rx_data; 10558c2ecf20Sopenharmony_ci u32 beacon_buffer_thres_host_int_trig_rx_data; 10568c2ecf20Sopenharmony_ci u32 missed_beacon_host_int_trig_rx_data; 10578c2ecf20Sopenharmony_ci u32 tx_xfr_host_int_trig_rx_data; 10588c2ecf20Sopenharmony_ci} __packed; 10598c2ecf20Sopenharmony_ci 10608c2ecf20Sopenharmony_cistruct acx_statistics { 10618c2ecf20Sopenharmony_ci struct acx_header header; 10628c2ecf20Sopenharmony_ci 10638c2ecf20Sopenharmony_ci struct acx_tx_statistics tx; 10648c2ecf20Sopenharmony_ci struct acx_rx_statistics rx; 10658c2ecf20Sopenharmony_ci struct acx_dma_statistics dma; 10668c2ecf20Sopenharmony_ci struct acx_isr_statistics isr; 10678c2ecf20Sopenharmony_ci struct acx_wep_statistics wep; 10688c2ecf20Sopenharmony_ci struct acx_pwr_statistics pwr; 10698c2ecf20Sopenharmony_ci struct acx_aes_statistics aes; 10708c2ecf20Sopenharmony_ci struct acx_mic_statistics mic; 10718c2ecf20Sopenharmony_ci struct acx_event_statistics event; 10728c2ecf20Sopenharmony_ci struct acx_ps_statistics ps; 10738c2ecf20Sopenharmony_ci struct acx_rxpipe_statistics rxpipe; 10748c2ecf20Sopenharmony_ci} __packed; 10758c2ecf20Sopenharmony_ci 10768c2ecf20Sopenharmony_ci#define ACX_MAX_RATE_CLASSES 8 10778c2ecf20Sopenharmony_ci#define ACX_RATE_MASK_UNSPECIFIED 0 10788c2ecf20Sopenharmony_ci#define ACX_RATE_RETRY_LIMIT 10 10798c2ecf20Sopenharmony_ci 10808c2ecf20Sopenharmony_cistruct acx_rate_class { 10818c2ecf20Sopenharmony_ci u32 enabled_rates; 10828c2ecf20Sopenharmony_ci u8 short_retry_limit; 10838c2ecf20Sopenharmony_ci u8 long_retry_limit; 10848c2ecf20Sopenharmony_ci u8 aflags; 10858c2ecf20Sopenharmony_ci u8 reserved; 10868c2ecf20Sopenharmony_ci} __packed; 10878c2ecf20Sopenharmony_ci 10888c2ecf20Sopenharmony_cistruct acx_rate_policy { 10898c2ecf20Sopenharmony_ci struct acx_header header; 10908c2ecf20Sopenharmony_ci 10918c2ecf20Sopenharmony_ci u32 rate_class_cnt; 10928c2ecf20Sopenharmony_ci struct acx_rate_class rate_class[ACX_MAX_RATE_CLASSES]; 10938c2ecf20Sopenharmony_ci} __packed; 10948c2ecf20Sopenharmony_ci 10958c2ecf20Sopenharmony_cistruct wl1251_acx_memory { 10968c2ecf20Sopenharmony_ci __le16 num_stations; /* number of STAs to be supported. */ 10978c2ecf20Sopenharmony_ci u16 reserved_1; 10988c2ecf20Sopenharmony_ci 10998c2ecf20Sopenharmony_ci /* 11008c2ecf20Sopenharmony_ci * Nmber of memory buffers for the RX mem pool. 11018c2ecf20Sopenharmony_ci * The actual number may be less if there are 11028c2ecf20Sopenharmony_ci * not enough blocks left for the minimum num 11038c2ecf20Sopenharmony_ci * of TX ones. 11048c2ecf20Sopenharmony_ci */ 11058c2ecf20Sopenharmony_ci u8 rx_mem_block_num; 11068c2ecf20Sopenharmony_ci u8 reserved_2; 11078c2ecf20Sopenharmony_ci u8 num_tx_queues; /* From 1 to 16 */ 11088c2ecf20Sopenharmony_ci u8 host_if_options; /* HOST_IF* */ 11098c2ecf20Sopenharmony_ci u8 tx_min_mem_block_num; 11108c2ecf20Sopenharmony_ci u8 num_ssid_profiles; 11118c2ecf20Sopenharmony_ci __le16 debug_buffer_size; 11128c2ecf20Sopenharmony_ci} __packed; 11138c2ecf20Sopenharmony_ci 11148c2ecf20Sopenharmony_ci 11158c2ecf20Sopenharmony_ci#define ACX_RX_DESC_MIN 1 11168c2ecf20Sopenharmony_ci#define ACX_RX_DESC_MAX 127 11178c2ecf20Sopenharmony_ci#define ACX_RX_DESC_DEF 32 11188c2ecf20Sopenharmony_cistruct wl1251_acx_rx_queue_config { 11198c2ecf20Sopenharmony_ci u8 num_descs; 11208c2ecf20Sopenharmony_ci u8 pad; 11218c2ecf20Sopenharmony_ci u8 type; 11228c2ecf20Sopenharmony_ci u8 priority; 11238c2ecf20Sopenharmony_ci __le32 dma_address; 11248c2ecf20Sopenharmony_ci} __packed; 11258c2ecf20Sopenharmony_ci 11268c2ecf20Sopenharmony_ci#define ACX_TX_DESC_MIN 1 11278c2ecf20Sopenharmony_ci#define ACX_TX_DESC_MAX 127 11288c2ecf20Sopenharmony_ci#define ACX_TX_DESC_DEF 16 11298c2ecf20Sopenharmony_cistruct wl1251_acx_tx_queue_config { 11308c2ecf20Sopenharmony_ci u8 num_descs; 11318c2ecf20Sopenharmony_ci u8 pad[2]; 11328c2ecf20Sopenharmony_ci u8 attributes; 11338c2ecf20Sopenharmony_ci} __packed; 11348c2ecf20Sopenharmony_ci 11358c2ecf20Sopenharmony_ci#define MAX_TX_QUEUE_CONFIGS 5 11368c2ecf20Sopenharmony_ci#define MAX_TX_QUEUES 4 11378c2ecf20Sopenharmony_cistruct wl1251_acx_config_memory { 11388c2ecf20Sopenharmony_ci struct acx_header header; 11398c2ecf20Sopenharmony_ci 11408c2ecf20Sopenharmony_ci struct wl1251_acx_memory mem_config; 11418c2ecf20Sopenharmony_ci struct wl1251_acx_rx_queue_config rx_queue_config; 11428c2ecf20Sopenharmony_ci struct wl1251_acx_tx_queue_config tx_queue_config[MAX_TX_QUEUE_CONFIGS]; 11438c2ecf20Sopenharmony_ci} __packed; 11448c2ecf20Sopenharmony_ci 11458c2ecf20Sopenharmony_cistruct wl1251_acx_mem_map { 11468c2ecf20Sopenharmony_ci struct acx_header header; 11478c2ecf20Sopenharmony_ci 11488c2ecf20Sopenharmony_ci void *code_start; 11498c2ecf20Sopenharmony_ci void *code_end; 11508c2ecf20Sopenharmony_ci 11518c2ecf20Sopenharmony_ci void *wep_defkey_start; 11528c2ecf20Sopenharmony_ci void *wep_defkey_end; 11538c2ecf20Sopenharmony_ci 11548c2ecf20Sopenharmony_ci void *sta_table_start; 11558c2ecf20Sopenharmony_ci void *sta_table_end; 11568c2ecf20Sopenharmony_ci 11578c2ecf20Sopenharmony_ci void *packet_template_start; 11588c2ecf20Sopenharmony_ci void *packet_template_end; 11598c2ecf20Sopenharmony_ci 11608c2ecf20Sopenharmony_ci void *queue_memory_start; 11618c2ecf20Sopenharmony_ci void *queue_memory_end; 11628c2ecf20Sopenharmony_ci 11638c2ecf20Sopenharmony_ci void *packet_memory_pool_start; 11648c2ecf20Sopenharmony_ci void *packet_memory_pool_end; 11658c2ecf20Sopenharmony_ci 11668c2ecf20Sopenharmony_ci void *debug_buffer1_start; 11678c2ecf20Sopenharmony_ci void *debug_buffer1_end; 11688c2ecf20Sopenharmony_ci 11698c2ecf20Sopenharmony_ci void *debug_buffer2_start; 11708c2ecf20Sopenharmony_ci void *debug_buffer2_end; 11718c2ecf20Sopenharmony_ci 11728c2ecf20Sopenharmony_ci /* Number of blocks FW allocated for TX packets */ 11738c2ecf20Sopenharmony_ci u32 num_tx_mem_blocks; 11748c2ecf20Sopenharmony_ci 11758c2ecf20Sopenharmony_ci /* Number of blocks FW allocated for RX packets */ 11768c2ecf20Sopenharmony_ci u32 num_rx_mem_blocks; 11778c2ecf20Sopenharmony_ci} __packed; 11788c2ecf20Sopenharmony_ci 11798c2ecf20Sopenharmony_ci 11808c2ecf20Sopenharmony_cistruct wl1251_acx_wr_tbtt_and_dtim { 11818c2ecf20Sopenharmony_ci 11828c2ecf20Sopenharmony_ci struct acx_header header; 11838c2ecf20Sopenharmony_ci 11848c2ecf20Sopenharmony_ci /* Time in TUs between two consecutive beacons */ 11858c2ecf20Sopenharmony_ci u16 tbtt; 11868c2ecf20Sopenharmony_ci 11878c2ecf20Sopenharmony_ci /* 11888c2ecf20Sopenharmony_ci * DTIM period 11898c2ecf20Sopenharmony_ci * For BSS: Number of TBTTs in a DTIM period (range: 1-10) 11908c2ecf20Sopenharmony_ci * For IBSS: value shall be set to 1 11918c2ecf20Sopenharmony_ci */ 11928c2ecf20Sopenharmony_ci u8 dtim; 11938c2ecf20Sopenharmony_ci u8 padding; 11948c2ecf20Sopenharmony_ci} __packed; 11958c2ecf20Sopenharmony_ci 11968c2ecf20Sopenharmony_cienum wl1251_acx_bet_mode { 11978c2ecf20Sopenharmony_ci WL1251_ACX_BET_DISABLE = 0, 11988c2ecf20Sopenharmony_ci WL1251_ACX_BET_ENABLE = 1, 11998c2ecf20Sopenharmony_ci}; 12008c2ecf20Sopenharmony_ci 12018c2ecf20Sopenharmony_cistruct wl1251_acx_bet_enable { 12028c2ecf20Sopenharmony_ci struct acx_header header; 12038c2ecf20Sopenharmony_ci 12048c2ecf20Sopenharmony_ci /* 12058c2ecf20Sopenharmony_ci * Specifies if beacon early termination procedure is enabled or 12068c2ecf20Sopenharmony_ci * disabled, see enum wl1251_acx_bet_mode. 12078c2ecf20Sopenharmony_ci */ 12088c2ecf20Sopenharmony_ci u8 enable; 12098c2ecf20Sopenharmony_ci 12108c2ecf20Sopenharmony_ci /* 12118c2ecf20Sopenharmony_ci * Specifies the maximum number of consecutive beacons that may be 12128c2ecf20Sopenharmony_ci * early terminated. After this number is reached at least one full 12138c2ecf20Sopenharmony_ci * beacon must be correctly received in FW before beacon ET 12148c2ecf20Sopenharmony_ci * resumes. Range 0 - 255. 12158c2ecf20Sopenharmony_ci */ 12168c2ecf20Sopenharmony_ci u8 max_consecutive; 12178c2ecf20Sopenharmony_ci 12188c2ecf20Sopenharmony_ci u8 padding[2]; 12198c2ecf20Sopenharmony_ci} __packed; 12208c2ecf20Sopenharmony_ci 12218c2ecf20Sopenharmony_ci#define ACX_IPV4_VERSION 4 12228c2ecf20Sopenharmony_ci#define ACX_IPV6_VERSION 6 12238c2ecf20Sopenharmony_ci#define ACX_IPV4_ADDR_SIZE 4 12248c2ecf20Sopenharmony_cistruct wl1251_acx_arp_filter { 12258c2ecf20Sopenharmony_ci struct acx_header header; 12268c2ecf20Sopenharmony_ci u8 version; /* The IP version: 4 - IPv4, 6 - IPv6.*/ 12278c2ecf20Sopenharmony_ci u8 enable; /* 1 - ARP filtering is enabled, 0 - disabled */ 12288c2ecf20Sopenharmony_ci u8 padding[2]; 12298c2ecf20Sopenharmony_ci u8 address[16]; /* The IP address used to filter ARP packets. 12308c2ecf20Sopenharmony_ci ARP packets that do not match this address are 12318c2ecf20Sopenharmony_ci dropped. When the IP Version is 4, the last 12 12328c2ecf20Sopenharmony_ci bytes of the the address are ignored. */ 12338c2ecf20Sopenharmony_ci} __attribute__((packed)); 12348c2ecf20Sopenharmony_ci 12358c2ecf20Sopenharmony_cistruct wl1251_acx_ac_cfg { 12368c2ecf20Sopenharmony_ci struct acx_header header; 12378c2ecf20Sopenharmony_ci 12388c2ecf20Sopenharmony_ci /* 12398c2ecf20Sopenharmony_ci * Access Category - The TX queue's access category 12408c2ecf20Sopenharmony_ci * (refer to AccessCategory_enum) 12418c2ecf20Sopenharmony_ci */ 12428c2ecf20Sopenharmony_ci u8 ac; 12438c2ecf20Sopenharmony_ci 12448c2ecf20Sopenharmony_ci /* 12458c2ecf20Sopenharmony_ci * The contention window minimum size (in slots) for 12468c2ecf20Sopenharmony_ci * the access class. 12478c2ecf20Sopenharmony_ci */ 12488c2ecf20Sopenharmony_ci u8 cw_min; 12498c2ecf20Sopenharmony_ci 12508c2ecf20Sopenharmony_ci /* 12518c2ecf20Sopenharmony_ci * The contention window maximum size (in slots) for 12528c2ecf20Sopenharmony_ci * the access class. 12538c2ecf20Sopenharmony_ci */ 12548c2ecf20Sopenharmony_ci u16 cw_max; 12558c2ecf20Sopenharmony_ci 12568c2ecf20Sopenharmony_ci /* The AIF value (in slots) for the access class. */ 12578c2ecf20Sopenharmony_ci u8 aifsn; 12588c2ecf20Sopenharmony_ci 12598c2ecf20Sopenharmony_ci u8 reserved; 12608c2ecf20Sopenharmony_ci 12618c2ecf20Sopenharmony_ci /* The TX Op Limit (in microseconds) for the access class. */ 12628c2ecf20Sopenharmony_ci u16 txop_limit; 12638c2ecf20Sopenharmony_ci} __packed; 12648c2ecf20Sopenharmony_ci 12658c2ecf20Sopenharmony_ci 12668c2ecf20Sopenharmony_cienum wl1251_acx_channel_type { 12678c2ecf20Sopenharmony_ci CHANNEL_TYPE_DCF = 0, 12688c2ecf20Sopenharmony_ci CHANNEL_TYPE_EDCF = 1, 12698c2ecf20Sopenharmony_ci CHANNEL_TYPE_HCCA = 2, 12708c2ecf20Sopenharmony_ci}; 12718c2ecf20Sopenharmony_ci 12728c2ecf20Sopenharmony_cienum wl1251_acx_ps_scheme { 12738c2ecf20Sopenharmony_ci /* regular ps: simple sending of packets */ 12748c2ecf20Sopenharmony_ci WL1251_ACX_PS_SCHEME_LEGACY = 0, 12758c2ecf20Sopenharmony_ci 12768c2ecf20Sopenharmony_ci /* sending a packet triggers a unscheduled apsd downstream */ 12778c2ecf20Sopenharmony_ci WL1251_ACX_PS_SCHEME_UPSD_TRIGGER = 1, 12788c2ecf20Sopenharmony_ci 12798c2ecf20Sopenharmony_ci /* a pspoll packet will be sent before every data packet */ 12808c2ecf20Sopenharmony_ci WL1251_ACX_PS_SCHEME_LEGACY_PSPOLL = 2, 12818c2ecf20Sopenharmony_ci 12828c2ecf20Sopenharmony_ci /* scheduled apsd mode */ 12838c2ecf20Sopenharmony_ci WL1251_ACX_PS_SCHEME_SAPSD = 3, 12848c2ecf20Sopenharmony_ci}; 12858c2ecf20Sopenharmony_ci 12868c2ecf20Sopenharmony_cienum wl1251_acx_ack_policy { 12878c2ecf20Sopenharmony_ci WL1251_ACX_ACK_POLICY_LEGACY = 0, 12888c2ecf20Sopenharmony_ci WL1251_ACX_ACK_POLICY_NO_ACK = 1, 12898c2ecf20Sopenharmony_ci WL1251_ACX_ACK_POLICY_BLOCK = 2, 12908c2ecf20Sopenharmony_ci}; 12918c2ecf20Sopenharmony_ci 12928c2ecf20Sopenharmony_cistruct wl1251_acx_tid_cfg { 12938c2ecf20Sopenharmony_ci struct acx_header header; 12948c2ecf20Sopenharmony_ci 12958c2ecf20Sopenharmony_ci /* tx queue id number (0-7) */ 12968c2ecf20Sopenharmony_ci u8 queue; 12978c2ecf20Sopenharmony_ci 12988c2ecf20Sopenharmony_ci /* channel access type for the queue, enum wl1251_acx_channel_type */ 12998c2ecf20Sopenharmony_ci u8 type; 13008c2ecf20Sopenharmony_ci 13018c2ecf20Sopenharmony_ci /* EDCA: ac index (0-3), HCCA: traffic stream id (8-15) */ 13028c2ecf20Sopenharmony_ci u8 tsid; 13038c2ecf20Sopenharmony_ci 13048c2ecf20Sopenharmony_ci /* ps scheme of the specified queue, enum wl1251_acx_ps_scheme */ 13058c2ecf20Sopenharmony_ci u8 ps_scheme; 13068c2ecf20Sopenharmony_ci 13078c2ecf20Sopenharmony_ci /* the tx queue ack policy, enum wl1251_acx_ack_policy */ 13088c2ecf20Sopenharmony_ci u8 ack_policy; 13098c2ecf20Sopenharmony_ci 13108c2ecf20Sopenharmony_ci u8 padding[3]; 13118c2ecf20Sopenharmony_ci 13128c2ecf20Sopenharmony_ci /* not supported */ 13138c2ecf20Sopenharmony_ci u32 apsdconf[2]; 13148c2ecf20Sopenharmony_ci} __packed; 13158c2ecf20Sopenharmony_ci 13168c2ecf20Sopenharmony_ci/************************************************************************* 13178c2ecf20Sopenharmony_ci 13188c2ecf20Sopenharmony_ci Host Interrupt Register (WiLink -> Host) 13198c2ecf20Sopenharmony_ci 13208c2ecf20Sopenharmony_ci**************************************************************************/ 13218c2ecf20Sopenharmony_ci 13228c2ecf20Sopenharmony_ci/* RX packet is ready in Xfer buffer #0 */ 13238c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_RX0_DATA BIT(0) 13248c2ecf20Sopenharmony_ci 13258c2ecf20Sopenharmony_ci/* TX result(s) are in the TX complete buffer */ 13268c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_TX_RESULT BIT(1) 13278c2ecf20Sopenharmony_ci 13288c2ecf20Sopenharmony_ci/* OBSOLETE */ 13298c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_TX_XFR BIT(2) 13308c2ecf20Sopenharmony_ci 13318c2ecf20Sopenharmony_ci/* RX packet is ready in Xfer buffer #1 */ 13328c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_RX1_DATA BIT(3) 13338c2ecf20Sopenharmony_ci 13348c2ecf20Sopenharmony_ci/* Event was entered to Event MBOX #A */ 13358c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_EVENT_A BIT(4) 13368c2ecf20Sopenharmony_ci 13378c2ecf20Sopenharmony_ci/* Event was entered to Event MBOX #B */ 13388c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_EVENT_B BIT(5) 13398c2ecf20Sopenharmony_ci 13408c2ecf20Sopenharmony_ci/* OBSOLETE */ 13418c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_WAKE_ON_HOST BIT(6) 13428c2ecf20Sopenharmony_ci 13438c2ecf20Sopenharmony_ci/* Trace message on MBOX #A */ 13448c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_TRACE_A BIT(7) 13458c2ecf20Sopenharmony_ci 13468c2ecf20Sopenharmony_ci/* Trace message on MBOX #B */ 13478c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_TRACE_B BIT(8) 13488c2ecf20Sopenharmony_ci 13498c2ecf20Sopenharmony_ci/* Command processing completion */ 13508c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_CMD_COMPLETE BIT(9) 13518c2ecf20Sopenharmony_ci 13528c2ecf20Sopenharmony_ci/* Init sequence is done */ 13538c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_INIT_COMPLETE BIT(14) 13548c2ecf20Sopenharmony_ci 13558c2ecf20Sopenharmony_ci#define WL1251_ACX_INTR_ALL 0xFFFFFFFF 13568c2ecf20Sopenharmony_ci 13578c2ecf20Sopenharmony_cienum { 13588c2ecf20Sopenharmony_ci ACX_WAKE_UP_CONDITIONS = 0x0002, 13598c2ecf20Sopenharmony_ci ACX_MEM_CFG = 0x0003, 13608c2ecf20Sopenharmony_ci ACX_SLOT = 0x0004, 13618c2ecf20Sopenharmony_ci ACX_QUEUE_HEAD = 0x0005, /* for MASTER mode only */ 13628c2ecf20Sopenharmony_ci ACX_AC_CFG = 0x0007, 13638c2ecf20Sopenharmony_ci ACX_MEM_MAP = 0x0008, 13648c2ecf20Sopenharmony_ci ACX_AID = 0x000A, 13658c2ecf20Sopenharmony_ci ACX_RADIO_PARAM = 0x000B, /* Not used */ 13668c2ecf20Sopenharmony_ci ACX_CFG = 0x000C, /* Not used */ 13678c2ecf20Sopenharmony_ci ACX_FW_REV = 0x000D, 13688c2ecf20Sopenharmony_ci ACX_MEDIUM_USAGE = 0x000F, 13698c2ecf20Sopenharmony_ci ACX_RX_CFG = 0x0010, 13708c2ecf20Sopenharmony_ci ACX_TX_QUEUE_CFG = 0x0011, /* FIXME: only used by wl1251 */ 13718c2ecf20Sopenharmony_ci ACX_BSS_IN_PS = 0x0012, /* for AP only */ 13728c2ecf20Sopenharmony_ci ACX_STATISTICS = 0x0013, /* Debug API */ 13738c2ecf20Sopenharmony_ci ACX_FEATURE_CFG = 0x0015, 13748c2ecf20Sopenharmony_ci ACX_MISC_CFG = 0x0017, /* Not used */ 13758c2ecf20Sopenharmony_ci ACX_TID_CFG = 0x001A, 13768c2ecf20Sopenharmony_ci ACX_BEACON_FILTER_OPT = 0x001F, 13778c2ecf20Sopenharmony_ci ACX_LOW_RSSI = 0x0020, 13788c2ecf20Sopenharmony_ci ACX_NOISE_HIST = 0x0021, 13798c2ecf20Sopenharmony_ci ACX_HDK_VERSION = 0x0022, /* ??? */ 13808c2ecf20Sopenharmony_ci ACX_PD_THRESHOLD = 0x0023, 13818c2ecf20Sopenharmony_ci ACX_DATA_PATH_PARAMS = 0x0024, /* WO */ 13828c2ecf20Sopenharmony_ci ACX_DATA_PATH_RESP_PARAMS = 0x0024, /* RO */ 13838c2ecf20Sopenharmony_ci ACX_CCA_THRESHOLD = 0x0025, 13848c2ecf20Sopenharmony_ci ACX_EVENT_MBOX_MASK = 0x0026, 13858c2ecf20Sopenharmony_ci#ifdef FW_RUNNING_AS_AP 13868c2ecf20Sopenharmony_ci ACX_DTIM_PERIOD = 0x0027, /* for AP only */ 13878c2ecf20Sopenharmony_ci#else 13888c2ecf20Sopenharmony_ci ACX_WR_TBTT_AND_DTIM = 0x0027, /* STA only */ 13898c2ecf20Sopenharmony_ci#endif 13908c2ecf20Sopenharmony_ci ACX_ACI_OPTION_CFG = 0x0029, /* OBSOLETE (for 1251)*/ 13918c2ecf20Sopenharmony_ci ACX_GPIO_CFG = 0x002A, /* Not used */ 13928c2ecf20Sopenharmony_ci ACX_GPIO_SET = 0x002B, /* Not used */ 13938c2ecf20Sopenharmony_ci ACX_PM_CFG = 0x002C, /* To Be Documented */ 13948c2ecf20Sopenharmony_ci ACX_CONN_MONIT_PARAMS = 0x002D, 13958c2ecf20Sopenharmony_ci ACX_AVERAGE_RSSI = 0x002E, /* Not used */ 13968c2ecf20Sopenharmony_ci ACX_CONS_TX_FAILURE = 0x002F, 13978c2ecf20Sopenharmony_ci ACX_BCN_DTIM_OPTIONS = 0x0031, 13988c2ecf20Sopenharmony_ci ACX_SG_ENABLE = 0x0032, 13998c2ecf20Sopenharmony_ci ACX_SG_CFG = 0x0033, 14008c2ecf20Sopenharmony_ci ACX_ANTENNA_DIVERSITY_CFG = 0x0035, /* To Be Documented */ 14018c2ecf20Sopenharmony_ci ACX_LOW_SNR = 0x0037, /* To Be Documented */ 14028c2ecf20Sopenharmony_ci ACX_BEACON_FILTER_TABLE = 0x0038, 14038c2ecf20Sopenharmony_ci ACX_ARP_IP_FILTER = 0x0039, 14048c2ecf20Sopenharmony_ci ACX_ROAMING_STATISTICS_TBL = 0x003B, 14058c2ecf20Sopenharmony_ci ACX_RATE_POLICY = 0x003D, 14068c2ecf20Sopenharmony_ci ACX_CTS_PROTECTION = 0x003E, 14078c2ecf20Sopenharmony_ci ACX_SLEEP_AUTH = 0x003F, 14088c2ecf20Sopenharmony_ci ACX_PREAMBLE_TYPE = 0x0040, 14098c2ecf20Sopenharmony_ci ACX_ERROR_CNT = 0x0041, 14108c2ecf20Sopenharmony_ci ACX_FW_GEN_FRAME_RATES = 0x0042, 14118c2ecf20Sopenharmony_ci ACX_IBSS_FILTER = 0x0044, 14128c2ecf20Sopenharmony_ci ACX_SERVICE_PERIOD_TIMEOUT = 0x0045, 14138c2ecf20Sopenharmony_ci ACX_TSF_INFO = 0x0046, 14148c2ecf20Sopenharmony_ci ACX_CONFIG_PS_WMM = 0x0049, 14158c2ecf20Sopenharmony_ci ACX_ENABLE_RX_DATA_FILTER = 0x004A, 14168c2ecf20Sopenharmony_ci ACX_SET_RX_DATA_FILTER = 0x004B, 14178c2ecf20Sopenharmony_ci ACX_GET_DATA_FILTER_STATISTICS = 0x004C, 14188c2ecf20Sopenharmony_ci ACX_POWER_LEVEL_TABLE = 0x004D, 14198c2ecf20Sopenharmony_ci ACX_BET_ENABLE = 0x0050, 14208c2ecf20Sopenharmony_ci DOT11_STATION_ID = 0x1001, 14218c2ecf20Sopenharmony_ci DOT11_RX_MSDU_LIFE_TIME = 0x1004, 14228c2ecf20Sopenharmony_ci DOT11_CUR_TX_PWR = 0x100D, 14238c2ecf20Sopenharmony_ci DOT11_DEFAULT_KEY = 0x1010, 14248c2ecf20Sopenharmony_ci DOT11_RX_DOT11_MODE = 0x1012, 14258c2ecf20Sopenharmony_ci DOT11_RTS_THRESHOLD = 0x1013, 14268c2ecf20Sopenharmony_ci DOT11_GROUP_ADDRESS_TBL = 0x1014, 14278c2ecf20Sopenharmony_ci 14288c2ecf20Sopenharmony_ci MAX_DOT11_IE = DOT11_GROUP_ADDRESS_TBL, 14298c2ecf20Sopenharmony_ci 14308c2ecf20Sopenharmony_ci MAX_IE = 0xFFFF 14318c2ecf20Sopenharmony_ci}; 14328c2ecf20Sopenharmony_ci 14338c2ecf20Sopenharmony_ci 14348c2ecf20Sopenharmony_ciint wl1251_acx_frame_rates(struct wl1251 *wl, u8 ctrl_rate, u8 ctrl_mod, 14358c2ecf20Sopenharmony_ci u8 mgt_rate, u8 mgt_mod); 14368c2ecf20Sopenharmony_ciint wl1251_acx_station_id(struct wl1251 *wl); 14378c2ecf20Sopenharmony_ciint wl1251_acx_default_key(struct wl1251 *wl, u8 key_id); 14388c2ecf20Sopenharmony_ciint wl1251_acx_wake_up_conditions(struct wl1251 *wl, u8 wake_up_event, 14398c2ecf20Sopenharmony_ci u8 listen_interval); 14408c2ecf20Sopenharmony_ciint wl1251_acx_sleep_auth(struct wl1251 *wl, u8 sleep_auth); 14418c2ecf20Sopenharmony_ciint wl1251_acx_fw_version(struct wl1251 *wl, char *buf, size_t len); 14428c2ecf20Sopenharmony_ciint wl1251_acx_tx_power(struct wl1251 *wl, int power); 14438c2ecf20Sopenharmony_ciint wl1251_acx_feature_cfg(struct wl1251 *wl, u32 data_flow_options); 14448c2ecf20Sopenharmony_ciint wl1251_acx_mem_map(struct wl1251 *wl, 14458c2ecf20Sopenharmony_ci struct acx_header *mem_map, size_t len); 14468c2ecf20Sopenharmony_ciint wl1251_acx_data_path_params(struct wl1251 *wl, 14478c2ecf20Sopenharmony_ci struct acx_data_path_params_resp *data_path); 14488c2ecf20Sopenharmony_ciint wl1251_acx_rx_msdu_life_time(struct wl1251 *wl, u32 life_time); 14498c2ecf20Sopenharmony_ciint wl1251_acx_rx_config(struct wl1251 *wl, u32 config, u32 filter); 14508c2ecf20Sopenharmony_ciint wl1251_acx_pd_threshold(struct wl1251 *wl); 14518c2ecf20Sopenharmony_ciint wl1251_acx_slot(struct wl1251 *wl, enum acx_slot_type slot_time); 14528c2ecf20Sopenharmony_ciint wl1251_acx_group_address_tbl(struct wl1251 *wl, bool enable, 14538c2ecf20Sopenharmony_ci void *mc_list, u32 mc_list_len); 14548c2ecf20Sopenharmony_ciint wl1251_acx_service_period_timeout(struct wl1251 *wl); 14558c2ecf20Sopenharmony_ciint wl1251_acx_rts_threshold(struct wl1251 *wl, u16 rts_threshold); 14568c2ecf20Sopenharmony_ciint wl1251_acx_beacon_filter_opt(struct wl1251 *wl, bool enable_filter); 14578c2ecf20Sopenharmony_ciint wl1251_acx_beacon_filter_table(struct wl1251 *wl); 14588c2ecf20Sopenharmony_ciint wl1251_acx_conn_monit_params(struct wl1251 *wl); 14598c2ecf20Sopenharmony_ciint wl1251_acx_sg_enable(struct wl1251 *wl); 14608c2ecf20Sopenharmony_ciint wl1251_acx_sg_cfg(struct wl1251 *wl); 14618c2ecf20Sopenharmony_ciint wl1251_acx_cca_threshold(struct wl1251 *wl); 14628c2ecf20Sopenharmony_ciint wl1251_acx_bcn_dtim_options(struct wl1251 *wl); 14638c2ecf20Sopenharmony_ciint wl1251_acx_aid(struct wl1251 *wl, u16 aid); 14648c2ecf20Sopenharmony_ciint wl1251_acx_event_mbox_mask(struct wl1251 *wl, u32 event_mask); 14658c2ecf20Sopenharmony_ciint wl1251_acx_low_rssi(struct wl1251 *wl, s8 threshold, u8 weight, 14668c2ecf20Sopenharmony_ci u8 depth, enum wl1251_acx_low_rssi_type type); 14678c2ecf20Sopenharmony_ciint wl1251_acx_set_preamble(struct wl1251 *wl, enum acx_preamble_type preamble); 14688c2ecf20Sopenharmony_ciint wl1251_acx_cts_protect(struct wl1251 *wl, 14698c2ecf20Sopenharmony_ci enum acx_ctsprotect_type ctsprotect); 14708c2ecf20Sopenharmony_ciint wl1251_acx_statistics(struct wl1251 *wl, struct acx_statistics *stats); 14718c2ecf20Sopenharmony_ciint wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime); 14728c2ecf20Sopenharmony_ciint wl1251_acx_rate_policies(struct wl1251 *wl); 14738c2ecf20Sopenharmony_ciint wl1251_acx_mem_cfg(struct wl1251 *wl); 14748c2ecf20Sopenharmony_ciint wl1251_acx_wr_tbtt_and_dtim(struct wl1251 *wl, u16 tbtt, u8 dtim); 14758c2ecf20Sopenharmony_ciint wl1251_acx_bet_enable(struct wl1251 *wl, enum wl1251_acx_bet_mode mode, 14768c2ecf20Sopenharmony_ci u8 max_consecutive); 14778c2ecf20Sopenharmony_ciint wl1251_acx_arp_ip_filter(struct wl1251 *wl, bool enable, __be32 address); 14788c2ecf20Sopenharmony_ciint wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max, 14798c2ecf20Sopenharmony_ci u8 aifs, u16 txop); 14808c2ecf20Sopenharmony_ciint wl1251_acx_tid_cfg(struct wl1251 *wl, u8 queue, 14818c2ecf20Sopenharmony_ci enum wl1251_acx_channel_type type, 14828c2ecf20Sopenharmony_ci u8 tsid, enum wl1251_acx_ps_scheme ps_scheme, 14838c2ecf20Sopenharmony_ci enum wl1251_acx_ack_policy ack_policy); 14848c2ecf20Sopenharmony_ci 14858c2ecf20Sopenharmony_ci#endif /* __WL1251_ACX_H__ */ 1486