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

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * This file is part of wl1271
 *
 * Copyright (C) 1998-2009 Texas Instruments. All rights reserved.
 * Copyright (C) 2008-2010 Nokia Corporation
 *
 * Contact: Luciano Coelho <[email protected]>
 */

#ifndef __ACX_H__
#define __ACX_H__

#include "wlcore.h"
#include "cmd.h"

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

    Host Interrupt Register (WiLink -> Host)

**************************************************************************/
/* HW Initiated interrupt Watchdog timer expiration */
#define WL1271_ACX_INTR_WATCHDOG
/* Init sequence is done (masked interrupt, detection through polling only ) */
#define WL1271_ACX_INTR_INIT_COMPLETE
/* Event was entered to Event MBOX #A*/
#define WL1271_ACX_INTR_EVENT_A
/* Event was entered to Event MBOX #B*/
#define WL1271_ACX_INTR_EVENT_B
/* Command processing completion*/
#define WL1271_ACX_INTR_CMD_COMPLETE
/* Signaling the host on HW wakeup */
#define WL1271_ACX_INTR_HW_AVAILABLE
/* The MISC bit is used for aggregation of RX, TxComplete and TX rate update */
#define WL1271_ACX_INTR_DATA
/* Trace message on MBOX #A */
#define WL1271_ACX_INTR_TRACE_A
/* Trace message on MBOX #B */
#define WL1271_ACX_INTR_TRACE_B
/* SW FW Initiated interrupt Watchdog timer expiration */
#define WL1271_ACX_SW_INTR_WATCHDOG

#define WL1271_ACX_INTR_ALL

/* all possible interrupts - only appropriate ones will be masked in */
#define WLCORE_ALL_INTR_MASK

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

struct acx_error_counter {} __packed;

enum wl12xx_role {};

enum wl1271_psm_mode {};

struct acx_sleep_auth {} __packed;

enum {};

#define DEFAULT_UCAST_PRIORITY
#define DEFAULT_RX_Q_PRIORITY
#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 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;

enum acx_slot_type {};

#define STATION_WONE_INDEX

struct acx_slot {} __packed;


#define ACX_MC_ADDRESS_GROUP_MAX
#define ADDRESS_GROUP_MAX_LEN

struct acx_dot11_grp_addr_tbl {} __packed;

struct acx_rx_timeout {} __packed;

struct acx_rts_threshold {} __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

struct acx_beacon_filter_ie_table {} __packed;

struct acx_conn_monit_params {} __packed;

struct acx_bt_wlan_coex {} __packed;

struct acx_bt_wlan_coex_param {} __packed;

struct acx_dco_itrim_params {} __packed;

struct acx_energy_detection {} __packed;

struct acx_beacon_broadcast {} __packed;

struct acx_event_mask {} __packed;

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

/* When set, disable HW encryption */
#define DF_ENCRYPTION_DISABLE
#define DF_SNIFF_MODE_ENABLE

struct acx_feature_config {} __packed;

struct acx_current_tx_power {} __packed;

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_rate_class {};

struct acx_rate_policy {} __packed;

struct acx_ac_cfg {} __packed;

struct acx_tid_config {} __packed;

struct acx_frag_threshold {} __packed;

struct acx_tx_config_options {} __packed;

struct wl12xx_acx_config_memory {} __packed;

struct wl1271_acx_mem_map {} __packed;

struct wl1271_acx_rx_config_opt {} __packed;


struct wl1271_acx_bet_enable {} __packed;

#define ACX_IPV4_VERSION
#define ACX_IPV6_VERSION
#define ACX_IPV4_ADDR_SIZE

/* bitmap of enabled arp_filter features */
#define ACX_ARP_FILTER_ARP_FILTERING
#define ACX_ARP_FILTER_AUTO_ARP

struct wl1271_acx_arp_filter {} __packed;

struct wl1271_acx_pm_config {} __packed;

