linux/drivers/net/wireless/marvell/libertas/host.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * This file function prototypes, data structure
 * and  definitions for all the host/station commands
 */

#ifndef _LBS_HOST_H_
#define _LBS_HOST_H_

#include "types.h"
#include "defs.h"

#define DEFAULT_AD_HOC_CHANNEL

#define CMD_OPTION_WAITFORRSP

/* Host command IDs */

/*
 * Return command are almost always the same as the host command, but with
 * bit 15 set high.  There are a few exceptions, though...
 */
#define CMD_RET(cmd)

/* Return command convention exceptions: */
#define CMD_RET_802_11_ASSOCIATE

/* Command codes */
#define CMD_GET_HW_SPEC
#define CMD_EEPROM_UPDATE
#define CMD_802_11_RESET
#define CMD_802_11_SCAN
#define CMD_802_11_GET_LOG
#define CMD_MAC_MULTICAST_ADR
#define CMD_802_11_AUTHENTICATE
#define CMD_802_11_EEPROM_ACCESS
#define CMD_802_11_ASSOCIATE
#define CMD_802_11_SET_WEP
#define CMD_802_11_GET_STAT
#define CMD_802_3_GET_STAT
#define CMD_802_11_SNMP_MIB
#define CMD_MAC_REG_MAP
#define CMD_BBP_REG_MAP
#define CMD_MAC_REG_ACCESS
#define CMD_BBP_REG_ACCESS
#define CMD_RF_REG_ACCESS
#define CMD_802_11_RADIO_CONTROL
#define CMD_802_11_RF_CHANNEL
#define CMD_802_11_RF_TX_POWER
#define CMD_802_11_RSSI
#define CMD_802_11_RF_ANTENNA
#define CMD_802_11_PS_MODE
#define CMD_802_11_DATA_RATE
#define CMD_RF_REG_MAP
#define CMD_802_11_DEAUTHENTICATE
#define CMD_802_11_REASSOCIATE
#define CMD_MAC_CONTROL
#define CMD_802_11_AD_HOC_START
#define CMD_802_11_AD_HOC_JOIN
#define CMD_802_11_QUERY_TKIP_REPLY_CNTRS
#define CMD_802_11_ENABLE_RSN
#define CMD_802_11_SET_AFC
#define CMD_802_11_GET_AFC
#define CMD_802_11_DEEP_SLEEP
#define CMD_802_11_AD_HOC_STOP
#define CMD_802_11_HOST_SLEEP_CFG
#define CMD_802_11_WAKEUP_CONFIRM
#define CMD_802_11_HOST_SLEEP_ACTIVATE
#define CMD_802_11_BEACON_STOP
#define CMD_802_11_MAC_ADDRESS
#define CMD_802_11_LED_GPIO_CTRL
#define CMD_802_11_BAND_CONFIG
#define CMD_GSPI_BUS_CONFIG
#define CMD_802_11D_DOMAIN_INFO
#define CMD_802_11_KEY_MATERIAL
#define CMD_802_11_SLEEP_PARAMS
#define CMD_802_11_INACTIVITY_TIMEOUT
#define CMD_802_11_SLEEP_PERIOD
#define CMD_802_11_TPC_CFG
#define CMD_802_11_PA_CFG
#define CMD_802_11_FW_WAKE_METHOD
#define CMD_802_11_SUBSCRIBE_EVENT
#define CMD_802_11_RATE_ADAPT_RATESET
#define CMD_802_11_TX_RATE_QUERY
#define CMD_GET_TSF
#define CMD_BT_ACCESS
#define CMD_FWT_ACCESS
#define CMD_802_11_MONITOR_MODE
#define CMD_MESH_ACCESS
#define CMD_MESH_CONFIG_OLD
#define CMD_MESH_CONFIG
#define CMD_SET_BOOT2_VER
#define CMD_FUNC_INIT
#define CMD_FUNC_SHUTDOWN
#define CMD_802_11_BEACON_CTRL

/* For the IEEE Power Save */
#define PS_MODE_ACTION_ENTER_PS
#define PS_MODE_ACTION_EXIT_PS
#define PS_MODE_ACTION_SLEEP_CONFIRMED

#define CMD_ENABLE_RSN
#define CMD_DISABLE_RSN

#define CMD_ACT_GET
#define CMD_ACT_SET

/* Define action or option for CMD_802_11_SET_WEP */
#define CMD_ACT_ADD
#define CMD_ACT_REMOVE

#define CMD_TYPE_WEP_40_BIT
#define CMD_TYPE_WEP_104_BIT

#define CMD_NUM_OF_WEP_KEYS

#define CMD_WEP_KEY_INDEX_MASK

/* Define action or option for CMD_802_11_SCAN */
#define CMD_BSS_TYPE_BSS
#define CMD_BSS_TYPE_IBSS
#define CMD_BSS_TYPE_ANY

