linux/drivers/net/wireless/ti/wl1251/acx.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * This file is part of wl1251
 *
 * Copyright (c) 1998-2007 Texas Instruments Incorporated
 * Copyright (C) 2008 Nokia Corporation
 */

#ifndef __WL1251_ACX_H__
#define __WL1251_ACX_H__

#include "wl1251.h"
#include "cmd.h"

/* Target's information element */
struct acx_header {} __packed;

struct acx_error_counter {} __packed;

struct acx_revision {} __packed;

enum wl1251_psm_mode {};

struct acx_sleep_auth {} __packed;

enum {};

#define DEFAULT_UCAST_PRIORITY
#define DEFAULT_RX_Q_PRIORITY
#define DEFAULT_NUM_STATIONS
#define DEFAULT_RXQ_PRIORITY
#define DEFAULT_RXQ_TYPE
#define TRACE_BUFFER_MAX_SIZE

#define DP_RX_PACKET_RING_CHUNK_SIZE
#define DP_TX_PACKET_RING_CHUNK_SIZE
#define DP_RX_PACKET_RING_CHUNK_NUM
#define DP_TX_PACKET_RING_CHUNK_NUM
#define DP_TX_COMPLETE_TIME_OUT
#define FW_TX_CMPLT_BLOCK_SIZE

struct acx_data_path_params {} __packed;


struct acx_data_path_params_resp {} __packed;

#define TX_MSDU_LIFETIME_MIN
#define TX_MSDU_LIFETIME_MAX
#define TX_MSDU_LIFETIME_DEF
#define RX_MSDU_LIFETIME_MIN
#define RX_MSDU_LIFETIME_MAX
#define RX_MSDU_LIFETIME_DEF

struct acx_rx_msdu_lifetime {} __packed;

/*
 * RX Config Options Table
 * Bit		Definition
 * ===		==========
 * 31:14		Reserved
 * 13		Copy RX Status - when set, write three receive status words
 * 	 	to top of rx'd MPDUs.
 * 		When cleared, do not write three status words (added rev 1.5)
 * 12		Reserved
 * 11		RX Complete upon FCS error - when set, give rx complete
 *	 	interrupt for FCS errors, after the rx filtering, e.g. unicast
 *	 	frames not to us with FCS error will not generate an interrupt.
 * 10		SSID Filter Enable - When set, the WiLink discards all beacon,
 *	        probe request, and probe response frames with an SSID that does
 *		not match the SSID specified by the host in the START/JOIN
 *		command.
 *		When clear, the WiLink receives frames with any SSID.
 * 9		Broadcast Filter Enable - When set, the WiLink discards all
 * 	 	broadcast frames. When clear, the WiLink receives all received
 *		broadcast frames.
 * 8:6		Reserved
 * 5		BSSID Filter Enable - When set, the WiLink discards any frames
 * 	 	with a BSSID that does not match the BSSID specified by the
 *		host.
 *		When clear, the WiLink receives frames from any BSSID.
 * 4		MAC Addr Filter - When set, the WiLink discards any frames
 * 	 	with a destination address that does not match the MAC address
 *		of the adaptor.
 *		When clear, the WiLink receives frames destined to any MAC
 *		address.
 * 3		Promiscuous - When set, the WiLink receives all valid frames
 * 	 	(i.e., all frames that pass the FCS check).
 *		When clear, only frames that pass the other filters specified
 *		are received.
 * 2		FCS - When set, the WiLink includes the FCS with the received
 *	 	frame.
 *		When cleared, the FCS is discarded.
 * 1		PLCP header - When set, write all data from baseband to frame
 * 	 	buffer including PHY header.
 * 0		Reserved - Always equal to 0.
 *
 * RX Filter Options Table
 * Bit		Definition
 * ===		==========
 * 31:12		Reserved - Always equal to 0.
 * 11		Association - When set, the WiLink receives all association
 *		related frames (association request/response, reassociation
 *		request/response, and disassociation). When clear, these frames
 *		are discarded.
 * 10		Auth/De auth - When set, the WiLink receives all authentication
 * 	 	and de-authentication frames. When clear, these frames are
 *		discarded.
 * 9		Beacon - When set, the WiLink receives all beacon frames.
 * 	 	When clear, these frames are discarded.
 * 8		Contention Free - When set, the WiLink receives all contention
 * 	 	free frames.
 *		When clear, these frames are discarded.
 * 7		Control - When set, the WiLink receives all control frames.
 * 	 	When clear, these frames are discarded.
 * 6		Data - When set, the WiLink receives all data frames.
 * 	 	When clear, these frames are discarded.
 * 5		FCS Error - When set, the WiLink receives frames that have FCS
 *	 	errors.
 *		When clear, these frames are discarded.
 * 4		Management - When set, the WiLink receives all management
 *		frames.
 * 	 	When clear, these frames are discarded.
 * 3		Probe Request - When set, the WiLink receives all probe request
 * 	 	frames.
 *		When clear, these frames are discarded.
 * 2		Probe Response - When set, the WiLink receives all probe
 * 		response frames.
 *		When clear, these frames are discarded.
 * 1		RTS/CTS/ACK - When set, the WiLink receives all RTS, CTS and ACK
 * 	 	frames.
 *		When clear, these frames are discarded.
 * 0		Rsvd Type/Sub Type - When set, the WiLink receives all frames
 * 	 	that have reserved frame types and sub types as defined by the
 *		802.11 specification.
 *		When clear, these frames are discarded.
 */