struct wl1271_acx_keep_alive_mode {} __packed;

enum {};

enum {};

struct wl1271_acx_keep_alive_config {} __packed;

/* TODO: maybe this needs to be moved somewhere else? */
#define HOST_IF_CFG_RX_FIFO_ENABLE
#define HOST_IF_CFG_TX_EXTRA_BLKS_SWAP
#define HOST_IF_CFG_TX_PAD_TO_SDIO_BLK
#define HOST_IF_CFG_RX_PAD_TO_SDIO_BLK
#define HOST_IF_CFG_ADD_RX_ALIGNMENT

enum {};

enum {};

enum {};

enum {};

enum {};

struct wl1271_acx_rssi_snr_trigger {};

struct wl1271_acx_rssi_snr_avg_weights {};


/* special capability bit (not employed by the 802.11n spec) */
#define WL12XX_HT_CAP_HT_OPERATION

/*
 * ACX_PEER_HT_CAP
 * Configure HT capabilities - declare the capabilities of the peer
 * we are connected to.
 */
struct wl1271_acx_ht_capabilities {} __packed;

/*
 * ACX_HT_BSS_OPERATION
 * Configure HT capabilities - AP rules for behavior in the BSS.
 */
struct wl1271_acx_ht_information {} __packed;

struct wl1271_acx_ba_initiator_policy {} __packed;

struct wl1271_acx_ba_receiver_setup {} __packed;

struct wl12xx_acx_fw_tsf_information {} __packed;

struct wl1271_acx_ps_rx_streaming {} __packed;

struct wl1271_acx_ap_max_tx_retry {} __packed;

struct wl1271_acx_config_ps {} __packed;

struct wl1271_acx_inconnection_sta {} __packed;

/*
 * ACX_FM_COEX_CFG
 * set the FM co-existence parameters.
 */
struct wl1271_acx_fm_coex {} __packed;

#define ACX_RATE_MGMT_ALL_PARAMS
struct wl12xx_acx_set_rate_mgmt_params {} __packed;

struct wl12xx_acx_config_hangover {} __packed;


struct acx_default_rx_filter {} __packed;


struct acx_rx_filter_cfg {} __packed;

struct acx_roaming_stats {} __packed;

enum {};


int wl1271_acx_wake_up_conditions(struct wl1271 *wl,
				  struct wl12xx_vif *wlvif,
				  u8 wake_up_event, u8 listen_interval);
int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth);
int wl1271_acx_tx_power(struct wl1271 *wl, struct wl12xx_vif *wlvif,
			int power);
int wl1271_acx_feature_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl1271_acx_mem_map(struct wl1271 *wl,
		       struct acx_header *mem_map, size_t len);
int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl);
int wl1271_acx_slot(struct wl1271 *wl, struct wl12xx_vif *wlvif,
		    enum acx_slot_type slot_time);
int wl1271_acx_group_address_tbl(struct wl1271 *wl, struct wl12xx_vif *wlvif,
				 bool enable, void *mc_list, u32 mc_list_len);
int wl1271_acx_service_period_timeout(struct wl1271 *wl,
				      struct wl12xx_vif *wlvif);
int wl1271_acx_rts_threshold(struct wl1271 *wl, struct wl12xx_vif *wlvif,
			     u32 rts_threshold);
int wl1271_acx_dco_itrim_params(struct wl1271 *wl);
int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, struct wl12xx_vif *wlvif,
				 bool enable_filter);
int wl1271_acx_beacon_filter_table(struct wl1271 *wl,
				   struct wl12xx_vif *wlvif);
int wl1271_acx_conn_monit_params(struct wl1271 *wl, struct wl12xx_vif *wlvif,
				 bool enable);