/* Define action or option for CMD_802_11_SCAN */
#define CMD_SCAN_TYPE_ACTIVE
#define CMD_SCAN_TYPE_PASSIVE

#define CMD_SCAN_RADIO_TYPE_BG

#define CMD_SCAN_PROBE_DELAY_TIME

/* Define action or option for CMD_MAC_CONTROL */
#define CMD_ACT_MAC_RX_ON
#define CMD_ACT_MAC_TX_ON
#define CMD_ACT_MAC_LOOPBACK_ON
#define CMD_ACT_MAC_WEP_ENABLE
#define CMD_ACT_MAC_INT_ENABLE
#define CMD_ACT_MAC_MULTICAST_ENABLE
#define CMD_ACT_MAC_BROADCAST_ENABLE
#define CMD_ACT_MAC_PROMISCUOUS_ENABLE
#define CMD_ACT_MAC_ALL_MULTICAST_ENABLE
#define CMD_ACT_MAC_STRICT_PROTECTION_ENABLE

/* Event flags for CMD_802_11_SUBSCRIBE_EVENT */
#define CMD_SUBSCRIBE_RSSI_LOW
#define CMD_SUBSCRIBE_SNR_LOW
#define CMD_SUBSCRIBE_FAILCOUNT
#define CMD_SUBSCRIBE_BCNMISS
#define CMD_SUBSCRIBE_RSSI_HIGH
#define CMD_SUBSCRIBE_SNR_HIGH

#define RADIO_PREAMBLE_LONG
#define RADIO_PREAMBLE_SHORT
#define RADIO_PREAMBLE_AUTO

/* Define action or option for CMD_802_11_RF_CHANNEL */
#define CMD_OPT_802_11_RF_CHANNEL_GET
#define CMD_OPT_802_11_RF_CHANNEL_SET

/* Define action or option for CMD_802_11_DATA_RATE */
#define CMD_ACT_SET_TX_AUTO
#define CMD_ACT_SET_TX_FIX_RATE
#define CMD_ACT_GET_TX_RATE

/* Options for CMD_802_11_FW_WAKE_METHOD */
#define CMD_WAKE_METHOD_UNCHANGED
#define CMD_WAKE_METHOD_COMMAND_INT
#define CMD_WAKE_METHOD_GPIO

/* Object IDs for CMD_802_11_SNMP_MIB */
#define SNMP_MIB_OID_BSS_TYPE
#define SNMP_MIB_OID_OP_RATE_SET
#define SNMP_MIB_OID_BEACON_PERIOD
#define SNMP_MIB_OID_DTIM_PERIOD
#define SNMP_MIB_OID_ASSOC_TIMEOUT
#define SNMP_MIB_OID_RTS_THRESHOLD
#define SNMP_MIB_OID_SHORT_RETRY_LIMIT
#define SNMP_MIB_OID_LONG_RETRY_LIMIT
#define SNMP_MIB_OID_FRAG_THRESHOLD
#define SNMP_MIB_OID_11D_ENABLE
#define SNMP_MIB_OID_11H_ENABLE

/* Define action or option for CMD_BT_ACCESS */
enum cmd_bt_access_opts {};

/* Define action or option for CMD_FWT_ACCESS */
enum cmd_fwt_access_opts {};

/* Define action or option for CMD_802_11_HOST_SLEEP_CFG */
enum cmd_wol_cfg_opts {};

/* Define action or option for CMD_MESH_ACCESS */
enum cmd_mesh_access_opts {};

/* Define actions and types for CMD_MESH_CONFIG */
enum cmd_mesh_config_actions {};

enum cmd_mesh_config_types {};

/* Card Event definition */
#define MACREG_INT_CODE_TX_PPA_FREE
#define MACREG_INT_CODE_TX_DMA_DONE
#define MACREG_INT_CODE_LINK_LOST_W_SCAN
#define MACREG_INT_CODE_LINK_LOST_NO_SCAN
#define MACREG_INT_CODE_LINK_SENSED
#define MACREG_INT_CODE_CMD_FINISHED
#define MACREG_INT_CODE_MIB_CHANGED
#define MACREG_INT_CODE_INIT_DONE
#define MACREG_INT_CODE_DEAUTHENTICATED
#define MACREG_INT_CODE_DISASSOCIATED
#define MACREG_INT_CODE_PS_AWAKE
#define MACREG_INT_CODE_PS_SLEEP
#define MACREG_INT_CODE_MIC_ERR_MULTICAST
#define MACREG_INT_CODE_MIC_ERR_UNICAST
#define MACREG_INT_CODE_WM_AWAKE
#define MACREG_INT_CODE_DEEP_SLEEP_AWAKE
#define MACREG_INT_CODE_ADHOC_BCN_LOST
#define MACREG_INT_CODE_HOST_AWAKE
#define MACREG_INT_CODE_STOP_TX
#define MACREG_INT_CODE_START_TX
#define MACREG_INT_CODE_CHANNEL_SWITCH
#define MACREG_INT_CODE_MEASUREMENT_RDY
#define MACREG_INT_CODE_WMM_CHANGE
#define MACREG_INT_CODE_BG_SCAN_REPORT
#define MACREG_INT_CODE_RSSI_LOW
#define MACREG_INT_CODE_SNR_LOW
#define MACREG_INT_CODE_MAX_FAIL
#define MACREG_INT_CODE_RSSI_HIGH
#define MACREG_INT_CODE_SNR_HIGH
#define MACREG_INT_CODE_MESH_AUTO_STARTED
#define MACREG_INT_CODE_FIRMWARE_READY


