xref: /linux/drivers/net/wireless/ti/wlcore/acx.h (revision ead5d1f4d877e92c051e1a1ade623d0d30e71619)
12b27bdccSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
27b3115f2SLuciano Coelho /*
37b3115f2SLuciano Coelho  * This file is part of wl1271
47b3115f2SLuciano Coelho  *
57b3115f2SLuciano Coelho  * Copyright (C) 1998-2009 Texas Instruments. All rights reserved.
67b3115f2SLuciano Coelho  * Copyright (C) 2008-2010 Nokia Corporation
77b3115f2SLuciano Coelho  *
87b3115f2SLuciano Coelho  * Contact: Luciano Coelho <luciano.coelho@nokia.com>
97b3115f2SLuciano Coelho  */
107b3115f2SLuciano Coelho 
117b3115f2SLuciano Coelho #ifndef __ACX_H__
127b3115f2SLuciano Coelho #define __ACX_H__
137b3115f2SLuciano Coelho 
14c31be25aSLuciano Coelho #include "wlcore.h"
157b3115f2SLuciano Coelho #include "cmd.h"
167b3115f2SLuciano Coelho 
177b3115f2SLuciano Coelho /*************************************************************************
187b3115f2SLuciano Coelho 
197b3115f2SLuciano Coelho     Host Interrupt Register (WiLink -> Host)
207b3115f2SLuciano Coelho 
217b3115f2SLuciano Coelho **************************************************************************/
227b3115f2SLuciano Coelho /* HW Initiated interrupt Watchdog timer expiration */
237b3115f2SLuciano Coelho #define WL1271_ACX_INTR_WATCHDOG           BIT(0)
247b3115f2SLuciano Coelho /* Init sequence is done (masked interrupt, detection through polling only ) */
257b3115f2SLuciano Coelho #define WL1271_ACX_INTR_INIT_COMPLETE      BIT(1)
267b3115f2SLuciano Coelho /* Event was entered to Event MBOX #A*/
277b3115f2SLuciano Coelho #define WL1271_ACX_INTR_EVENT_A            BIT(2)
287b3115f2SLuciano Coelho /* Event was entered to Event MBOX #B*/
297b3115f2SLuciano Coelho #define WL1271_ACX_INTR_EVENT_B            BIT(3)
307b3115f2SLuciano Coelho /* Command processing completion*/
317b3115f2SLuciano Coelho #define WL1271_ACX_INTR_CMD_COMPLETE       BIT(4)
327b3115f2SLuciano Coelho /* Signaling the host on HW wakeup */
337b3115f2SLuciano Coelho #define WL1271_ACX_INTR_HW_AVAILABLE       BIT(5)
347b3115f2SLuciano Coelho /* The MISC bit is used for aggregation of RX, TxComplete and TX rate update */
357b3115f2SLuciano Coelho #define WL1271_ACX_INTR_DATA               BIT(6)
367b3115f2SLuciano Coelho /* Trace message on MBOX #A */
377b3115f2SLuciano Coelho #define WL1271_ACX_INTR_TRACE_A            BIT(7)
387b3115f2SLuciano Coelho /* Trace message on MBOX #B */
397b3115f2SLuciano Coelho #define WL1271_ACX_INTR_TRACE_B            BIT(8)
40f5755fe9SIdo Reis /* SW FW Initiated interrupt Watchdog timer expiration */
41f5755fe9SIdo Reis #define WL1271_ACX_SW_INTR_WATCHDOG        BIT(9)
427b3115f2SLuciano Coelho 
437b3115f2SLuciano Coelho #define WL1271_ACX_INTR_ALL             0xFFFFFFFF
447b3115f2SLuciano Coelho 
45f5755fe9SIdo Reis /* all possible interrupts - only appropriate ones will be masked in */
46f5755fe9SIdo Reis #define WLCORE_ALL_INTR_MASK		(WL1271_ACX_INTR_WATCHDOG     | \
477b3115f2SLuciano Coelho 					WL1271_ACX_INTR_EVENT_A       | \
487b3115f2SLuciano Coelho 					WL1271_ACX_INTR_EVENT_B       | \
497b3115f2SLuciano Coelho 					WL1271_ACX_INTR_HW_AVAILABLE  | \
50f5755fe9SIdo Reis 					WL1271_ACX_INTR_DATA          | \
51f5755fe9SIdo Reis 					WL1271_ACX_SW_INTR_WATCHDOG)
527b3115f2SLuciano Coelho 
537b3115f2SLuciano Coelho /* Target's information element */
547b3115f2SLuciano Coelho struct acx_header {
557b3115f2SLuciano Coelho 	struct wl1271_cmd_header cmd;
567b3115f2SLuciano Coelho 
577b3115f2SLuciano Coelho 	/* acx (or information element) header */
587b3115f2SLuciano Coelho 	__le16 id;
597b3115f2SLuciano Coelho 
607b3115f2SLuciano Coelho 	/* payload length (not including headers */
617b3115f2SLuciano Coelho 	__le16 len;
627b3115f2SLuciano Coelho } __packed;
637b3115f2SLuciano Coelho 
647b3115f2SLuciano Coelho struct acx_error_counter {
657b3115f2SLuciano Coelho 	struct acx_header header;
667b3115f2SLuciano Coelho 
677b3115f2SLuciano Coelho 	/* The number of PLCP errors since the last time this */
687b3115f2SLuciano Coelho 	/* information element was interrogated. This field is */
697b3115f2SLuciano Coelho 	/* automatically cleared when it is interrogated.*/
707b3115f2SLuciano Coelho 	__le32 PLCP_error;
717b3115f2SLuciano Coelho 
727b3115f2SLuciano Coelho 	/* The number of FCS errors since the last time this */
737b3115f2SLuciano Coelho 	/* information element was interrogated. This field is */
747b3115f2SLuciano Coelho 	/* automatically cleared when it is interrogated.*/
757b3115f2SLuciano Coelho 	__le32 FCS_error;
767b3115f2SLuciano Coelho 
777b3115f2SLuciano Coelho 	/* The number of MPDUs without PLCP header errors received*/
787b3115f2SLuciano Coelho 	/* since the last time this information element was interrogated. */
797b3115f2SLuciano Coelho 	/* This field is automatically cleared when it is interrogated.*/
807b3115f2SLuciano Coelho 	__le32 valid_frame;
817b3115f2SLuciano Coelho 
827b3115f2SLuciano Coelho 	/* the number of missed sequence numbers in the squentially */
837b3115f2SLuciano Coelho 	/* values of frames seq numbers */
847b3115f2SLuciano Coelho 	__le32 seq_num_miss;
857b3115f2SLuciano Coelho } __packed;
867b3115f2SLuciano Coelho 
877b3115f2SLuciano Coelho enum wl12xx_role {
887b3115f2SLuciano Coelho 	WL1271_ROLE_STA = 0,
897b3115f2SLuciano Coelho 	WL1271_ROLE_IBSS,
907b3115f2SLuciano Coelho 	WL1271_ROLE_AP,
917b3115f2SLuciano Coelho 	WL1271_ROLE_DEVICE,
927b3115f2SLuciano Coelho 	WL1271_ROLE_P2P_CL,
937b3115f2SLuciano Coelho 	WL1271_ROLE_P2P_GO,
94c0174ee2SMaital Hahn 	WL1271_ROLE_MESH_POINT,
957b3115f2SLuciano Coelho 
967b3115f2SLuciano Coelho 	WL12XX_INVALID_ROLE_TYPE = 0xff
977b3115f2SLuciano Coelho };
987b3115f2SLuciano Coelho 
997b3115f2SLuciano Coelho enum wl1271_psm_mode {
1007b3115f2SLuciano Coelho 	/* Active mode */
1017b3115f2SLuciano Coelho 	WL1271_PSM_CAM = 0,
1027b3115f2SLuciano Coelho 
1037b3115f2SLuciano Coelho 	/* Power save mode */
1047b3115f2SLuciano Coelho 	WL1271_PSM_PS = 1,
1057b3115f2SLuciano Coelho 
1067b3115f2SLuciano Coelho 	/* Extreme low power */
1077b3115f2SLuciano Coelho 	WL1271_PSM_ELP = 2,
10826b5858aSLuciano Coelho 
10926b5858aSLuciano Coelho 	WL1271_PSM_MAX = WL1271_PSM_ELP,
11066340e5bSArik Nemtsov 
11166340e5bSArik Nemtsov 	/* illegal out of band value of PSM mode */
11266340e5bSArik Nemtsov 	WL1271_PSM_ILLEGAL = 0xff
1137b3115f2SLuciano Coelho };
1147b3115f2SLuciano Coelho 
1157b3115f2SLuciano Coelho struct acx_sleep_auth {
1167b3115f2SLuciano Coelho 	struct acx_header header;
1177b3115f2SLuciano Coelho 
1187b3115f2SLuciano Coelho 	/* The sleep level authorization of the device. */
1197b3115f2SLuciano Coelho 	/* 0 - Always active*/
1207b3115f2SLuciano Coelho 	/* 1 - Power down mode: light / fast sleep*/
1217b3115f2SLuciano Coelho 	/* 2 - ELP mode: Deep / Max sleep*/
1227b3115f2SLuciano Coelho 	u8  sleep_auth;
1237b3115f2SLuciano Coelho 	u8  padding[3];
1247b3115f2SLuciano Coelho } __packed;
1257b3115f2SLuciano Coelho 
1267b3115f2SLuciano Coelho enum {
1277b3115f2SLuciano Coelho 	HOSTIF_PCI_MASTER_HOST_INDIRECT,
1287b3115f2SLuciano Coelho 	HOSTIF_PCI_MASTER_HOST_DIRECT,
1297b3115f2SLuciano Coelho 	HOSTIF_SLAVE,
1307b3115f2SLuciano Coelho 	HOSTIF_PKT_RING,
1317b3115f2SLuciano Coelho 	HOSTIF_DONTCARE = 0xFF
1327b3115f2SLuciano Coelho };
1337b3115f2SLuciano Coelho 
1347b3115f2SLuciano Coelho #define DEFAULT_UCAST_PRIORITY          0
1357b3115f2SLuciano Coelho #define DEFAULT_RX_Q_PRIORITY           0
1367b3115f2SLuciano Coelho #define DEFAULT_RXQ_PRIORITY            0 /* low 0 .. 15 high  */
1377b3115f2SLuciano Coelho #define DEFAULT_RXQ_TYPE                0x07    /* All frames, Data/Ctrl/Mgmt */
1387b3115f2SLuciano Coelho #define TRACE_BUFFER_MAX_SIZE           256
1397b3115f2SLuciano Coelho 
1407b3115f2SLuciano Coelho #define  DP_RX_PACKET_RING_CHUNK_SIZE 1600
1417b3115f2SLuciano Coelho #define  DP_TX_PACKET_RING_CHUNK_SIZE 1600
1427b3115f2SLuciano Coelho #define  DP_RX_PACKET_RING_CHUNK_NUM 2
1437b3115f2SLuciano Coelho #define  DP_TX_PACKET_RING_CHUNK_NUM 2
1447b3115f2SLuciano Coelho #define  DP_TX_COMPLETE_TIME_OUT 20
1457b3115f2SLuciano Coelho 
1467b3115f2SLuciano Coelho #define TX_MSDU_LIFETIME_MIN       0
1477b3115f2SLuciano Coelho #define TX_MSDU_LIFETIME_MAX       3000
1487b3115f2SLuciano Coelho #define TX_MSDU_LIFETIME_DEF       512
1497b3115f2SLuciano Coelho #define RX_MSDU_LIFETIME_MIN       0
1507b3115f2SLuciano Coelho #define RX_MSDU_LIFETIME_MAX       0xFFFFFFFF
1517b3115f2SLuciano Coelho #define RX_MSDU_LIFETIME_DEF       512000
1527b3115f2SLuciano Coelho 
1537b3115f2SLuciano Coelho struct acx_rx_msdu_lifetime {
1547b3115f2SLuciano Coelho 	struct acx_header header;
1557b3115f2SLuciano Coelho 
1567b3115f2SLuciano Coelho 	/*
1577b3115f2SLuciano Coelho 	 * The maximum amount of time, in TU, before the
1587b3115f2SLuciano Coelho 	 * firmware discards the MSDU.
1597b3115f2SLuciano Coelho 	 */
1607b3115f2SLuciano Coelho 	__le32 lifetime;
1617b3115f2SLuciano Coelho } __packed;
1627b3115f2SLuciano Coelho 
1637b3115f2SLuciano Coelho enum acx_slot_type {
1647b3115f2SLuciano Coelho 	SLOT_TIME_LONG = 0,
1657b3115f2SLuciano Coelho 	SLOT_TIME_SHORT = 1,
1667b3115f2SLuciano Coelho 	DEFAULT_SLOT_TIME = SLOT_TIME_SHORT,
1677b3115f2SLuciano Coelho 	MAX_SLOT_TIMES = 0xFF
1687b3115f2SLuciano Coelho };
1697b3115f2SLuciano Coelho 
1707b3115f2SLuciano Coelho #define STATION_WONE_INDEX 0
1717b3115f2SLuciano Coelho 
1727b3115f2SLuciano Coelho struct acx_slot {
1737b3115f2SLuciano Coelho 	struct acx_header header;
1747b3115f2SLuciano Coelho 
1757b3115f2SLuciano Coelho 	u8 role_id;
1767b3115f2SLuciano Coelho 	u8 wone_index; /* Reserved */
1777b3115f2SLuciano Coelho 	u8 slot_time;
1787b3115f2SLuciano Coelho 	u8 reserved[5];
1797b3115f2SLuciano Coelho } __packed;
1807b3115f2SLuciano Coelho 
1817b3115f2SLuciano Coelho 
1827b3115f2SLuciano Coelho #define ACX_MC_ADDRESS_GROUP_MAX	(8)
1837b3115f2SLuciano Coelho #define ADDRESS_GROUP_MAX_LEN	        (ETH_ALEN * ACX_MC_ADDRESS_GROUP_MAX)
1847b3115f2SLuciano Coelho 
1857b3115f2SLuciano Coelho struct acx_dot11_grp_addr_tbl {
1867b3115f2SLuciano Coelho 	struct acx_header header;
1877b3115f2SLuciano Coelho 
1887b3115f2SLuciano Coelho 	u8 role_id;
1897b3115f2SLuciano Coelho 	u8 enabled;
1907b3115f2SLuciano Coelho 	u8 num_groups;
1917b3115f2SLuciano Coelho 	u8 pad[1];
1927b3115f2SLuciano Coelho 	u8 mac_table[ADDRESS_GROUP_MAX_LEN];
1937b3115f2SLuciano Coelho } __packed;
1947b3115f2SLuciano Coelho 
1957b3115f2SLuciano Coelho struct acx_rx_timeout {
1967b3115f2SLuciano Coelho 	struct acx_header header;
1977b3115f2SLuciano Coelho 
1987b3115f2SLuciano Coelho 	u8 role_id;
1997b3115f2SLuciano Coelho 	u8 reserved;
2007b3115f2SLuciano Coelho 	__le16 ps_poll_timeout;
2017b3115f2SLuciano Coelho 	__le16 upsd_timeout;
2027b3115f2SLuciano Coelho 	u8 padding[2];
2037b3115f2SLuciano Coelho } __packed;
2047b3115f2SLuciano Coelho 
2057b3115f2SLuciano Coelho struct acx_rts_threshold {
2067b3115f2SLuciano Coelho 	struct acx_header header;
2077b3115f2SLuciano Coelho 
2087b3115f2SLuciano Coelho 	u8 role_id;
2097b3115f2SLuciano Coelho 	u8 reserved;
2107b3115f2SLuciano Coelho 	__le16 threshold;
2117b3115f2SLuciano Coelho } __packed;
2127b3115f2SLuciano Coelho 
2137b3115f2SLuciano Coelho struct acx_beacon_filter_option {
2147b3115f2SLuciano Coelho 	struct acx_header header;
2157b3115f2SLuciano Coelho 
2167b3115f2SLuciano Coelho 	u8 role_id;
2177b3115f2SLuciano Coelho 	u8 enable;
2187b3115f2SLuciano Coelho 	/*
2197b3115f2SLuciano Coelho 	 * The number of beacons without the unicast TIM
2207b3115f2SLuciano Coelho 	 * bit set that the firmware buffers before
2217b3115f2SLuciano Coelho 	 * signaling the host about ready frames.
2227b3115f2SLuciano Coelho 	 * When set to 0 and the filter is enabled, beacons
2237b3115f2SLuciano Coelho 	 * without the unicast TIM bit set are dropped.
2247b3115f2SLuciano Coelho 	 */
2257b3115f2SLuciano Coelho 	u8 max_num_beacons;
2267b3115f2SLuciano Coelho 	u8 pad[1];
2277b3115f2SLuciano Coelho } __packed;
2287b3115f2SLuciano Coelho 
2297b3115f2SLuciano Coelho /*
2307b3115f2SLuciano Coelho  * ACXBeaconFilterEntry (not 221)
2317b3115f2SLuciano Coelho  * Byte Offset     Size (Bytes)    Definition
2327b3115f2SLuciano Coelho  * ===========     ============    ==========
2337b3115f2SLuciano Coelho  * 0               1               IE identifier
2347b3115f2SLuciano Coelho  * 1               1               Treatment bit mask
2357b3115f2SLuciano Coelho  *
2367b3115f2SLuciano Coelho  * ACXBeaconFilterEntry (221)
2377b3115f2SLuciano Coelho  * Byte Offset     Size (Bytes)    Definition
2387b3115f2SLuciano Coelho  * ===========     ============    ==========
2397b3115f2SLuciano Coelho  * 0               1               IE identifier
2407b3115f2SLuciano Coelho  * 1               1               Treatment bit mask
2417b3115f2SLuciano Coelho  * 2               3               OUI
2427b3115f2SLuciano Coelho  * 5               1               Type
2437b3115f2SLuciano Coelho  * 6               2               Version
2447b3115f2SLuciano Coelho  *
2457b3115f2SLuciano Coelho  *
2467b3115f2SLuciano Coelho  * Treatment bit mask - The information element handling:
2477b3115f2SLuciano Coelho  * bit 0 - The information element is compared and transferred
2487b3115f2SLuciano Coelho  * in case of change.
2497b3115f2SLuciano Coelho  * bit 1 - The information element is transferred to the host
2507b3115f2SLuciano Coelho  * with each appearance or disappearance.
2517b3115f2SLuciano Coelho  * Note that both bits can be set at the same time.
2527b3115f2SLuciano Coelho  */
2537b3115f2SLuciano Coelho #define	BEACON_FILTER_TABLE_MAX_IE_NUM		       (32)
2547b3115f2SLuciano Coelho #define BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM (6)
2557b3115f2SLuciano Coelho #define BEACON_FILTER_TABLE_IE_ENTRY_SIZE	       (2)
2567b3115f2SLuciano Coelho #define BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE (6)
2577b3115f2SLuciano Coelho #define BEACON_FILTER_TABLE_MAX_SIZE ((BEACON_FILTER_TABLE_MAX_IE_NUM * \
2587b3115f2SLuciano Coelho 			    BEACON_FILTER_TABLE_IE_ENTRY_SIZE) + \
2597b3115f2SLuciano Coelho 			   (BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * \
2607b3115f2SLuciano Coelho 			    BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE))
2617b3115f2SLuciano Coelho 
2627b3115f2SLuciano Coelho struct acx_beacon_filter_ie_table {
2637b3115f2SLuciano Coelho 	struct acx_header header;
2647b3115f2SLuciano Coelho 
2657b3115f2SLuciano Coelho 	u8 role_id;
2667b3115f2SLuciano Coelho 	u8 num_ie;
2677b3115f2SLuciano Coelho 	u8 pad[2];
2687b3115f2SLuciano Coelho 	u8 table[BEACON_FILTER_TABLE_MAX_SIZE];
2697b3115f2SLuciano Coelho } __packed;
2707b3115f2SLuciano Coelho 
2717b3115f2SLuciano Coelho struct acx_conn_monit_params {
2727b3115f2SLuciano Coelho        struct acx_header header;
2737b3115f2SLuciano Coelho 
2747b3115f2SLuciano Coelho 	   u8 role_id;
2757b3115f2SLuciano Coelho 	   u8 padding[3];
2767b3115f2SLuciano Coelho        __le32 synch_fail_thold; /* number of beacons missed */
2777b3115f2SLuciano Coelho        __le32 bss_lose_timeout; /* number of TU's from synch fail */
2787b3115f2SLuciano Coelho } __packed;
2797b3115f2SLuciano Coelho 
2807b3115f2SLuciano Coelho struct acx_bt_wlan_coex {
2817b3115f2SLuciano Coelho 	struct acx_header header;
2827b3115f2SLuciano Coelho 
2837b3115f2SLuciano Coelho 	u8 enable;
2847b3115f2SLuciano Coelho 	u8 pad[3];
2857b3115f2SLuciano Coelho } __packed;
2867b3115f2SLuciano Coelho 
2877b3115f2SLuciano Coelho struct acx_bt_wlan_coex_param {
2887b3115f2SLuciano Coelho 	struct acx_header header;
2897b3115f2SLuciano Coelho 
290133b7326SGuy Mishol 	__le32 params[WLCORE_CONF_SG_PARAMS_MAX];
2917b3115f2SLuciano Coelho 	u8 param_idx;
2927b3115f2SLuciano Coelho 	u8 padding[3];
2937b3115f2SLuciano Coelho } __packed;
2947b3115f2SLuciano Coelho 
2957b3115f2SLuciano Coelho struct acx_dco_itrim_params {
2967b3115f2SLuciano Coelho 	struct acx_header header;
2977b3115f2SLuciano Coelho 
2987b3115f2SLuciano Coelho 	u8 enable;
2997b3115f2SLuciano Coelho 	u8 padding[3];
3007b3115f2SLuciano Coelho 	__le32 timeout;
3017b3115f2SLuciano Coelho } __packed;
3027b3115f2SLuciano Coelho 
3037b3115f2SLuciano Coelho struct acx_energy_detection {
3047b3115f2SLuciano Coelho 	struct acx_header header;
3057b3115f2SLuciano Coelho 
3067b3115f2SLuciano Coelho 	/* The RX Clear Channel Assessment threshold in the PHY */
3077b3115f2SLuciano Coelho 	__le16 rx_cca_threshold;
3087b3115f2SLuciano Coelho 	u8 tx_energy_detection;
3097b3115f2SLuciano Coelho 	u8 pad;
3107b3115f2SLuciano Coelho } __packed;
3117b3115f2SLuciano Coelho 
3127b3115f2SLuciano Coelho struct acx_beacon_broadcast {
3137b3115f2SLuciano Coelho 	struct acx_header header;
3147b3115f2SLuciano Coelho 
3157b3115f2SLuciano Coelho 	u8 role_id;
3167b3115f2SLuciano Coelho 	/* Enables receiving of broadcast packets in PS mode */
3177b3115f2SLuciano Coelho 	u8 rx_broadcast_in_ps;
3187b3115f2SLuciano Coelho 
3197b3115f2SLuciano Coelho 	__le16 beacon_rx_timeout;
3207b3115f2SLuciano Coelho 	__le16 broadcast_timeout;
3217b3115f2SLuciano Coelho 
3227b3115f2SLuciano Coelho 	/* Consecutive PS Poll failures before updating the host */
3237b3115f2SLuciano Coelho 	u8 ps_poll_threshold;
3247b3115f2SLuciano Coelho 	u8 pad[1];
3257b3115f2SLuciano Coelho } __packed;
3267b3115f2SLuciano Coelho 
3277b3115f2SLuciano Coelho struct acx_event_mask {
3287b3115f2SLuciano Coelho 	struct acx_header header;
3297b3115f2SLuciano Coelho 
3307b3115f2SLuciano Coelho 	__le32 event_mask;
3317b3115f2SLuciano Coelho 	__le32 high_event_mask; /* Unused */
3327b3115f2SLuciano Coelho } __packed;
3337b3115f2SLuciano Coelho 
3347b3115f2SLuciano Coelho #define SCAN_PASSIVE		BIT(0)
3357b3115f2SLuciano Coelho #define SCAN_5GHZ_BAND		BIT(1)
3367b3115f2SLuciano Coelho #define SCAN_TRIGGERED		BIT(2)
3377b3115f2SLuciano Coelho #define SCAN_PRIORITY_HIGH	BIT(3)
3387b3115f2SLuciano Coelho 
3397b3115f2SLuciano Coelho /* When set, disable HW encryption */
3407b3115f2SLuciano Coelho #define DF_ENCRYPTION_DISABLE      0x01
3417b3115f2SLuciano Coelho #define DF_SNIFF_MODE_ENABLE       0x80
3427b3115f2SLuciano Coelho 
3437b3115f2SLuciano Coelho struct acx_feature_config {
3447b3115f2SLuciano Coelho 	struct acx_header header;
3457b3115f2SLuciano Coelho 
3467b3115f2SLuciano Coelho 	u8 role_id;
3477b3115f2SLuciano Coelho 	u8 padding[3];
3487b3115f2SLuciano Coelho 	__le32 options;
3497b3115f2SLuciano Coelho 	__le32 data_flow_options;
3507b3115f2SLuciano Coelho } __packed;
3517b3115f2SLuciano Coelho 
3527b3115f2SLuciano Coelho struct acx_current_tx_power {
3537b3115f2SLuciano Coelho 	struct acx_header header;
3547b3115f2SLuciano Coelho 
3557b3115f2SLuciano Coelho 	u8  role_id;
3567b3115f2SLuciano Coelho 	u8  current_tx_power;
3577b3115f2SLuciano Coelho 	u8  padding[2];
3587b3115f2SLuciano Coelho } __packed;
3597b3115f2SLuciano Coelho 
3607b3115f2SLuciano Coelho struct acx_wake_up_condition {
3617b3115f2SLuciano Coelho 	struct acx_header header;
3627b3115f2SLuciano Coelho 
3637b3115f2SLuciano Coelho 	u8 role_id;
3647b3115f2SLuciano Coelho 	u8 wake_up_event; /* Only one bit can be set */
3657b3115f2SLuciano Coelho 	u8 listen_interval;
3667b3115f2SLuciano Coelho 	u8 pad[1];
3677b3115f2SLuciano Coelho } __packed;
3687b3115f2SLuciano Coelho 
3697b3115f2SLuciano Coelho struct acx_aid {
3707b3115f2SLuciano Coelho 	struct acx_header header;
3717b3115f2SLuciano Coelho 
3727b3115f2SLuciano Coelho 	/*
3737b3115f2SLuciano Coelho 	 * To be set when associated with an AP.
3747b3115f2SLuciano Coelho 	 */
3757b3115f2SLuciano Coelho 	u8 role_id;
3767b3115f2SLuciano Coelho 	u8 reserved;
3777b3115f2SLuciano Coelho 	__le16 aid;
3787b3115f2SLuciano Coelho } __packed;
3797b3115f2SLuciano Coelho 
3807b3115f2SLuciano Coelho enum acx_preamble_type {
3817b3115f2SLuciano Coelho 	ACX_PREAMBLE_LONG = 0,
3827b3115f2SLuciano Coelho 	ACX_PREAMBLE_SHORT = 1
3837b3115f2SLuciano Coelho };
3847b3115f2SLuciano Coelho 
3857b3115f2SLuciano Coelho struct acx_preamble {
3867b3115f2SLuciano Coelho 	struct acx_header header;
3877b3115f2SLuciano Coelho 
3887b3115f2SLuciano Coelho 	/*
3897b3115f2SLuciano Coelho 	 * When set, the WiLink transmits the frames with a short preamble and
3907b3115f2SLuciano Coelho 	 * when cleared, the WiLink transmits the frames with a long preamble.
3917b3115f2SLuciano Coelho 	 */
3927b3115f2SLuciano Coelho 	u8 role_id;
3937b3115f2SLuciano Coelho 	u8 preamble;
3947b3115f2SLuciano Coelho 	u8 padding[2];
3957b3115f2SLuciano Coelho } __packed;
3967b3115f2SLuciano Coelho 
3977b3115f2SLuciano Coelho enum acx_ctsprotect_type {
3987b3115f2SLuciano Coelho 	CTSPROTECT_DISABLE = 0,
3997b3115f2SLuciano Coelho 	CTSPROTECT_ENABLE = 1
4007b3115f2SLuciano Coelho };
4017b3115f2SLuciano Coelho 
4027b3115f2SLuciano Coelho struct acx_ctsprotect {
4037b3115f2SLuciano Coelho 	struct acx_header header;
4047b3115f2SLuciano Coelho 	u8 role_id;
4057b3115f2SLuciano Coelho 	u8 ctsprotect;
4067b3115f2SLuciano Coelho 	u8 padding[2];
4077b3115f2SLuciano Coelho } __packed;
4087b3115f2SLuciano Coelho 
4097b3115f2SLuciano Coelho struct acx_rate_class {
4107b3115f2SLuciano Coelho 	__le32 enabled_rates;
4117b3115f2SLuciano Coelho 	u8 short_retry_limit;
4127b3115f2SLuciano Coelho 	u8 long_retry_limit;
4137b3115f2SLuciano Coelho 	u8 aflags;
4147b3115f2SLuciano Coelho 	u8 reserved;
4157b3115f2SLuciano Coelho };
4167b3115f2SLuciano Coelho 
4177b3115f2SLuciano Coelho struct acx_rate_policy {
4187b3115f2SLuciano Coelho 	struct acx_header header;
4197b3115f2SLuciano Coelho 
4207b3115f2SLuciano Coelho 	__le32 rate_policy_idx;
4217b3115f2SLuciano Coelho 	struct acx_rate_class rate_policy;
4227b3115f2SLuciano Coelho } __packed;
4237b3115f2SLuciano Coelho 
4247b3115f2SLuciano Coelho struct acx_ac_cfg {
4257b3115f2SLuciano Coelho 	struct acx_header header;
4267b3115f2SLuciano Coelho 	u8 role_id;
4277b3115f2SLuciano Coelho 	u8 ac;
4287b3115f2SLuciano Coelho 	u8 aifsn;
4297b3115f2SLuciano Coelho 	u8 cw_min;
4307b3115f2SLuciano Coelho 	__le16 cw_max;
4317b3115f2SLuciano Coelho 	__le16 tx_op_limit;
4327b3115f2SLuciano Coelho } __packed;
4337b3115f2SLuciano Coelho 
4347b3115f2SLuciano Coelho struct acx_tid_config {
4357b3115f2SLuciano Coelho 	struct acx_header header;
4367b3115f2SLuciano Coelho 	u8 role_id;
4377b3115f2SLuciano Coelho 	u8 queue_id;
4387b3115f2SLuciano Coelho 	u8 channel_type;
4397b3115f2SLuciano Coelho 	u8 tsid;
4407b3115f2SLuciano Coelho 	u8 ps_scheme;
4417b3115f2SLuciano Coelho 	u8 ack_policy;
4427b3115f2SLuciano Coelho 	u8 padding[2];
4437b3115f2SLuciano Coelho 	__le32 apsd_conf[2];
4447b3115f2SLuciano Coelho } __packed;
4457b3115f2SLuciano Coelho 
4467b3115f2SLuciano Coelho struct acx_frag_threshold {
4477b3115f2SLuciano Coelho 	struct acx_header header;
4487b3115f2SLuciano Coelho 	__le16 frag_threshold;
4497b3115f2SLuciano Coelho 	u8 padding[2];
4507b3115f2SLuciano Coelho } __packed;
4517b3115f2SLuciano Coelho 
4527b3115f2SLuciano Coelho struct acx_tx_config_options {
4537b3115f2SLuciano Coelho 	struct acx_header header;
4547b3115f2SLuciano Coelho 	__le16 tx_compl_timeout;     /* msec */
4557b3115f2SLuciano Coelho 	__le16 tx_compl_threshold;   /* number of packets */
4567b3115f2SLuciano Coelho } __packed;
4577b3115f2SLuciano Coelho 
4587b3115f2SLuciano Coelho struct wl12xx_acx_config_memory {
4597b3115f2SLuciano Coelho 	struct acx_header header;
4607b3115f2SLuciano Coelho 
4617b3115f2SLuciano Coelho 	u8 rx_mem_block_num;
4627b3115f2SLuciano Coelho 	u8 tx_min_mem_block_num;
4637b3115f2SLuciano Coelho 	u8 num_stations;
4647b3115f2SLuciano Coelho 	u8 num_ssid_profiles;
4657b3115f2SLuciano Coelho 	__le32 total_tx_descriptors;
4667b3115f2SLuciano Coelho 	u8 dyn_mem_enable;
4677b3115f2SLuciano Coelho 	u8 tx_free_req;
4687b3115f2SLuciano Coelho 	u8 rx_free_req;
4697b3115f2SLuciano Coelho 	u8 tx_min;
4707b3115f2SLuciano Coelho 	u8 fwlog_blocks;
4717b3115f2SLuciano Coelho 	u8 padding[3];
4727b3115f2SLuciano Coelho } __packed;
4737b3115f2SLuciano Coelho 
4747b3115f2SLuciano Coelho struct wl1271_acx_mem_map {
4757b3115f2SLuciano Coelho 	struct acx_header header;
4767b3115f2SLuciano Coelho 
4777b3115f2SLuciano Coelho 	__le32 code_start;
4787b3115f2SLuciano Coelho 	__le32 code_end;
4797b3115f2SLuciano Coelho 
4807b3115f2SLuciano Coelho 	__le32 wep_defkey_start;
4817b3115f2SLuciano Coelho 	__le32 wep_defkey_end;
4827b3115f2SLuciano Coelho 
4837b3115f2SLuciano Coelho 	__le32 sta_table_start;
4847b3115f2SLuciano Coelho 	__le32 sta_table_end;
4857b3115f2SLuciano Coelho 
4867b3115f2SLuciano Coelho 	__le32 packet_template_start;
4877b3115f2SLuciano Coelho 	__le32 packet_template_end;
4887b3115f2SLuciano Coelho 
4897b3115f2SLuciano Coelho 	/* Address of the TX result interface (control block) */
4907b3115f2SLuciano Coelho 	__le32 tx_result;
4917b3115f2SLuciano Coelho 	__le32 tx_result_queue_start;
4927b3115f2SLuciano Coelho 
4937b3115f2SLuciano Coelho 	__le32 queue_memory_start;
4947b3115f2SLuciano Coelho 	__le32 queue_memory_end;
4957b3115f2SLuciano Coelho 
4967b3115f2SLuciano Coelho 	__le32 packet_memory_pool_start;
4977b3115f2SLuciano Coelho 	__le32 packet_memory_pool_end;
4987b3115f2SLuciano Coelho 
4997b3115f2SLuciano Coelho 	__le32 debug_buffer1_start;
5007b3115f2SLuciano Coelho 	__le32 debug_buffer1_end;
5017b3115f2SLuciano Coelho 
5027b3115f2SLuciano Coelho 	__le32 debug_buffer2_start;
5037b3115f2SLuciano Coelho 	__le32 debug_buffer2_end;
5047b3115f2SLuciano Coelho 
5057b3115f2SLuciano Coelho 	/* Number of blocks FW allocated for TX packets */
5067b3115f2SLuciano Coelho 	__le32 num_tx_mem_blocks;
5077b3115f2SLuciano Coelho 
5087b3115f2SLuciano Coelho 	/* Number of blocks FW allocated for RX packets */
5097b3115f2SLuciano Coelho 	__le32 num_rx_mem_blocks;
5107b3115f2SLuciano Coelho 
5117b3115f2SLuciano Coelho 	/* the following 4 fields are valid in SLAVE mode only */
5127b3115f2SLuciano Coelho 	u8 *tx_cbuf;
5137b3115f2SLuciano Coelho 	u8 *rx_cbuf;
5147b3115f2SLuciano Coelho 	__le32 rx_ctrl;
5157b3115f2SLuciano Coelho 	__le32 tx_ctrl;
5167b3115f2SLuciano Coelho } __packed;
5177b3115f2SLuciano Coelho 
5187b3115f2SLuciano Coelho struct wl1271_acx_rx_config_opt {
5197b3115f2SLuciano Coelho 	struct acx_header header;
5207b3115f2SLuciano Coelho 
5217b3115f2SLuciano Coelho 	__le16 mblk_threshold;
5227b3115f2SLuciano Coelho 	__le16 threshold;
5237b3115f2SLuciano Coelho 	__le16 timeout;
5247b3115f2SLuciano Coelho 	u8 queue_type;
5257b3115f2SLuciano Coelho 	u8 reserved;
5267b3115f2SLuciano Coelho } __packed;
5277b3115f2SLuciano Coelho 
5287b3115f2SLuciano Coelho 
5297b3115f2SLuciano Coelho struct wl1271_acx_bet_enable {
5307b3115f2SLuciano Coelho 	struct acx_header header;
5317b3115f2SLuciano Coelho 
5327b3115f2SLuciano Coelho 	u8 role_id;
5337b3115f2SLuciano Coelho 	u8 enable;
5347b3115f2SLuciano Coelho 	u8 max_consecutive;
5357b3115f2SLuciano Coelho 	u8 padding[1];
5367b3115f2SLuciano Coelho } __packed;
5377b3115f2SLuciano Coelho 
5387b3115f2SLuciano Coelho #define ACX_IPV4_VERSION 4
5397b3115f2SLuciano Coelho #define ACX_IPV6_VERSION 6
5407b3115f2SLuciano Coelho #define ACX_IPV4_ADDR_SIZE 4
5417b3115f2SLuciano Coelho 
5427b3115f2SLuciano Coelho /* bitmap of enabled arp_filter features */
5437b3115f2SLuciano Coelho #define ACX_ARP_FILTER_ARP_FILTERING	BIT(0)
5447b3115f2SLuciano Coelho #define ACX_ARP_FILTER_AUTO_ARP		BIT(1)
5457b3115f2SLuciano Coelho 
5467b3115f2SLuciano Coelho struct wl1271_acx_arp_filter {
5477b3115f2SLuciano Coelho 	struct acx_header header;
5487b3115f2SLuciano Coelho 	u8 role_id;
5497b3115f2SLuciano Coelho 	u8 version;         /* ACX_IPV4_VERSION, ACX_IPV6_VERSION */
5507b3115f2SLuciano Coelho 	u8 enable;          /* bitmap of enabled ARP filtering features */
5517b3115f2SLuciano Coelho 	u8 padding[1];
5527b3115f2SLuciano Coelho 	u8 address[16];     /* The configured device IP address - all ARP
5537b3115f2SLuciano Coelho 			       requests directed to this IP address will pass
5547b3115f2SLuciano Coelho 			       through. For IPv4, the first four bytes are
5557b3115f2SLuciano Coelho 			       used. */
5567b3115f2SLuciano Coelho } __packed;
5577b3115f2SLuciano Coelho 
5587b3115f2SLuciano Coelho struct wl1271_acx_pm_config {
5597b3115f2SLuciano Coelho 	struct acx_header header;
5607b3115f2SLuciano Coelho 
5617b3115f2SLuciano Coelho 	__le32 host_clk_settling_time;
5627b3115f2SLuciano Coelho 	u8 host_fast_wakeup_support;
5637b3115f2SLuciano Coelho 	u8 padding[3];
5647b3115f2SLuciano Coelho } __packed;
5657b3115f2SLuciano Coelho 
5667b3115f2SLuciano Coelho struct wl1271_acx_keep_alive_mode {
5677b3115f2SLuciano Coelho 	struct acx_header header;
5687b3115f2SLuciano Coelho 
5697b3115f2SLuciano Coelho 	u8 role_id;
5707b3115f2SLuciano Coelho 	u8 enabled;
5717b3115f2SLuciano Coelho 	u8 padding[2];
5727b3115f2SLuciano Coelho } __packed;
5737b3115f2SLuciano Coelho 
5747b3115f2SLuciano Coelho enum {
5757b3115f2SLuciano Coelho 	ACX_KEEP_ALIVE_NO_TX = 0,
5767b3115f2SLuciano Coelho 	ACX_KEEP_ALIVE_PERIOD_ONLY
5777b3115f2SLuciano Coelho };
5787b3115f2SLuciano Coelho 
5797b3115f2SLuciano Coelho enum {
5807b3115f2SLuciano Coelho 	ACX_KEEP_ALIVE_TPL_INVALID = 0,
5817b3115f2SLuciano Coelho 	ACX_KEEP_ALIVE_TPL_VALID
5827b3115f2SLuciano Coelho };
5837b3115f2SLuciano Coelho 
5847b3115f2SLuciano Coelho struct wl1271_acx_keep_alive_config {
5857b3115f2SLuciano Coelho 	struct acx_header header;
5867b3115f2SLuciano Coelho 
5877b3115f2SLuciano Coelho 	u8 role_id;
5887b3115f2SLuciano Coelho 	u8 index;
5897b3115f2SLuciano Coelho 	u8 tpl_validation;
5907b3115f2SLuciano Coelho 	u8 trigger;
5917b3115f2SLuciano Coelho 	__le32 period;
5927b3115f2SLuciano Coelho } __packed;
5937b3115f2SLuciano Coelho 
5949d68d1eeSLuciano Coelho /* TODO: maybe this needs to be moved somewhere else? */
5957b3115f2SLuciano Coelho #define HOST_IF_CFG_RX_FIFO_ENABLE     BIT(0)
5967b3115f2SLuciano Coelho #define HOST_IF_CFG_TX_EXTRA_BLKS_SWAP BIT(1)
5977b3115f2SLuciano Coelho #define HOST_IF_CFG_TX_PAD_TO_SDIO_BLK BIT(3)
598b8422dcbSLuciano Coelho #define HOST_IF_CFG_RX_PAD_TO_SDIO_BLK BIT(4)
599b8422dcbSLuciano Coelho #define HOST_IF_CFG_ADD_RX_ALIGNMENT   BIT(6)
6007b3115f2SLuciano Coelho 
6017b3115f2SLuciano Coelho enum {
6027b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_TYPE_LEVEL = 0,
6037b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_TYPE_EDGE,
6047b3115f2SLuciano Coelho };
6057b3115f2SLuciano Coelho 
6067b3115f2SLuciano Coelho enum {
6077b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_DIR_LOW = 0,
6087b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_DIR_HIGH,
6097b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_DIR_BIDIR,
6107b3115f2SLuciano Coelho };
6117b3115f2SLuciano Coelho 
6127b3115f2SLuciano Coelho enum {
6137b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_ENABLE = 1,
6147b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_DISABLE,
6157b3115f2SLuciano Coelho };
6167b3115f2SLuciano Coelho 
6177b3115f2SLuciano Coelho enum {
6187b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_METRIC_RSSI_BEACON = 0,
6197b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_METRIC_RSSI_DATA,
6207b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_METRIC_SNR_BEACON,
6217b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_METRIC_SNR_DATA,
6227b3115f2SLuciano Coelho };
6237b3115f2SLuciano Coelho 
6247b3115f2SLuciano Coelho enum {
6257b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_IDX_RSSI = 0,
6267b3115f2SLuciano Coelho 	WL1271_ACX_TRIG_COUNT = 8,
6277b3115f2SLuciano Coelho };
6287b3115f2SLuciano Coelho 
6297b3115f2SLuciano Coelho struct wl1271_acx_rssi_snr_trigger {
6307b3115f2SLuciano Coelho 	struct acx_header header;
6317b3115f2SLuciano Coelho 
6327b3115f2SLuciano Coelho 	u8 role_id;
6337b3115f2SLuciano Coelho 	u8 metric;
6347b3115f2SLuciano Coelho 	u8 type;
6357b3115f2SLuciano Coelho 	u8 dir;
6367b3115f2SLuciano Coelho 	__le16 threshold;
6377b3115f2SLuciano Coelho 	__le16 pacing; /* 0 - 60000 ms */
6387b3115f2SLuciano Coelho 	u8 hysteresis;
6397b3115f2SLuciano Coelho 	u8 index;
6407b3115f2SLuciano Coelho 	u8 enable;
6417b3115f2SLuciano Coelho 	u8 padding[1];
6427b3115f2SLuciano Coelho };
6437b3115f2SLuciano Coelho 
6447b3115f2SLuciano Coelho struct wl1271_acx_rssi_snr_avg_weights {
6457b3115f2SLuciano Coelho 	struct acx_header header;
6467b3115f2SLuciano Coelho 
6477b3115f2SLuciano Coelho 	u8 role_id;
6487b3115f2SLuciano Coelho 	u8 padding[3];
6497b3115f2SLuciano Coelho 	u8 rssi_beacon;
6507b3115f2SLuciano Coelho 	u8 rssi_data;
6517b3115f2SLuciano Coelho 	u8 snr_beacon;
6527b3115f2SLuciano Coelho 	u8 snr_data;
6537b3115f2SLuciano Coelho };
6547b3115f2SLuciano Coelho 
6557b3115f2SLuciano Coelho 
6567b3115f2SLuciano Coelho /* special capability bit (not employed by the 802.11n spec) */
6577b3115f2SLuciano Coelho #define WL12XX_HT_CAP_HT_OPERATION BIT(16)
6587b3115f2SLuciano Coelho 
6597b3115f2SLuciano Coelho /*
6607b3115f2SLuciano Coelho  * ACX_PEER_HT_CAP
6617b3115f2SLuciano Coelho  * Configure HT capabilities - declare the capabilities of the peer
6627b3115f2SLuciano Coelho  * we are connected to.
6637b3115f2SLuciano Coelho  */
6647b3115f2SLuciano Coelho struct wl1271_acx_ht_capabilities {
6657b3115f2SLuciano Coelho 	struct acx_header header;
6667b3115f2SLuciano Coelho 
6677b3115f2SLuciano Coelho 	/* bitmask of capability bits supported by the peer */
6687b3115f2SLuciano Coelho 	__le32 ht_capabilites;
6697b3115f2SLuciano Coelho 
6707b3115f2SLuciano Coelho 	/* Indicates to which link these capabilities apply. */
6717b3115f2SLuciano Coelho 	u8 hlid;
6727b3115f2SLuciano Coelho 
6737b3115f2SLuciano Coelho 	/*
6747b3115f2SLuciano Coelho 	 * This the maximum A-MPDU length supported by the AP. The FW may not
6757b3115f2SLuciano Coelho 	 * exceed this length when sending A-MPDUs
6767b3115f2SLuciano Coelho 	 */
6777b3115f2SLuciano Coelho 	u8 ampdu_max_length;
6787b3115f2SLuciano Coelho 
6797b3115f2SLuciano Coelho 	/* This is the minimal spacing required when sending A-MPDUs to the AP*/
6807b3115f2SLuciano Coelho 	u8 ampdu_min_spacing;
6817b3115f2SLuciano Coelho 
6827b3115f2SLuciano Coelho 	u8 padding;
6837b3115f2SLuciano Coelho } __packed;
6847b3115f2SLuciano Coelho 
6857b3115f2SLuciano Coelho /*
6867b3115f2SLuciano Coelho  * ACX_HT_BSS_OPERATION
6877b3115f2SLuciano Coelho  * Configure HT capabilities - AP rules for behavior in the BSS.
6887b3115f2SLuciano Coelho  */
6897b3115f2SLuciano Coelho struct wl1271_acx_ht_information {
6907b3115f2SLuciano Coelho 	struct acx_header header;
6917b3115f2SLuciano Coelho 
6927b3115f2SLuciano Coelho 	u8 role_id;
6937b3115f2SLuciano Coelho 
6947b3115f2SLuciano Coelho 	/* Values: 0 - RIFS not allowed, 1 - RIFS allowed */
6957b3115f2SLuciano Coelho 	u8 rifs_mode;
6967b3115f2SLuciano Coelho 
6977b3115f2SLuciano Coelho 	/* Values: 0 - 3 like in spec */
6987b3115f2SLuciano Coelho 	u8 ht_protection;
6997b3115f2SLuciano Coelho 
7007b3115f2SLuciano Coelho 	/* Values: 0 - GF protection not required, 1 - GF protection required */
7017b3115f2SLuciano Coelho 	u8 gf_protection;
7027b3115f2SLuciano Coelho 
7037b3115f2SLuciano Coelho 	/*Values: 0 - TX Burst limit not required, 1 - TX Burst Limit required*/
7047b3115f2SLuciano Coelho 	u8 ht_tx_burst_limit;
7057b3115f2SLuciano Coelho 
7067b3115f2SLuciano Coelho 	/*
7077b3115f2SLuciano Coelho 	 * Values: 0 - Dual CTS protection not required,
7087b3115f2SLuciano Coelho 	 *         1 - Dual CTS Protection required
7097b3115f2SLuciano Coelho 	 * Note: When this value is set to 1 FW will protect all TXOP with RTS
7107b3115f2SLuciano Coelho 	 * frame and will not use CTS-to-self regardless of the value of the
7117b3115f2SLuciano Coelho 	 * ACX_CTS_PROTECTION information element
7127b3115f2SLuciano Coelho 	 */
7137b3115f2SLuciano Coelho 	u8 dual_cts_protection;
7147b3115f2SLuciano Coelho 
7157b3115f2SLuciano Coelho 	u8 padding[2];
7167b3115f2SLuciano Coelho } __packed;
7177b3115f2SLuciano Coelho 
7187b3115f2SLuciano Coelho struct wl1271_acx_ba_initiator_policy {
7197b3115f2SLuciano Coelho 	struct acx_header header;
7207b3115f2SLuciano Coelho 
7217b3115f2SLuciano Coelho 	/* Specifies role Id, Range 0-7, 0xFF means ANY role. */
7227b3115f2SLuciano Coelho 	u8 role_id;
7237b3115f2SLuciano Coelho 
7247b3115f2SLuciano Coelho 	/*
7257b3115f2SLuciano Coelho 	 * Per TID setting for allowing TX BA. Set a bit to 1 to allow
7267b3115f2SLuciano Coelho 	 * TX BA sessions for the corresponding TID.
7277b3115f2SLuciano Coelho 	 */
7287b3115f2SLuciano Coelho 	u8 tid_bitmap;
7297b3115f2SLuciano Coelho 
7307b3115f2SLuciano Coelho 	/* Windows size in number of packets */
7317b3115f2SLuciano Coelho 	u8 win_size;
7327b3115f2SLuciano Coelho 
7337b3115f2SLuciano Coelho 	u8 padding1[1];
7347b3115f2SLuciano Coelho 
7357b3115f2SLuciano Coelho 	/* As initiator inactivity timeout in time units(TU) of 1024us */
7367b3115f2SLuciano Coelho 	u16 inactivity_timeout;
7377b3115f2SLuciano Coelho 
7387b3115f2SLuciano Coelho 	u8 padding[2];
7397b3115f2SLuciano Coelho } __packed;
7407b3115f2SLuciano Coelho 
7417b3115f2SLuciano Coelho struct wl1271_acx_ba_receiver_setup {
7427b3115f2SLuciano Coelho 	struct acx_header header;
7437b3115f2SLuciano Coelho 
7447b3115f2SLuciano Coelho 	/* Specifies link id, range 0-31 */
7457b3115f2SLuciano Coelho 	u8 hlid;
7467b3115f2SLuciano Coelho 
7477b3115f2SLuciano Coelho 	u8 tid;
7487b3115f2SLuciano Coelho 
7497b3115f2SLuciano Coelho 	u8 enable;
7507b3115f2SLuciano Coelho 
7517b3115f2SLuciano Coelho 	/* Windows size in number of packets */
7527b3115f2SLuciano Coelho 	u8 win_size;
7537b3115f2SLuciano Coelho 
7547b3115f2SLuciano Coelho 	/* BA session starting sequence number.  RANGE 0-FFF */
7557b3115f2SLuciano Coelho 	u16 ssn;
7567b3115f2SLuciano Coelho 
7577b3115f2SLuciano Coelho 	u8 padding[2];
7587b3115f2SLuciano Coelho } __packed;
7597b3115f2SLuciano Coelho 
7607b3115f2SLuciano Coelho struct wl12xx_acx_fw_tsf_information {
7617b3115f2SLuciano Coelho 	struct acx_header header;
7627b3115f2SLuciano Coelho 
7637b3115f2SLuciano Coelho 	u8 role_id;
7647b3115f2SLuciano Coelho 	u8 padding1[3];
7657b3115f2SLuciano Coelho 	__le32 current_tsf_high;
7667b3115f2SLuciano Coelho 	__le32 current_tsf_low;
7677b3115f2SLuciano Coelho 	__le32 last_bttt_high;
7687b3115f2SLuciano Coelho 	__le32 last_tbtt_low;
7697b3115f2SLuciano Coelho 	u8 last_dtim_count;
7707b3115f2SLuciano Coelho 	u8 padding2[3];
7717b3115f2SLuciano Coelho } __packed;
7727b3115f2SLuciano Coelho 
7737b3115f2SLuciano Coelho struct wl1271_acx_ps_rx_streaming {
7747b3115f2SLuciano Coelho 	struct acx_header header;
7757b3115f2SLuciano Coelho 
7767b3115f2SLuciano Coelho 	u8 role_id;
7777b3115f2SLuciano Coelho 	u8 tid;
7787b3115f2SLuciano Coelho 	u8 enable;
7797b3115f2SLuciano Coelho 
7807b3115f2SLuciano Coelho 	/* interval between triggers (10-100 msec) */
7817b3115f2SLuciano Coelho 	u8 period;
7827b3115f2SLuciano Coelho 
7837b3115f2SLuciano Coelho 	/* timeout before first trigger (0-200 msec) */
7847b3115f2SLuciano Coelho 	u8 timeout;
7857b3115f2SLuciano Coelho 	u8 padding[3];
7867b3115f2SLuciano Coelho } __packed;
7877b3115f2SLuciano Coelho 
7887b3115f2SLuciano Coelho struct wl1271_acx_ap_max_tx_retry {
7897b3115f2SLuciano Coelho 	struct acx_header header;
7907b3115f2SLuciano Coelho 
7917b3115f2SLuciano Coelho 	u8 role_id;
7927b3115f2SLuciano Coelho 	u8 padding_1;
7937b3115f2SLuciano Coelho 
7947b3115f2SLuciano Coelho 	/*
7957b3115f2SLuciano Coelho 	 * the number of frames transmission failures before
7967b3115f2SLuciano Coelho 	 * issuing the aging event.
7977b3115f2SLuciano Coelho 	 */
7987b3115f2SLuciano Coelho 	__le16 max_tx_retry;
7997b3115f2SLuciano Coelho } __packed;
8007b3115f2SLuciano Coelho 
8017b3115f2SLuciano Coelho struct wl1271_acx_config_ps {
8027b3115f2SLuciano Coelho 	struct acx_header header;
8037b3115f2SLuciano Coelho 
8047b3115f2SLuciano Coelho 	u8 exit_retries;
8057b3115f2SLuciano Coelho 	u8 enter_retries;
8067b3115f2SLuciano Coelho 	u8 padding[2];
8077b3115f2SLuciano Coelho 	__le32 null_data_rate;
8087b3115f2SLuciano Coelho } __packed;
8097b3115f2SLuciano Coelho 
8107b3115f2SLuciano Coelho struct wl1271_acx_inconnection_sta {
8117b3115f2SLuciano Coelho 	struct acx_header header;
8127b3115f2SLuciano Coelho 
8137b3115f2SLuciano Coelho 	u8 addr[ETH_ALEN];
814028e7243SEliad Peller 	u8 role_id;
815028e7243SEliad Peller 	u8 padding;
8167b3115f2SLuciano Coelho } __packed;
8177b3115f2SLuciano Coelho 
8187b3115f2SLuciano Coelho /*
8197b3115f2SLuciano Coelho  * ACX_FM_COEX_CFG
8207b3115f2SLuciano Coelho  * set the FM co-existence parameters.
8217b3115f2SLuciano Coelho  */
8227b3115f2SLuciano Coelho struct wl1271_acx_fm_coex {
8237b3115f2SLuciano Coelho 	struct acx_header header;
8247b3115f2SLuciano Coelho 	/* enable(1) / disable(0) the FM Coex feature */
8257b3115f2SLuciano Coelho 	u8 enable;
8267b3115f2SLuciano Coelho 	/*
8277b3115f2SLuciano Coelho 	 * Swallow period used in COEX PLL swallowing mechanism.
8287b3115f2SLuciano Coelho 	 * 0xFF = use FW default
8297b3115f2SLuciano Coelho 	 */
8307b3115f2SLuciano Coelho 	u8 swallow_period;
8317b3115f2SLuciano Coelho 	/*
8327b3115f2SLuciano Coelho 	 * The N divider used in COEX PLL swallowing mechanism for Fref of
8337b3115f2SLuciano Coelho 	 * 38.4/19.2 Mhz. 0xFF = use FW default
8347b3115f2SLuciano Coelho 	 */
8357b3115f2SLuciano Coelho 	u8 n_divider_fref_set_1;
8367b3115f2SLuciano Coelho 	/*
8377b3115f2SLuciano Coelho 	 * The N divider used in COEX PLL swallowing mechanism for Fref of
8387b3115f2SLuciano Coelho 	 * 26/52 Mhz. 0xFF = use FW default
8397b3115f2SLuciano Coelho 	 */
8407b3115f2SLuciano Coelho 	u8 n_divider_fref_set_2;
8417b3115f2SLuciano Coelho 	/*
8427b3115f2SLuciano Coelho 	 * The M divider used in COEX PLL swallowing mechanism for Fref of
8437b3115f2SLuciano Coelho 	 * 38.4/19.2 Mhz. 0xFFFF = use FW default
8447b3115f2SLuciano Coelho 	 */
8457b3115f2SLuciano Coelho 	__le16 m_divider_fref_set_1;
8467b3115f2SLuciano Coelho 	/*
8477b3115f2SLuciano Coelho 	 * The M divider used in COEX PLL swallowing mechanism for Fref of
8487b3115f2SLuciano Coelho 	 * 26/52 Mhz. 0xFFFF = use FW default
8497b3115f2SLuciano Coelho 	 */
8507b3115f2SLuciano Coelho 	__le16 m_divider_fref_set_2;
8517b3115f2SLuciano Coelho 	/*
8527b3115f2SLuciano Coelho 	 * The time duration in uSec required for COEX PLL to stabilize.
8537b3115f2SLuciano Coelho 	 * 0xFFFFFFFF = use FW default
8547b3115f2SLuciano Coelho 	 */
8557b3115f2SLuciano Coelho 	__le32 coex_pll_stabilization_time;
8567b3115f2SLuciano Coelho 	/*
8577b3115f2SLuciano Coelho 	 * The time duration in uSec required for LDO to stabilize.
8587b3115f2SLuciano Coelho 	 * 0xFFFFFFFF = use FW default
8597b3115f2SLuciano Coelho 	 */
8607b3115f2SLuciano Coelho 	__le16 ldo_stabilization_time;
8617b3115f2SLuciano Coelho 	/*
8627b3115f2SLuciano Coelho 	 * The disturbed frequency band margin around the disturbed frequency
8637b3115f2SLuciano Coelho 	 * center (single sided).
8647b3115f2SLuciano Coelho 	 * For example, if 2 is configured, the following channels will be
8657b3115f2SLuciano Coelho 	 * considered disturbed channel:
8667b3115f2SLuciano Coelho 	 *   80 +- 0.1 MHz, 91 +- 0.1 MHz, 98 +- 0.1 MHz, 102 +- 0.1 MH
8677b3115f2SLuciano Coelho 	 * 0xFF = use FW default
8687b3115f2SLuciano Coelho 	 */
8697b3115f2SLuciano Coelho 	u8 fm_disturbed_band_margin;
8707b3115f2SLuciano Coelho 	/*
8717b3115f2SLuciano Coelho 	 * The swallow clock difference of the swallowing mechanism.
8727b3115f2SLuciano Coelho 	 * 0xFF = use FW default
8737b3115f2SLuciano Coelho 	 */
8747b3115f2SLuciano Coelho 	u8 swallow_clk_diff;
8757b3115f2SLuciano Coelho } __packed;
8767b3115f2SLuciano Coelho 
8777b3115f2SLuciano Coelho #define ACX_RATE_MGMT_ALL_PARAMS 0xff
8787b3115f2SLuciano Coelho struct wl12xx_acx_set_rate_mgmt_params {
8797b3115f2SLuciano Coelho 	struct acx_header header;
8807b3115f2SLuciano Coelho 
8817b3115f2SLuciano Coelho 	u8 index; /* 0xff to configure all params */
8827b3115f2SLuciano Coelho 	u8 padding1;
8837b3115f2SLuciano Coelho 	__le16 rate_retry_score;
8847b3115f2SLuciano Coelho 	__le16 per_add;
8857b3115f2SLuciano Coelho 	__le16 per_th1;
8867b3115f2SLuciano Coelho 	__le16 per_th2;
8877b3115f2SLuciano Coelho 	__le16 max_per;
8887b3115f2SLuciano Coelho 	u8 inverse_curiosity_factor;
8897b3115f2SLuciano Coelho 	u8 tx_fail_low_th;
8907b3115f2SLuciano Coelho 	u8 tx_fail_high_th;
8917b3115f2SLuciano Coelho 	u8 per_alpha_shift;
8927b3115f2SLuciano Coelho 	u8 per_add_shift;
8937b3115f2SLuciano Coelho 	u8 per_beta1_shift;
8947b3115f2SLuciano Coelho 	u8 per_beta2_shift;
8957b3115f2SLuciano Coelho 	u8 rate_check_up;
8967b3115f2SLuciano Coelho 	u8 rate_check_down;
8977b3115f2SLuciano Coelho 	u8 rate_retry_policy[ACX_RATE_MGMT_NUM_OF_RATES];
8987b3115f2SLuciano Coelho 	u8 padding2[2];
8997b3115f2SLuciano Coelho } __packed;
9007b3115f2SLuciano Coelho 
9017b3115f2SLuciano Coelho struct wl12xx_acx_config_hangover {
9027b3115f2SLuciano Coelho 	struct acx_header header;
9037b3115f2SLuciano Coelho 
9047b3115f2SLuciano Coelho 	__le32 recover_time;
9057b3115f2SLuciano Coelho 	u8 hangover_period;
9067b3115f2SLuciano Coelho 	u8 dynamic_mode;
9077b3115f2SLuciano Coelho 	u8 early_termination_mode;
9087b3115f2SLuciano Coelho 	u8 max_period;
9097b3115f2SLuciano Coelho 	u8 min_period;
9107b3115f2SLuciano Coelho 	u8 increase_delta;
9117b3115f2SLuciano Coelho 	u8 decrease_delta;
9127b3115f2SLuciano Coelho 	u8 quiet_time;
9137b3115f2SLuciano Coelho 	u8 increase_time;
9147b3115f2SLuciano Coelho 	u8 window_size;
9157b3115f2SLuciano Coelho 	u8 padding[2];
9167b3115f2SLuciano Coelho } __packed;
9177b3115f2SLuciano Coelho 
918c21eebb5SEyal Shapira 
919c21eebb5SEyal Shapira struct acx_default_rx_filter {
920c21eebb5SEyal Shapira 	struct acx_header header;
921c21eebb5SEyal Shapira 	u8 enable;
922c21eebb5SEyal Shapira 
923c21eebb5SEyal Shapira 	/* action of type FILTER_XXX */
924c21eebb5SEyal Shapira 	u8 default_action;
925c21eebb5SEyal Shapira 
926c21eebb5SEyal Shapira 	u8 pad[2];
927c21eebb5SEyal Shapira } __packed;
928c21eebb5SEyal Shapira 
929c21eebb5SEyal Shapira 
930c21eebb5SEyal Shapira struct acx_rx_filter_cfg {
931c21eebb5SEyal Shapira 	struct acx_header header;
932c21eebb5SEyal Shapira 
933c21eebb5SEyal Shapira 	u8 enable;
934c21eebb5SEyal Shapira 
935c21eebb5SEyal Shapira 	/* 0 - WL1271_MAX_RX_FILTERS-1 */
936c21eebb5SEyal Shapira 	u8 index;
937c21eebb5SEyal Shapira 
938c21eebb5SEyal Shapira 	u8 action;
939c21eebb5SEyal Shapira 
940c21eebb5SEyal Shapira 	u8 num_fields;
941*398978f7SGustavo A. R. Silva 	u8 fields[];
942c21eebb5SEyal Shapira } __packed;
943c21eebb5SEyal Shapira 
9440a9ffac0SNadim Zubidat struct acx_roaming_stats {
9450a9ffac0SNadim Zubidat 	struct acx_header header;
9460a9ffac0SNadim Zubidat 
9470a9ffac0SNadim Zubidat 	u8	role_id;
9480a9ffac0SNadim Zubidat 	u8	pad[3];
9490a9ffac0SNadim Zubidat 	u32	missed_beacons;
9500a9ffac0SNadim Zubidat 	u8	snr_data;
9510a9ffac0SNadim Zubidat 	u8	snr_bacon;
9520a9ffac0SNadim Zubidat 	s8	rssi_data;
9530a9ffac0SNadim Zubidat 	s8	rssi_beacon;
9540a9ffac0SNadim Zubidat } __packed;
9550a9ffac0SNadim Zubidat 
9567b3115f2SLuciano Coelho enum {
9577b3115f2SLuciano Coelho 	ACX_WAKE_UP_CONDITIONS           = 0x0000,
9587b3115f2SLuciano Coelho 	ACX_MEM_CFG                      = 0x0001,
9597b3115f2SLuciano Coelho 	ACX_SLOT                         = 0x0002,
9607b3115f2SLuciano Coelho 	ACX_AC_CFG                       = 0x0003,
9617b3115f2SLuciano Coelho 	ACX_MEM_MAP                      = 0x0004,
9627b3115f2SLuciano Coelho 	ACX_AID                          = 0x0005,
9637b3115f2SLuciano Coelho 	ACX_MEDIUM_USAGE                 = 0x0006,
9647b3115f2SLuciano Coelho 	ACX_STATISTICS                   = 0x0007,
9657b3115f2SLuciano Coelho 	ACX_PWR_CONSUMPTION_STATISTICS   = 0x0008,
9667b3115f2SLuciano Coelho 	ACX_TID_CFG                      = 0x0009,
9677b3115f2SLuciano Coelho 	ACX_PS_RX_STREAMING              = 0x000A,
9687b3115f2SLuciano Coelho 	ACX_BEACON_FILTER_OPT            = 0x000B,
9697b3115f2SLuciano Coelho 	ACX_NOISE_HIST                   = 0x000C,
9707b3115f2SLuciano Coelho 	ACX_HDK_VERSION                  = 0x000D,
9717b3115f2SLuciano Coelho 	ACX_PD_THRESHOLD                 = 0x000E,
9727b3115f2SLuciano Coelho 	ACX_TX_CONFIG_OPT                = 0x000F,
9737b3115f2SLuciano Coelho 	ACX_CCA_THRESHOLD                = 0x0010,
9747b3115f2SLuciano Coelho 	ACX_EVENT_MBOX_MASK              = 0x0011,
9757b3115f2SLuciano Coelho 	ACX_CONN_MONIT_PARAMS            = 0x0012,
9767b3115f2SLuciano Coelho 	ACX_DISABLE_BROADCASTS           = 0x0013,
9777b3115f2SLuciano Coelho 	ACX_BCN_DTIM_OPTIONS             = 0x0014,
9787b3115f2SLuciano Coelho 	ACX_SG_ENABLE                    = 0x0015,
9797b3115f2SLuciano Coelho 	ACX_SG_CFG                       = 0x0016,
9807b3115f2SLuciano Coelho 	ACX_FM_COEX_CFG                  = 0x0017,
9817b3115f2SLuciano Coelho 	ACX_BEACON_FILTER_TABLE          = 0x0018,
9827b3115f2SLuciano Coelho 	ACX_ARP_IP_FILTER                = 0x0019,
9837b3115f2SLuciano Coelho 	ACX_ROAMING_STATISTICS_TBL       = 0x001A,
9847b3115f2SLuciano Coelho 	ACX_RATE_POLICY                  = 0x001B,
9857b3115f2SLuciano Coelho 	ACX_CTS_PROTECTION               = 0x001C,
9867b3115f2SLuciano Coelho 	ACX_SLEEP_AUTH                   = 0x001D,
9877b3115f2SLuciano Coelho 	ACX_PREAMBLE_TYPE                = 0x001E,
9887b3115f2SLuciano Coelho 	ACX_ERROR_CNT                    = 0x001F,
9897b3115f2SLuciano Coelho 	ACX_IBSS_FILTER                  = 0x0020,
9907b3115f2SLuciano Coelho 	ACX_SERVICE_PERIOD_TIMEOUT       = 0x0021,
9917b3115f2SLuciano Coelho 	ACX_TSF_INFO                     = 0x0022,
9927b3115f2SLuciano Coelho 	ACX_CONFIG_PS_WMM                = 0x0023,
9937b3115f2SLuciano Coelho 	ACX_ENABLE_RX_DATA_FILTER        = 0x0024,
9947b3115f2SLuciano Coelho 	ACX_SET_RX_DATA_FILTER           = 0x0025,
9957b3115f2SLuciano Coelho 	ACX_GET_DATA_FILTER_STATISTICS   = 0x0026,
9967b3115f2SLuciano Coelho 	ACX_RX_CONFIG_OPT                = 0x0027,
9977b3115f2SLuciano Coelho 	ACX_FRAG_CFG                     = 0x0028,
9987b3115f2SLuciano Coelho 	ACX_BET_ENABLE                   = 0x0029,
9997b3115f2SLuciano Coelho 	ACX_RSSI_SNR_TRIGGER             = 0x002A,
10007b3115f2SLuciano Coelho 	ACX_RSSI_SNR_WEIGHTS             = 0x002B,
10017b3115f2SLuciano Coelho 	ACX_KEEP_ALIVE_MODE              = 0x002C,
10027b3115f2SLuciano Coelho 	ACX_SET_KEEP_ALIVE_CONFIG        = 0x002D,
10037b3115f2SLuciano Coelho 	ACX_BA_SESSION_INIT_POLICY       = 0x002E,
10047b3115f2SLuciano Coelho 	ACX_BA_SESSION_RX_SETUP          = 0x002F,
10057b3115f2SLuciano Coelho 	ACX_PEER_HT_CAP                  = 0x0030,
10067b3115f2SLuciano Coelho 	ACX_HT_BSS_OPERATION             = 0x0031,
10077b3115f2SLuciano Coelho 	ACX_COEX_ACTIVITY                = 0x0032,
10087b3115f2SLuciano Coelho 	ACX_BURST_MODE                   = 0x0033,
10097b3115f2SLuciano Coelho 	ACX_SET_RATE_MGMT_PARAMS         = 0x0034,
10107b3115f2SLuciano Coelho 	ACX_GET_RATE_MGMT_PARAMS         = 0x0035,
10117b3115f2SLuciano Coelho 	ACX_SET_RATE_ADAPT_PARAMS        = 0x0036,
10127b3115f2SLuciano Coelho 	ACX_SET_DCO_ITRIM_PARAMS         = 0x0037,
10137b3115f2SLuciano Coelho 	ACX_GEN_FW_CMD                   = 0x0038,
10147b3115f2SLuciano Coelho 	ACX_HOST_IF_CFG_BITMAP           = 0x0039,
10157b3115f2SLuciano Coelho 	ACX_MAX_TX_FAILURE               = 0x003A,
10167b3115f2SLuciano Coelho 	ACX_UPDATE_INCONNECTION_STA_LIST = 0x003B,
10177b3115f2SLuciano Coelho 	DOT11_RX_MSDU_LIFE_TIME          = 0x003C,
10187b3115f2SLuciano Coelho 	DOT11_CUR_TX_PWR                 = 0x003D,
10197b3115f2SLuciano Coelho 	DOT11_RTS_THRESHOLD              = 0x003E,
10207b3115f2SLuciano Coelho 	DOT11_GROUP_ADDRESS_TBL          = 0x003F,
10217b3115f2SLuciano Coelho 	ACX_PM_CONFIG                    = 0x0040,
10227b3115f2SLuciano Coelho 	ACX_CONFIG_PS                    = 0x0041,
10237b3115f2SLuciano Coelho 	ACX_CONFIG_HANGOVER              = 0x0042,
10247b3115f2SLuciano Coelho 	ACX_FEATURE_CFG                  = 0x0043,
10257b3115f2SLuciano Coelho 	ACX_PROTECTION_CFG               = 0x0044,
10267b3115f2SLuciano Coelho };
10277b3115f2SLuciano Coelho 
10287b3115f2SLuciano Coelho 
10297b3115f2SLuciano Coelho int wl1271_acx_wake_up_conditions(struct wl1271 *wl,
10307b3115f2SLuciano Coelho 				  struct wl12xx_vif *wlvif,
10317b3115f2SLuciano Coelho 				  u8 wake_up_event, u8 listen_interval);
10327b3115f2SLuciano Coelho int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth);
10337b3115f2SLuciano Coelho int wl1271_acx_tx_power(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10347b3115f2SLuciano Coelho 			int power);
10357b3115f2SLuciano Coelho int wl1271_acx_feature_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif);
10367b3115f2SLuciano Coelho int wl1271_acx_mem_map(struct wl1271 *wl,
10377b3115f2SLuciano Coelho 		       struct acx_header *mem_map, size_t len);
10387b3115f2SLuciano Coelho int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl);
10397b3115f2SLuciano Coelho int wl1271_acx_slot(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10407b3115f2SLuciano Coelho 		    enum acx_slot_type slot_time);
10417b3115f2SLuciano Coelho int wl1271_acx_group_address_tbl(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10427b3115f2SLuciano Coelho 				 bool enable, void *mc_list, u32 mc_list_len);
10437b3115f2SLuciano Coelho int wl1271_acx_service_period_timeout(struct wl1271 *wl,
10447b3115f2SLuciano Coelho 				      struct wl12xx_vif *wlvif);
10457b3115f2SLuciano Coelho int wl1271_acx_rts_threshold(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10467b3115f2SLuciano Coelho 			     u32 rts_threshold);
10477b3115f2SLuciano Coelho int wl1271_acx_dco_itrim_params(struct wl1271 *wl);
10487b3115f2SLuciano Coelho int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10497b3115f2SLuciano Coelho 				 bool enable_filter);
10507b3115f2SLuciano Coelho int wl1271_acx_beacon_filter_table(struct wl1271 *wl,
10517b3115f2SLuciano Coelho 				   struct wl12xx_vif *wlvif);
10527b3115f2SLuciano Coelho int wl1271_acx_conn_monit_params(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10537b3115f2SLuciano Coelho 				 bool enable);
10547b3115f2SLuciano Coelho int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable);
10557b3115f2SLuciano Coelho int wl12xx_acx_sg_cfg(struct wl1271 *wl);
10567b3115f2SLuciano Coelho int wl1271_acx_cca_threshold(struct wl1271 *wl);
10577b3115f2SLuciano Coelho int wl1271_acx_bcn_dtim_options(struct wl1271 *wl, struct wl12xx_vif *wlvif);
10587b3115f2SLuciano Coelho int wl1271_acx_aid(struct wl1271 *wl, struct wl12xx_vif *wlvif, u16 aid);
10597b3115f2SLuciano Coelho int wl1271_acx_event_mbox_mask(struct wl1271 *wl, u32 event_mask);
10607b3115f2SLuciano Coelho int wl1271_acx_set_preamble(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10617b3115f2SLuciano Coelho 			    enum acx_preamble_type preamble);
10627b3115f2SLuciano Coelho int wl1271_acx_cts_protect(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10637b3115f2SLuciano Coelho 			   enum acx_ctsprotect_type ctsprotect);
10644987257cSLuciano Coelho int wl1271_acx_statistics(struct wl1271 *wl, void *stats);
10657b3115f2SLuciano Coelho int wl1271_acx_sta_rate_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif);
10667b3115f2SLuciano Coelho int wl1271_acx_ap_rate_policy(struct wl1271 *wl, struct conf_tx_rate_class *c,
10677b3115f2SLuciano Coelho 		      u8 idx);
10687b3115f2SLuciano Coelho int wl1271_acx_ac_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10697b3115f2SLuciano Coelho 		      u8 ac, u8 cw_min, u16 cw_max, u8 aifsn, u16 txop);
10707b3115f2SLuciano Coelho int wl1271_acx_tid_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10717b3115f2SLuciano Coelho 		       u8 queue_id, u8 channel_type,
10727b3115f2SLuciano Coelho 		       u8 tsid, u8 ps_scheme, u8 ack_policy,
10737b3115f2SLuciano Coelho 		       u32 apsd_conf0, u32 apsd_conf1);
10747b3115f2SLuciano Coelho int wl1271_acx_frag_threshold(struct wl1271 *wl, u32 frag_threshold);
10757b3115f2SLuciano Coelho int wl1271_acx_tx_config_options(struct wl1271 *wl);
10767b3115f2SLuciano Coelho int wl12xx_acx_mem_cfg(struct wl1271 *wl);
10777b3115f2SLuciano Coelho int wl1271_acx_init_mem_config(struct wl1271 *wl);
10787b3115f2SLuciano Coelho int wl1271_acx_init_rx_interrupt(struct wl1271 *wl);
10797b3115f2SLuciano Coelho int wl1271_acx_smart_reflex(struct wl1271 *wl);
10807b3115f2SLuciano Coelho int wl1271_acx_bet_enable(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10817b3115f2SLuciano Coelho 			  bool enable);
10827b3115f2SLuciano Coelho int wl1271_acx_arp_ip_filter(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10837b3115f2SLuciano Coelho 			     u8 enable, __be32 address);
10847b3115f2SLuciano Coelho int wl1271_acx_pm_config(struct wl1271 *wl);
10857b3115f2SLuciano Coelho int wl1271_acx_keep_alive_mode(struct wl1271 *wl, struct wl12xx_vif *vif,
10867b3115f2SLuciano Coelho 			       bool enable);
10877b3115f2SLuciano Coelho int wl1271_acx_keep_alive_config(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10887b3115f2SLuciano Coelho 				 u8 index, u8 tpl_valid);
10897b3115f2SLuciano Coelho int wl1271_acx_rssi_snr_trigger(struct wl1271 *wl, struct wl12xx_vif *wlvif,
10907b3115f2SLuciano Coelho 				bool enable, s16 thold, u8 hyst);
10917b3115f2SLuciano Coelho int wl1271_acx_rssi_snr_avg_weights(struct wl1271 *wl,
10927b3115f2SLuciano Coelho 				    struct wl12xx_vif *wlvif);
10937b3115f2SLuciano Coelho int wl1271_acx_set_ht_capabilities(struct wl1271 *wl,
10947b3115f2SLuciano Coelho 				    struct ieee80211_sta_ht_cap *ht_cap,
10957b3115f2SLuciano Coelho 				    bool allow_ht_operation, u8 hlid);
10967b3115f2SLuciano Coelho int wl1271_acx_set_ht_information(struct wl1271 *wl,
10977b3115f2SLuciano Coelho 				   struct wl12xx_vif *wlvif,
10987b3115f2SLuciano Coelho 				   u16 ht_operation_mode);
10997b3115f2SLuciano Coelho int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl,
11007b3115f2SLuciano Coelho 				       struct wl12xx_vif *wlvif);
11017b3115f2SLuciano Coelho int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
110242c7372aSMaxim Altshul 				       u16 ssn, bool enable, u8 peer_hlid,
110342c7372aSMaxim Altshul 				       u8 win_size);
11047b3115f2SLuciano Coelho int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif,
11057b3115f2SLuciano Coelho 			u64 *mactime);
11067b3115f2SLuciano Coelho int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif,
11077b3115f2SLuciano Coelho 			       bool enable);
11087b3115f2SLuciano Coelho int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl, struct wl12xx_vif *wlvif);
11097b3115f2SLuciano Coelho int wl12xx_acx_config_ps(struct wl1271 *wl, struct wl12xx_vif *wlvif);
1110028e7243SEliad Peller int wl1271_acx_set_inconnection_sta(struct wl1271 *wl,
1111028e7243SEliad Peller 				    struct wl12xx_vif *wlvif, u8 *addr);
11127b3115f2SLuciano Coelho int wl1271_acx_fm_coex(struct wl1271 *wl);
11137b3115f2SLuciano Coelho int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl);
11147b3115f2SLuciano Coelho int wl12xx_acx_config_hangover(struct wl1271 *wl);
11150a9ffac0SNadim Zubidat int wlcore_acx_average_rssi(struct wl1271 *wl, struct wl12xx_vif *wlvif,
11160a9ffac0SNadim Zubidat 			    s8 *avg_rssi);
11174161923aSEyal Shapira 
1118c21eebb5SEyal Shapira int wl1271_acx_default_rx_filter_enable(struct wl1271 *wl, bool enable,
1119c21eebb5SEyal Shapira 					enum rx_filter_action action);
1120c21eebb5SEyal Shapira int wl1271_acx_set_rx_filter(struct wl1271 *wl, u8 index, bool enable,
1121c21eebb5SEyal Shapira 			     struct wl12xx_rx_filter *filter);
11227b3115f2SLuciano Coelho #endif /* __WL1271_ACX_H__ */
1123