/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2007-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2007-2009 Marvell Semiconductor, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
* redistribution must be conditioned upon including a substantially
* similar Disclaimer requirement for further binary redistribution.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
*/
/*
* Definitions for the Marvell Wireless LAN controller Hardware Access Layer.
*/
#ifndef _MWL_REG_H
#define _MWL_REG_H
#ifdef __cplusplus
extern "C" {
#endif
/*
*/
/*
* Define total number of TX queues in the shared memory.
* This count includes the EDCA queues, Block Ack queues, and HCCA queues
* In addition to this, there could be a management packet queue some
* time in the future
*/
#define NUM_HCCA_QUEUES 0
#define NUM_BA_QUEUES 0
#define NUM_MGMT_QUEUES 0
#define TOTAL_TX_QUEUES \
(NUM_EDCA_QUEUES + \
NUM_HCCA_QUEUES + \
NUM_BA_QUEUES + \
NUM_MGMT_QUEUES + \
/*
* Firmware download support.
*/
/*
* Map to 0x80000000 (Bus control) on BAR0
*/
/* From host to ARM */
/* From ARM to host */
/* Map to 0x80000000 on BAR1 */
/* Bit definitio for MACREG_REG_A2H_INTERRUPT_CAUSE (A2HRIC) */
/* Bit definitio for MACREG_REG_H2A_INTERRUPT_CAUSE (H2ARIC) */
/* INT code register event definition */
/*
*/
/*
* The following mode signature has to be written to PCI scratch register#0
* right after successfully downloading the last block of firmware and
* before waiting for firmware ready signature
*/
/* SoftAP command code */
/*
* @HWENCR@
* Command to update firmware encryption keys.
*/
/*
* @11E-BA@
*/
/*
* Define general result code for each command
*/
/* RESULT OK */
/* Genenral error */
/* Command is not valid */
/* Command is pending (will be processed) */
/* System is busy (command ignored) */
/* Data buffer is not big enough */
/*
* Definition of action or option for each command
*/
/*
* Define general purpose action
*/
/* Define action or option for HostCmd_FW_USE_FIXED_RATE */
/* Define action or option for HostCmd_CMD_802_11_SET_WEP */
/*
* PUBLIC DEFINITIONS
*/
#pragma pack(1)
struct mwl_ant_info {
};
/*
*
* NB: tx descriptor size must match f/w expected size
* because f/w prefetch's the next descriptor linearly
* and doesn't chase the next pointer.
*/
struct mwl_txdesc {
/* NB: 3 is reserved */
};
struct mwl_rxdesc {
/* control element */
/* received signal strengt indication */
/* status field w/ USED bit */
/* channel # pkt received on */
/* total length of received data */
/* not used */
/* received data rate */
/* physical address of payload data */
/* physical address of next RX desc */
/* received QosCtrl field variable */
/* like name states */
#ifdef MWL_ANT_INFO_SUPPORT
/* antenna info */
#endif
};
#pragma pack()
// =============================================================================
// HOST COMMAND DEFINITIONS
// =============================================================================
//
// Definition of data structure for each command
//
// Define general data structure
#pragma pack(1)
typedef struct {
#ifdef MWL_MBSS_SUPPORT
#else
#endif
} FWCmdHdr;
typedef struct {
typedef struct {
/* version of the HW */
/* host interface */
/* Max. number of WCB FW can handle */
/* MaxNbr of MC addresses FW can handle */
/* MAC address programmed in HW */
/* Number of antenna used */
/* 4 byte of FW release number */
typedef struct {
/* HW revision */
/* Host interface */
/* Max. number of Multicast address FW can handle */
/* MAC address */
/* Region Code */
/* 4 byte of FW release number */
/* Firmware awake cookie */
/* Device capabilities (see above) */
/* Rx shared memory queue */
/* TX queues in WcbBase array */
/* TX WCB Rings */
typedef struct {
#ifdef MWL_MBSS_SUPPORT
#define WL_MAC_TYPE_PRIMARY_CLIENT 0
#endif
typedef struct {
struct {
} AddHtInfo;
} PeerInfo_t;
typedef struct {
/* Define data structure for HostCmd_CMD_802_11_RF_ANTENNA */
typedef struct _HostCmd_DS_802_11_RF_ANTENNA {
/* Number of antennas or 0xffff(diversity) */
/* Define data structure for HostCmd_CMD_802_11_RADIO_CONTROL */
typedef struct {
/*
*/
/* for HostCmd_CMD_SET_WMM_MODE */
typedef struct {
/* 0->unset, 1->set */
/* bits 0-5 specify frequency band */
/* bits 6-10 specify channel width */
/* bits 11-12 specify extension channel */
/* bits 13-31 are reserved */
#define FIXED_RATE_WITH_AUTO_RATE_DROP 0
#define LEGACY_RATE_TYPE 0
#define RETRY_COUNT_VALID 0
// Define data structure for HostCmd_CMD_802_11_RF_CHANNEL
typedef struct {
/* Define data structure for HostCmd_CMD_802_11_RF_TX_POWER */
typedef struct {
typedef struct {
/*
* lower rate after the retry count
* 0: legacy, 1: HT
*/
/*
* 0: retry count is not valid
* 1: use retry count specified
*/
typedef struct {
/* legacy rate(not index) or an MCS code */
typedef struct {
/*
* HostCmd_ACT_GEN_GET 0x0000
* HostCmd_ACT_GEN_SET 0x0001
* HostCmd_ACT_NOT_USE_FIXED_RATE 0x0002
*/
/* use fixed rate specified but firmware can drop */
/* Define data structure for HostCmd_CMD_SET_RATE_ADAPT_MODE */
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
typedef struct {
/* Define data structure for HostCmd_CMD_SET_LINKADAPT_CS_MODE */
typedef struct {
typedef struct {
#ifdef MWL_MBSS_SUPPORT
#endif
/*
* @HWENCR@
* Hardware Encryption related data structures and constant definitions.
* Note that all related changes are marked with the @HWENCR@ tag.
*/
/*
* flags used in structure - same as driver EKF_XXX flags
*/
/* indicate key is in use */
/* Group key for RX only */
/* Group key for TX */
/* pairwise */
/* only used for RX */
/*
* These flags are new additions - for hardware encryption commands only
*/
/* Key is for Authenticator */
/* Sequence counters valid */
/* Tx key for WEP */
/*
* Key material definitions (for WEP, TKIP, & AES-CCMP)
*/
/*
* WEP Key material definition
* ----------------------------
* WEPKey --> An array of 'MAX_ENCR_KEY_LENGTH' bytes.
* Note that we do not support 152bit WEP keys
*/
typedef struct {
/* WEP key material (max 128bit) */
} WEP_TYPE_KEY;
/*
* TKIP Key material definition
* ----------------------------
* This structure defines TKIP key material. Note that
* the TxMicKey and RxMicKey may or may not be valid.
*/
/*
* TKIP Sequence counter - 24 bits
* Incremented on each fragment MPDU
*/
typedef struct {
/*
* TKIP Key material. Key type (group or pairwise key) is
* determined by flags in KEY_PARAM_SET structure
*/
typedef struct {
/*
* AES-CCMP Key material definition
* --------------------------------
* This structure defines AES-CCMP key material.
*/
typedef struct {
/* AES Key material */
} AES_TYPE_KEY;
/*
* UPDATE_ENCRYPTION command action type.
*/
typedef enum {
/* request to set encryption key */
/* request to remove one or more keys */
/*
* Encryption key definition.
* --------------------------
*/
typedef struct {
union { /* Key material (variable size array) */
} Key;
#ifdef MWL_MBSS_SUPPORT
#endif
typedef struct {
#ifndef MWL_MBSS_SUPPORT
#endif
#pragma pack()
#ifdef __cplusplus
}
#endif
#endif /* _MWL_REG_H */