/* 802.11-related definitions */

/* TxPD descriptor */
struct txpd {} __packed;

/* RxPD Descriptor */
struct rxpd {} __packed;

struct cmd_header {} __packed;

/* Generic structure to hold all key types. */
struct enc_key {};

/* lbs_offset_value */
struct lbs_offset_value {} __packed;

#define MAX_11D_TRIPLETS

struct mrvl_ie_domain_param_set {} __packed;

struct cmd_ds_802_11d_domain_info {} __packed;

/*
 * Define data structure for CMD_GET_HW_SPEC
 * This structure defines the response for the GET_HW_SPEC command
 */
struct cmd_ds_get_hw_spec {} __packed;

struct cmd_ds_802_11_subscribe_event {} __packed;

/*
 * This scan handle Country Information IE(802.11d compliant)
 * Define data structure for CMD_802_11_SCAN
 */
struct cmd_ds_802_11_scan {} __packed;

struct cmd_ds_802_11_scan_rsp {} __packed;

struct cmd_ds_802_11_get_log {} __packed;

struct cmd_ds_mac_control {} __packed;

struct cmd_ds_mac_multicast_adr {} __packed;

struct cmd_ds_802_11_authenticate {} __packed;

struct cmd_ds_802_11_deauthenticate {} __packed;

struct cmd_ds_802_11_associate {} __packed;

struct cmd_ds_802_11_associate_response {} __packed;

struct cmd_ds_802_11_set_wep {} __packed;

struct cmd_ds_802_11_snmp_mib {} __packed;

struct cmd_ds_reg_access {} __packed;

struct cmd_ds_802_11_radio_control {} __packed;

struct cmd_ds_802_11_beacon_control {} __packed;

struct cmd_ds_802_11_sleep_params {} __packed;

struct cmd_ds_802_11_rf_channel {} __packed;

struct cmd_ds_802_11_rssi {} __packed;

struct cmd_ds_802_11_mac_address {} __packed;

struct cmd_ds_802_11_rf_tx_power {} __packed;

/* MONITOR_MODE only exists in OLPC v5 firmware */
struct cmd_ds_802_11_monitor_mode {} __packed;

struct cmd_ds_set_boot2_ver {} __packed;

struct cmd_ds_802_11_fw_wake_method {} __packed;

struct cmd_ds_802_11_ps_mode {} __packed;

struct cmd_confirm_sleep {} __packed;

struct cmd_ds_802_11_data_rate {} __packed;

struct cmd_ds_802_11_rate_adapt_rateset {} __packed;

struct cmd_ds_802_11_ad_hoc_start {} __packed;

struct cmd_ds_802_11_ad_hoc_result {} __packed;

struct adhoc_bssdesc {} __packed;

struct cmd_ds_802_11_ad_hoc_join {} __packed;

struct cmd_ds_802_11_ad_hoc_stop {} __packed;

struct cmd_ds_802_11_enable_rsn {} __packed;

struct MrvlIEtype_keyParamSet {} __packed;

#define MAX_WOL_RULES

struct host_wol_rule {} __packed;

struct wol_config {} __packed;

struct cmd_ds_host_sleep {} __packed;



struct cmd_ds_802_11_key_material {} __packed;

struct cmd_ds_802_11_eeprom_access {} __packed;

struct cmd_ds_802_11_tpc_cfg {} __packed;


struct cmd_ds_802_11_pa_cfg {} __packed;


struct cmd_ds_802_11_led_ctrl {} __packed;

/* Automatic Frequency Control */
struct cmd_ds_802_11_afc {} __packed;

struct cmd_tx_rate_query {} __packed;

struct cmd_ds_get_tsf {} __packed;

struct cmd_ds_bt_access {} __packed;

struct cmd_ds_fwt_access {} __packed;

struct cmd_ds_mesh_config {} __packed;

struct cmd_ds_mesh_access {} __packed;

/* Number of stats counters returned by the firmware */
#define MESH_STATS_NUM
#endif