iwh_hw.h revision e2cf88ac9d753a00c17aa235f6afdc76574fe3a6
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2009, Intel Corporation
* All rights reserved.
*/
/*
* Sun elects to use this software under the BSD license.
*/
/*
* redistributing this file, you may do so under either license.
*
* GPL LICENSE SUMMARY
*
* Copyright(c) 2005 - 2009 Intel Corporation. All rights reserved.
*
* it under the terms of version 2 of the GNU Geeral Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
* USA
*
* The full GNU General Public License is included in this distribution
* in the file called LICENSE.GPL.
*
* Contact Information:
* James P. Ketrenos <ipw2100-admin@linux.intel.com>
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*
* BSD LICENSE
*
* Copyright(c) 2005 - 2009 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* distribution.
* * Neither the name Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 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 MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* 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 DAMAGE.
*/
#ifndef _IWH_HW_H_
#define _IWH_HW_H_
#ifdef __cplusplus
extern "C" {
#endif
/*
*/
#define IWH_MAX_SCATTER (10)
/*
* Flow Handler Definitions
*/
#define FH_MEM_LOWER_BOUND (0x1000)
#define FH_MEM_UPPER_BOUND (0x1EF0)
#define IWH_FH_REGS_LOWER_BOUND (0x1000)
#define IWH_FH_REGS_UPPER_BOUND (0x2000)
/*
* TFDB Area - TFDs buffer table
*/
/*
* channels 0 - 8
*/
/*
* TFDIB Area - TFD Immediate Buffer
*/
/*
* channels 0 - 10
*/
/*
* TFDIB registers used in Service Mode
*/
/*
* Tx service channels
*/
#define FH_MEM_TFDIB_DRAM_ADDR_MSB_MASK (0xF00000000)
#define FH_MEM_TFDIB_DRAM_ADDR_LSB_BITSHIFT (0)
#define FH_MEM_TFDIB_DRAM_ADDR_MSB_BITSHIFT (32)
#define FH_MEM_TFDIB_TB_LENGTH_BITSHIFT (0)
#define FH_MEM_TFDIB_REG0_ADDR_MASK (0xFFFFFFFF)
#define FH_MEM_TFDIB_REG1_ADDR_MASK (0xF0000000)
#define FH_MEM_TFDIB_REG1_LENGTH_MASK (0x0001FFFF)
#define FH_MEM_TFDIB_REG0_ADDR_BITSHIFT (0)
#define FH_MEM_TFDIB_REG1_ADDR_BITSHIFT (28)
#define FH_MEM_TFDIB_REG1_LENGTH_BITSHIFT (0)
#define FH_MEM_TFDIB_DRAM_ADDR_LSB_MASK (0xFFFFFFFF)
/*
* TRB Area - Transmit Request Buffers
*/
/*
* channels 0 - 8
*/
/*
* Keep-Warm (KW) buffer base address.
*
* Driver must allocate a 4KByte buffer that is used by Shirely Peak(SP) for
* keeping the
* host DRAM powered on (via dummy accesses to DRAM) to maintain low-latency
* DRAM access when SP is Txing or Rxing. The dummy accesses prevent host
* from going into a power-savings mode that would cause higher DRAM latency,
* and possible data over/under-runs, before all Tx/Rx is complete.
*
* Driver loads IWH_FH_KW_MEM_ADDR_REG with the physical address (bits 35:4)
* of the buffer, which must be 4K aligned. Once this is set up, the SP
* automatically invokes keep-warm accesses when normal accesses might not
* be sufficient to maintain fast DRAM response.
*
* Bit fields:
* 31-0: Keep-warm buffer physical base address [35:4], must be 4K aligned
*/
/*
* STAGB Area - Scheduler TAG Buffer
*/
/*
* channels 0 - 8
*/
/*
* Tx service channels
*/
#define FH_MEM_STAGB_SRAM_ADDR_MASK (0x00FFFFFF)
/*
* TFD Circular Buffers Base (CBBC) addresses
*
* SP has 16 base pointer registers, one for each of 16 host-DRAM-resident
* (see struct iwh_tfd_frame). These 16 pointer registers are offset by 0x04
* bytes from one another. Each TFD circular buffer in DRAM must be 256-byte
* aligned (address bits 0-7 must be 0).
*
* Bit fields in each pointer register:
* 27-0: TFD CB physical base address [35:8], must be 256-byte aligned
*/
/*
* queues 0 - 15
*/
/*
* TAGR Area - TAG reconstruct table
*/
/*
* TDBGR Area - Tx Debug Registers
*/
/*
* channels 0 - 10
*/
#define FH_MEM_TDBGR_CHNL_REG_0(x) (FH_MEM_TDBGR_CHNL(x))
#define FH_MEM_TDBGR_CHNL_BYTES_TO_FIFO_MASK (0x000FFFFF)
#define FH_MEM_TDBGR_CHNL_BYTES_TO_FIFO_BITSHIFT (0)
/*
* RDBUF Area
*/
#define FH_MEM_RDBUF_CHNL0 (FH_MEM_RDBUF_LOWER_BOUND)
/*
* Rx SRAM Control and Status Registers (RSCSR)
*
* These registers provide handshake between driver and Shirley Peak for
* the Rx queue
* (this queue handles *all* command responses, notifications, Rx data, etc.
* sent from SP uCode to host driver). Unlike Tx, there is only one Rx
* concatenate up to 20 DRAM buffers to form a Tx frame, each Receive Buffer
* Descriptor (RBD) points to only one Rx Buffer (RB); there is a 1:1
* mapping between RBDs and RBs.
*
* Driver must allocate host DRAM memory for the following, and set the
* physical address of each into SP registers:
*
* 1) Receive Buffer Descriptor (RBD) circular buffer (CB), typically with 256
* entries (although any power of 2, up to 4096, is selectable by driver).
* Each entry (1 dword) points to a receive buffer (RB) of consistent size
* (typically 4K, although 8K or 16K are also selectable by driver).
* Driver sets up RB size and number of RBDs in the CB via Rx config
* register FH_MEM_RCSR_CHNL0_CONFIG_REG.
*
* Bit fields within one RBD:
* 27-0: Receive Buffer physical address bits [35:8], 256-byte aligned.
*
* Driver sets physical address [35:8] of base of RBD circular buffer
* into FH_RSCSR_CHNL0_RBDCB_BASE_REG [27:0].
*
* 2) Rx status buffer, 8 bytes, in which SP indicates which Rx Buffers
* (RBs) have been filled, via a "write pointer", actually the index of
* the RB's corresponding RBD within the circular buffer. Driver sets
* physical address [35:4] into FH_RSCSR_CHNL0_STTS_WPTR_REG [31:0].
*
* Bit fields in lower dword of Rx status buffer (upper dword not used
* by driver; see struct iwh_shared, val0):
* 31-12: Not used by driver
* 11- 0: Index of last filled Rx buffer descriptor
* (SP writes, driver reads this value)
*
* As the driver prepares Receive Buffers (RBs) for SP to fill, driver must
* enter pointers to these RBs into contiguous RBD circular buffer entries,
* and update the SP's "write" index register, FH_RSCSR_CHNL0_RBDCB_WPTR_REG.
*
* This "write" index corresponds to the *next* RBD that the driver will make
* available, i.e. one RBD past the the tail of the ready-to-fill RBDs within
* the circular buffer. This value should initially be 0 (before preparing any
* RBs), should be 8 after preparing the first 8 RBs (for example), and must
* wrap back to 0 at the end of the circular buffer (but don't wrap before
* "read" index has advanced past 1! See below).
* NOTE: SP EXPECTS THE WRITE INDEX TO BE INCREMENTED IN MULTIPLES OF 8.
*
* As the SP fills RBs (referenced from contiguous RBDs within the circular
* buffer), it updates the Rx status buffer in DRAM, 2) described above,
* to tell the driver the index of the latest filled RBD. The driver must
* read this "read" index from DRAM after receiving an Rx interrupt from SP.
*
* The driver must also internally keep track of a third index, which is the
* next RBD to process. When receiving an Rx interrupt, driver should process
* all filled but unprocessed RBs up to, but not including, the RB
* corresponding to the "read" index. For example, if "read" index becomes "1",
* driver may process the RB pointed to by RBD 0. Depending on volume of
* traffic, there may be many RBs to process.
*
* If read index == write index, SP thinks there is no room to put new data.
* Due to this, the maximum number of filled RBs is 255, instead of 256. To
* be safe, make sure that there is a gap of at least 2 RBDs between "write"
* and "read" indexes; that is, make sure that there are no more than 254
* buffers waiting to be filled.
*/
#define FH_MEM_RSCSR_CHNL0 (FH_MEM_RSCSR_LOWER_BOUND)
/*
* Physical base address of 8-byte Rx Status buffer.
* Bit fields:
* 31-0: Rx status buffer physical base address [35:4], must 16-byte aligned.
*/
/*
* Physical base address of Rx Buffer Descriptor Circular Buffer.
* Bit fields:
* 27-0: RBD CD physical base address [35:8], must be 256-byte aligned.
*/
/*
* Rx write pointer (index, really!).
* Bit fields:
* 11-0: Index of driver's most recent prepared-to-be-filled RBD, + 1.
* NOTE: For 256-entry circular buffer, use only bits [7:0].
*/
/*
* RSCSR registers used in Service mode
*/
#define FH_RSCSR_CHNL1_RB_WPTR_REG (FH_MEM_RSCSR_CHNL1)
/*
* Rx Config Reg for channel 0 (only channel used)
*
* Driver must initialize FH_MEM_RCSR_CHNL0_CONFIG_REG as follows for
* normal operation (see bit fields).
*
* Clearing FH_MEM_RCSR_CHNL0_CONFIG_REG to 0 turns off Rx DMA.
* Driver should poll FH_MEM_RSSR_RX_STATUS_REG for
* FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (bit 24) before continuing.
*
* Bit fields:
* '10' operate normally
* 29-24: reserved
* 23-20: # RBDs in circular buffer = 2^value; use "8" for 256 RBDs (normal),
* min "5" for 32 RBDs, max "12" for 4096 RBDs.
* 19-18: reserved
* 17-16: size of each receive buffer; '00' 4K (normal), '01' 8K,
* '10' 12K, '11' 16K.
* 15-14: reserved
* 13-12: IRQ destination; '00' none, '01' host driver (normal operation)
* 11- 4: timeout for closing Rx buffer and interrupting host (units 32 usec)
* typical value 0x10 (about 1/2 msec)
* 3- 0: reserved
*/
#define FH_MEM_RCSR_CHNL0 (FH_MEM_RCSR_LOWER_BOUND)
#define FH_MEM_RCSR_CHNL0_RBD_STTS_FRAME_RB_CNT_MASK (0x7FFFFFF0)
/*
* RCSR registers used in Service mode
*/
/*
* Rx Shared Status Registers (RSSR)
*
* After stopping Rx DMA channel (writing 0 to FH_MEM_RCSR_CHNL0_CONFIG_REG),
* driver must poll FH_MEM_RSSR_RX_STATUS_REG until Rx channel is idle.
*
* Bit fields:
* 24: 1 = Channel 0 is idle
*
* FH_MEM_RSSR_SHARED_CTRL_REG and FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV contain
* default values that should not be altered by the driver.
*/
/*
*
* supported in hardware; config regs are separated by 0x20 bytes.
*
* To use a Tx DMA channel, driver must initialize its
*
*
* All other bits should be 0.
*
* Bit fields:
* '10' operate normally
* 29- 4: Reserved, set to "0"
* 3: Enable internal DMA requests (1, normal operation), disable (0)
* 2- 0: Reserved, set to "0"
*/
#define IWH_FH_TCSR_CHNL_NUM (7)
/*
* Tx Shared Status Registers (TSSR)
*
* After stopping Tx DMA channel (writing 0 to
* IWH_FH_TSSR_TX_STATUS_REG until selected Tx channel is idle
* (channel's buffers empty | no pending requests).
*
* Bit fields:
* 31-24: 1 = Channel buffers empty (channel 7:0)
* 23-16: 1 = No pending requests (channel 7:0)
*/
#define IWH_FH_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TXPD_ON (0xFF000000)
#define IWH_FH_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_TXPD_ON (0x00FF0000)
#define IWH_FH_TSSR_TX_MSG_CONFIG_REG_VAL_MAX_FRAG_SIZE_64B (0x00000000)
#define IWH_FH_TSSR_TX_MSG_CONFIG_REG_VAL_MAX_FRAG_SIZE_128B (0x00000400)
#define IWH_FH_TSSR_TX_MSG_CONFIG_REG_VAL_MAX_FRAG_SIZE_256B (0x00000800)
#define IWH_FH_TSSR_TX_MSG_CONFIG_REG_VAL_MAX_FRAG_SIZE_512B (0x00000C00)
#define IWH_FH_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TFD_ON (0x00000100)
#define IWH_FH_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_CBB_ON (0x00000080)
#define IWH_FH_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RSP_WAIT_TH (0x00000020)
#define IWH_FH_TSSR_TX_MSG_CONFIG_REG_VAL_RSP_WAIT_TH (0x00000005)
#define IWH_FH_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_chnl) \
#define IWH_FH_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_chnl) \
#define IWH_FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(_chnl) \
/*
* TFDIB
*/
#define IWH_FH_TFDIB_CTRL1_REG_POS_MSB (28)
#define IWH_FH_TFDIB_CTRL0_REG(_chnl)\
#define IWH_FH_TFDIB_CTRL1_REG(_chnl)\
/*
* Debug Monitor Area
*/
#define FH_TB1_ADDR_LOW_BITSHIFT (0)
#define FH_TB1_ADDR_HIGH_BITSHIFT (32)
#define FH_TB2_ADDR_LOW_BITSHIFT (0)
#define FH_TB2_ADDR_HIGH_BITSHIFT (16)
/*
* number of FH channels including 2 service mode
*/
#define NUM_OF_FH_CHANNELS (10)
/*
* ctrl field bitology
*/
#define FH_TFD_CTRL_PADDING_BITSHIFT (30)
#define FH_TFD_CTRL_NUMTB_BITSHIFT (24)
#define FH_TFD_GET_NUM_TBS(ctrl) \
#define FH_TFD_GET_PADDING(ctrl) \
/*
* TCSR: tx_config register values
*/
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_TXF (0x00000000)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_DRIVER (0x00000001)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_ARC (0x00000002)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL (0x00000008)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_NOINT (0x00000000)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_IFTFD (0x00200000)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_NOINT (0x00000000)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_ENDTFD (0x00400000)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_IFTFD (0x00800000)
#define IWH_FH_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_EMPTY (0x00000000)
#define IWH_FH_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_WAIT (0x00002000)
#define IWH_FH_TCSR_CHNL_TX_BUF_STS_REG_BIT_TFDB_WPTR (0x00000001)
#define IWH_FH_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_NUM (20)
#define IWH_FH_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_IDX (12)
#define IWH_FH_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_VALID (0x00000003)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE (0x80000000)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE_VAL (0x00000000)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_ENDTFD (0x00100000)
#define IWH_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE (0x00000000)
#define IWH_FH_TCSR_CHNL_TX_CONFIG_REG(_chnl)\
#define IWH_FH_TCSR_CHNL_TX_CREDIT_REG(_chnl)\
#define IWH_FH_TCSR_CHNL_TX_BUF_STS_REG(_chnl)\
#define IWH_FH_TCSR_CHNL_NUM (7)
/*
* CBB table
*/
#define FH_CBB_ADDR_BIT_SHIFT (8)
/*
* RCSR: channel 0 rx_config register defines
*/
#define FH_RCSR_RX_CONFIG_RBDCB_SIZE_BITSHIFT (20)
#define FH_RCSR_RX_CONFIG_RB_SIZE_BITSHIFT (16)
#define FH_RCSR_GET_RDBC_SIZE(reg) \
((reg & FH_RCSR_RX_CONFIG_RDBC_SIZE_MASK) >> \
/*
* RCSR: channel 1 rx_config register defines
*/
/*
* RCSR: rx_config register values
*/
#define FH_RCSR_RX_CONFIG_CHNL_EN_PAUSE_VAL (0x00000000)
#define FH_RCSR_RX_CONFIG_CHNL_EN_PAUSE_EOF_VAL (0x40000000)
#define FH_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL (0x80000000)
#define FH_RCSR_RX_CONFIG_SINGLE_FRAME_MODE (0x00008000)
#define FH_RCSR_RX_CONFIG_RDRBD_DISABLE_VAL (0x00000000)
#define FH_RCSR_RX_CONFIG_RDRBD_ENABLE_VAL (0x20000000)
#define IWH_FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K (0x00000000)
#define IWH_TX_RTS_RETRY_LIMIT (60)
#define IWH_TX_DATA_RETRY_LIMIT (15)
#define IWH_FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K (0x00010000)
#define IWH_FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_12K (0x00020000)
#define IWH_FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_16K (0x00030000)
/*
* RCSR channel 0 config register values
*/
#define FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_NO_INT_VAL (0x00000000)
#define FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL (0x00001000)
/*
* RCSR channel 1 config register values
*/
#define FH_RCSR_CHNL1_RX_CONFIG_IRQ_DEST_NO_INT_VAL (0x00000000)
#define FH_RCSR_CHNL1_RX_CONFIG_IRQ_DEST_INT_HOST_VAL (0x00001000)
#define FH_RCSR_CHNL1_RX_CONFIG_IRQ_DEST_INT_RTC_VAL (0x00002000)
#define FH_RCSR_CHNL1_RX_CONFIG_IRQ_DEST_INT_HOST_RTC_VAL (0x00003000)
/*
* RCSR: rb status register defines
*/
/*
* RSCSR: defs used in normal mode
*/
/*
* RSCSR: defs used in service mode
*/
/*
* RSSR: RX Enable Error IRQ to Driver register defines
*/
/*
* RX DRAM status regs definitions
*/
#define FH_RX_RB_NUM_BITSHIFT (0)
#define FH_RX_FRAME_NUM_BITSHIFT (16)
/*
* Tx Scheduler
*
* The Tx Scheduler selects the next frame to be transmitted, chosing TFDs
* (Transmit Frame Descriptors) from up to 16 circular queues resident in
* host DRAM. It steers each frame's Tx command (which contains the frame
* data) through one of up to 7 prioritized Tx DMA FIFO channels within the
* device. A queue maps to only one (selectable by driver) Tx DMA channel,
* but one DMA channel may take input from several queues.
*
* Tx DMA channels have dedicated purposes. For SP, and are used as follows:
* BMC TODO: CONFIRM channel assignments, esp for 0/1
*
* 0 -- EDCA BK (background) frames, lowest priority
* 1 -- EDCA BE (best effort) frames, normal priority
* 2 -- EDCA VI (video) frames, higher priority
* 3 -- EDCA VO (voice) and management frames, highest priority
* 4 -- Commands (e.g. RXON, etc.)
* 5 -- HCCA short frames
* 6 -- HCCA long frames
* 7 -- not used by driver (device-internal only)
*
* support 11n aggregation via EDCA DMA channels. BMC confirm.
*
* The driver sets up each queue to work in one of two modes:
*
* 1) Scheduler-Ack, in which the scheduler automatically supports a
* block-ack (BA) window of up to 64 TFDs. In this mode, each queue
* contains TFDs for a unique combination of Recipient Address (RA)
* and Traffic Identifier (TID), that is, traffic of a given
* Quality-Of-Service (QOS) priority, destined for a single station.
*
* In scheduler-ack mode, the scheduler keeps track of the Tx status of
* each frame within the BA window, including whether it's been transmitted,
* and whether it's been acknowledged by the receiving station. The device
* automatically processes block-acks received from the receiving STA,
* and reschedules un-acked frames to be retransmitted (successful
* Tx completion may end up being out-of-order).
*
* The driver must maintain the queue's Byte Count table in host DRAM
* (struct iwh_sched_queue_byte_cnt_tbl) for this mode.
* This mode does not support fragmentation.
*
* 2) FIFO (a.k.a. non-Scheduler-ACK), in which each TFD is processed in order.
* The device may automatically retry Tx, but will retry only one frame
* at a time, until receiving ACK from receiving station, or reaching
* retry limit and giving up.
*
* The command queue (#4) must use this mode!
* This mode does not require use of the Byte Count table in host DRAM.
*
* Driver controls scheduler operation via 3 means:
* 1) Scheduler registers
* 2) Shared scheduler data base in internal 4956 SRAM
* 3) Shared data in host DRAM
*
* Initialization:
*
* When loading, driver should allocate memory for:
* 1) 16 TFD circular buffers, each with space for (typically) 256 TFDs.
* 2) 16 Byte Count circular buffers in 16 KBytes contiguous memory
* (1024 bytes for each queue).
*
* After receiving "Alive" response from uCode, driver must initialize
* the following (especially for queue #4, the command queue, otherwise
* the driver can't issue commands!):
*
* 1) SP's scheduler data base area in SRAM:
* a) Read SRAM address of data base area from SCD_SRAM_BASE_ADDR
* b) Clear and Init SCD_CONTEXT_DATA_OFFSET area (size 128 bytes)
* c) Clear SCD_TX_STTS_BITMAP_OFFSET area (size 256 bytes)
* d) Clear (BMC and init?) SCD_TRANSLATE_TBL_OFFSET (size 32 bytes)
*
* 2) Init SCD_DRAM_BASE_ADDR with physical base of Tx byte count circular
* buffer array, allocated by driver in host DRAM.
*
* 3)
*/
/*
* Max Tx window size is the max number of contiguous TFDs that the scheduler
* can keep track of at one time when creating block-ack chains of frames.
* Note that "64" matches the number of ack bits in a block-ack.
* Driver should use SCD_WIN_SIZE and SCD_FRAME_LIMIT values to initialize
* SCD_CONTEXT_QUEUE_OFFSET(x) values.
*/
#define SCD_WIN_SIZE 64
#define SCD_FRAME_LIMIT 64
/*
* Driver may need to update queue-empty bits after changing queue's
* write and read pointers (indexes) during (re-)initialization (i.e. when
* scheduler is not tracking what's happening).
* Bit fields:
* 31-16: Write mask -- 1: update empty bit, 0: don't change empty bit
* 15-00: Empty state, one for each queue -- 1: empty, 0: non-empty
* NOTE BMC: THIS REGISTER NOT USED BY LINUX DRIVER.
*/
/*
* Physical base address of array of byte count (BC) circular buffers (CBs).
* Each Tx queue has a BC CB in host DRAM to support Scheduler-ACK mode.
* This register points to BC CB for queue 0, must be on 1024-byte boundary.
* Others are spaced by 1024 bytes.
* Each BC CB is 2 bytes * (256 + 64) = 740 bytes, followed by 384 bytes pad.
* (Index into a queue's BC CB) = (index into queue's TFD CB) = (SSN & 0xff).
* Bit fields:
* 25-00: Byte Count CB physical address [35:10], must be 1024-byte aligned.
*/
/*
* Queue (x) Write Pointers (indexes, really!), one for each Tx queue.
* Initialized and updated by driver as new TFDs are added to queue.
* NOTE: If using Block Ack, index must correspond to frame's
* Start Sequence Number; index = (SSN & 0xff)
* NOTE BMC: Alternative to HBUS_TARG_WRPTR, which is what Linux driver uses?
*/
/*
* Queue (x) Read Pointers (indexes, really!), one for each Tx queue.
* For FIFO mode, index indicates next frame to transmit.
* For Scheduler-ACK mode, index indicates first frame in Tx window.
* Initialized by driver, updated by scheduler.
*/
/*
* Select which queues work in chain mode (1) vs. not (0).
* Use chain mode to build chains of aggregated frames.
* Bit fields:
* 31-16: Reserved
* 15-00: Mode, one bit for each queue -- 1: Chain mode, 0: one-at-a-time
* NOTE: If driver sets up queue for chain mode, it should be also set up
* Scheduler-ACK mode as well, via SCD_QUEUE_STATUS_BITS(x).
*/
/*
* Select which queues interrupt driver when read pointer (index) increments.
* Bit fields:
* 31-16: Reserved
* 15-00: Interrupt enable, one bit for each queue -- 1: enabled, 0: disabled
* NOTE BMC: THIS FUNCTIONALITY IS APPARENTLY A NO-OP.
*/
/*
* SP internal SRAM structures for scheduler, shared with driver ...
* Driver should clear and initialize the following areas after receiving
* "Alive" response from SP uCode, i.e. after initial
* uCode load, or after a uCode load done for error recovery:
*
* SCD_CONTEXT_DATA_OFFSET (size 128 bytes)
* SCD_TX_STTS_BITMAP_OFFSET (size 256 bytes)
* SCD_TRANSLATE_TBL_OFFSET (size 32 bytes)
*
* Driver reads base address of this scheduler area from SCD_SRAM_BASE_ADDR.
* All OFFSET values must be added to this base address.
* Use HBUS_TARG_MEM_* registers to access SRAM.
*/
/*
* Queue context. One 8-byte entry for each of 16 queues.
*
* Driver should clear this entire area (size 0x80) to 0 after receiving
* "Alive" notification from uCode. Additionally, driver should init
* each queue's entry as follows:
*
* LS Dword bit fields:
* 0-06: Max Tx window size for Scheduler-ACK. Driver should init to 64.
*
* MS Dword bit fields:
* 16-22: Frame limit. Driver should init to 10 (0xa).
*
* Driver should init all other bits to 0.
*
* Init must be done after driver receives "Alive" response from SP uCode,
* and when setting up queue for aggregation.
*/
#define SCD_CONTEXT_DATA_OFFSET 0x380
/*
* Tx Status Bitmap
*
* Driver should clear this entire area (size 0x100) to 0 after receiving
* "Alive" notification from uCode. Area is used only by device itself;
* no other support (besides clearing) is required from driver.
*/
#define SCD_TX_STTS_BITMAP_OFFSET 0x400
/*
* RAxTID to queue translation mapping.
*
* When queue is in Scheduler-ACK mode, frames placed in a that queue must be
* for only one combination of receiver address (RA) and traffic ID (TID), i.e.
* one QOS priority level destined for one station (for this link, not final
* destination). The SCD_TRANSLATE_TABLE area provides 16 16-bit mappings,
* one for each of the 16 queues. If queue is not in Scheduler-ACK mode, the
* device ignores the mapping value.
*
* Bit fields, for each 16-bit map:
* 15-9: Reserved, set to 0
* 8-4: Index into device's station table for recipient station
* 3-0: Traffic ID (tid), range 0-15
*
* Driver should clear this entire area (size 32 bytes) to 0 after receiving
* "Alive" notification from uCode. To update a 16-bit map value, driver
* must read a dword-aligned value from device SRAM, replace the 16-bit map
* value of interest, and write the dword value back into device SRAM.
*/
#define SCD_TRANSLATE_TBL_OFFSET 0x500
#define SCD_TRANSLATE_TBL_OFFSET_QUEUE(x) \
/*
*/
#define SCD_MODE_REG_BIT_SEARCH_MODE (1<<0)
#define SCD_TXFIFO_POS_TID (0)
#define SCD_TXFIFO_POS_RA (4)
#define SCD_QUEUE_STTS_REG_POS_SCD_ACK (8)
#define SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN (10)
#define SCD_QUEUE_RA_TID_MAP_RATID_MSK (0x01FF)
#define SCD_QUEUE_CTX_REG1_WIN_SIZE_POS (0)
#define SCD_QUEUE_CTX_REG1_WIN_SIZE_MSK (0x0000007F)
#define SCD_QUEUE_CTX_REG1_CREDIT_POS (8)
#define SCD_QUEUE_CTX_REG1_CREDIT_MSK (0x00FFFF00)
#define SCD_QUEUE_CTX_REG1_SUPER_CREDIT_POS (24)
#define SCD_QUEUE_CTX_REG1_SUPER_CREDIT_MSK (0xFF000000)
#define SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS (16)
#define SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK (0x007F0000)
#define CSR_HW_IF_CONFIG_REG_BIT_KEDRON_R (0x00000010)
#define CSR_HW_IF_CONFIG_REG_MSK_BOARD_VER (0x00000C00)
#define CSR_HW_IF_CONFIG_REG_BIT_MAC_SI (0x00000100)
#define CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI (0x00000200)
#define CSR_HW_IF_CONFIG_REG_EEP_SEM (0x00200000)
#define IWH_CSR_ANA_PLL_CFG (0x00880300)
/* IWH-END */
#define STATISTICS_FLG_CLEAR (0x1)
#define STATISTICS_FLG_DISABLE_NOTIFICATION (0x2)
#define STATISTICS_REPLY_FLG_CLEAR (0x1)
#define STATISTICS_REPLY_FLG_BAND_24G_MSK (0x2)
#define STATISTICS_REPLY_FLG_TGJ_NARROW_BAND_MSK (0x4)
#define STATISTICS_REPLY_FLG_FAT_MODE_MSK (0x8)
#define RX_PHY_FLAGS_ANTENNAE_OFFSET (4)
#define RX_PHY_FLAGS_ANTENNAE_MASK (0x70)
/*
* Register and values
*/
#define CSR_BASE (0x0)
#define HBUS_BASE (0x400)
/*
* CSR (control and status registers)
*/
/*
* BSM (Bootstrap State Machine)
*/
/*
* BSM special memory, stays powered during power-save sleeps
*/
#define BSM_SRAM_SIZE (1024)
/*
* card static random access memory (SRAM) for processor data and instructs
*/
#define RTC_INST_LOWER_BOUND (0x00000)
#define ALM_RTC_INST_UPPER_BOUND (0x14000)
#define RTC_DATA_LOWER_BOUND (0x800000)
#define ALM_RTC_DATA_UPPER_BOUND (0x808000)
/*
* HBUS (Host-side bus)
*/
/*
* HW I/F configuration
*/
#define CSR_HW_IF_CONFIG_REG_BIT_ALMAGOR_MB (0x00000100)
#define CSR_HW_IF_CONFIG_REG_BIT_ALMAGOR_MM (0x00000200)
#define CSR_HW_IF_CONFIG_REG_BIT_SKU_MRC (0x00000400)
#define CSR_HW_IF_CONFIG_REG_BIT_BOARD_TYPE (0x00000800)
#define CSR_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_A (0x00000000)
#define CSR_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_B (0x00001000)
#define CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP (0x00000001)
#define CSR_UCODE_SW_BIT_RFKILL (0x00000002)
#define CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED (0x00000004)
#define CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT (0x00000008)
#define CSR_GPIO_IN_BIT_AUX_POWER (0x00000200)
#define CSR_GPIO_IN_VAL_VAUX_PWR_SRC (0x00000000)
#define CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX (0x00800000)
#define CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER (0x20000000)
#define PCI_CFG_PMC_PME_FROM_D3COLD_SUPPORT (0x80000000)
/*
* interrupt flags in INTA, set by uCode or hardware (e.g. dma),
* acknowledged (reset) by host writing "1" to flagged bits.
*/
#define BIT_INT_FH_RX \
#define CSR_INI_SET_MASK (BIT_INT_FH_RX | \
BIT_INT_ERR | \
BIT_INT_FH_TX | \
BIT_INT_SWERROR | \
BIT_INT_RF_KILL | \
BIT_INT_SW_RX | \
BIT_INT_WAKEUP | \
/*
* interrupt flags in FH (flow handler) (PCI busmaster DMA)
*/
#define FH_INT_RX_MASK (BIT_FH_INT_HI_PRIOR | \
#define FH_INT_TX_MASK (BIT_FH_INT_TX_CHNL6 | \
/*
* RESET
*/
#define CSR_RESET_REG_FLAG_NEVO_RESET (0x00000001)
#define CSR_RESET_REG_FLAG_FORCE_NMI (0x00000002)
#define CSR_RESET_REG_FLAG_SW_RESET (0x00000080)
#define CSR_RESET_REG_FLAG_MASTER_DISABLED (0x00000100)
#define CSR_RESET_REG_FLAG_STOP_MASTER (0x00000200)
/*
* GP (general purpose) CONTROL
*/
#define CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY (0x00000001)
#define CSR_GP_CNTRL_REG_FLAG_INIT_DONE (0x00000004)
#define CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ (0x00000008)
#define CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP (0x00000010)
#define CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN (0x00000001)
#define CSR_GP_CNTRL_REG_MSK_POWER_SAVE_TYPE (0x07000000)
#define CSR_GP_CNTRL_REG_FLAG_MAC_POWER_SAVE (0x04000000)
#define CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW (0x08000000)
/*
* APMG (power management) constants
*/
#define APMG_CLK_CTRL_REG (0x003000)
#define ALM_APMG_CLK_EN (0x003004)
#define ALM_APMG_CLK_DIS (0x003008)
#define ALM_APMG_PS_CTL (0x00300c)
#define ALM_APMG_PCIDEV_STT (0x003010)
#define ALM_APMG_RFKILL (0x003014)
#define ALM_APMG_LARC_INT (0x00301c)
#define ALM_APMG_LARC_INT_MSK (0x003020)
#define APMG_CLK_REG_VAL_DMA_CLK_RQT (0x00000200)
#define APMG_CLK_REG_VAL_BSM_CLK_RQT (0x00000800)
#define APMG_PS_CTRL_REG_VAL_ALM_R_RESET_REQ (0x04000000)
#define APMG_DEV_STATE_REG_VAL_L1_ACTIVE_DISABLE (0x00000800)
#define APMG_PS_CTRL_REG_MSK_POWER_SRC (0x03000000)
#define APMG_PS_CTRL_REG_VAL_POWER_SRC_VMAIN (0x00000000)
#define APMG_PS_CTRL_REG_VAL_POWER_SRC_VAUX (0x01000000)
/*
* BSM (bootstrap state machine)
*/
/*
* start boot load now
*/
#define BSM_WR_CTRL_REG_BIT_START (0x80000000)
/*
* enable boot after power up
*/
#define BSM_WR_CTRL_REG_BIT_START_EN (0x40000000)
/*
* DBM
*/
#define ALM_FH_SRVC_CHNL (6)
#define IWH_FH_SRVC_CHNL (9)
#define IWH_FH_SRVC_CHNL_SRAM_ADDR_REG(_chnl)\
#define ALM_FH_RCSR_RX_CONFIG_REG_POS_RBDC_SIZE (20)
#define ALM_FH_RCSR_RX_CONFIG_REG_POS_IRQ_RBTH (4)
#define ALM_FH_RCSR_RX_CONFIG_REG_BIT_WR_STTS_EN (0x08000000)
#define ALM_FH_RCSR_RX_CONFIG_REG_VAL_DMA_CHNL_EN_ENABLE (0x80000000)
#define ALM_FH_RCSR_RX_CONFIG_REG_VAL_RDRBD_EN_ENABLE (0x20000000)
#define ALM_FH_RCSR_RX_CONFIG_REG_VAL_MAX_FRAG_SIZE_128 (0x01000000)
#define ALM_FH_RCSR_RX_CONFIG_REG_VAL_IRQ_DEST_INT_HOST (0x00001000)
#define ALM_FH_RCSR_RX_CONFIG_REG_VAL_MSG_MODE_FH (0x00000000)
#define ALM_FH_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_TXF (0x00000000)
#define ALM_FH_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_DRIVER (0x00000001)
#define ALM_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE_VAL (0x00000000)
#define ALM_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL (0x00000008)
#define ALM_FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_IFTFD (0x00200000)
#define ALM_FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_NOINT (0x00000000)
#define ALM_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE (0x00000000)
#define ALM_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE (0x80000000)
#define ALM_FH_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_VALID (0x00004000)
#define ALM_FH_TCSR_CHNL_TX_BUF_STS_REG_BIT_TFDB_WPTR (0x00000001)
#define ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TXPD_ON (0xFF000000)
#define ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_TXPD_ON (0x00FF0000)
#define ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_MAX_FRAG_SIZE_128B (0x00000400)
#define ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TFD_ON (0x00000100)
#define ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_CBB_ON (0x00000080)
#define ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RSP_WAIT_TH (0x00000020)
#define ALM_FH_TSSR_TX_MSG_CONFIG_REG_VAL_RSP_WAIT_TH (0x00000005)
#define ALM_TB_MAX_BYTES_COUNT (0xFFF0)
#define ALM_FH_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_channel) \
#define ALM_FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(_channel) \
#define HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED (0x00000004)
#define TFD_QUEUE_MIN 0
#define TFD_QUEUE_MAX 6
#define TFD_QUEUE_SIZE_MAX (256)
/*
* spectrum and channel data structures
*/
#define IWH_NUM_SCAN_RATES (2)
#define IWH_SCAN_FLAG_24GHZ (1<<0)
#define IWH_MAX_CMD_SIZE 1024
#define IWH_DEFAULT_TX_RETRY 15
#define IWH_MAX_TX_RETRY 16
#define RFD_SIZE 4
#define NUM_TFD_CHUNKS 4
#define RX_QUEUE_SIZE 256
#define RX_QUEUE_SIZE_LOG 8
/*
* TX Queue Flag Definitions
*/
/*
* use short preamble
*/
#define DCT_FLAG_LONG_PREAMBLE 0x00
#define DCT_FLAG_SHORT_PREAMBLE 0x04
/*
* ACK rx is expected to follow
*/
#define DCT_FLAG_ACK_REQD 0x80
#define IWH_MB_DISASSOCIATE_THRESHOLD_DEFAULT 24
#define IWH_MB_ROAMING_THRESHOLD_DEFAULT 8
#define IWH_REAL_RATE_RX_PACKET_THRESHOLD 300
/*
* QoS definitions
*/
/*
* index of every AC in firmware
*/
#define QOS_AC_BK (0)
#define QOS_AC_BE (1)
#define QOS_AC_VI (2)
#define QOS_AC_VO (3)
#define QOS_AC_INVALID (-1)
#define QOS_CW_RANGE_MIN (0) /* exponential of 2 */
#define QOS_TXOP_MIN (0) /* unit of 32 microsecond */
#define QOS_AIFSN_MIN (2)
/*
* masks for flags of QoS parameter command
*/
#define QOS_PARAM_FLG_UPDATE_EDCA (0x01)
#define QOS_PARAM_FLG_TGN (0x02)
/*
* index of TX queue for every AC
*/
#define QOS_AC_BK_TO_TXQ (3)
#define QOS_AC_BE_TO_TXQ (2)
#define QOS_AC_VI_TO_TXQ (1)
#define QOS_AC_VO_TO_TXQ (0)
#define TXQ_FOR_AC_MIN (0)
#define TXQ_FOR_AC_MAX (3)
#define TXQ_FOR_AC_INVALID (-1)
#define NON_QOS_TXQ QOS_AC_BE_TO_TXQ
#define QOS_TXQ_FOR_MGT QOS_AC_VO_TO_TXQ
#define WME_TID_MIN (0)
#define WME_TID_MAX (7)
#define WME_TID_INVALID (-1)
/*
* HT definitions
*/
/*
* HT capabilities masks
*/
#define HT_CAP_SUP_WIDTH (0x0002)
#define HT_CAP_MIMO_PS (0x000c)
#define HT_CAP_GRN_FLD (0x0010)
#define HT_CAP_SGI_20 (0x0020)
#define HT_CAP_SGI_40 (0x0040)
#define HT_CAP_DELAY_BA (0x0400)
#define HT_CAP_MAX_AMSDU (0x0800)
#define HT_CAP_MCS_TX_DEFINED (0x01)
#define HT_CAP_MCS_TX_RX_DIFF (0x02)
#define HT_CAP_MCS_TX_STREAMS (0x0c)
#define HT_CAP_MCS_TX_UEQM (0x10)
#define HT_CAP_MIMO_PS_STATIC (0)
#define HT_CAP_MIMO_PS_DYNAMIC (1)
#define HT_CAP_MIMO_PS_INVALID (2)
#define HT_CAP_MIMO_PS_NONE (3)
#define HT_RX_AMPDU_FACTOR_8K (0x0)
#define HT_RX_AMPDU_FACTOR_16K (0x1)
#define HT_RX_AMPDU_FACTOR_32K (0x2)
#define HT_RX_AMPDU_FACTOR_64K (0x3)
#define HT_RX_AMPDU_FACTOR_MSK (0x3)
#define HT_MPDU_DENSITY_4USEC (0x5)
#define HT_MPDU_DENSITY_8USEC (0x6)
#define HT_MPDU_DENSITY HT_MPDU_DENSITY_4USEC
#define HT_MPDU_DENSITY_MSK (0x1c)
#define HT_MPDU_DENSITY_POS (2)
#define HT_RATESET_NUM (16)
#define HT_1CHAIN_RATE_MIN_IDX (0x0)
#define HT_1CHAIN_RATE_MAX_IDX (0x7)
#define HT_2CHAIN_RATE_MIN_IDX (0x8)
#define HT_2CHAIN_RATE_MAX_IDX (0xf)
struct iwh_ampdu_param {
};
typedef struct iwh_ht_conf {
struct iwh_ampdu_param ampdu_p;
#define NO_HT_PROT (0)
#define HT_PROT_CHAN_NON_HT (1)
#define HT_PROT_FAT (2)
#define HT_PROT_ASSOC_NON_HT (3)
/*
* HT flags for RXON command.
*/
#define RXON_FLG_CONTROL_CHANNEL_LOCATION_MSK 0x400000
#define RXON_FLG_CONTROL_CHANNEL_LOC_LOW_MSK 0x000000
#define RXON_FLG_CONTROL_CHANNEL_LOC_HIGH_MSK 0x400000
#define RXON_FLG_HT_OPERATING_MODE_POS (23)
#define RXON_FLG_HT_PROT_MSK 0x800000
#define RXON_FLG_FAT_PROT_MSK 0x1000000
#define RXON_FLG_CHANNEL_MODE_POS (25)
#define RXON_FLG_CHANNEL_MODE_MSK 0x06000000
#define RXON_FLG_CHANNEL_MODE_LEGACY_MSK 0x00000000
#define RXON_FLG_CHANNEL_MODE_PURE_40_MSK 0x02000000
#define RXON_FLG_CHANNEL_MODE_MIXED_MSK 0x04000000
#define RXON_RX_CHAIN_DRIVER_FORCE_MSK (0x1<<0)
#define RXON_RX_CHAIN_VALID_POS (1)
#define RXON_RX_CHAIN_FORCE_SEL_POS (4)
#define RXON_RX_CHAIN_FORCE_MIMO_SEL_POS (7)
#define RXON_RX_CHAIN_CNT_POS (10)
#define RXON_RX_CHAIN_MIMO_CNT_POS (12)
#define RXON_RX_CHAIN_MIMO_FORCE_POS (14)
#define RXON_RX_CHAIN_A_MSK (1)
#define RXON_RX_CHAIN_B_MSK (2)
#define RXON_RX_CHAIN_C_MSK (4)
/*
* Generic queue structure
*
* Contains common data for Rx and Tx queues
*/
#define TFD_CTL_COUNT_SET(n) (n<<24)
#define TFD_CTL_PAD_SET(n) (n<<28)
#define TFD_TX_CMD_SLOTS 64
#define TFD_CMD_SLOTS 32
/*
*
* Most communication between driver and SP is via queues of data buffers.
* For example, all commands that the driver issues to device's embedded
* controller (uCode) are via the command queue (one of the Tx queues). All
* uCode command responses/replies/notifications, including Rx frames, are
* conveyed from uCode to driver via the Rx queue.
*
* Most support for these queues, including handshake support, resides in
* structures in host DRAM, shared between the driver and the device. When
* allocating this memory, the driver must make sure that data written by
* the host CPU updates DRAM immediately (and does not get "stuck" in CPU's
* cache memory), so DRAM and cache are consistent, and the device can
* immediately see changes made by the driver.
*
* SP supports up to 16 DRAM-based Tx queues, and services these queues via
* up to 7 DMA channels (FIFOs). Each Tx queue is supported by a circular array
* in DRAM containing 256 Transmit Frame Descriptors (TFDs).
*/
#define IWH_MAX_WIN_SIZE 64
#define IWH_QUEUE_SIZE 256
#define IWH_NUM_FIFOS 7
#define IWH_NUM_QUEUES 20
#define IWH_CMD_QUEUE_NUM 4
#define IWH_CMD_FIFO_NUM 7
struct iwh_rate {
union {
struct {
} s;
} r;
};
struct iwh_dram_scratch {
};
struct iwh_tx_power {
};
union iwh_tx_power_triple_stream {
struct {
}s;
};
struct iwh_tx_power_db {
};
typedef struct iwh_tx_power_table_cmd {
struct iwh_tx_power_db db;
/*
* Hardware rate scaling set by iwh_ap_lq function.
* Given a particular initial rate and mode, the driver uses the
* following formula to fill the rs_table[LINK_QUAL_MAX_RETRY_NUM]
* rate table in the Link Quality command:
*
* 1) If using High-throughput(HT)(SISO or MIMO) initial rate:
* a) Use this same initial rate for first 3 entries.
* b) Find next lower available rate using same mode(SISO or MIMO),
* use for next 3 entries. If no lower rate available, switch to
* legacy mode(no FAT channel, no MIMO, no short guard interval).
* c) If using MIMO, set command's mimo_delimeter to number of
* entries using MIMO(3 or 6).
* d) After trying 2 HT rates, switch to legacy mode(no FAT channel,
* no MIMO, no short qguard interval), at the next lower bit rate
* (e.g. if second HT bit rate was 54, try 48 legacy),and follow
* legacy procedure for remaining table entries.
*
* 2) If using legacy initial rate:
* a) Use the initial rate for only one entry.
* b) For each following entry, reduce the rate to next lower available
* rate, until reaching the lowest available rate.
* c) When reducing rate, also switch antenna selection.
* b) Once lowest available rate is reached, repreat this rate until
* rate table is filled(16 entries),switching antenna each entry.
*/
/*
* OFDM HT rate masks
*/
#define R_MCS_6M_MSK 0x1
#define R_MCS_12M_MSK 0x2
#define R_MCS_18M_MSK 0x4
#define R_MCS_24M_MSK 0x8
#define R_MCS_36M_MSK 0x10
#define R_MCS_48M_MSK 0x20
#define R_MCS_54M_MSK 0x40
#define R_MCS_60M_MSK 0x80
#define R_MCS_12M_DUAL_MSK 0x100
#define R_MCS_24M_DUAL_MSK 0x200
#define R_MCS_36M_DUAL_MSK 0x400
#define R_MCS_48M_DUAL_MSK 0x800
#define RATE_MCS_CODE_MSK 0x7
#define RATE_MCS_MIMO_POS 3
#define RATE_MCS_MIMO_MSK 0x8
#define RATE_MCS_HT_DUP_POS 5
#define RATE_MCS_HT_DUP_MSK 0x20
#define RATE_MCS_FLAGS_POS 8
#define RATE_MCS_HT_POS 8
#define RATE_MCS_HT_MSK 0x100
#define RATE_MCS_CCK_POS 9
#define RATE_MCS_CCK_MSK 0x200
#define RATE_MCS_GF_POS 10
#define RATE_MCS_GF_MSK 0x400
#define RATE_MCS_FAT_POS 11
#define RATE_MCS_FAT_MSK 0x800
#define RATE_MCS_DUP_POS 12
#define RATE_MCS_DUP_MSK 0x1000
#define RATE_MCS_SGI_POS 13
#define RATE_MCS_SGI_MSK 0x2000
#define EEPROM_SEM_TIMEOUT 10
#define EEPROM_SEM_RETRY_LIMIT 1000
/*
* Antenna masks:
* bit14:15 01 B inactive, A active
* 10 B active, A inactive
* 11 Both active
*/
#define RATE_MCS_ANT_A_POS 14
#define RATE_MCS_ANT_B_POS 15
#define RATE_MCS_ANT_A_MSK 0x4000
#define RATE_MCS_ANT_B_MSK 0x8000
#define RATE_MCS_ANT_AB_MSK 0xc000
/*
* RS_NEW_API: only TLC_RTS remains and moved to bit 0
*/
#define LINK_QUAL_FLAGS_SET_STA_TLC_RTS_MSK (1<<0)
#define LINK_QUAL_AC_NUM 4
#define LINK_QUAL_MAX_RETRY_NUM 16
#define LINK_QUAL_ANT_A_MSK (1<<0)
struct iwh_link_qual_general_params {
};
struct iwh_link_qual_agg_params {
};
typedef struct iwh_link_quality_cmd {
struct iwh_link_qual_agg_params agg_params;
struct iwh_rx_mpdu_body_size {
};
typedef struct iwh_rx_phy_res {
/* for various implementations of non_cfg_phy */
struct iwh_rx_mpdu_res_start {
};
#define IWH_AGC_DB_POS (7)
#define IWH_RX_RES_PHY_CNT (8)
#define IWH_RX_RES_AGC_IDX (1)
#define IWH_RX_RES_RSSI_AB_IDX (2)
#define IWH_RX_RES_RSSI_C_IDX (3)
#define IWH_OFDM_AGC_MSK (0xFE00)
#define IWH_OFDM_AGC_BIT_POS (9)
#define IWH_OFDM_RSSI_A_MSK (0x00FF)
#define IWH_OFDM_RSSI_A_BIT_POS (0)
#define IWH_OFDM_RSSI_B_MSK (0xFF0000)
#define IWH_OFDM_RSSI_B_BIT_POS (16)
#define IWH_OFDM_RSSI_C_MSK (0x00FF)
#define IWH_OFDM_RSSI_C_BIT_POS (0)
#define IWH_RSSI_OFFSET (44)
/*
* Fixed (non-configurable) rx data from phy
*/
struct iwh_rx_non_cfg_phy {
};
/*
* Byte Count Table Entry
*
* Bit fields:
* 15-12: reserved
* 11- 0: total to-be-transmitted byte count of frame (does not include command)
*/
struct iwh_queue_byte_cnt_entry {
};
/*
* Byte Count table
*
* Each Tx queue uses a byte-count table containing 320 entries:
* one 16-bit entry for each of 256 TFDs, plus an additional 64 entries that
* duplicate the first 64 entries (to avoid wrap-around within a Tx window;
* max Tx window is 64 TFDs).
*
* When driver sets up a new TFD, it must also enter the total byte count
* of the frame to be transmitted into the corresponding entry in the byte
* count table for the chosen Tx queue. If the TFD index is 0-63, the driver
* must duplicate the byte count entry in corresponding index 256-319.
*
* "dont_care" padding puts each byte count table on a 1024-byte boundary;
* SP assumes tables are separated by 1024 bytes.
*/
struct iwh_sched_queue_byte_cnt_tbl {
};
/*
* struct iwh_shared, handshake area for Tx and Rx
*
* For convenience in allocating memory, this structure combines 2 areas of
* DRAM which must be shared between driver and SP. These do not need to
* be combined, if better allocation would result from keeping them separate:
* TODO: Split these; carried over from 3945, doesn't work well for SP.
*
* 1) The Tx byte count tables occupy 1024 bytes each (16 KBytes total for
* 16 queues). Driver uses SCD_DRAM_BASE_ADDR to tell SP where to find
* the first of these tables. SP assumes tables are 1024 bytes apart.
*
* 2) The Rx status (val0 and val1) occupies only 8 bytes. Driver uses
* FH_RSCSR_CHNL0_STTS_WPTR_REG to tell SP where to find this area.
* Driver reads val0 to determine the latest Receive Buffer Descriptor (RBD)
* that has been filled by the SP.
*
* Bit fields val0:
* 31-12: Not used
* 11- 0: Index of last filled Rx buffer descriptor (SP writes, driver reads)
*
* Bit fields val1:
* 31- 0: Not used
*/
typedef struct iwh_shared {
struct iwh_sched_queue_byte_cnt_tbl
} iwh_shared_t;
/*
* struct iwh_tfd_frame_data
*
* Describes up to 2 buffers containing (contiguous) portions of a Tx frame.
* Each buffer must be on dword boundary.
* Up to 10 iwh_tfd_frame_data structures, describing up to 20 buffers,
* may be filled within a TFD (iwh_tfd_frame).
*
* Bit fields in tb1_addr:
* 31- 0: Tx buffer 1 address bits [31:0]
*
* Bit fields in val1:
* 31-16: Tx buffer 2 address bits [15:0]
* 15- 4: Tx buffer 1 length (bytes)
* 3- 0: Tx buffer 1 address bits [32:32]
*
* Bit fields in val2:
* 31-20: Tx buffer 2 length (bytes)
* 19- 0: Tx buffer 2 address bits [35:16]
*/
struct iwh_tfd_frame_data {
};
typedef struct iwh_tx_desc {
struct agg_tx_status {
};
typedef struct iwh_tx_stat {
struct agg_tx_status status;
struct iwh_cmd_header {
};
typedef struct iwh_rx_desc {
struct iwh_cmd_header hdr;
typedef struct iwh_rx_stat {
typedef struct iwh_rx_head {
typedef struct iwh_rx_tail {
enum {
IWH_AP_ID = 0,
IWH_BROADCAST_ID = 15,
IWH_STATION_COUNT = 16,
};
/*
* key flags
*/
enum {
STA_KEY_FLG_ENCRYPT_MSK = 0x7,
STA_KEY_FLG_NO_ENC = 0x0,
STA_KEY_FLG_WEP = 0x1,
STA_KEY_FLG_CCMP = 0x2,
STA_KEY_FLG_TKIP = 0x3,
STA_KEY_FLG_INVALID = 0x0800,
};
/*
* modify flags
*/
enum {
STA_MODIFY_KEY_MASK = 0x01,
STA_MODIFY_TID_DISABLE_TX = 0x02,
STA_MODIFY_TX_RATE_MSK = 0x04
};
enum {
RX_RES_STATUS_NO_CRC32_ERROR = (1 << 0),
};
enum {
RX_RES_PHY_FLAGS_BAND_24_MSK = (1 << 0),
RX_RES_PHY_FLAGS_ANTENNA_MSK = 0xf0,
};
enum {
REPLY_ALIVE = 0x1,
REPLY_ERROR = 0x2,
/* RXON state commands */
REPLY_RXON = 0x10,
REPLY_RXON_ASSOC = 0x11,
REPLY_QOS_PARAM = 0x13,
REPLY_RXON_TIMING = 0x14,
/* Multi-Station support */
REPLY_ADD_STA = 0x18,
REPLY_REMOVE_STA = 0x19,
REPLY_REMOVE_ALL_STA = 0x1a,
/* RX, TX */
REPLY_TX = 0x1c,
/* timers commands */
REPLY_BCON = 0x27,
REPLY_SHUTDOWN = 0x40,
/* MISC commands */
REPLY_RATE_SCALE = 0x47,
REPLY_LEDS_CMD = 0x48,
REPLY_TX_LINK_QUALITY_CMD = 0x4e,
COEX_PRIORITY_TABLE_CMD = 0x5a,
CALIBRATION_CFG_CMD = 0x65,
CALIBRATION_RES_NOTIFICATION = 0x66,
/* 802.11h related */
RADAR_NOTIFICATION = 0x70,
REPLY_QUIET_CMD = 0x71,
REPLY_CHANNEL_SWITCH = 0x72,
CHANNEL_SWITCH_NOTIFICATION = 0x73,
REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74,
SPECTRUM_MEASURE_NOTIFICATION = 0x75,
/* Power Management *** */
POWER_TABLE_CMD = 0x77,
PM_SLEEP_NOTIFICATION = 0x7A,
PM_DEBUG_STATISTIC_NOTIFIC = 0x7B,
/* Scan commands and notifications */
REPLY_SCAN_CMD = 0x80,
REPLY_SCAN_ABORT_CMD = 0x81,
SCAN_START_NOTIFICATION = 0x82,
SCAN_RESULTS_NOTIFICATION = 0x83,
SCAN_COMPLETE_NOTIFICATION = 0x84,
BEACON_NOTIFICATION = 0x90,
REPLY_TX_BEACON = 0x91,
WHO_IS_AWAKE_NOTIFICATION = 0x94,
QUIET_NOTIFICATION = 0x96,
REPLY_TX_PWR_TABLE_CMD = 0x97,
MEASURE_ABORT_NOTIFICATION = 0x99,
REPLY_CALIBRATION_TUNE = 0x9a,
/* BT config command */
REPLY_BT_CONFIG = 0x9b,
REPLY_STATISTICS_CMD = 0x9c,
STATISTICS_NOTIFICATION = 0x9d,
/* RF-KILL commands and notifications *** */
REPLY_CARD_STATE_CMD = 0xa0,
CARD_STATE_NOTIFICATION = 0xa1,
/* Missed beacons notification */
MISSED_BEACONS_NOTIFICATION = 0xa2,
REPLY_CT_KILL_CONFIG_CMD = 0xa4,
SENSITIVITY_CMD = 0xa8,
REPLY_PHY_CALIBRATION_CMD = 0xb0,
REPLY_RX_PHY_CMD = 0xc0,
REPLY_RX_MPDU_CMD = 0xc1,
REPLY_SP_RX = 0xc3,
REPLY_COMPRESSED_BA = 0xc5,
REPLY_MAX = 0xff
};
typedef struct iwh_cmd {
struct iwh_cmd_header hdr;
} iwh_cmd_t;
/*
* Alive Command & Response
*/
#define UCODE_VALID_OK (0x1)
#define INITIALIZE_SUBTYPE (9)
struct iwh_alive_resp {
};
struct iwh_init_alive_resp {
struct iwh_alive_resp s;
/* calibration values from "initialize" uCode */
/*
* signed MIMO gain comp, 5 freq groups, 2 Tx chains
*/
};
/*
* Rx config defines & structure
*/
/*
* rx_config device types
*/
enum {
RXON_DEV_TYPE_AP = 1,
RXON_DEV_TYPE_ESS = 3,
RXON_DEV_TYPE_IBSS = 4,
};
/*
* rx_config flags
*/
enum {
/* band & modulation selection */
RXON_FLG_BAND_24G_MSK = (1 << 0),
/* auto detection enable */
/* TGg protection when tx */
/* cck short slot & preamble */
/* antenna selection */
RXON_FLG_ANT_SEL_MSK = 0x0f00,
/* radar detection enable */
/*
* rx response to host with 8-byte TSF
* (according to ON_AIR deassertion)
*/
};
/*
* rx_config filter flags
*/
enum {
/* accept all data frames */
RXON_FILTER_PROMISC_MSK = (1 << 0),
/* pass control & management to host */
/* accept multi-cast */
/* don't decrypt uni-cast frames */
/* don't decrypt multi-cast frames */
/* STA is associated */
/* transfer to host non bssid beacons in associated state */
};
/*
* structure for RXON Command & Response
*/
typedef struct iwh_rxon_cmd {
typedef struct iwh_compressed_ba_resp {
#define PHY_CALIBRATE_DIFF_GAIN_CMD (7)
#define PHY_CALIBRATE_LO_CMD (9)
#define PHY_CALIBRATE_TX_IQ_CMD (11)
#define PHY_CALIBRATE_CRYSTAL_FRQ_CMD (15)
#define PHY_CALIBRATE_TX_IQ_PERD_CMD (17)
#define HD_TABLE_SIZE (11)
/*
* Param table within SENSITIVITY_CMD
*/
#define HD_MIN_ENERGY_CCK_DET_INDEX (0)
#define HD_MIN_ENERGY_OFDM_DET_INDEX (1)
#define HD_AUTO_CORR32_X1_TH_ADD_MIN_INDEX (2)
#define HD_AUTO_CORR32_X1_TH_ADD_MIN_MRC_INDEX (3)
#define HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_INDEX (4)
#define HD_AUTO_CORR32_X4_TH_ADD_MIN_INDEX (5)
#define HD_AUTO_CORR32_X4_TH_ADD_MIN_MRC_INDEX (6)
#define HD_BARKER_CORR_TH_ADD_MIN_INDEX (7)
#define HD_BARKER_CORR_TH_ADD_MIN_MRC_INDEX (8)
#define HD_AUTO_CORR40_X4_TH_ADD_MIN_INDEX (9)
#define HD_OFDM_ENERGY_TH_IN_INDEX (10)
typedef struct iwh_sensitivity_cmd {
typedef struct iwh_calibration_cmd {
char diff_gain_a;
char diff_gain_b;
char diff_gain_c;
struct iwh_calib_hdr {
};
#define FH_RSCSR_FRAME_SIZE_MASK (0x00003FFF)
struct iwh_calib_results {
void *tx_iq_res;
void *tx_iq_perd_res;
void *lo_res;
};
#define IWH_CALIB_INIT_CFG_ALL (0xFFFFFFFF)
struct iwh_calib_cfg_elmnt_s {
};
struct iwh_calib_cfg_status_s {
struct iwh_calib_cfg_elmnt_s once;
struct iwh_calib_cfg_elmnt_s perd;
};
struct iwh_calib_cfg_cmd {
struct iwh_calib_cfg_status_s ucd_calib_cfg;
struct iwh_calib_cfg_status_s drv_calib_cfg;
};
struct iwh_cal_crystal_freq {
};
typedef struct iwh_calibration_crystal_cmd {
struct iwh_cal_crystal_freq data;
#define COEX_NUM_OF_EVENTS (16)
struct iwh_wimax_coex_event_entry {
};
typedef struct iwh_wimax_coex_cmd {
typedef struct iwh_missed_beacon_notif {
typedef struct iwh_ct_kill_config {
/*
* structure for command IWH_CMD_ASSOCIATE
*/
typedef struct iwh_assoc {
} iwh_assoc_t;
/*
* structure for command IWH_CMD_TSF
*/
typedef struct iwh_cmd_tsf {
/*
* structure for IWH_CMD_ADD_NODE
*/
#define STA_MODE_ADD_MSK (0)
#define STA_MODE_MODIFY_MSK (1)
#define STA_FLG_MAX_AMPDU_POS (19)
#define STA_FLG_AMPDU_DENSITY_POS (23)
#define STA_MODIFY_KEY_MASK (0x01)
#define STA_MODIFY_TID_DISABLE_TX (0x02)
#define STA_MODIFY_TX_RATE_MSK (0x04)
#define STA_MODIFY_ADDBA_TID_MSK (0x08)
#define STA_MODIFY_DELBA_TID_MSK (0x10)
struct sta_id_modify {
};
struct iwh_keyinfo {
};
typedef struct iwh_add_sta {
struct sta_id_modify sta;
struct iwh_keyinfo key;
typedef struct iwh_rem_sta {
/*
* Tx flags
*/
enum {
TX_CMD_FLG_ANT_SEL_MSK = 0xf00,
/* ucode ignores BT priority for this frame */
/* ucode overrides sequence control */
/* signal that this frame is non-last MPDU */
/* calculate TSF in outgoing frame */
/* activate TX calibration. */
/*
* signals that 2 bytes pad was inserted
* after the MAC header
*/
/* HCCA-AP - disable duration overwriting. */
};
/*
* structure for command IWH_CMD_TX_DATA
*/
typedef struct iwh_tx_cmd {
struct iwh_dram_scratch scratch;
union {
} stop_time;
union {
} timeout;
} iwh_tx_cmd_t;
/*
* structure for command "TX beacon"
*/
typedef struct iwh_tx_beacon_cmd {
/*
* LEDs Command & Response
* REPLY_LEDS_CMD = 0x48 (command, has simple generic response)
*
* this command turns it on or off, or sets up a periodic blinking cycle.
*/
typedef struct iwh_led_cmd {
/*
* # intervals off while blinking;
* "0", with > 0 "on" value, turns LED on
*/
/*
* # intervals on while blinking;
* "0", regardless of "off", turns LED off
*/
/*
* structure for IWH_CMD_SET_POWER_MODE
*/
typedef struct iwh_powertable_cmd {
struct iwh_ssid_ie {
};
/*
* structure for command IWH_CMD_SCAN
*/
typedef struct iwh_scan_hdr {
/*
* dwell only this long on quiet chnl
* (active scan)
*/
/*
* max usec to be out of associated (service)
* chnl
*/
/*
* pause scan this long when returning to svc
* chnl.
* SP -- 31:22 # beacons, 21:0 additional usec.
*/
struct iwh_tx_cmd tx_cmd;
/* followed by probe request body */
/* followed by nchan x iwh_scan_chan */
typedef struct iwh_scan_chan {
struct iwh_tx_power tpc;
/*
* structure for IWH_CMD_BLUETOOTH
*/
typedef struct iwh_bt_cmd {
} iwh_bt_cmd_t;
typedef struct iwh_wme_param {
/*
* QoS parameter command (REPLY_QOS_PARAM = 0x13)
* FIFO0-background, FIFO1-best effort, FIFO2-video, FIFO3-voice
*/
struct iwh_edca_param {
};
typedef struct iwh_qos_param_cmd {
/*
* firmware image header
*/
typedef struct iwh_firmware_hdr {
/*
* structure for IWH_START_SCAN notification
*/
typedef struct iwh_start_scan {
/*
* structure for IWK_SCAN_COMPLETE notification
*/
typedef struct iwh_stop_scan {
/*
* Driver can access peripheral registers
* and ram via HBUS_TARG_PRPH_* registers.
*/
#define PRPH_BASE (0x00000)
#define PRPH_END (0xFFFFF)
#define IWH_SCD_CONTEXT_DATA_OFFSET (0x600)
#define IWH_SCD_TX_STTS_BITMAP_OFFSET (0x7B1)
#define IWH_SCD_TRANSLATE_TBL_OFFSET (0x7E0)
#define IWH_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS (0)
#define IWH_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK (0x0000007F)
#define IWH_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS (16)
#define IWH_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK (0x007F0000)
(~(1 << IWH_CMD_QUEUE_NUM)))
#define IWH_SCD_CONTEXT_QUEUE_OFFSET(x)\
(IWH_SCD_CONTEXT_DATA_OFFSET + (x) * 8)
#define IWH_SCD_QUEUE_STTS_REG_POS_TXF (0)
#define IWH_SCD_QUEUE_STTS_REG_POS_ACTIVE (3)
#define IWH_SCD_QUEUE_STTS_REG_POS_WSL (4)
#define IWH_SCD_QUEUE_STTS_REG_MSK (0x00FF0000)
/* TX command security control */
#define TX_CMD_SEC_WEP (0x01)
#define TX_CMD_SEC_CCM (0x02)
#define TX_CMD_SEC_TKIP (0x03)
#define TX_CMD_SEC_MSK (0x03)
#define TX_CMD_SEC_SHIFT (6)
#define TX_CMD_SEC_KEY128 (0x08)
#define WEP_IV_LEN (4)
#define WEP_ICV_LEN (4)
#define CCMP_MIC_LEN (8)
#define TKIP_ICV_LEN (4)
#ifdef __cplusplus
}
#endif
#endif /* _IWH_HW_H_ */