struct acx_rx_config {} __packed;

enum {};

#define MAX_NUM_OF_AC
#define FIRST_AC_INDEX
#define MAX_NUM_OF_802_1d_TAGS
#define AC_PARAMS_MAX_TSID
#define MAX_APSD_CONF

#define QOS_TX_HIGH_MIN
#define QOS_TX_HIGH_MAX

#define QOS_TX_HIGH_BK_DEF
#define QOS_TX_HIGH_BE_DEF
#define QOS_TX_HIGH_VI_DEF
#define QOS_TX_HIGH_VO_DEF

#define QOS_TX_LOW_BK_DEF
#define QOS_TX_LOW_BE_DEF
#define QOS_TX_LOW_VI_DEF
#define QOS_TX_LOW_VO_DEF

struct acx_tx_queue_qos_config {} __packed;

struct acx_packet_detection {} __packed;


enum acx_slot_type {};

#define STATION_WONE_INDEX

struct acx_slot {} __packed;


#define ACX_MC_ADDRESS_GROUP_MAX
#define ACX_MC_ADDRESS_GROUP_MAX_LEN

struct acx_dot11_grp_addr_tbl {} __packed;


#define RX_TIMEOUT_PS_POLL_MIN
#define RX_TIMEOUT_PS_POLL_MAX
#define RX_TIMEOUT_PS_POLL_DEF
#define RX_TIMEOUT_UPSD_MIN
#define RX_TIMEOUT_UPSD_MAX
#define RX_TIMEOUT_UPSD_DEF

struct acx_rx_timeout {} __packed;

#define RTS_THRESHOLD_MIN
#define RTS_THRESHOLD_MAX
#define RTS_THRESHOLD_DEF

struct acx_rts_threshold {} __packed;

enum wl1251_acx_low_rssi_type {};

struct acx_low_rssi {} __packed;

struct acx_beacon_filter_option {} __packed;

/*
 * ACXBeaconFilterEntry (not 221)
 * Byte Offset     Size (Bytes)    Definition
 * ===========     ============    ==========
 * 0				1               IE identifier
 * 1               1               Treatment bit mask
 *
 * ACXBeaconFilterEntry (221)
 * Byte Offset     Size (Bytes)    Definition
 * ===========     ============    ==========
 * 0               1               IE identifier
 * 1               1               Treatment bit mask
 * 2               3               OUI
 * 5               1               Type
 * 6               2               Version
 *
 *
 * Treatment bit mask - The information element handling:
 * bit 0 - The information element is compared and transferred
 * in case of change.
 * bit 1 - The information element is transferred to the host
 * with each appearance or disappearance.
 * Note that both bits can be set at the same time.
 */