int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable);
int wl12xx_acx_sg_cfg(struct wl1271 *wl);
int wl1271_acx_cca_threshold(struct wl1271 *wl);
int wl1271_acx_bcn_dtim_options(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl1271_acx_aid(struct wl1271 *wl, struct wl12xx_vif *wlvif, u16 aid);
int wl1271_acx_event_mbox_mask(struct wl1271 *wl, u32 event_mask);
int wl1271_acx_set_preamble(struct wl1271 *wl, struct wl12xx_vif *wlvif,
			    enum acx_preamble_type preamble);
int wl1271_acx_cts_protect(struct wl1271 *wl, struct wl12xx_vif *wlvif,
			   enum acx_ctsprotect_type ctsprotect);
int wl1271_acx_statistics(struct wl1271 *wl, void *stats);
int wl1271_acx_sta_rate_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl1271_acx_ap_rate_policy(struct wl1271 *wl, struct conf_tx_rate_class *c,
		      u8 idx);
int wl1271_acx_ac_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif,
		      u8 ac, u8 cw_min, u16 cw_max, u8 aifsn, u16 txop);
int wl1271_acx_tid_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif,
		       u8 queue_id, u8 channel_type,
		       u8 tsid, u8 ps_scheme, u8 ack_policy,
		       u32 apsd_conf0, u32 apsd_conf1);
int wl1271_acx_frag_threshold(struct wl1271 *wl, u32 frag_threshold);
int wl1271_acx_tx_config_options(struct wl1271 *wl);
int wl12xx_acx_mem_cfg(struct wl1271 *wl);
int wl1271_acx_init_mem_config(struct wl1271 *wl);
int wl1271_acx_init_rx_interrupt(struct wl1271 *wl);
int wl1271_acx_smart_reflex(struct wl1271 *wl);
int wl1271_acx_bet_enable(struct wl1271 *wl, struct wl12xx_vif *wlvif,
			  bool enable);
int wl1271_acx_arp_ip_filter(struct wl1271 *wl, struct wl12xx_vif *wlvif,
			     u8 enable, __be32 address);
int wl1271_acx_pm_config(struct wl1271 *wl);
int wl1271_acx_keep_alive_mode(struct wl1271 *wl, struct wl12xx_vif *vif,
			       bool enable);
int wl1271_acx_keep_alive_config(struct wl1271 *wl, struct wl12xx_vif *wlvif,
				 u8 index, u8 tpl_valid);
int wl1271_acx_rssi_snr_trigger(struct wl1271 *wl, struct wl12xx_vif *wlvif,
				bool enable, s16 thold, u8 hyst);
int wl1271_acx_rssi_snr_avg_weights(struct wl1271 *wl,
				    struct wl12xx_vif *wlvif);
int wl1271_acx_set_ht_capabilities(struct wl1271 *wl,
				    struct ieee80211_sta_ht_cap *ht_cap,
				    bool allow_ht_operation, u8 hlid);
int wl1271_acx_set_ht_information(struct wl1271 *wl,
				   struct wl12xx_vif *wlvif,
				   u16 ht_operation_mode);
int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl,
				       struct wl12xx_vif *wlvif);
int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
				       u16 ssn, bool enable, u8 peer_hlid,
				       u8 win_size);
int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif,
			u64 *mactime);
int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif,
			       bool enable);
int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl12xx_acx_config_ps(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl1271_acx_set_inconnection_sta(struct wl1271 *wl,
				    struct wl12xx_vif *wlvif, u8 *addr);
int wl1271_acx_fm_coex(struct wl1271 *wl);
int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl);
int wl12xx_acx_config_hangover(struct wl1271 *wl);
int wlcore_acx_average_rssi(struct wl1271 *wl, struct wl12xx_vif *wlvif,
			    s8 *avg_rssi);

int wl1271_acx_default_rx_filter_enable(struct wl1271 *wl, bool enable,
					enum rx_filter_action action);
int wl1271_acx_set_rx_filter(struct wl1271 *wl, u8 index, bool enable,
			     struct wl12xx_rx_filter *filter);
#endif /* __WL1271_ACX_H__ */