1cf4c5a53SSam Leffler /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 3718cf2ccSPedro F. Giffuni * 4cf4c5a53SSam Leffler * Copyright (c) 2007-2009 Sam Leffler, Errno Consulting 5cf4c5a53SSam Leffler * Copyright (c) 2007-2009 Marvell Semiconductor, Inc. 6cf4c5a53SSam Leffler * All rights reserved. 7cf4c5a53SSam Leffler * 8cf4c5a53SSam Leffler * Redistribution and use in source and binary forms, with or without 9cf4c5a53SSam Leffler * modification, are permitted provided that the following conditions 10cf4c5a53SSam Leffler * are met: 11cf4c5a53SSam Leffler * 1. Redistributions of source code must retain the above copyright 12cf4c5a53SSam Leffler * notice, this list of conditions and the following disclaimer, 13cf4c5a53SSam Leffler * without modification. 14cf4c5a53SSam Leffler * 2. Redistributions in binary form must reproduce at minimum a disclaimer 15cf4c5a53SSam Leffler * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 16cf4c5a53SSam Leffler * redistribution must be conditioned upon including a substantially 17cf4c5a53SSam Leffler * similar Disclaimer requirement for further binary redistribution. 18cf4c5a53SSam Leffler * 19cf4c5a53SSam Leffler * NO WARRANTY 20cf4c5a53SSam Leffler * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21cf4c5a53SSam Leffler * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22cf4c5a53SSam Leffler * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 23cf4c5a53SSam Leffler * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 24cf4c5a53SSam Leffler * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 25cf4c5a53SSam Leffler * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26cf4c5a53SSam Leffler * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27cf4c5a53SSam Leffler * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 28cf4c5a53SSam Leffler * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29cf4c5a53SSam Leffler * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30cf4c5a53SSam Leffler * THE POSSIBILITY OF SUCH DAMAGES. 31cf4c5a53SSam Leffler */ 32cf4c5a53SSam Leffler 33cf4c5a53SSam Leffler /* 34cf4c5a53SSam Leffler * Definitions for the Marvell Wireless LAN controller Hardware Access Layer. 35cf4c5a53SSam Leffler */ 36cf4c5a53SSam Leffler #ifndef _MWL_HALREG_H_ 37cf4c5a53SSam Leffler #define _MWL_HALREG_H_ 38cf4c5a53SSam Leffler 39cf4c5a53SSam Leffler #define MWL_ANT_INFO_SUPPORT /* per-antenna data in rx descriptor */ 40cf4c5a53SSam Leffler 41cf4c5a53SSam Leffler #define MACREG_REG_TSF_LOW 0xa600 /* TSF lo */ 42cf4c5a53SSam Leffler #define MACREG_REG_TSF_HIGH 0xa604 /* TSF hi */ 43cf4c5a53SSam Leffler #define MACREG_REG_CHIP_REV 0xa814 /* chip rev */ 44cf4c5a53SSam Leffler 45cf4c5a53SSam Leffler // Map to 0x80000000 (Bus control) on BAR0 46cf4c5a53SSam Leffler #define MACREG_REG_H2A_INTERRUPT_EVENTS 0x00000C18 // (From host to ARM) 47cf4c5a53SSam Leffler #define MACREG_REG_H2A_INTERRUPT_CAUSE 0x00000C1C // (From host to ARM) 48cf4c5a53SSam Leffler #define MACREG_REG_H2A_INTERRUPT_MASK 0x00000C20 // (From host to ARM) 49cf4c5a53SSam Leffler #define MACREG_REG_H2A_INTERRUPT_CLEAR_SEL 0x00000C24 // (From host to ARM) 50cf4c5a53SSam Leffler #define MACREG_REG_H2A_INTERRUPT_STATUS_MASK 0x00000C28 // (From host to ARM) 51cf4c5a53SSam Leffler 52cf4c5a53SSam Leffler #define MACREG_REG_A2H_INTERRUPT_EVENTS 0x00000C2C // (From ARM to host) 53cf4c5a53SSam Leffler #define MACREG_REG_A2H_INTERRUPT_CAUSE 0x00000C30 // (From ARM to host) 54cf4c5a53SSam Leffler #define MACREG_REG_A2H_INTERRUPT_MASK 0x00000C34 // (From ARM to host) 55cf4c5a53SSam Leffler #define MACREG_REG_A2H_INTERRUPT_CLEAR_SEL 0x00000C38 // (From ARM to host) 56cf4c5a53SSam Leffler #define MACREG_REG_A2H_INTERRUPT_STATUS_MASK 0x00000C3C // (From ARM to host) 57cf4c5a53SSam Leffler 58cf4c5a53SSam Leffler // Map to 0x80000000 on BAR1 59cf4c5a53SSam Leffler #define MACREG_REG_GEN_PTR 0x00000C10 60cf4c5a53SSam Leffler #define MACREG_REG_INT_CODE 0x00000C14 61cf4c5a53SSam Leffler #define MACREG_REG_SCRATCH 0x00000C40 62cf4c5a53SSam Leffler #define MACREG_REG_FW_PRESENT 0x0000BFFC 63cf4c5a53SSam Leffler 64cf4c5a53SSam Leffler #define MACREG_REG_PROMISCUOUS 0xA300 65cf4c5a53SSam Leffler 66cf4c5a53SSam Leffler // Bit definitio for MACREG_REG_A2H_INTERRUPT_CAUSE (A2HRIC) 67cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_TX_DONE 0x00000001 // bit 0 68cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_RX_RDY 0x00000002 // bit 1 69cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_OPC_DONE 0x00000004 // bit 2 70cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_MAC_EVENT 0x00000008 // bit 3 71cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_RX_PROBLEM 0x00000010 // bit 4 72cf4c5a53SSam Leffler 73cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_RADIO_OFF 0x00000020 // bit 5 74cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_RADIO_ON 0x00000040 // bit 6 75cf4c5a53SSam Leffler 76cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_RADAR_DETECT 0x00000080 // bit 7 77cf4c5a53SSam Leffler 78cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_ICV_ERROR 0x00000100 // bit 8 79cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_MIC_ERROR 0x00000200 // bit 9 80cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_QUEUE_EMPTY 0x00004000 81cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_QUEUE_FULL 0x00000800 82cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_CHAN_SWITCH 0x00001000 83cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_TX_WATCHDOG 0x00002000 84cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_BA_WATCHDOG 0x00000400 857850fa71SSam Leffler #define MACREQ_A2HRIC_BIT_TX_ACK 0x00008000 86cf4c5a53SSam Leffler #define ISR_SRC_BITS ((MACREG_A2HRIC_BIT_RX_RDY) | \ 87cf4c5a53SSam Leffler (MACREG_A2HRIC_BIT_TX_DONE) | \ 88cf4c5a53SSam Leffler (MACREG_A2HRIC_BIT_OPC_DONE) | \ 89cf4c5a53SSam Leffler (MACREG_A2HRIC_BIT_MAC_EVENT)| \ 90cf4c5a53SSam Leffler (MACREG_A2HRIC_BIT_MIC_ERROR)| \ 91cf4c5a53SSam Leffler (MACREG_A2HRIC_BIT_ICV_ERROR)| \ 92cf4c5a53SSam Leffler (MACREG_A2HRIC_BIT_RADAR_DETECT)| \ 93cf4c5a53SSam Leffler (MACREG_A2HRIC_BIT_CHAN_SWITCH)| \ 94cf4c5a53SSam Leffler (MACREG_A2HRIC_BIT_TX_WATCHDOG)| \ 95cf4c5a53SSam Leffler (MACREG_A2HRIC_BIT_QUEUE_EMPTY)| \ 967850fa71SSam Leffler (MACREG_A2HRIC_BIT_BA_WATCHDOG)| \ 977850fa71SSam Leffler (MACREQ_A2HRIC_BIT_TX_ACK)) 98cf4c5a53SSam Leffler 99cf4c5a53SSam Leffler #define MACREG_A2HRIC_BIT_MASK ISR_SRC_BITS 100cf4c5a53SSam Leffler 101cf4c5a53SSam Leffler // Bit definitio for MACREG_REG_H2A_INTERRUPT_CAUSE (H2ARIC) 102cf4c5a53SSam Leffler #define MACREG_H2ARIC_BIT_PPA_READY 0x00000001 // bit 0 103cf4c5a53SSam Leffler #define MACREG_H2ARIC_BIT_DOOR_BELL 0x00000002 // bit 1 104cf4c5a53SSam Leffler #define ISR_RESET (1<<15) 105cf4c5a53SSam Leffler 106cf4c5a53SSam Leffler // INT code register event definition 107cf4c5a53SSam Leffler #define MACREG_INT_CODE_CMD_FINISHED 0x00000005 108cf4c5a53SSam Leffler 109cf4c5a53SSam Leffler /* 110cf4c5a53SSam Leffler * Host/Firmware Interface definitions. 111cf4c5a53SSam Leffler */ 112cf4c5a53SSam Leffler 113cf4c5a53SSam Leffler /** 114cf4c5a53SSam Leffler * Define total number of TX queues in the shared memory. 115cf4c5a53SSam Leffler * This count includes the EDCA queues, Block Ack queues, and HCCA queues 116cf4c5a53SSam Leffler * In addition to this, there could be a management packet queue some 117cf4c5a53SSam Leffler * time in the future 118cf4c5a53SSam Leffler */ 119cf4c5a53SSam Leffler #define NUM_EDCA_QUEUES 4 120cf4c5a53SSam Leffler #define NUM_HCCA_QUEUES 0 121cf4c5a53SSam Leffler #define NUM_BA_QUEUES 0 122cf4c5a53SSam Leffler #define NUM_MGMT_QUEUES 0 1237850fa71SSam Leffler #define NUM_ACK_EVENT_QUEUE 1 124cf4c5a53SSam Leffler #define TOTAL_TX_QUEUES \ 1257850fa71SSam Leffler (NUM_EDCA_QUEUES + NUM_HCCA_QUEUES + NUM_BA_QUEUES + NUM_MGMT_QUEUES + NUM_ACK_EVENT_QUEUE) 1267850fa71SSam Leffler #define MAX_TXWCB_QUEUES TOTAL_TX_QUEUES - NUM_ACK_EVENT_QUEUE 127cf4c5a53SSam Leffler #define MAX_RXWCB_QUEUES 1 128cf4c5a53SSam Leffler 129cf4c5a53SSam Leffler //============================================================================= 130cf4c5a53SSam Leffler // PUBLIC DEFINITIONS 131cf4c5a53SSam Leffler //============================================================================= 132cf4c5a53SSam Leffler 133cf4c5a53SSam Leffler #define RATE_INDEX_MAX_ARRAY 14 134cf4c5a53SSam Leffler #define WOW_MAX_STATION 32 135cf4c5a53SSam Leffler 136cf4c5a53SSam Leffler /* 137cf4c5a53SSam Leffler * Hardware tx/rx descriptors. 138cf4c5a53SSam Leffler * 139cf4c5a53SSam Leffler * NB: tx descriptor size must match f/w expected size 140cf4c5a53SSam Leffler * because f/w prefetch's the next descriptor linearly 141cf4c5a53SSam Leffler * and doesn't chase the next pointer. 142cf4c5a53SSam Leffler */ 143cf4c5a53SSam Leffler struct mwl_txdesc { 144cf4c5a53SSam Leffler uint32_t Status; 145cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_IDLE 0x00000000 146cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_USED 0x00000001 147cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_OK 0x00000001 148cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_OK_RETRY 0x00000002 149cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_OK_MORE_RETRY 0x00000004 150cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_MULTICAST_TX 0x00000008 151cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_BROADCAST_TX 0x00000010 152cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_FAILED_LINK_ERROR 0x00000020 153cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_FAILED_EXCEED_LIMIT 0x00000040 154cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_FAILED_XRETRY EAGLE_TXD_STATUS_FAILED_EXCEED_LIMIT 155cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_FAILED_AGING 0x00000080 156cf4c5a53SSam Leffler #define EAGLE_TXD_STATUS_FW_OWNED 0x80000000 157cf4c5a53SSam Leffler uint8_t DataRate; 158cf4c5a53SSam Leffler uint8_t TxPriority; 159cf4c5a53SSam Leffler uint16_t QosCtrl; 160cf4c5a53SSam Leffler uint32_t PktPtr; 161cf4c5a53SSam Leffler uint16_t PktLen; 162cf4c5a53SSam Leffler uint8_t DestAddr[6]; 163cf4c5a53SSam Leffler uint32_t pPhysNext; 164cf4c5a53SSam Leffler uint32_t SapPktInfo; 165cf4c5a53SSam Leffler #define EAGLE_TXD_MODE_BONLY 1 166cf4c5a53SSam Leffler #define EAGLE_TXD_MODE_GONLY 2 167cf4c5a53SSam Leffler #define EAGLE_TXD_MODE_BG 3 168cf4c5a53SSam Leffler #define EAGLE_TXD_MODE_NONLY 4 169cf4c5a53SSam Leffler #define EAGLE_TXD_MODE_BN 5 170cf4c5a53SSam Leffler #define EAGLE_TXD_MODE_GN 6 171cf4c5a53SSam Leffler #define EAGLE_TXD_MODE_BGN 7 172cf4c5a53SSam Leffler #define EAGLE_TXD_MODE_AONLY 8 173cf4c5a53SSam Leffler #define EAGLE_TXD_MODE_AG 10 174cf4c5a53SSam Leffler #define EAGLE_TXD_MODE_AN 12 175cf4c5a53SSam Leffler uint16_t Format; 176cf4c5a53SSam Leffler #define EAGLE_TXD_FORMAT 0x0001 /* frame format/rate */ 177cf4c5a53SSam Leffler #define EAGLE_TXD_FORMAT_LEGACY 0x0000 /* legacy rate frame */ 178cf4c5a53SSam Leffler #define EAGLE_TXD_FORMAT_HT 0x0001 /* HT rate frame */ 179cf4c5a53SSam Leffler #define EAGLE_TXD_GI 0x0002 /* guard interval */ 180cf4c5a53SSam Leffler #define EAGLE_TXD_GI_SHORT 0x0002 /* short guard interval */ 181cf4c5a53SSam Leffler #define EAGLE_TXD_GI_LONG 0x0000 /* long guard interval */ 182cf4c5a53SSam Leffler #define EAGLE_TXD_CHW 0x0004 /* channel width */ 183cf4c5a53SSam Leffler #define EAGLE_TXD_CHW_20 0x0000 /* 20MHz channel width */ 184cf4c5a53SSam Leffler #define EAGLE_TXD_CHW_40 0x0004 /* 40MHz channel width */ 185cf4c5a53SSam Leffler #define EAGLE_TXD_RATE 0x01f8 /* tx rate (legacy)/ MCS */ 186cf4c5a53SSam Leffler #define EAGLE_TXD_RATE_S 3 187cf4c5a53SSam Leffler #define EAGLE_TXD_ADV 0x0600 /* advanced coding */ 188cf4c5a53SSam Leffler #define EAGLE_TXD_ADV_S 9 189cf4c5a53SSam Leffler #define EAGLE_TXD_ADV_NONE 0x0000 190cf4c5a53SSam Leffler #define EAGLE_TXD_ADV_LDPC 0x0200 191cf4c5a53SSam Leffler #define EAGLE_TXD_ADV_RS 0x0400 192cf4c5a53SSam Leffler /* NB: 3 is reserved */ 193cf4c5a53SSam Leffler #define EAGLE_TXD_ANTENNA 0x1800 /* antenna select */ 194cf4c5a53SSam Leffler #define EAGLE_TXD_ANTENNA_S 11 195cf4c5a53SSam Leffler #define EAGLE_TXD_EXTCHAN 0x6000 /* extension channel */ 196cf4c5a53SSam Leffler #define EAGLE_TXD_EXTCHAN_S 13 197cf4c5a53SSam Leffler #define EAGLE_TXD_EXTCHAN_HI 0x0000 /* above */ 198cf4c5a53SSam Leffler #define EAGLE_TXD_EXTCHAN_LO 0x2000 /* below */ 199cf4c5a53SSam Leffler #define EAGLE_TXD_PREAMBLE 0x8000 200cf4c5a53SSam Leffler #define EAGLE_TXD_PREAMBLE_SHORT 0x8000 /* short preamble */ 201cf4c5a53SSam Leffler #define EAGLE_TXD_PREAMBLE_LONG 0x0000 /* long preamble */ 202cf4c5a53SSam Leffler uint16_t pad; /* align to 4-byte boundary */ 203cf4c5a53SSam Leffler #define EAGLE_TXD_FIXED_RATE 0x0100 /* get tx rate from Format */ 204cf4c5a53SSam Leffler #define EAGLE_TXD_DONT_AGGR 0x0200 /* don't aggregate frame */ 2057850fa71SSam Leffler uint32_t ack_wcb_addr; 206cf4c5a53SSam Leffler } __packed; 207cf4c5a53SSam Leffler 208cf4c5a53SSam Leffler struct mwl_ant_info { 209cf4c5a53SSam Leffler uint8_t rssi_a; /* RSSI for antenna A */ 210cf4c5a53SSam Leffler uint8_t rssi_b; /* RSSI for antenna B */ 211cf4c5a53SSam Leffler uint8_t rssi_c; /* RSSI for antenna C */ 212cf4c5a53SSam Leffler uint8_t rsvd1; /* Reserved */ 213cf4c5a53SSam Leffler uint8_t nf_a; /* Noise floor for antenna A */ 214cf4c5a53SSam Leffler uint8_t nf_b; /* Noise floor for antenna B */ 215cf4c5a53SSam Leffler uint8_t nf_c; /* Noise floor for antenna C */ 216cf4c5a53SSam Leffler uint8_t rsvd2; /* Reserved */ 217cf4c5a53SSam Leffler uint8_t nf; /* Noise floor */ 2187850fa71SSam Leffler uint8_t rsvd3[3]; /* Reserved - To make word aligned */ 219cf4c5a53SSam Leffler } __packed; 220cf4c5a53SSam Leffler 221cf4c5a53SSam Leffler struct mwl_rxdesc { 222cf4c5a53SSam Leffler uint8_t RxControl; /* control element */ 223cf4c5a53SSam Leffler #define EAGLE_RXD_CTRL_DRIVER_OWN 0x00 224cf4c5a53SSam Leffler #define EAGLE_RXD_CTRL_OS_OWN 0x04 225cf4c5a53SSam Leffler #define EAGLE_RXD_CTRL_DMA_OWN 0x80 226cf4c5a53SSam Leffler uint8_t RSSI; /* received signal strengt indication */ 227cf4c5a53SSam Leffler uint8_t Status; /* status field w/ USED bit */ 228cf4c5a53SSam Leffler #define EAGLE_RXD_STATUS_IDLE 0x00 229cf4c5a53SSam Leffler #define EAGLE_RXD_STATUS_OK 0x01 230cf4c5a53SSam Leffler #define EAGLE_RXD_STATUS_MULTICAST_RX 0x02 231cf4c5a53SSam Leffler #define EAGLE_RXD_STATUS_BROADCAST_RX 0x04 232cf4c5a53SSam Leffler #define EAGLE_RXD_STATUS_FRAGMENT_RX 0x08 233cf4c5a53SSam Leffler #define EAGLE_RXD_STATUS_GENERAL_DECRYPT_ERR 0xff 234cf4c5a53SSam Leffler #define EAGLE_RXD_STATUS_DECRYPT_ERR_MASK 0x80 235cf4c5a53SSam Leffler #define EAGLE_RXD_STATUS_TKIP_MIC_DECRYPT_ERR 0x02 236cf4c5a53SSam Leffler #define EAGLE_RXD_STATUS_WEP_ICV_DECRYPT_ERR 0x04 237cf4c5a53SSam Leffler #define EAGLE_RXD_STATUS_TKIP_ICV_DECRYPT_ERR 0x08 238cf4c5a53SSam Leffler uint8_t Channel; /* channel # pkt received on */ 239cf4c5a53SSam Leffler uint16_t PktLen; /* total length of received data */ 240cf4c5a53SSam Leffler uint8_t SQ2; /* not used */ 241cf4c5a53SSam Leffler uint8_t Rate; /* received data rate */ 242cf4c5a53SSam Leffler uint32_t pPhysBuffData; /* physical address of payload data */ 243cf4c5a53SSam Leffler uint32_t pPhysNext; /* physical address of next RX desc */ 244cf4c5a53SSam Leffler uint16_t QosCtrl; /* received QosCtrl field variable */ 245cf4c5a53SSam Leffler uint16_t HtSig2; /* like name states */ 246cf4c5a53SSam Leffler #ifdef MWL_ANT_INFO_SUPPORT 247cf4c5a53SSam Leffler struct mwl_ant_info ai; /* antenna info */ 248cf4c5a53SSam Leffler #endif 249cf4c5a53SSam Leffler } __packed; 250cf4c5a53SSam Leffler 251cf4c5a53SSam Leffler /* 252cf4c5a53SSam Leffler // Define OpMode for SoftAP/Station mode 253cf4c5a53SSam Leffler // 254cf4c5a53SSam Leffler // The following mode signature has to be written to PCI scratch register#0 255cf4c5a53SSam Leffler // right after successfully downloading the last block of firmware and 256cf4c5a53SSam Leffler // before waiting for firmware ready signature 257cf4c5a53SSam Leffler */ 258cf4c5a53SSam Leffler #define HostCmd_STA_MODE 0x5A 259cf4c5a53SSam Leffler #define HostCmd_SOFTAP_MODE 0xA5 260cf4c5a53SSam Leffler 261cf4c5a53SSam Leffler #define HostCmd_STA_FWRDY_SIGNATURE 0xF0F1F2F4 262cf4c5a53SSam Leffler #define HostCmd_SOFTAP_FWRDY_SIGNATURE 0xF1F2F4A5 263cf4c5a53SSam Leffler 264cf4c5a53SSam Leffler //*************************************************************************** 265cf4c5a53SSam Leffler //*************************************************************************** 266cf4c5a53SSam Leffler 267cf4c5a53SSam Leffler //*************************************************************************** 268cf4c5a53SSam Leffler 269cf4c5a53SSam Leffler #define HostCmd_CMD_CODE_DNLD 0x0001 270cf4c5a53SSam Leffler #define HostCmd_CMD_GET_HW_SPEC 0x0003 271cf4c5a53SSam Leffler #define HostCmd_CMD_SET_HW_SPEC 0x0004 272cf4c5a53SSam Leffler #define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010 273cf4c5a53SSam Leffler #define HostCmd_CMD_802_11_GET_STAT 0x0014 274cf4c5a53SSam Leffler #define HostCmd_CMD_MAC_REG_ACCESS 0x0019 275cf4c5a53SSam Leffler #define HostCmd_CMD_BBP_REG_ACCESS 0x001a 276cf4c5a53SSam Leffler #define HostCmd_CMD_RF_REG_ACCESS 0x001b 277cf4c5a53SSam Leffler #define HostCmd_CMD_802_11_RADIO_CONTROL 0x001c 278cf4c5a53SSam Leffler #define HostCmd_CMD_802_11_RF_TX_POWER 0x001e 279cf4c5a53SSam Leffler #define HostCmd_CMD_802_11_RF_ANTENNA 0x0020 280cf4c5a53SSam Leffler #define HostCmd_CMD_SET_BEACON 0x0100 281cf4c5a53SSam Leffler #define HostCmd_CMD_SET_AID 0x010d 282cf4c5a53SSam Leffler #define HostCmd_CMD_SET_RF_CHANNEL 0x010a 283cf4c5a53SSam Leffler #define HostCmd_CMD_SET_INFRA_MODE 0x010e 284cf4c5a53SSam Leffler #define HostCmd_CMD_SET_G_PROTECT_FLAG 0x010f 285cf4c5a53SSam Leffler #define HostCmd_CMD_802_11_RTS_THSD 0x0113 286cf4c5a53SSam Leffler #define HostCmd_CMD_802_11_SET_SLOT 0x0114 287cf4c5a53SSam Leffler 288cf4c5a53SSam Leffler #define HostCmd_CMD_802_11H_DETECT_RADAR 0x0120 289cf4c5a53SSam Leffler #define HostCmd_CMD_SET_WMM_MODE 0x0123 290cf4c5a53SSam Leffler #define HostCmd_CMD_HT_GUARD_INTERVAL 0x0124 291cf4c5a53SSam Leffler #define HostCmd_CMD_SET_FIXED_RATE 0x0126 292cf4c5a53SSam Leffler #define HostCmd_CMD_SET_LINKADAPT_CS_MODE 0x0129 293cf4c5a53SSam Leffler #define HostCmd_CMD_SET_MAC_ADDR 0x0202 294cf4c5a53SSam Leffler #define HostCmd_CMD_SET_RATE_ADAPT_MODE 0x0203 295cf4c5a53SSam Leffler #define HostCmd_CMD_GET_WATCHDOG_BITMAP 0x0205 296cf4c5a53SSam Leffler 297cf4c5a53SSam Leffler //SoftAP command code 298cf4c5a53SSam Leffler #define HostCmd_CMD_BSS_START 0x1100 299cf4c5a53SSam Leffler #define HostCmd_CMD_SET_NEW_STN 0x1111 300cf4c5a53SSam Leffler #define HostCmd_CMD_SET_KEEP_ALIVE 0x1112 301cf4c5a53SSam Leffler #define HostCmd_CMD_SET_APMODE 0x1114 302cf4c5a53SSam Leffler #define HostCmd_CMD_SET_SWITCH_CHANNEL 0x1121 303cf4c5a53SSam Leffler 304cf4c5a53SSam Leffler /* 305cf4c5a53SSam Leffler @HWENCR@ 306cf4c5a53SSam Leffler Command to update firmware encryption keys. 307cf4c5a53SSam Leffler */ 308cf4c5a53SSam Leffler #define HostCmd_CMD_UPDATE_ENCRYPTION 0x1122 309cf4c5a53SSam Leffler /* 310cf4c5a53SSam Leffler @11E-BA@ 311cf4c5a53SSam Leffler Command to create/destroy block ACK 312cf4c5a53SSam Leffler */ 313cf4c5a53SSam Leffler #define HostCmd_CMD_BASTREAM 0x1125 314cf4c5a53SSam Leffler #define HostCmd_CMD_SET_RIFS 0x1126 315cf4c5a53SSam Leffler #define HostCmd_CMD_SET_N_PROTECT_FLAG 0x1131 316cf4c5a53SSam Leffler #define HostCmd_CMD_SET_N_PROTECT_OPMODE 0x1132 317cf4c5a53SSam Leffler #define HostCmd_CMD_SET_OPTIMIZATION_LEVEL 0x1133 318cf4c5a53SSam Leffler #define HostCmd_CMD_GET_CALTABLE 0x1134 319cf4c5a53SSam Leffler #define HostCmd_CMD_SET_MIMOPSHT 0x1135 320cf4c5a53SSam Leffler #define HostCmd_CMD_GET_BEACON 0x1138 321cf4c5a53SSam Leffler #define HostCmd_CMD_SET_REGION_CODE 0x1139 322cf4c5a53SSam Leffler #define HostCmd_CMD_SET_POWERSAVESTATION 0x1140 323cf4c5a53SSam Leffler #define HostCmd_CMD_SET_TIM 0x1141 324cf4c5a53SSam Leffler #define HostCmd_CMD_GET_TIM 0x1142 325cf4c5a53SSam Leffler #define HostCmd_CMD_GET_SEQNO 0x1143 3267850fa71SSam Leffler #define HostCmd_CMD_DWDS_ENABLE 0x1144 3277850fa71SSam Leffler #define HostCmd_CMD_AMPDU_RETRY_RATEDROP_MODE 0x1145 3287850fa71SSam Leffler #define HostCmd_CMD_CFEND_ENABLE 0x1146 329cf4c5a53SSam Leffler 330cf4c5a53SSam Leffler /* 331cf4c5a53SSam Leffler // Define general result code for each command 332cf4c5a53SSam Leffler */ 333cf4c5a53SSam Leffler #define HostCmd_RESULT_OK 0x0000 // OK 334cf4c5a53SSam Leffler #define HostCmd_RESULT_ERROR 0x0001 // Genenral error 335cf4c5a53SSam Leffler #define HostCmd_RESULT_NOT_SUPPORT 0x0002 // Command is not valid 336cf4c5a53SSam Leffler #define HostCmd_RESULT_PENDING 0x0003 // Command is pending (will be processed) 337cf4c5a53SSam Leffler #define HostCmd_RESULT_BUSY 0x0004 // System is busy (command ignored) 338cf4c5a53SSam Leffler #define HostCmd_RESULT_PARTIAL_DATA 0x0005 // Data buffer is not big enough 339cf4c5a53SSam Leffler 340cf4c5a53SSam Leffler /* 341cf4c5a53SSam Leffler // Definition of action or option for each command 342cf4c5a53SSam Leffler // 343cf4c5a53SSam Leffler // Define general purpose action 344cf4c5a53SSam Leffler */ 345cf4c5a53SSam Leffler #define HostCmd_ACT_GEN_READ 0x0000 346cf4c5a53SSam Leffler #define HostCmd_ACT_GEN_WRITE 0x0001 347cf4c5a53SSam Leffler #define HostCmd_ACT_GEN_GET 0x0000 348cf4c5a53SSam Leffler #define HostCmd_ACT_GEN_SET 0x0001 349cf4c5a53SSam Leffler #define HostCmd_ACT_GEN_OFF 0x0000 350cf4c5a53SSam Leffler #define HostCmd_ACT_GEN_ON 0x0001 351cf4c5a53SSam Leffler 352cf4c5a53SSam Leffler #define HostCmd_ACT_DIFF_CHANNEL 0x0002 353cf4c5a53SSam Leffler #define HostCmd_ACT_GEN_SET_LIST 0x0002 354cf4c5a53SSam Leffler 355cf4c5a53SSam Leffler // Define action or option for HostCmd_FW_USE_FIXED_RATE 356cf4c5a53SSam Leffler #define HostCmd_ACT_USE_FIXED_RATE 0x0001 357cf4c5a53SSam Leffler #define HostCmd_ACT_NOT_USE_FIXED_RATE 0x0002 358cf4c5a53SSam Leffler 359cf4c5a53SSam Leffler // Define action or option for HostCmd_CMD_802_11_SET_WEP 360cf4c5a53SSam Leffler //#define HostCmd_ACT_ENABLE 0x0001 // Use MAC control for WEP on/off 361cf4c5a53SSam Leffler //#define HostCmd_ACT_DISABLE 0x0000 362cf4c5a53SSam Leffler #define HostCmd_ACT_ADD 0x0002 363cf4c5a53SSam Leffler #define HostCmd_ACT_REMOVE 0x0004 364cf4c5a53SSam Leffler #define HostCmd_ACT_USE_DEFAULT 0x0008 365cf4c5a53SSam Leffler 366cf4c5a53SSam Leffler #define HostCmd_TYPE_WEP_40_BIT 0x0001 // 40 bit 367cf4c5a53SSam Leffler #define HostCmd_TYPE_WEP_104_BIT 0x0002 // 104 bit 368cf4c5a53SSam Leffler #define HostCmd_TYPE_WEP_128_BIT 0x0003 // 128 bit 369cf4c5a53SSam Leffler #define HostCmd_TYPE_WEP_TX_KEY 0x0004 // TX WEP 370cf4c5a53SSam Leffler 371cf4c5a53SSam Leffler #define HostCmd_NUM_OF_WEP_KEYS 4 372cf4c5a53SSam Leffler 373cf4c5a53SSam Leffler #define HostCmd_WEP_KEY_INDEX_MASK 0x3fffffff 374cf4c5a53SSam Leffler 375cf4c5a53SSam Leffler // Define action or option for HostCmd_CMD_802_11_RESET 376cf4c5a53SSam Leffler #define HostCmd_ACT_HALT 0x0001 377cf4c5a53SSam Leffler #define HostCmd_ACT_RESTART 0x0002 378cf4c5a53SSam Leffler 379cf4c5a53SSam Leffler // Define action or option for HostCmd_CMD_802_11_RADIO_CONTROL 380cf4c5a53SSam Leffler #define HostCmd_TYPE_AUTO_PREAMBLE 0x0001 381cf4c5a53SSam Leffler #define HostCmd_TYPE_SHORT_PREAMBLE 0x0002 382cf4c5a53SSam Leffler #define HostCmd_TYPE_LONG_PREAMBLE 0x0003 383cf4c5a53SSam Leffler 384cf4c5a53SSam Leffler // Define action or option for CMD_802_11_RF_CHANNEL 385cf4c5a53SSam Leffler #define HostCmd_TYPE_802_11A 0x0001 386cf4c5a53SSam Leffler #define HostCmd_TYPE_802_11B 0x0002 387cf4c5a53SSam Leffler 388cf4c5a53SSam Leffler // Define action or option for HostCmd_CMD_802_11_RF_TX_POWER 389cf4c5a53SSam Leffler #define HostCmd_ACT_TX_POWER_OPT_SET_HIGH 0x0003 390cf4c5a53SSam Leffler #define HostCmd_ACT_TX_POWER_OPT_SET_MID 0x0002 391cf4c5a53SSam Leffler #define HostCmd_ACT_TX_POWER_OPT_SET_LOW 0x0001 392cf4c5a53SSam Leffler #define HostCmd_ACT_TX_POWER_OPT_SET_AUTO 0x0000 393cf4c5a53SSam Leffler 394cf4c5a53SSam Leffler #define HostCmd_ACT_TX_POWER_LEVEL_MIN 0x000e // in dbm 395cf4c5a53SSam Leffler #define HostCmd_ACT_TX_POWER_LEVEL_GAP 0x0001 // in dbm 396cf4c5a53SSam Leffler // Define action or option for HostCmd_CMD_802_11_DATA_RATE 397cf4c5a53SSam Leffler #define HostCmd_ACT_SET_TX_AUTO 0x0000 398cf4c5a53SSam Leffler #define HostCmd_ACT_SET_TX_FIX_RATE 0x0001 399cf4c5a53SSam Leffler #define HostCmd_ACT_GET_TX_RATE 0x0002 400cf4c5a53SSam Leffler 401cf4c5a53SSam Leffler #define HostCmd_ACT_SET_RX 0x0001 402cf4c5a53SSam Leffler #define HostCmd_ACT_SET_TX 0x0002 403cf4c5a53SSam Leffler #define HostCmd_ACT_SET_BOTH 0x0003 404cf4c5a53SSam Leffler #define HostCmd_ACT_GET_RX 0x0004 405cf4c5a53SSam Leffler #define HostCmd_ACT_GET_TX 0x0008 406cf4c5a53SSam Leffler #define HostCmd_ACT_GET_BOTH 0x000c 407cf4c5a53SSam Leffler 408cf4c5a53SSam Leffler #define TYPE_ANTENNA_DIVERSITY 0xffff 409cf4c5a53SSam Leffler 410cf4c5a53SSam Leffler // Define action or option for HostCmd_CMD_802_11_PS_MODE 411cf4c5a53SSam Leffler #define HostCmd_TYPE_CAM 0x0000 412cf4c5a53SSam Leffler #define HostCmd_TYPE_MAX_PSP 0x0001 413cf4c5a53SSam Leffler #define HostCmd_TYPE_FAST_PSP 0x0002 414cf4c5a53SSam Leffler 415cf4c5a53SSam Leffler #define HostCmd_CMD_SET_EDCA_PARAMS 0x0115 416cf4c5a53SSam Leffler 417cf4c5a53SSam Leffler //============================================================================= 418cf4c5a53SSam Leffler // HOST COMMAND DEFINITIONS 419cf4c5a53SSam Leffler //============================================================================= 420cf4c5a53SSam Leffler 421cf4c5a53SSam Leffler // 422cf4c5a53SSam Leffler // Definition of data structure for each command 423cf4c5a53SSam Leffler // 424cf4c5a53SSam Leffler // Define general data structure 425cf4c5a53SSam Leffler typedef struct { 426cf4c5a53SSam Leffler uint16_t Cmd; 427cf4c5a53SSam Leffler uint16_t Length; 428cf4c5a53SSam Leffler #ifdef MWL_MBSS_SUPPORT 429cf4c5a53SSam Leffler uint8_t SeqNum; 430cf4c5a53SSam Leffler uint8_t MacId; 431cf4c5a53SSam Leffler #else 432cf4c5a53SSam Leffler uint16_t SeqNum; 433cf4c5a53SSam Leffler #endif 434cf4c5a53SSam Leffler uint16_t Result; 435cf4c5a53SSam Leffler } __packed FWCmdHdr; 436cf4c5a53SSam Leffler 437cf4c5a53SSam Leffler typedef struct { 438cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 439cf4c5a53SSam Leffler uint8_t Version; // HW revision 440cf4c5a53SSam Leffler uint8_t HostIf; // Host interface 441cf4c5a53SSam Leffler uint16_t NumOfMCastAdr; // Max. number of Multicast address FW can handle 442cf4c5a53SSam Leffler uint8_t PermanentAddr[6]; // MAC address 443cf4c5a53SSam Leffler uint16_t RegionCode; // Region Code 444cf4c5a53SSam Leffler uint32_t FWReleaseNumber; // 4 byte of FW release number 445cf4c5a53SSam Leffler uint32_t ulFwAwakeCookie; // Firmware awake cookie 446cf4c5a53SSam Leffler uint32_t DeviceCaps; // Device capabilities (see above) 447cf4c5a53SSam Leffler uint32_t RxPdWrPtr; // Rx shared memory queue 448cf4c5a53SSam Leffler uint32_t NumTxQueues; // # TX queues in WcbBase array 449cf4c5a53SSam Leffler uint32_t WcbBase[MAX_TXWCB_QUEUES]; // TX WCB Rings 450cf4c5a53SSam Leffler uint32_t Flags; 451cf4c5a53SSam Leffler #define SET_HW_SPEC_DISABLEMBSS 0x08 452cf4c5a53SSam Leffler #define SET_HW_SPEC_HOSTFORM_BEACON 0x10 453cf4c5a53SSam Leffler #define SET_HW_SPEC_HOSTFORM_PROBERESP 0x20 454cf4c5a53SSam Leffler #define SET_HW_SPEC_HOST_POWERSAVE 0x40 455cf4c5a53SSam Leffler #define SET_HW_SPEC_HOSTENCRDECR_MGMT 0x80 456cf4c5a53SSam Leffler uint32_t TxWcbNumPerQueue; 457cf4c5a53SSam Leffler uint32_t TotalRxWcb; 458cf4c5a53SSam Leffler } __packed HostCmd_DS_SET_HW_SPEC; 459cf4c5a53SSam Leffler 460cf4c5a53SSam Leffler typedef struct { 461cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 462cf4c5a53SSam Leffler u_int8_t Version; /* version of the HW */ 463cf4c5a53SSam Leffler u_int8_t HostIf; /* host interface */ 464cf4c5a53SSam Leffler u_int16_t NumOfWCB; /* Max. number of WCB FW can handle */ 465cf4c5a53SSam Leffler u_int16_t NumOfMCastAddr; /* MaxNbr of MC addresses FW can handle */ 466cf4c5a53SSam Leffler u_int8_t PermanentAddr[6]; /* MAC address programmed in HW */ 467cf4c5a53SSam Leffler u_int16_t RegionCode; 468cf4c5a53SSam Leffler u_int16_t NumberOfAntenna; /* Number of antenna used */ 469cf4c5a53SSam Leffler u_int32_t FWReleaseNumber; /* 4 byte of FW release number */ 470cf4c5a53SSam Leffler u_int32_t WcbBase0; 471cf4c5a53SSam Leffler u_int32_t RxPdWrPtr; 472cf4c5a53SSam Leffler u_int32_t RxPdRdPtr; 473cf4c5a53SSam Leffler u_int32_t ulFwAwakeCookie; 4747850fa71SSam Leffler u_int32_t WcbBase1[TOTAL_TX_QUEUES-1]; 475cf4c5a53SSam Leffler } __packed HostCmd_DS_GET_HW_SPEC; 476cf4c5a53SSam Leffler 477cf4c5a53SSam Leffler typedef struct { 478cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 479cf4c5a53SSam Leffler u_int32_t Enable; /* FALSE: Disable or TRUE: Enable */ 480cf4c5a53SSam Leffler } __packed HostCmd_DS_BSS_START; 481cf4c5a53SSam Leffler 482cf4c5a53SSam Leffler typedef struct { 483cf4c5a53SSam Leffler u_int8_t ElemId; 484cf4c5a53SSam Leffler u_int8_t Len; 485cf4c5a53SSam Leffler u_int8_t OuiType[4]; /* 00:50:f2:01 */ 486cf4c5a53SSam Leffler u_int8_t Ver[2]; 487cf4c5a53SSam Leffler u_int8_t GrpKeyCipher[4]; 488cf4c5a53SSam Leffler u_int8_t PwsKeyCnt[2]; 489cf4c5a53SSam Leffler u_int8_t PwsKeyCipherList[4]; 490cf4c5a53SSam Leffler u_int8_t AuthKeyCnt[2]; 491cf4c5a53SSam Leffler u_int8_t AuthKeyList[4]; 492cf4c5a53SSam Leffler } __packed RsnIE_t; 493cf4c5a53SSam Leffler 494cf4c5a53SSam Leffler typedef struct { 495cf4c5a53SSam Leffler u_int8_t ElemId; 496cf4c5a53SSam Leffler u_int8_t Len; 497cf4c5a53SSam Leffler u_int8_t Ver[2]; 498cf4c5a53SSam Leffler u_int8_t GrpKeyCipher[4]; 499cf4c5a53SSam Leffler u_int8_t PwsKeyCnt[2]; 500cf4c5a53SSam Leffler u_int8_t PwsKeyCipherList[4]; 501cf4c5a53SSam Leffler u_int8_t AuthKeyCnt[2]; 502cf4c5a53SSam Leffler u_int8_t AuthKeyList[4]; 503cf4c5a53SSam Leffler u_int8_t RsnCap[2]; 504cf4c5a53SSam Leffler } __packed Rsn48IE_t; 505cf4c5a53SSam Leffler 506cf4c5a53SSam Leffler typedef struct { 507cf4c5a53SSam Leffler u_int8_t ElementId; 508cf4c5a53SSam Leffler u_int8_t Len; 509cf4c5a53SSam Leffler u_int8_t CfpCnt; 510cf4c5a53SSam Leffler u_int8_t CfpPeriod; 511cf4c5a53SSam Leffler u_int16_t CfpMaxDuration; 512cf4c5a53SSam Leffler u_int16_t CfpDurationRemaining; 513cf4c5a53SSam Leffler } __packed CfParams_t; 514cf4c5a53SSam Leffler 515cf4c5a53SSam Leffler typedef struct { 516cf4c5a53SSam Leffler u_int8_t ElementId; 517cf4c5a53SSam Leffler u_int8_t Len; 518cf4c5a53SSam Leffler u_int16_t AtimWindow; 519cf4c5a53SSam Leffler } __packed IbssParams_t; 520cf4c5a53SSam Leffler 521cf4c5a53SSam Leffler typedef union { 522cf4c5a53SSam Leffler CfParams_t CfParamSet; 523cf4c5a53SSam Leffler IbssParams_t IbssParamSet; 524cf4c5a53SSam Leffler } __packed SsParams_t; 525cf4c5a53SSam Leffler 526cf4c5a53SSam Leffler typedef struct { 527cf4c5a53SSam Leffler u_int8_t ElementId; 528cf4c5a53SSam Leffler u_int8_t Len; 529cf4c5a53SSam Leffler u_int16_t DwellTime; 530cf4c5a53SSam Leffler u_int8_t HopSet; 531cf4c5a53SSam Leffler u_int8_t HopPattern; 532cf4c5a53SSam Leffler u_int8_t HopIndex; 533cf4c5a53SSam Leffler } __packed FhParams_t; 534cf4c5a53SSam Leffler 535cf4c5a53SSam Leffler typedef struct { 536cf4c5a53SSam Leffler u_int8_t ElementId; 537cf4c5a53SSam Leffler u_int8_t Len; 538cf4c5a53SSam Leffler u_int8_t CurrentChan; 539cf4c5a53SSam Leffler } __packed DsParams_t; 540cf4c5a53SSam Leffler 541cf4c5a53SSam Leffler typedef union { 542cf4c5a53SSam Leffler FhParams_t FhParamSet; 543cf4c5a53SSam Leffler DsParams_t DsParamSet; 544cf4c5a53SSam Leffler } __packed PhyParams_t; 545cf4c5a53SSam Leffler 546cf4c5a53SSam Leffler typedef struct { 547cf4c5a53SSam Leffler u_int8_t FirstChannelNum; 548cf4c5a53SSam Leffler u_int8_t NumOfChannels; 549cf4c5a53SSam Leffler u_int8_t MaxTxPwrLevel; 550cf4c5a53SSam Leffler } __packed ChannelInfo_t; 551cf4c5a53SSam Leffler 552cf4c5a53SSam Leffler typedef struct { 553cf4c5a53SSam Leffler u_int8_t ElementId; 554cf4c5a53SSam Leffler u_int8_t Len; 555cf4c5a53SSam Leffler u_int8_t CountryStr[3]; 556cf4c5a53SSam Leffler ChannelInfo_t ChannelInfo[40]; 557cf4c5a53SSam Leffler } __packed Country_t; 558cf4c5a53SSam Leffler 559cf4c5a53SSam Leffler typedef struct { 560cf4c5a53SSam Leffler u_int8_t AIFSN : 4; 561cf4c5a53SSam Leffler u_int8_t ACM : 1; 562cf4c5a53SSam Leffler u_int8_t ACI : 2; 563cf4c5a53SSam Leffler u_int8_t rsvd : 1; 564cf4c5a53SSam Leffler 565cf4c5a53SSam Leffler }__packed ACIAIFSN_field_t; 566cf4c5a53SSam Leffler 567cf4c5a53SSam Leffler typedef struct { 568cf4c5a53SSam Leffler u_int8_t ECW_min : 4; 569cf4c5a53SSam Leffler u_int8_t ECW_max : 4; 570cf4c5a53SSam Leffler }__packed ECWmin_max_field_t; 571cf4c5a53SSam Leffler 572cf4c5a53SSam Leffler typedef struct { 573cf4c5a53SSam Leffler ACIAIFSN_field_t ACI_AIFSN; 574cf4c5a53SSam Leffler ECWmin_max_field_t ECW_min_max; 575cf4c5a53SSam Leffler u_int16_t TXOP_lim; 576cf4c5a53SSam Leffler }__packed ACparam_rcd_t; 577cf4c5a53SSam Leffler 578cf4c5a53SSam Leffler typedef struct { 579cf4c5a53SSam Leffler u_int8_t ElementId; 580cf4c5a53SSam Leffler u_int8_t Len; 581cf4c5a53SSam Leffler u_int8_t OUI[3]; 582cf4c5a53SSam Leffler u_int8_t Type; 583cf4c5a53SSam Leffler u_int8_t Subtype; 584cf4c5a53SSam Leffler u_int8_t version; 585cf4c5a53SSam Leffler u_int8_t rsvd; 586cf4c5a53SSam Leffler ACparam_rcd_t AC_BE; 587cf4c5a53SSam Leffler ACparam_rcd_t AC_BK; 588cf4c5a53SSam Leffler ACparam_rcd_t AC_VI; 589cf4c5a53SSam Leffler ACparam_rcd_t AC_VO; 590cf4c5a53SSam Leffler } __packed WMM_param_elem_t ; 591cf4c5a53SSam Leffler 592cf4c5a53SSam Leffler typedef struct { 593cf4c5a53SSam Leffler #ifdef MWL_MBSS_SUPPORT 594cf4c5a53SSam Leffler u_int8_t StaMacAddr[6]; 595cf4c5a53SSam Leffler #endif 596cf4c5a53SSam Leffler u_int8_t SsId[32]; 597cf4c5a53SSam Leffler u_int8_t BssType; 598cf4c5a53SSam Leffler u_int16_t BcnPeriod; 599cf4c5a53SSam Leffler u_int8_t DtimPeriod; 600cf4c5a53SSam Leffler SsParams_t SsParamSet; 601cf4c5a53SSam Leffler PhyParams_t PhyParamSet; 602cf4c5a53SSam Leffler u_int16_t ProbeDelay; 603cf4c5a53SSam Leffler u_int16_t CapInfo; /* see below */ 604cf4c5a53SSam Leffler u_int8_t BssBasicRateSet[14]; 605cf4c5a53SSam Leffler u_int8_t OpRateSet[14]; 606cf4c5a53SSam Leffler RsnIE_t RsnIE; 607cf4c5a53SSam Leffler Rsn48IE_t Rsn48IE; 608cf4c5a53SSam Leffler WMM_param_elem_t WMMParam; 609cf4c5a53SSam Leffler Country_t Country; 610cf4c5a53SSam Leffler u_int32_t ApRFType; /* 0->B, 1->G, 2->Mixed, 3->A, 4->11J */ 611cf4c5a53SSam Leffler } __packed StartCmd_t; 612cf4c5a53SSam Leffler 613cf4c5a53SSam Leffler #define HostCmd_CAPINFO_DEFAULT 0x0000 614cf4c5a53SSam Leffler #define HostCmd_CAPINFO_ESS 0x0001 615cf4c5a53SSam Leffler #define HostCmd_CAPINFO_IBSS 0x0002 616cf4c5a53SSam Leffler #define HostCmd_CAPINFO_CF_POLLABLE 0x0004 617cf4c5a53SSam Leffler #define HostCmd_CAPINFO_CF_REQUEST 0x0008 618cf4c5a53SSam Leffler #define HostCmd_CAPINFO_PRIVACY 0x0010 619cf4c5a53SSam Leffler #define HostCmd_CAPINFO_SHORT_PREAMBLE 0x0020 620cf4c5a53SSam Leffler #define HostCmd_CAPINFO_PBCC 0x0040 621cf4c5a53SSam Leffler #define HostCmd_CAPINFO_CHANNEL_AGILITY 0x0080 622cf4c5a53SSam Leffler #define HostCmd_CAPINFO_SHORT_SLOT 0x0400 623cf4c5a53SSam Leffler #define HostCmd_CAPINFO_DSSS_OFDM 0x2000 624cf4c5a53SSam Leffler 625cf4c5a53SSam Leffler typedef struct { 626cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 627cf4c5a53SSam Leffler StartCmd_t StartCmd; 628cf4c5a53SSam Leffler } __packed HostCmd_DS_AP_BEACON; 629cf4c5a53SSam Leffler 630cf4c5a53SSam Leffler typedef struct { 631cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 632cf4c5a53SSam Leffler uint16_t FrmBodyLen; 633cf4c5a53SSam Leffler uint8_t FrmBody[1]; /* NB: variable length */ 634cf4c5a53SSam Leffler } __packed HostCmd_DS_SET_BEACON; 635cf4c5a53SSam Leffler 636cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_MAC_MULTICAST_ADR 637cf4c5a53SSam Leffler typedef struct { 638cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 639cf4c5a53SSam Leffler uint16_t Action; 640cf4c5a53SSam Leffler uint16_t NumOfAdrs; 641cf4c5a53SSam Leffler #define MWL_HAL_MCAST_MAX 32 642cf4c5a53SSam Leffler uint8_t MACList[6*32]; 643cf4c5a53SSam Leffler } __packed HostCmd_DS_MAC_MULTICAST_ADR; 644cf4c5a53SSam Leffler 645cf4c5a53SSam Leffler // Indicate to FW the current state of AP ERP info 646cf4c5a53SSam Leffler typedef struct { 647cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 648cf4c5a53SSam Leffler uint32_t GProtectFlag; 649cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_G_PROTECT_FLAG; 650cf4c5a53SSam Leffler 651cf4c5a53SSam Leffler typedef struct { 652cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 653cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_INFRA_MODE; 654cf4c5a53SSam Leffler 655cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_802_11_RF_CHANNEL 656cf4c5a53SSam Leffler typedef struct { 657cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 658cf4c5a53SSam Leffler uint16_t Action; 659cf4c5a53SSam Leffler uint8_t CurrentChannel; /* channel # */ 660cf4c5a53SSam Leffler uint32_t ChannelFlags; /* see below */ 661cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_RF_CHANNEL; 662cf4c5a53SSam Leffler 663cf4c5a53SSam Leffler /* bits 0-5 specify frequency band */ 664cf4c5a53SSam Leffler #define FREQ_BAND_2DOT4GHZ 0x0001 665cf4c5a53SSam Leffler #define FREQ_BAND_4DOT9GHZ 0x0002 /* XXX not implemented */ 666cf4c5a53SSam Leffler #define FREQ_BAND_5GHZ 0x0004 667cf4c5a53SSam Leffler #define FREQ_BAND_5DOT2GHZ 0x0008 /* XXX not implemented */ 668cf4c5a53SSam Leffler /* bits 6-10 specify channel width */ 669cf4c5a53SSam Leffler #define CH_AUTO_WIDTH 0x0000 /* XXX not used? */ 670cf4c5a53SSam Leffler #define CH_10_MHz_WIDTH 0x0040 671cf4c5a53SSam Leffler #define CH_20_MHz_WIDTH 0x0080 672cf4c5a53SSam Leffler #define CH_40_MHz_WIDTH 0x0100 673cf4c5a53SSam Leffler /* bits 11-12 specify extension channel */ 674cf4c5a53SSam Leffler #define EXT_CH_NONE 0x0000 /* no extension channel */ 675cf4c5a53SSam Leffler #define EXT_CH_ABOVE_CTRL_CH 0x0800 /* extension channel above */ 676cf4c5a53SSam Leffler #define EXT_CH_AUTO 0x1000 /* XXX not used? */ 677cf4c5a53SSam Leffler #define EXT_CH_BELOW_CTRL_CH 0x1800 /* extension channel below */ 678cf4c5a53SSam Leffler /* bits 13-31 are reserved */ 679cf4c5a53SSam Leffler 680cf4c5a53SSam Leffler #define FIXED_RATE_WITH_AUTO_RATE_DROP 0 681cf4c5a53SSam Leffler #define FIXED_RATE_WITHOUT_AUTORATE_DROP 1 682cf4c5a53SSam Leffler 683cf4c5a53SSam Leffler #define LEGACY_RATE_TYPE 0 684cf4c5a53SSam Leffler #define HT_RATE_TYPE 1 685cf4c5a53SSam Leffler 686cf4c5a53SSam Leffler #define RETRY_COUNT_VALID 0 687cf4c5a53SSam Leffler #define RETRY_COUNT_INVALID 1 688cf4c5a53SSam Leffler 689cf4c5a53SSam Leffler typedef struct { 690cf4c5a53SSam Leffler // lower rate after the retry count 691cf4c5a53SSam Leffler uint32_t FixRateType; //0: legacy, 1: HT 692cf4c5a53SSam Leffler uint32_t RetryCountValid; //0: retry count is not valid, 1: use retry count specified 693cf4c5a53SSam Leffler } __packed FIX_RATE_FLAG; 694cf4c5a53SSam Leffler 695cf4c5a53SSam Leffler typedef struct { 696cf4c5a53SSam Leffler FIX_RATE_FLAG FixRateTypeFlags; 697cf4c5a53SSam Leffler uint32_t FixedRate; // legacy rate(not index) or an MCS code. 698cf4c5a53SSam Leffler uint32_t RetryCount; 699cf4c5a53SSam Leffler } __packed FIXED_RATE_ENTRY; 700cf4c5a53SSam Leffler 701cf4c5a53SSam Leffler typedef struct { 702cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 703cf4c5a53SSam Leffler uint32_t Action; //HostCmd_ACT_GEN_GET 0x0000 704cf4c5a53SSam Leffler //HostCmd_ACT_GEN_SET 0x0001 705cf4c5a53SSam Leffler //HostCmd_ACT_NOT_USE_FIXED_RATE 0x0002 706cf4c5a53SSam Leffler uint32_t AllowRateDrop; // use fixed rate specified but firmware can drop to 707cf4c5a53SSam Leffler uint32_t EntryCount; 708cf4c5a53SSam Leffler FIXED_RATE_ENTRY FixedRateTable[4]; 709cf4c5a53SSam Leffler uint8_t MulticastRate; 710cf4c5a53SSam Leffler uint8_t MultiRateTxType; 711cf4c5a53SSam Leffler uint8_t ManagementRate; 712cf4c5a53SSam Leffler } __packed HostCmd_FW_USE_FIXED_RATE; 713cf4c5a53SSam Leffler 714cf4c5a53SSam Leffler typedef struct { 715cf4c5a53SSam Leffler uint32_t AllowRateDrop; 716cf4c5a53SSam Leffler uint32_t EntryCount; 717cf4c5a53SSam Leffler FIXED_RATE_ENTRY FixedRateTable[4]; 718cf4c5a53SSam Leffler } __packed USE_FIXED_RATE_INFO; 719cf4c5a53SSam Leffler 720cf4c5a53SSam Leffler typedef struct { 721cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 722cf4c5a53SSam Leffler uint32_t Action; 723cf4c5a53SSam Leffler uint32_t GIType; 724cf4c5a53SSam Leffler #define GI_TYPE_LONG 0x0001 725cf4c5a53SSam Leffler #define GI_TYPE_SHORT 0x0002 726cf4c5a53SSam Leffler } __packed HostCmd_FW_HT_GUARD_INTERVAL; 727cf4c5a53SSam Leffler 728cf4c5a53SSam Leffler typedef struct { 729cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 730cf4c5a53SSam Leffler uint32_t Action; 731cf4c5a53SSam Leffler uint8_t RxAntennaMap; 732cf4c5a53SSam Leffler uint8_t TxAntennaMap; 733cf4c5a53SSam Leffler } __packed HostCmd_FW_HT_MIMO_CONFIG; 734cf4c5a53SSam Leffler 735cf4c5a53SSam Leffler typedef struct { 736cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 737cf4c5a53SSam Leffler uint16_t Action; 738cf4c5a53SSam Leffler uint8_t Slot; // Slot=0 if regular, Slot=1 if short. 739cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_SLOT; 740cf4c5a53SSam Leffler 741cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_802_11_GET_STAT 742cf4c5a53SSam Leffler typedef struct { 743cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 744cf4c5a53SSam Leffler uint32_t TxRetrySuccesses; 745cf4c5a53SSam Leffler uint32_t TxMultipleRetrySuccesses; 746cf4c5a53SSam Leffler uint32_t TxFailures; 747cf4c5a53SSam Leffler uint32_t RTSSuccesses; 748cf4c5a53SSam Leffler uint32_t RTSFailures; 749cf4c5a53SSam Leffler uint32_t AckFailures; 750cf4c5a53SSam Leffler uint32_t RxDuplicateFrames; 751cf4c5a53SSam Leffler uint32_t FCSErrorCount; 752cf4c5a53SSam Leffler uint32_t TxWatchDogTimeouts; 753cf4c5a53SSam Leffler uint32_t RxOverflows; //used 754cf4c5a53SSam Leffler uint32_t RxFragErrors; //used 755cf4c5a53SSam Leffler uint32_t RxMemErrors; //used 756cf4c5a53SSam Leffler uint32_t PointerErrors; //used 757cf4c5a53SSam Leffler uint32_t TxUnderflows; //used 758cf4c5a53SSam Leffler uint32_t TxDone; 759cf4c5a53SSam Leffler uint32_t TxDoneBufTryPut; 760cf4c5a53SSam Leffler uint32_t TxDoneBufPut; 761cf4c5a53SSam Leffler uint32_t Wait4TxBuf; // Put size of requested buffer in here 762cf4c5a53SSam Leffler uint32_t TxAttempts; 763cf4c5a53SSam Leffler uint32_t TxSuccesses; 764cf4c5a53SSam Leffler uint32_t TxFragments; 765cf4c5a53SSam Leffler uint32_t TxMulticasts; 766cf4c5a53SSam Leffler uint32_t RxNonCtlPkts; 767cf4c5a53SSam Leffler uint32_t RxMulticasts; 768cf4c5a53SSam Leffler uint32_t RxUndecryptableFrames; 769cf4c5a53SSam Leffler uint32_t RxICVErrors; 770cf4c5a53SSam Leffler uint32_t RxExcludedFrames; 771cf4c5a53SSam Leffler } __packed HostCmd_DS_802_11_GET_STAT; 772cf4c5a53SSam Leffler 773cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_MAC_REG_ACCESS 774cf4c5a53SSam Leffler typedef struct { 775cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 776cf4c5a53SSam Leffler uint16_t Action; 777cf4c5a53SSam Leffler uint16_t Offset; 778cf4c5a53SSam Leffler uint32_t Value; 779cf4c5a53SSam Leffler uint16_t Reserved; 780cf4c5a53SSam Leffler } __packed HostCmd_DS_MAC_REG_ACCESS; 781cf4c5a53SSam Leffler 782cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_BBP_REG_ACCESS 783cf4c5a53SSam Leffler typedef struct { 784cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 785cf4c5a53SSam Leffler uint16_t Action; 786cf4c5a53SSam Leffler uint16_t Offset; 787cf4c5a53SSam Leffler uint8_t Value; 788cf4c5a53SSam Leffler uint8_t Reserverd[3]; 789cf4c5a53SSam Leffler } __packed HostCmd_DS_BBP_REG_ACCESS; 790cf4c5a53SSam Leffler 791cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_RF_REG_ACCESS 792cf4c5a53SSam Leffler typedef struct { 793cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 794cf4c5a53SSam Leffler uint16_t Action; 795cf4c5a53SSam Leffler uint16_t Offset; 796cf4c5a53SSam Leffler uint8_t Value; 797cf4c5a53SSam Leffler uint8_t Reserverd[3]; 798cf4c5a53SSam Leffler } __packed HostCmd_DS_RF_REG_ACCESS; 799cf4c5a53SSam Leffler 800cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_802_11_RADIO_CONTROL 801cf4c5a53SSam Leffler typedef struct { 802cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 803cf4c5a53SSam Leffler uint16_t Action; 804cf4c5a53SSam Leffler uint16_t Control; // @bit0: 1/0,on/off, @bit1: 1/0, long/short @bit2: 1/0,auto/fix 805cf4c5a53SSam Leffler uint16_t RadioOn; 806cf4c5a53SSam Leffler } __packed HostCmd_DS_802_11_RADIO_CONTROL; 807cf4c5a53SSam Leffler 808cf4c5a53SSam Leffler #define TX_POWER_LEVEL_TOTAL 8 809cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_802_11_RF_TX_POWER 810cf4c5a53SSam Leffler typedef struct { 811cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 812cf4c5a53SSam Leffler uint16_t Action; 813cf4c5a53SSam Leffler uint16_t SupportTxPowerLevel; 814cf4c5a53SSam Leffler uint16_t CurrentTxPowerLevel; 815cf4c5a53SSam Leffler uint16_t Reserved; 816cf4c5a53SSam Leffler uint16_t PowerLevelList[TX_POWER_LEVEL_TOTAL]; 817cf4c5a53SSam Leffler } __packed HostCmd_DS_802_11_RF_TX_POWER; 818cf4c5a53SSam Leffler 819cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_802_11_RF_ANTENNA 820cf4c5a53SSam Leffler typedef struct _HostCmd_DS_802_11_RF_ANTENNA { 821cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 822cf4c5a53SSam Leffler uint16_t Action; 823cf4c5a53SSam Leffler uint16_t AntennaMode; // Number of antennas or 0xffff(diversity) 824cf4c5a53SSam Leffler } __packed HostCmd_DS_802_11_RF_ANTENNA; 825cf4c5a53SSam Leffler 826cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_802_11_PS_MODE 827cf4c5a53SSam Leffler typedef struct { 828cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 829cf4c5a53SSam Leffler uint16_t Action; 830cf4c5a53SSam Leffler uint16_t PowerMode; // CAM, Max.PSP or Fast PSP 831cf4c5a53SSam Leffler } __packed HostCmd_DS_802_11_PS_MODE; 832cf4c5a53SSam Leffler 833cf4c5a53SSam Leffler typedef struct { 834cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 835cf4c5a53SSam Leffler uint16_t Action; 836cf4c5a53SSam Leffler uint16_t Threshold; 837cf4c5a53SSam Leffler } __packed HostCmd_DS_802_11_RTS_THSD; 838cf4c5a53SSam Leffler 839cf4c5a53SSam Leffler // used for stand alone bssid sets/clears 840cf4c5a53SSam Leffler typedef struct { 841cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 842cf4c5a53SSam Leffler #ifdef MWL_MBSS_SUPPORT 843cf4c5a53SSam Leffler uint16_t MacType; 844cf4c5a53SSam Leffler #define WL_MAC_TYPE_PRIMARY_CLIENT 0 845cf4c5a53SSam Leffler #define WL_MAC_TYPE_SECONDARY_CLIENT 1 846cf4c5a53SSam Leffler #define WL_MAC_TYPE_PRIMARY_AP 2 847cf4c5a53SSam Leffler #define WL_MAC_TYPE_SECONDARY_AP 3 848cf4c5a53SSam Leffler #endif 849cf4c5a53SSam Leffler uint8_t MacAddr[6]; 850cf4c5a53SSam Leffler } __packed HostCmd_DS_SET_MAC, 851cf4c5a53SSam Leffler HostCmd_FW_SET_BSSID, 852cf4c5a53SSam Leffler HostCmd_FW_SET_MAC; 853cf4c5a53SSam Leffler 854cf4c5a53SSam Leffler // Indicate to FW to send out PS Poll 855cf4c5a53SSam Leffler typedef struct { 856cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 857cf4c5a53SSam Leffler uint32_t PSPoll; 858cf4c5a53SSam Leffler } __packed HostCmd_FW_TX_POLL; 859cf4c5a53SSam Leffler 860cf4c5a53SSam Leffler // used for AID sets/clears 861cf4c5a53SSam Leffler typedef struct { 862cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 863cf4c5a53SSam Leffler uint16_t AssocID; 864cf4c5a53SSam Leffler uint8_t MacAddr[6]; //AP's Mac Address(BSSID) 865cf4c5a53SSam Leffler uint32_t GProtection; 866cf4c5a53SSam Leffler uint8_t ApRates[ RATE_INDEX_MAX_ARRAY]; 867cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_AID; 868cf4c5a53SSam Leffler 869cf4c5a53SSam Leffler typedef struct { 870cf4c5a53SSam Leffler uint32_t LegacyRateBitMap; 871cf4c5a53SSam Leffler uint32_t HTRateBitMap; 872cf4c5a53SSam Leffler uint16_t CapInfo; 873cf4c5a53SSam Leffler uint16_t HTCapabilitiesInfo; 874cf4c5a53SSam Leffler uint8_t MacHTParamInfo; 875cf4c5a53SSam Leffler uint8_t Rev; 876cf4c5a53SSam Leffler struct { 877cf4c5a53SSam Leffler uint8_t ControlChan; 878cf4c5a53SSam Leffler uint8_t AddChan; 879cf4c5a53SSam Leffler uint16_t OpMode; 880cf4c5a53SSam Leffler uint16_t stbc; 881cf4c5a53SSam Leffler } __packed AddHtInfo; 882cf4c5a53SSam Leffler } __packed PeerInfo_t; 883cf4c5a53SSam Leffler 884cf4c5a53SSam Leffler typedef struct { 885cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 886cf4c5a53SSam Leffler uint16_t AID; 887cf4c5a53SSam Leffler uint8_t MacAddr[6]; 888cf4c5a53SSam Leffler uint16_t StnId; 889cf4c5a53SSam Leffler uint16_t Action; 890cf4c5a53SSam Leffler uint16_t Reserved; 891cf4c5a53SSam Leffler PeerInfo_t PeerInfo; 892cf4c5a53SSam Leffler uint8_t Qosinfo; 893cf4c5a53SSam Leffler uint8_t isQosSta; 8947850fa71SSam Leffler uint32_t FwStaPtr; 895cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_NEW_STN; 896cf4c5a53SSam Leffler 897cf4c5a53SSam Leffler typedef struct { 898cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 899cf4c5a53SSam Leffler uint8_t tick; 900cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_KEEP_ALIVE_TICK; 901cf4c5a53SSam Leffler 902cf4c5a53SSam Leffler typedef struct { 903cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 904cf4c5a53SSam Leffler uint8_t QNum; 905cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_RIFS; 906cf4c5a53SSam Leffler 907cf4c5a53SSam Leffler typedef struct { 908cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 909cf4c5a53SSam Leffler uint8_t ApMode; 910cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_APMODE; 911cf4c5a53SSam Leffler 912cf4c5a53SSam Leffler typedef struct { 913cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 914cf4c5a53SSam Leffler uint16_t Action; // see following 915cf4c5a53SSam Leffler uint16_t RadarTypeCode; 916cf4c5a53SSam Leffler } __packed HostCmd_802_11h_Detect_Radar; 917cf4c5a53SSam Leffler 918cf4c5a53SSam Leffler #define DR_DFS_DISABLE 0 919cf4c5a53SSam Leffler #define DR_CHK_CHANNEL_AVAILABLE_START 1 920cf4c5a53SSam Leffler #define DR_CHK_CHANNEL_AVAILABLE_STOP 2 921cf4c5a53SSam Leffler #define DR_IN_SERVICE_MONITOR_START 3 922cf4c5a53SSam Leffler 923cf4c5a53SSam Leffler //New Structure for Update Tim 30/9/2003 924cf4c5a53SSam Leffler typedef struct { 925cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 926cf4c5a53SSam Leffler uint16_t Aid; 927cf4c5a53SSam Leffler uint32_t Set; 928cf4c5a53SSam Leffler } __packed HostCmd_UpdateTIM; 929cf4c5a53SSam Leffler 930cf4c5a53SSam Leffler typedef struct { 931cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 932cf4c5a53SSam Leffler uint32_t SsidBroadcastEnable; 933cf4c5a53SSam Leffler } __packed HostCmd_SSID_BROADCAST; 934cf4c5a53SSam Leffler 935cf4c5a53SSam Leffler typedef struct { 936cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 937cf4c5a53SSam Leffler uint32_t WdsEnable; 938cf4c5a53SSam Leffler } __packed HostCmd_WDS; 939cf4c5a53SSam Leffler 940cf4c5a53SSam Leffler typedef struct { 941cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 942cf4c5a53SSam Leffler uint32_t Next11hChannel; 943cf4c5a53SSam Leffler uint32_t Mode; 944cf4c5a53SSam Leffler uint32_t InitialCount; 945cf4c5a53SSam Leffler uint32_t ChannelFlags ; 946cf4c5a53SSam Leffler } __packed HostCmd_SET_SWITCH_CHANNEL; 947cf4c5a53SSam Leffler 948cf4c5a53SSam Leffler typedef struct { 949cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 950cf4c5a53SSam Leffler uint32_t SpectrumMgmt; 951cf4c5a53SSam Leffler } __packed HostCmd_SET_SPECTRUM_MGMT; 952cf4c5a53SSam Leffler 953cf4c5a53SSam Leffler typedef struct { 954cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 955cf4c5a53SSam Leffler int32_t PowerConstraint; 956cf4c5a53SSam Leffler } __packed HostCmd_SET_POWER_CONSTRAINT; 957cf4c5a53SSam Leffler 958cf4c5a53SSam Leffler typedef struct { 959cf4c5a53SSam Leffler uint8_t FirstChannelNo; 960cf4c5a53SSam Leffler uint8_t NoofChannel; 961cf4c5a53SSam Leffler uint8_t MaxTransmitPw; 962cf4c5a53SSam Leffler } __packed DomainChannelEntry; 963cf4c5a53SSam Leffler 964cf4c5a53SSam Leffler typedef struct { 965cf4c5a53SSam Leffler uint8_t CountryString[3]; 966cf4c5a53SSam Leffler uint8_t GChannelLen; 967cf4c5a53SSam Leffler DomainChannelEntry DomainEntryG[1]; /** Assume only 1 G zone **/ 968cf4c5a53SSam Leffler uint8_t AChannelLen; 969cf4c5a53SSam Leffler DomainChannelEntry DomainEntryA[20]; /** Assume max of 5 A zone **/ 970cf4c5a53SSam Leffler } __packed DomainCountryInfo; 971cf4c5a53SSam Leffler 972cf4c5a53SSam Leffler typedef struct { 973cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 974cf4c5a53SSam Leffler uint32_t Action ; // 0 -> unset, 1 ->set 975cf4c5a53SSam Leffler DomainCountryInfo DomainInfo ; 976cf4c5a53SSam Leffler } __packed HostCmd_SET_COUNTRY_INFO; 977cf4c5a53SSam Leffler 978cf4c5a53SSam Leffler typedef struct { 979cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 980cf4c5a53SSam Leffler uint16_t regionCode ; 981cf4c5a53SSam Leffler } __packed HostCmd_SET_REGIONCODE_INFO; 982cf4c5a53SSam Leffler 983cf4c5a53SSam Leffler // for HostCmd_CMD_SET_WMM_MODE 984cf4c5a53SSam Leffler typedef struct { 985cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 986cf4c5a53SSam Leffler uint16_t Action; // 0->unset, 1->set 987cf4c5a53SSam Leffler } __packed HostCmd_FW_SetWMMMode; 988cf4c5a53SSam Leffler 989cf4c5a53SSam Leffler typedef struct { 990cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 991cf4c5a53SSam Leffler uint16_t Action; // 0->unset, 1->set 992cf4c5a53SSam Leffler uint16_t IeListLen; 993cf4c5a53SSam Leffler uint8_t IeList[200]; 994cf4c5a53SSam Leffler } __packed HostCmd_FW_SetIEs; 995cf4c5a53SSam Leffler 996cf4c5a53SSam Leffler #define EDCA_PARAM_SIZE 18 997cf4c5a53SSam Leffler #define BA_PARAM_SIZE 2 998cf4c5a53SSam Leffler 999cf4c5a53SSam Leffler typedef struct { 1000cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1001cf4c5a53SSam Leffler uint16_t Action; //0 = get all, 0x1 =set CWMin/Max, 0x2 = set TXOP , 0x4 =set AIFSN 1002cf4c5a53SSam Leffler uint16_t TxOP; // in unit of 32 us 1003cf4c5a53SSam Leffler uint32_t CWMax; // 0~15 1004cf4c5a53SSam Leffler uint32_t CWMin; // 0~15 1005cf4c5a53SSam Leffler uint8_t AIFSN; 1006cf4c5a53SSam Leffler uint8_t TxQNum; // Tx Queue number. 1007cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_EDCA_PARAMS; 1008cf4c5a53SSam Leffler 1009cf4c5a53SSam Leffler /****************************************************************************** 1010cf4c5a53SSam Leffler @HWENCR@ 1011cf4c5a53SSam Leffler Hardware Encryption related data structures and constant definitions. 1012cf4c5a53SSam Leffler Note that all related changes are marked with the @HWENCR@ tag. 1013cf4c5a53SSam Leffler *******************************************************************************/ 1014cf4c5a53SSam Leffler 1015cf4c5a53SSam Leffler #define MAX_ENCR_KEY_LENGTH 16 /* max 128 bits - depends on type */ 1016cf4c5a53SSam Leffler #define MIC_KEY_LENGTH 8 /* size of Tx/Rx MIC key - 8 bytes*/ 1017cf4c5a53SSam Leffler 1018cf4c5a53SSam Leffler #define ENCR_KEY_TYPE_ID_WEP 0x00 /* Key type is WEP */ 1019cf4c5a53SSam Leffler #define ENCR_KEY_TYPE_ID_TKIP 0x01 /* Key type is TKIP */ 1020cf4c5a53SSam Leffler #define ENCR_KEY_TYPE_ID_AES 0x02 /* Key type is AES-CCMP */ 1021cf4c5a53SSam Leffler 1022cf4c5a53SSam Leffler /* flags used in structure - same as driver EKF_XXX flags */ 1023cf4c5a53SSam Leffler #define ENCR_KEY_FLAG_INUSE 0x00000001 /* indicate key is in use */ 1024cf4c5a53SSam Leffler #define ENCR_KEY_FLAG_RXGROUPKEY 0x00000002 /* Group key for RX only */ 1025cf4c5a53SSam Leffler #define ENCR_KEY_FLAG_TXGROUPKEY 0x00000004 /* Group key for TX */ 1026cf4c5a53SSam Leffler #define ENCR_KEY_FLAG_PAIRWISE 0x00000008 /* pairwise */ 1027cf4c5a53SSam Leffler #define ENCR_KEY_FLAG_RXONLY 0x00000010 /* only used for RX */ 1028cf4c5a53SSam Leffler // These flags are new additions - for hardware encryption commands only. 1029cf4c5a53SSam Leffler #define ENCR_KEY_FLAG_AUTHENTICATOR 0x00000020 /* Key is for Authenticator */ 1030cf4c5a53SSam Leffler #define ENCR_KEY_FLAG_TSC_VALID 0x00000040 /* Sequence counters valid */ 1031cf4c5a53SSam Leffler #define ENCR_KEY_FLAG_WEP_TXKEY 0x01000000 /* Tx key for WEP */ 1032cf4c5a53SSam Leffler #define ENCR_KEY_FLAG_MICKEY_VALID 0x02000000 /* Tx/Rx MIC keys are valid */ 1033cf4c5a53SSam Leffler 1034cf4c5a53SSam Leffler /* 1035cf4c5a53SSam Leffler UPDATE_ENCRYPTION command action type. 1036cf4c5a53SSam Leffler */ 1037cf4c5a53SSam Leffler typedef enum { 1038cf4c5a53SSam Leffler // request to enable/disable HW encryption 1039cf4c5a53SSam Leffler EncrActionEnableHWEncryption, 1040cf4c5a53SSam Leffler // request to set encryption key 1041cf4c5a53SSam Leffler EncrActionTypeSetKey, 1042cf4c5a53SSam Leffler // request to remove one or more keys 1043cf4c5a53SSam Leffler EncrActionTypeRemoveKey, 1044cf4c5a53SSam Leffler EncrActionTypeSetGroupKey 1045cf4c5a53SSam Leffler } ENCR_ACTION_TYPE; 1046cf4c5a53SSam Leffler 1047cf4c5a53SSam Leffler /* 1048cf4c5a53SSam Leffler Key material definitions (for WEP, TKIP, & AES-CCMP) 1049cf4c5a53SSam Leffler */ 1050cf4c5a53SSam Leffler 1051cf4c5a53SSam Leffler /* 1052cf4c5a53SSam Leffler WEP Key material definition 1053cf4c5a53SSam Leffler ---------------------------- 1054cf4c5a53SSam Leffler WEPKey --> An array of 'MAX_ENCR_KEY_LENGTH' bytes. 1055cf4c5a53SSam Leffler Note that we do not support 152bit WEP keys 1056cf4c5a53SSam Leffler */ 1057cf4c5a53SSam Leffler typedef struct { 1058cf4c5a53SSam Leffler // WEP key material (max 128bit) 1059cf4c5a53SSam Leffler uint8_t KeyMaterial[ MAX_ENCR_KEY_LENGTH ]; 1060cf4c5a53SSam Leffler } __packed WEP_TYPE_KEY; 1061cf4c5a53SSam Leffler 1062cf4c5a53SSam Leffler /* 1063cf4c5a53SSam Leffler TKIP Key material definition 1064cf4c5a53SSam Leffler ---------------------------- 1065cf4c5a53SSam Leffler This structure defines TKIP key material. Note that 1066cf4c5a53SSam Leffler the TxMicKey and RxMicKey may or may not be valid. 1067cf4c5a53SSam Leffler */ 1068cf4c5a53SSam Leffler /* TKIP Sequence counter - 24 bits */ 1069cf4c5a53SSam Leffler /* Incremented on each fragment MPDU */ 1070cf4c5a53SSam Leffler typedef struct { 1071cf4c5a53SSam Leffler uint16_t low; 1072cf4c5a53SSam Leffler uint32_t high; 1073cf4c5a53SSam Leffler } __packed ENCR_TKIPSEQCNT; 1074cf4c5a53SSam Leffler 1075cf4c5a53SSam Leffler typedef struct { 1076cf4c5a53SSam Leffler // TKIP Key material. Key type (group or pairwise key) is 1077cf4c5a53SSam Leffler // determined by flags in KEY_PARAM_SET structure. 1078cf4c5a53SSam Leffler uint8_t KeyMaterial[ MAX_ENCR_KEY_LENGTH ]; 1079cf4c5a53SSam Leffler uint8_t TkipTxMicKey[ MIC_KEY_LENGTH ]; 1080cf4c5a53SSam Leffler uint8_t TkipRxMicKey[ MIC_KEY_LENGTH ]; 1081cf4c5a53SSam Leffler ENCR_TKIPSEQCNT TkipRsc; 1082cf4c5a53SSam Leffler ENCR_TKIPSEQCNT TkipTsc; 1083cf4c5a53SSam Leffler } __packed TKIP_TYPE_KEY; 1084cf4c5a53SSam Leffler 1085cf4c5a53SSam Leffler /* 1086cf4c5a53SSam Leffler AES-CCMP Key material definition 1087cf4c5a53SSam Leffler -------------------------------- 1088cf4c5a53SSam Leffler This structure defines AES-CCMP key material. 1089cf4c5a53SSam Leffler */ 1090cf4c5a53SSam Leffler typedef struct { 1091cf4c5a53SSam Leffler // AES Key material 1092cf4c5a53SSam Leffler uint8_t KeyMaterial[ MAX_ENCR_KEY_LENGTH ]; 1093cf4c5a53SSam Leffler } __packed AES_TYPE_KEY; 1094cf4c5a53SSam Leffler 1095cf4c5a53SSam Leffler /* 1096cf4c5a53SSam Leffler Encryption key definition. 1097cf4c5a53SSam Leffler -------------------------- 1098cf4c5a53SSam Leffler This structure provides all required/essential 1099cf4c5a53SSam Leffler information about the key being set/removed. 1100cf4c5a53SSam Leffler */ 1101cf4c5a53SSam Leffler typedef struct { 1102cf4c5a53SSam Leffler uint16_t Length; // Total length of this structure 1103cf4c5a53SSam Leffler uint16_t KeyTypeId; // Key type - WEP, TKIP or AES-CCMP. 1104cf4c5a53SSam Leffler uint32_t KeyInfo; // key flags (ENCR_KEY_FLAG_XXX_ 1105cf4c5a53SSam Leffler uint32_t KeyIndex; // For WEP only - actual key index 1106cf4c5a53SSam Leffler uint16_t KeyLen; // Size of the key 1107cf4c5a53SSam Leffler union { // Key material (variable size array) 1108cf4c5a53SSam Leffler WEP_TYPE_KEY WepKey; 1109cf4c5a53SSam Leffler TKIP_TYPE_KEY TkipKey; 1110cf4c5a53SSam Leffler AES_TYPE_KEY AesKey; 1111cf4c5a53SSam Leffler }__packed Key; 1112cf4c5a53SSam Leffler #ifdef MWL_MBSS_SUPPORT 1113cf4c5a53SSam Leffler uint8_t Macaddr[6]; 1114cf4c5a53SSam Leffler #endif 1115cf4c5a53SSam Leffler } __packed KEY_PARAM_SET; 1116cf4c5a53SSam Leffler 1117cf4c5a53SSam Leffler /* 1118cf4c5a53SSam Leffler HostCmd_FW_UPDATE_ENCRYPTION 1119cf4c5a53SSam Leffler ---------------------------- 1120cf4c5a53SSam Leffler Define data structure for updating firmware encryption keys. 1121cf4c5a53SSam Leffler 1122cf4c5a53SSam Leffler */ 1123cf4c5a53SSam Leffler typedef struct { 1124cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1125cf4c5a53SSam Leffler uint32_t ActionType; // ENCR_ACTION_TYPE 1126cf4c5a53SSam Leffler uint32_t DataLength; // size of the data buffer attached. 1127cf4c5a53SSam Leffler #ifdef MWL_MBSS_SUPPORT 1128cf4c5a53SSam Leffler uint8_t macaddr[6]; 1129cf4c5a53SSam Leffler #endif 1130cf4c5a53SSam Leffler uint8_t ActionData[1]; 1131cf4c5a53SSam Leffler } __packed HostCmd_FW_UPDATE_ENCRYPTION; 1132cf4c5a53SSam Leffler 1133cf4c5a53SSam Leffler typedef struct { 1134cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1135cf4c5a53SSam Leffler uint32_t ActionType; // ENCR_ACTION_TYPE 1136cf4c5a53SSam Leffler uint32_t DataLength; // size of the data buffer attached. 1137cf4c5a53SSam Leffler KEY_PARAM_SET KeyParam; 1138cf4c5a53SSam Leffler #ifndef MWL_MBSS_SUPPORT 1139cf4c5a53SSam Leffler uint8_t Macaddr[8]; /* XXX? */ 1140cf4c5a53SSam Leffler #endif 1141cf4c5a53SSam Leffler } __packed HostCmd_FW_UPDATE_ENCRYPTION_SET_KEY; 1142cf4c5a53SSam Leffler 1143cf4c5a53SSam Leffler typedef struct { 1144cf4c5a53SSam Leffler // Rate flags - see above. 1145cf4c5a53SSam Leffler uint32_t Flags; 1146cf4c5a53SSam Leffler // Rate in 500Kbps units. 1147cf4c5a53SSam Leffler uint8_t RateKbps; 1148cf4c5a53SSam Leffler // 802.11 rate to conversion table index value. 1149cf4c5a53SSam Leffler // This is the value required by the firmware/hardware. 1150cf4c5a53SSam Leffler uint16_t RateCodeToIndex; 1151cf4c5a53SSam Leffler }__packed RATE_INFO; 1152cf4c5a53SSam Leffler 1153cf4c5a53SSam Leffler /* 1154cf4c5a53SSam Leffler UPDATE_STADB command action type. 1155cf4c5a53SSam Leffler */ 1156cf4c5a53SSam Leffler typedef enum { 1157cf4c5a53SSam Leffler // request to add entry to stainfo db 1158cf4c5a53SSam Leffler StaInfoDbActionAddEntry, 1159cf4c5a53SSam Leffler // request to modify peer entry 1160cf4c5a53SSam Leffler StaInfoDbActionModifyEntry, 1161cf4c5a53SSam Leffler // request to remove peer from stainfo db 1162cf4c5a53SSam Leffler StaInfoDbActionRemoveEntry 1163cf4c5a53SSam Leffler }__packed STADB_ACTION_TYPE; 1164cf4c5a53SSam Leffler 1165cf4c5a53SSam Leffler /* 1166cf4c5a53SSam Leffler @11E-BA@ 1167cf4c5a53SSam Leffler 802.11e/WMM Related command(s)/data structures 1168cf4c5a53SSam Leffler */ 1169cf4c5a53SSam Leffler 1170cf4c5a53SSam Leffler // Flag to indicate if the stream is an immediate block ack stream. 1171cf4c5a53SSam Leffler // if this bit is not set, the stream is delayed block ack stream. 1172cf4c5a53SSam Leffler #define BASTREAM_FLAG_DELAYED_TYPE 0x00 1173cf4c5a53SSam Leffler #define BASTREAM_FLAG_IMMEDIATE_TYPE 0x01 1174cf4c5a53SSam Leffler 1175cf4c5a53SSam Leffler // Flag to indicate the direction of the stream (upstream/downstream). 1176cf4c5a53SSam Leffler // If this bit is not set, the direction is downstream. 1177cf4c5a53SSam Leffler #define BASTREAM_FLAG_DIRECTION_UPSTREAM 0x00 1178cf4c5a53SSam Leffler #define BASTREAM_FLAG_DIRECTION_DOWNSTREAM 0x02 1179cf4c5a53SSam Leffler #define BASTREAM_FLAG_DIRECTION_DLP 0x04 1180cf4c5a53SSam Leffler #define BASTREAM_FLAG_DIRECTION_BOTH 0x06 1181cf4c5a53SSam Leffler 1182cf4c5a53SSam Leffler typedef enum { 1183cf4c5a53SSam Leffler BaCreateStream, 1184cf4c5a53SSam Leffler BaUpdateStream, 1185cf4c5a53SSam Leffler BaDestroyStream, 1186cf4c5a53SSam Leffler BaFlushStream, 1187cf4c5a53SSam Leffler BaCheckCreateStream 1188cf4c5a53SSam Leffler } BASTREAM_ACTION_TYPE; 1189cf4c5a53SSam Leffler 1190cf4c5a53SSam Leffler typedef struct { 1191cf4c5a53SSam Leffler uint32_t Context; 1192cf4c5a53SSam Leffler } __packed BASTREAM_CONTEXT; 1193cf4c5a53SSam Leffler 1194cf4c5a53SSam Leffler // parameters for block ack creation 1195cf4c5a53SSam Leffler typedef struct { 1196cf4c5a53SSam Leffler // BA Creation flags - see above 1197cf4c5a53SSam Leffler uint32_t Flags; 1198cf4c5a53SSam Leffler // idle threshold 1199cf4c5a53SSam Leffler uint32_t IdleThrs; 1200cf4c5a53SSam Leffler // block ack transmit threshold (after how many pkts should we send BAR?) 1201cf4c5a53SSam Leffler uint32_t BarThrs; 1202cf4c5a53SSam Leffler // receiver window size 1203cf4c5a53SSam Leffler uint32_t WindowSize; 1204cf4c5a53SSam Leffler // MAC Address of the BA partner 1205cf4c5a53SSam Leffler uint8_t PeerMacAddr[6]; 1206cf4c5a53SSam Leffler // Dialog Token 1207cf4c5a53SSam Leffler uint8_t DialogToken; 1208cf4c5a53SSam Leffler //TID for the traffic stream in this BA 1209cf4c5a53SSam Leffler uint8_t Tid; 1210cf4c5a53SSam Leffler // shared memory queue ID (not sure if this is required) 1211cf4c5a53SSam Leffler uint8_t QueueId; 1212cf4c5a53SSam Leffler uint8_t ParamInfo; 1213cf4c5a53SSam Leffler // returned by firmware - firmware context pointer. 1214cf4c5a53SSam Leffler // this context pointer will be passed to firmware for all future commands. 1215cf4c5a53SSam Leffler BASTREAM_CONTEXT FwBaContext; 1216cf4c5a53SSam Leffler uint8_t ResetSeqNo; /** 0 or 1**/ 1217cf4c5a53SSam Leffler uint16_t StartSeqNo; 12187850fa71SSam Leffler 12197850fa71SSam Leffler // proxy sta MAC Address 12207850fa71SSam Leffler uint8_t StaSrcMacAddr[6]; 1221cf4c5a53SSam Leffler }__packed BASTREAM_CREATE_STREAM; 1222cf4c5a53SSam Leffler 1223cf4c5a53SSam Leffler // new transmit sequence number information 1224cf4c5a53SSam Leffler typedef struct { 1225cf4c5a53SSam Leffler // BA flags - see above 1226cf4c5a53SSam Leffler uint32_t Flags; 1227cf4c5a53SSam Leffler // returned by firmware in the create ba stream response 1228cf4c5a53SSam Leffler BASTREAM_CONTEXT FwBaContext; 1229cf4c5a53SSam Leffler // new sequence number for this block ack stream 1230cf4c5a53SSam Leffler uint16_t BaSeqNum; 1231cf4c5a53SSam Leffler }__packed BASTREAM_UPDATE_STREAM; 1232cf4c5a53SSam Leffler 1233cf4c5a53SSam Leffler typedef struct { 1234cf4c5a53SSam Leffler // BA Stream flags 1235cf4c5a53SSam Leffler uint32_t Flags; 1236cf4c5a53SSam Leffler // returned by firmware in the create ba stream response 1237cf4c5a53SSam Leffler BASTREAM_CONTEXT FwBaContext; 1238cf4c5a53SSam Leffler }__packed BASTREAM_STREAM_INFO; 1239cf4c5a53SSam Leffler 1240cf4c5a53SSam Leffler //Command to create/destroy block ACK 1241cf4c5a53SSam Leffler typedef struct { 1242cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1243cf4c5a53SSam Leffler uint32_t ActionType; 1244cf4c5a53SSam Leffler union 1245cf4c5a53SSam Leffler { 1246cf4c5a53SSam Leffler // information required to create BA Stream... 1247cf4c5a53SSam Leffler BASTREAM_CREATE_STREAM CreateParams; 1248cf4c5a53SSam Leffler // update starting/new sequence number etc. 1249cf4c5a53SSam Leffler BASTREAM_UPDATE_STREAM UpdtSeqNum; 1250cf4c5a53SSam Leffler // destroy an existing stream... 1251cf4c5a53SSam Leffler BASTREAM_STREAM_INFO DestroyParams; 1252cf4c5a53SSam Leffler // destroy an existing stream... 1253cf4c5a53SSam Leffler BASTREAM_STREAM_INFO FlushParams; 1254cf4c5a53SSam Leffler }__packed BaInfo; 1255cf4c5a53SSam Leffler }__packed HostCmd_FW_BASTREAM; 1256cf4c5a53SSam Leffler 1257cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_GET_WATCHDOG_BITMAP 1258cf4c5a53SSam Leffler typedef struct { 1259cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1260cf4c5a53SSam Leffler uint8_t Watchdogbitmap; // for SW/BA 1261cf4c5a53SSam Leffler } __packed HostCmd_FW_GET_WATCHDOG_BITMAP; 1262cf4c5a53SSam Leffler 1263cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_SET_REGION_POWER 1264cf4c5a53SSam Leffler typedef struct { 1265cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1266cf4c5a53SSam Leffler uint16_t MaxPowerLevel; 1267cf4c5a53SSam Leffler uint16_t Reserved; 1268cf4c5a53SSam Leffler } __packed HostCmd_DS_SET_REGION_POWER; 1269cf4c5a53SSam Leffler 1270cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_SET_RATE_ADAPT_MODE 1271cf4c5a53SSam Leffler typedef struct { 1272cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1273cf4c5a53SSam Leffler uint16_t Action; 1274cf4c5a53SSam Leffler uint16_t RateAdaptMode; 1275cf4c5a53SSam Leffler } __packed HostCmd_DS_SET_RATE_ADAPT_MODE; 1276cf4c5a53SSam Leffler 1277cf4c5a53SSam Leffler // Define data structure for HostCmd_CMD_SET_LINKADAPT_CS_MODE 1278cf4c5a53SSam Leffler typedef struct { 1279cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1280cf4c5a53SSam Leffler uint16_t Action; 1281cf4c5a53SSam Leffler uint16_t CSMode; 1282cf4c5a53SSam Leffler } __packed HostCmd_DS_SET_LINKADAPT_CS_MODE; 1283cf4c5a53SSam Leffler 1284cf4c5a53SSam Leffler typedef struct { 1285cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1286cf4c5a53SSam Leffler uint32_t NProtectFlag; 1287cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_N_PROTECT_FLAG; 1288cf4c5a53SSam Leffler 1289cf4c5a53SSam Leffler typedef struct { 1290cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1291cf4c5a53SSam Leffler uint8_t NProtectOpMode; 1292cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_N_PROTECT_OPMODE; 1293cf4c5a53SSam Leffler 1294cf4c5a53SSam Leffler typedef struct { 1295cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1296cf4c5a53SSam Leffler uint8_t OptLevel; 1297cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_OPTIMIZATION_LEVEL; 1298cf4c5a53SSam Leffler 1299cf4c5a53SSam Leffler typedef struct { 1300cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1301cf4c5a53SSam Leffler uint8_t annex; 1302cf4c5a53SSam Leffler uint8_t index; 1303cf4c5a53SSam Leffler uint8_t len; 1304cf4c5a53SSam Leffler uint8_t Reserverd; 1305cf4c5a53SSam Leffler #define CAL_TBL_SIZE 160 1306cf4c5a53SSam Leffler uint8_t calTbl[CAL_TBL_SIZE]; 1307cf4c5a53SSam Leffler } __packed HostCmd_FW_GET_CALTABLE; 1308cf4c5a53SSam Leffler 1309cf4c5a53SSam Leffler typedef struct { 1310cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1311cf4c5a53SSam Leffler uint8_t Addr[6]; 1312cf4c5a53SSam Leffler uint8_t Enable; 1313cf4c5a53SSam Leffler uint8_t Mode; 1314cf4c5a53SSam Leffler } __packed HostCmd_FW_SET_MIMOPSHT; 1315cf4c5a53SSam Leffler 1316cf4c5a53SSam Leffler #define MAX_BEACON_SIZE 1024 1317cf4c5a53SSam Leffler typedef struct { 1318cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1319cf4c5a53SSam Leffler uint16_t Bcnlen; 1320cf4c5a53SSam Leffler uint8_t Reserverd[2]; 1321cf4c5a53SSam Leffler uint8_t Bcn[MAX_BEACON_SIZE]; 1322cf4c5a53SSam Leffler } __packed HostCmd_FW_GET_BEACON; 1323cf4c5a53SSam Leffler 1324cf4c5a53SSam Leffler typedef struct { 1325cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1326cf4c5a53SSam Leffler uint8_t NumberOfPowersave; 1327cf4c5a53SSam Leffler uint8_t reserved; 1328cf4c5a53SSam Leffler } __packed HostCmd_SET_POWERSAVESTATION; 1329cf4c5a53SSam Leffler 1330cf4c5a53SSam Leffler typedef struct { 1331cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1332cf4c5a53SSam Leffler uint16_t Aid; 1333cf4c5a53SSam Leffler uint32_t Set; 1334cf4c5a53SSam Leffler uint8_t reserved; 1335cf4c5a53SSam Leffler } __packed HostCmd_SET_TIM; 1336cf4c5a53SSam Leffler 1337cf4c5a53SSam Leffler typedef struct { 1338cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1339cf4c5a53SSam Leffler uint8_t TrafficMap[251]; 1340cf4c5a53SSam Leffler uint8_t reserved; 1341cf4c5a53SSam Leffler } __packed HostCmd_GET_TIM; 1342cf4c5a53SSam Leffler 1343cf4c5a53SSam Leffler typedef struct { 1344cf4c5a53SSam Leffler FWCmdHdr CmdHdr; 1345cf4c5a53SSam Leffler uint8_t MacAddr[6]; 1346cf4c5a53SSam Leffler uint8_t TID; 1347cf4c5a53SSam Leffler uint16_t SeqNo; 1348cf4c5a53SSam Leffler uint8_t reserved; 1349cf4c5a53SSam Leffler } __packed HostCmd_GET_SEQNO; 13507850fa71SSam Leffler 13517850fa71SSam Leffler typedef struct { 13527850fa71SSam Leffler FWCmdHdr CmdHdr; 13537850fa71SSam Leffler uint32_t Enable; //0 -- Disbale. or 1 -- Enable. 13547850fa71SSam Leffler } __packed HostCmd_DWDS_ENABLE; 13557850fa71SSam Leffler 13567850fa71SSam Leffler typedef struct { 13577850fa71SSam Leffler FWCmdHdr CmdHdr; 13587850fa71SSam Leffler uint16_t Action; /* 0: Get. 1:Set */ 13597850fa71SSam Leffler uint32_t Option; /* 0: default. 1:Aggressive */ 13607850fa71SSam Leffler uint32_t Threshold; /* Range 0-200, default 8 */ 13617850fa71SSam Leffler }__packed HostCmd_FW_AMPDU_RETRY_RATEDROP_MODE; 13627850fa71SSam Leffler 13637850fa71SSam Leffler typedef struct { 13647850fa71SSam Leffler FWCmdHdr CmdHdr; 13657850fa71SSam Leffler uint32_t Enable; /* 0 -- Disable. or 1 -- Enable */ 13667850fa71SSam Leffler }__packed HostCmd_CFEND_ENABLE; 1367cf4c5a53SSam Leffler #endif /* _MWL_HALREG_H_ */ 1368