#define BEACON_FILTER_TABLE_MAX_IE_NUM
#define BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM
#define BEACON_FILTER_TABLE_IE_ENTRY_SIZE
#define BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE
#define BEACON_FILTER_TABLE_MAX_SIZE

#define BEACON_RULE_PASS_ON_CHANGE
#define BEACON_RULE_PASS_ON_APPEARANCE

#define BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN

struct acx_beacon_filter_ie_table {} __packed;

#define SYNCH_FAIL_DEFAULT_THRESHOLD
#define NO_BEACON_DEFAULT_TIMEOUT

struct acx_conn_monit_params {} __packed;

enum {};

struct acx_bt_wlan_coex {} __packed;

#define PTA_ANTENNA_TYPE_DEF
#define PTA_BT_HP_MAXTIME_DEF
#define PTA_WLAN_HP_MAX_TIME_DEF
#define PTA_SENSE_DISABLE_TIMER_DEF
#define PTA_PROTECTIVE_RX_TIME_DEF
#define PTA_PROTECTIVE_TX_TIME_DEF
#define PTA_TIMEOUT_NEXT_BT_LP_PACKET_DEF
#define PTA_SIGNALING_TYPE_DEF
#define PTA_AFH_LEVERAGE_ON_DEF
#define PTA_NUMBER_QUIET_CYCLE_DEF
#define PTA_MAX_NUM_CTS_DEF
#define PTA_NUMBER_OF_WLAN_PACKETS_DEF
#define PTA_NUMBER_OF_BT_PACKETS_DEF
#define PTA_PROTECTIVE_RX_TIME_FAST_DEF
#define PTA_PROTECTIVE_TX_TIME_FAST_DEF
#define PTA_CYCLE_TIME_FAST_DEF
#define PTA_RX_FOR_AVALANCHE_DEF
#define PTA_ELP_HP_DEF
#define PTA_ANTI_STARVE_PERIOD_DEF
#define PTA_ANTI_STARVE_NUM_CYCLE_DEF
#define PTA_ALLOW_PA_SD_DEF
#define PTA_TIME_BEFORE_BEACON_DEF
#define PTA_HPDM_MAX_TIME_DEF
#define PTA_TIME_OUT_NEXT_WLAN_DEF
#define PTA_AUTO_MODE_NO_CTS_DEF
#define PTA_BT_HP_RESPECTED_DEF
#define PTA_WLAN_RX_MIN_RATE_DEF
#define PTA_ACK_MODE_DEF

struct acx_bt_wlan_coex_param {} __packed;

#define CCA_THRSH_ENABLE_ENERGY_D
#define CCA_THRSH_DISABLE_ENERGY_D

struct acx_energy_detection {} __packed;

#define BCN_RX_TIMEOUT_DEF_VALUE
#define BROADCAST_RX_TIMEOUT_DEF_VALUE
#define RX_BROADCAST_IN_PS_DEF_VALUE
#define CONSECUTIVE_PS_POLL_FAILURE_DEF

struct acx_beacon_broadcast {} __packed;

struct acx_event_mask {} __packed;

#define CFG_RX_FCS
#define CFG_RX_ALL_GOOD
#define CFG_UNI_FILTER_EN
#define CFG_BSSID_FILTER_EN
#define CFG_MC_FILTER_EN
#define CFG_MC_ADDR0_EN
#define CFG_MC_ADDR1_EN
#define CFG_BC_REJECT_EN
#define CFG_SSID_FILTER_EN
#define CFG_RX_INT_FCS_ERROR
#define CFG_RX_INT_ENCRYPTED
#define CFG_RX_WR_RX_STATUS
#define CFG_RX_FILTER_NULTI
#define CFG_RX_RESERVE
#define CFG_RX_TIMESTAMP_TSF

#define CFG_RX_RSV_EN
#define CFG_RX_RCTS_ACK
#define CFG_RX_PRSP_EN
#define CFG_RX_PREQ_EN
#define CFG_RX_MGMT_EN
#define CFG_RX_FCS_ERROR
#define CFG_RX_DATA_EN
#define CFG_RX_CTL_EN
#define CFG_RX_CF_EN
#define CFG_RX_BCN_EN
#define CFG_RX_AUTH_EN
#define CFG_RX_ASSOC_EN

#define SCAN_PASSIVE
#define SCAN_5GHZ_BAND
#define SCAN_TRIGGERED
#define SCAN_PRIORITY_HIGH

struct acx_fw_gen_frame_rates {} __packed;

/* STA MAC */
struct acx_dot11_station_id {} __packed;

struct acx_feature_config {} __packed;

struct acx_current_tx_power {} __packed;

struct acx_dot11_default_key {} __packed;

struct acx_tsf_info {} __packed;

enum acx_wake_up_event {};

struct acx_wake_up_condition {} __packed;

struct acx_aid {} __packed;

enum acx_preamble_type {};

struct acx_preamble {} __packed;

enum acx_ctsprotect_type {};

struct acx_ctsprotect {} __packed;

struct acx_tx_statistics {}  __packed;

struct acx_rx_statistics {} __packed;

struct acx_dma_statistics {}  __packed;

struct acx_isr_statistics {} __packed;

struct acx_wep_statistics {} __packed;

#define ACX_MISSED_BEACONS_SPREAD

struct acx_pwr_statistics {} __packed;

struct acx_mic_statistics {} __packed;

struct acx_aes_statistics {} __packed;

struct acx_event_statistics {} __packed;

struct acx_ps_statistics {} __packed;

struct acx_rxpipe_statistics {} __packed;

struct acx_statistics {} __packed;

#define ACX_MAX_RATE_CLASSES
#define ACX_RATE_MASK_UNSPECIFIED
#define ACX_RATE_RETRY_LIMIT

struct acx_rate_class {} __packed;

struct acx_rate_policy {} __packed;

struct wl1251_acx_memory {} __packed;


#define ACX_RX_DESC_MIN
#define ACX_RX_DESC_MAX
#define ACX_RX_DESC_DEF
struct wl1251_acx_rx_queue_config {} __packed;

#define ACX_TX_DESC_MIN
#define ACX_TX_DESC_MAX
#define ACX_TX_DESC_DEF
struct wl1251_acx_tx_queue_config {} __packed;

#define MAX_TX_QUEUE_CONFIGS
#define MAX_TX_QUEUES
struct wl1251_acx_config_memory {} __packed;

struct wl1251_acx_mem_map {} __packed;


struct wl1251_acx_wr_tbtt_and_dtim {} __packed;

enum wl1251_acx_bet_mode {};

struct wl1251_acx_bet_enable {} __packed;

#define ACX_IPV4_VERSION
#define ACX_IPV6_VERSION
#define ACX_IPV4_ADDR_SIZE
struct wl1251_acx_arp_filter {} __attribute__((packed));

struct wl1251_acx_ac_cfg {} __packed;


enum wl1251_acx_channel_type {};

enum wl1251_acx_ps_scheme {};

enum wl1251_acx_ack_policy {};

struct wl1251_acx_tid_cfg {} __packed;

/*************************************************************************

    Host Interrupt Register (WiLink -> Host)

**************************************************************************/

/* RX packet is ready in Xfer buffer #0 */
#define WL1251_ACX_INTR_RX0_DATA

/* TX result(s) are in the TX complete buffer */
#define WL1251_ACX_INTR_TX_RESULT

/* OBSOLETE */
#define WL1251_ACX_INTR_TX_XFR

/* RX packet is ready in Xfer buffer #1 */
#define WL1251_ACX_INTR_RX1_DATA

/* Event was entered to Event MBOX #A */
#define WL1251_ACX_INTR_EVENT_A

/* Event was entered to Event MBOX #B */
#define WL1251_ACX_INTR_EVENT_B

/* OBSOLETE */
#define WL1251_ACX_INTR_WAKE_ON_HOST

/* Trace message on MBOX #A */
#define WL1251_ACX_INTR_TRACE_A

/* Trace message on MBOX #B */
#define WL1251_ACX_INTR_TRACE_B

/* Command processing completion */
#define WL1251_ACX_INTR_CMD_COMPLETE

/* Init sequence is done */
#define WL1251_ACX_INTR_INIT_COMPLETE

#define WL1251_ACX_INTR_ALL

enum {};


int wl1251_acx_frame_rates(struct wl1251 *wl, u8 ctrl_rate, u8 ctrl_mod,
			   u8 mgt_rate, u8 mgt_mod);
int wl1251_acx_station_id(struct wl1251 *wl);
int wl1251_acx_default_key(struct wl1251 *wl, u8 key_id);
int wl1251_acx_wake_up_conditions(struct wl1251 *wl, u8 wake_up_event,
				  u8 listen_interval);
int wl1251_acx_sleep_auth(struct wl1251 *wl, u8 sleep_auth);
int wl1251_acx_fw_version(struct wl1251 *wl, char *buf, size_t len);
int wl1251_acx_tx_power(struct wl1251 *wl, int power);
int wl1251_acx_feature_cfg(struct wl1251 *wl, u32 data_flow_options);
int wl1251_acx_mem_map(struct wl1251 *wl,
		       struct acx_header *mem_map, size_t len);
int wl1251_acx_data_path_params(struct wl1251 *wl,
				struct acx_data_path_params_resp *data_path);
int wl1251_acx_rx_msdu_life_time(struct wl1251 *wl, u32 life_time);
int wl1251_acx_rx_config(struct wl1251 *wl, u32 config, u32 filter);
int wl1251_acx_pd_threshold(struct wl1251 *wl);
int wl1251_acx_slot(struct wl1251 *wl, enum acx_slot_type slot_time);
int wl1251_acx_group_address_tbl(struct wl1251 *wl, bool enable,
				 void *mc_list, u32 mc_list_len);
int wl1251_acx_service_period_timeout(struct wl1251 *wl);
int wl1251_acx_rts_threshold(struct wl1251 *wl, u16 rts_threshold);
int wl1251_acx_beacon_filter_opt(struct wl1251 *wl, bool enable_filter);
int wl1251_acx_beacon_filter_table(struct wl1251 *wl);
int wl1251_acx_conn_monit_params(struct wl1251 *wl);
int wl1251_acx_sg_enable(struct wl1251 *wl);
int wl1251_acx_sg_cfg(struct wl1251 *wl);
int wl1251_acx_cca_threshold(struct wl1251 *wl);
int wl1251_acx_bcn_dtim_options(struct wl1251 *wl);
int wl1251_acx_aid(struct wl1251 *wl, u16 aid);
int wl1251_acx_event_mbox_mask(struct wl1251 *wl, u32 event_mask);
int wl1251_acx_low_rssi(struct wl1251 *wl, s8 threshold, u8 weight,
			u8 depth, enum wl1251_acx_low_rssi_type type);
int wl1251_acx_set_preamble(struct wl1251 *wl, enum acx_preamble_type preamble);
int wl1251_acx_cts_protect(struct wl1251 *wl,
			    enum acx_ctsprotect_type ctsprotect);
int wl1251_acx_statistics(struct wl1251 *wl, struct acx_statistics *stats);
int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime);
int wl1251_acx_rate_policies(struct wl1251 *wl);
int wl1251_acx_mem_cfg(struct wl1251 *wl);
int wl1251_acx_wr_tbtt_and_dtim(struct wl1251 *wl, u16 tbtt, u8 dtim);
int wl1251_acx_bet_enable(struct wl1251 *wl, enum wl1251_acx_bet_mode mode,
			  u8 max_consecutive);
int wl1251_acx_arp_ip_filter(struct wl1251 *wl, bool enable, __be32 address);
int wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max,
		      u8 aifs, u16 txop);
int wl1251_acx_tid_cfg(struct wl1251 *wl, u8 queue,
		       enum wl1251_acx_channel_type type,
		       u8 tsid, enum wl1251_acx_ps_scheme ps_scheme,
		       enum wl1251_acx_ack_policy ack_policy);

#endif /* __WL1251_ACX_H__ */