Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 1 | /* |
| 2 | * This file contains the function prototypes, data structure |
| 3 | * and defines for all the host/station commands |
| 4 | */ |
Holger Schurig | 1007832 | 2007-11-15 18:05:47 -0500 | [diff] [blame] | 5 | #ifndef _LBS_HOSTCMD_H |
| 6 | #define _LBS_HOSTCMD_H |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 7 | |
| 8 | #include <linux/wireless.h> |
| 9 | #include "11d.h" |
| 10 | #include "types.h" |
| 11 | |
| 12 | /* 802.11-related definitions */ |
| 13 | |
| 14 | /* TxPD descriptor */ |
| 15 | struct txpd { |
Bing Zhao | 684d6b3 | 2009-03-25 09:51:16 -0700 | [diff] [blame] | 16 | /* union to cope up with later FW revisions */ |
| 17 | union { |
| 18 | /* Current Tx packet status */ |
| 19 | __le32 tx_status; |
| 20 | struct { |
| 21 | /* BSS type: client, AP, etc. */ |
| 22 | u8 bss_type; |
| 23 | /* BSS number */ |
| 24 | u8 bss_num; |
| 25 | /* Reserved */ |
| 26 | __le16 reserved; |
| 27 | } bss; |
| 28 | } u; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 29 | /* Tx control */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 30 | __le32 tx_control; |
| 31 | __le32 tx_packet_location; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 32 | /* Tx packet length */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 33 | __le16 tx_packet_length; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 34 | /* First 2 byte of destination MAC address */ |
| 35 | u8 tx_dest_addr_high[2]; |
| 36 | /* Last 4 byte of destination MAC address */ |
| 37 | u8 tx_dest_addr_low[4]; |
| 38 | /* Pkt Priority */ |
| 39 | u8 priority; |
| 40 | /* Pkt Trasnit Power control */ |
| 41 | u8 powermgmt; |
| 42 | /* Amount of time the packet has been queued in the driver (units = 2ms) */ |
| 43 | u8 pktdelay_2ms; |
| 44 | /* reserved */ |
| 45 | u8 reserved1; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 46 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 47 | |
| 48 | /* RxPD Descriptor */ |
| 49 | struct rxpd { |
Bing Zhao | 684d6b3 | 2009-03-25 09:51:16 -0700 | [diff] [blame] | 50 | /* union to cope up with later FW revisions */ |
| 51 | union { |
| 52 | /* Current Rx packet status */ |
| 53 | __le16 status; |
| 54 | struct { |
| 55 | /* BSS type: client, AP, etc. */ |
| 56 | u8 bss_type; |
| 57 | /* BSS number */ |
| 58 | u8 bss_num; |
| 59 | } bss; |
| 60 | } u; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 61 | |
| 62 | /* SNR */ |
| 63 | u8 snr; |
| 64 | |
| 65 | /* Tx control */ |
| 66 | u8 rx_control; |
| 67 | |
| 68 | /* Pkt length */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 69 | __le16 pkt_len; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 70 | |
| 71 | /* Noise Floor */ |
| 72 | u8 nf; |
| 73 | |
| 74 | /* Rx Packet Rate */ |
| 75 | u8 rx_rate; |
| 76 | |
| 77 | /* Pkt addr */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 78 | __le32 pkt_ptr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 79 | |
| 80 | /* Next Rx RxPD addr */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 81 | __le32 next_rxpd_ptr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 82 | |
| 83 | /* Pkt Priority */ |
| 84 | u8 priority; |
| 85 | u8 reserved[3]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 86 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 87 | |
Dan Williams | 7ad994d | 2007-12-11 12:33:30 -0500 | [diff] [blame] | 88 | struct cmd_header { |
| 89 | __le16 command; |
| 90 | __le16 size; |
| 91 | __le16 seqnum; |
| 92 | __le16 result; |
| 93 | } __attribute__ ((packed)); |
| 94 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 95 | struct cmd_ctrl_node { |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 96 | struct list_head list; |
David Woodhouse | ae125bf | 2007-12-15 04:22:52 -0500 | [diff] [blame] | 97 | int result; |
Holger Schurig | 675787e | 2007-12-05 17:58:11 +0100 | [diff] [blame] | 98 | /* command response */ |
Dan Williams | 7ad994d | 2007-12-11 12:33:30 -0500 | [diff] [blame] | 99 | int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *); |
David Woodhouse | 1309b55 | 2007-12-10 13:36:10 -0500 | [diff] [blame] | 100 | unsigned long callback_arg; |
Holger Schurig | 675787e | 2007-12-05 17:58:11 +0100 | [diff] [blame] | 101 | /* command data */ |
Dan Williams | ddac452 | 2007-12-11 13:49:39 -0500 | [diff] [blame] | 102 | struct cmd_header *cmdbuf; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 103 | /* wait queue */ |
| 104 | u16 cmdwaitqwoken; |
| 105 | wait_queue_head_t cmdwait_q; |
| 106 | }; |
| 107 | |
Dan Williams | 1443b65 | 2007-08-02 10:45:55 -0400 | [diff] [blame] | 108 | /* Generic structure to hold all key types. */ |
| 109 | struct enc_key { |
| 110 | u16 len; |
Holger Schurig | 1007832 | 2007-11-15 18:05:47 -0500 | [diff] [blame] | 111 | u16 flags; /* KEY_INFO_* from defs.h */ |
| 112 | u16 type; /* KEY_TYPE_* from defs.h */ |
Dan Williams | 1443b65 | 2007-08-02 10:45:55 -0400 | [diff] [blame] | 113 | u8 key[32]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 114 | }; |
| 115 | |
Holger Schurig | 1007832 | 2007-11-15 18:05:47 -0500 | [diff] [blame] | 116 | /* lbs_offset_value */ |
| 117 | struct lbs_offset_value { |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 118 | u32 offset; |
| 119 | u32 value; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 120 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 121 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 122 | /* Define general data structure */ |
| 123 | /* cmd_DS_GEN */ |
| 124 | struct cmd_ds_gen { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 125 | __le16 command; |
| 126 | __le16 size; |
| 127 | __le16 seqnum; |
| 128 | __le16 result; |
Holger Schurig | 675787e | 2007-12-05 17:58:11 +0100 | [diff] [blame] | 129 | void *cmdresp[0]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 130 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 131 | |
| 132 | #define S_DS_GEN sizeof(struct cmd_ds_gen) |
Holger Schurig | 675787e | 2007-12-05 17:58:11 +0100 | [diff] [blame] | 133 | |
| 134 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 135 | /* |
Dan Williams | 0aef64d | 2007-08-02 11:31:18 -0400 | [diff] [blame] | 136 | * Define data structure for CMD_GET_HW_SPEC |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 137 | * This structure defines the response for the GET_HW_SPEC command |
| 138 | */ |
| 139 | struct cmd_ds_get_hw_spec { |
Dan Williams | 6e66f03 | 2007-12-11 12:42:16 -0500 | [diff] [blame] | 140 | struct cmd_header hdr; |
| 141 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 142 | /* HW Interface version number */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 143 | __le16 hwifversion; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 144 | /* HW version number */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 145 | __le16 version; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 146 | /* Max number of TxPD FW can handle */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 147 | __le16 nr_txpd; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 148 | /* Max no of Multicast address */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 149 | __le16 nr_mcast_adr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 150 | /* MAC address */ |
| 151 | u8 permanentaddr[6]; |
| 152 | |
| 153 | /* region Code */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 154 | __le16 regioncode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 155 | |
| 156 | /* Number of antenna used */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 157 | __le16 nr_antenna; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 158 | |
Holger Schurig | dac10a9 | 2008-01-16 15:55:22 +0100 | [diff] [blame] | 159 | /* FW release number, example 0x01030304 = 2.3.4p1 */ |
| 160 | __le32 fwrelease; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 161 | |
| 162 | /* Base Address of TxPD queue */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 163 | __le32 wcb_base; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 164 | /* Read Pointer of RxPd queue */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 165 | __le32 rxpd_rdptr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 166 | |
| 167 | /* Write Pointer of RxPd queue */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 168 | __le32 rxpd_wrptr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 169 | |
| 170 | /*FW/HW capability */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 171 | __le32 fwcapinfo; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 172 | } __attribute__ ((packed)); |
| 173 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 174 | struct cmd_ds_802_11_subscribe_event { |
David Woodhouse | 5844d12 | 2007-12-18 02:01:37 -0500 | [diff] [blame] | 175 | struct cmd_header hdr; |
| 176 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 177 | __le16 action; |
| 178 | __le16 events; |
Holger Schurig | 3a18864 | 2007-11-26 10:07:14 +0100 | [diff] [blame] | 179 | |
| 180 | /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a |
| 181 | * number of TLVs. From the v5.1 manual, those TLVs would add up to |
| 182 | * 40 bytes. However, future firmware might add additional TLVs, so I |
| 183 | * bump this up a bit. |
| 184 | */ |
David Woodhouse | 5844d12 | 2007-12-18 02:01:37 -0500 | [diff] [blame] | 185 | uint8_t tlv[128]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 186 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 187 | |
| 188 | /* |
| 189 | * This scan handle Country Information IE(802.11d compliant) |
Dan Williams | 0aef64d | 2007-08-02 11:31:18 -0400 | [diff] [blame] | 190 | * Define data structure for CMD_802_11_SCAN |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 191 | */ |
| 192 | struct cmd_ds_802_11_scan { |
David Woodhouse | fa62f99 | 2008-03-03 12:18:03 +0100 | [diff] [blame] | 193 | struct cmd_header hdr; |
| 194 | |
| 195 | uint8_t bsstype; |
| 196 | uint8_t bssid[ETH_ALEN]; |
| 197 | uint8_t tlvbuffer[0]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 198 | #if 0 |
| 199 | mrvlietypes_ssidparamset_t ssidParamSet; |
| 200 | mrvlietypes_chanlistparamset_t ChanListParamSet; |
| 201 | mrvlietypes_ratesparamset_t OpRateSet; |
| 202 | #endif |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 203 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 204 | |
| 205 | struct cmd_ds_802_11_scan_rsp { |
David Woodhouse | fa62f99 | 2008-03-03 12:18:03 +0100 | [diff] [blame] | 206 | struct cmd_header hdr; |
| 207 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 208 | __le16 bssdescriptsize; |
David Woodhouse | fa62f99 | 2008-03-03 12:18:03 +0100 | [diff] [blame] | 209 | uint8_t nr_sets; |
| 210 | uint8_t bssdesc_and_tlvbuffer[0]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 211 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 212 | |
| 213 | struct cmd_ds_802_11_get_log { |
Holger Schurig | c49c3b7 | 2008-03-17 12:45:58 +0100 | [diff] [blame] | 214 | struct cmd_header hdr; |
| 215 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 216 | __le32 mcasttxframe; |
| 217 | __le32 failed; |
| 218 | __le32 retry; |
| 219 | __le32 multiretry; |
| 220 | __le32 framedup; |
| 221 | __le32 rtssuccess; |
| 222 | __le32 rtsfailure; |
| 223 | __le32 ackfailure; |
| 224 | __le32 rxfrag; |
| 225 | __le32 mcastrxframe; |
| 226 | __le32 fcserror; |
| 227 | __le32 txframe; |
| 228 | __le32 wepundecryptable; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 229 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 230 | |
| 231 | struct cmd_ds_mac_control { |
Holger Schurig | 835d3ac | 2008-03-12 16:05:40 +0100 | [diff] [blame] | 232 | struct cmd_header hdr; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 233 | __le16 action; |
Holger Schurig | 835d3ac | 2008-03-12 16:05:40 +0100 | [diff] [blame] | 234 | u16 reserved; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 235 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 236 | |
| 237 | struct cmd_ds_mac_multicast_adr { |
David Woodhouse | 75bf45a | 2008-05-20 13:32:45 +0100 | [diff] [blame] | 238 | struct cmd_header hdr; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 239 | __le16 action; |
| 240 | __le16 nr_of_adrs; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 241 | u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 242 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 243 | |
Colin McCabe | b483659 | 2009-01-02 19:00:22 -0800 | [diff] [blame] | 244 | struct cmd_ds_gspi_bus_config { |
| 245 | struct cmd_header hdr; |
| 246 | __le16 action; |
| 247 | __le16 bus_delay_mode; |
| 248 | __le16 host_time_delay_to_read_port; |
| 249 | __le16 host_time_delay_to_read_register; |
| 250 | } __attribute__ ((packed)); |
| 251 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 252 | struct cmd_ds_802_11_authenticate { |
| 253 | u8 macaddr[ETH_ALEN]; |
| 254 | u8 authtype; |
| 255 | u8 reserved[10]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 256 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 257 | |
| 258 | struct cmd_ds_802_11_deauthenticate { |
Dan Williams | 191bb40 | 2008-08-21 17:46:18 -0400 | [diff] [blame] | 259 | struct cmd_header hdr; |
| 260 | |
| 261 | u8 macaddr[ETH_ALEN]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 262 | __le16 reasoncode; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 263 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 264 | |
| 265 | struct cmd_ds_802_11_associate { |
| 266 | u8 peerstaaddr[6]; |
Dan Williams | 0c9ca69 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 267 | __le16 capability; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 268 | __le16 listeninterval; |
| 269 | __le16 bcnperiod; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 270 | u8 dtimperiod; |
| 271 | |
| 272 | #if 0 |
| 273 | mrvlietypes_ssidparamset_t ssidParamSet; |
| 274 | mrvlietypes_phyparamset_t phyparamset; |
| 275 | mrvlietypes_ssparamset_t ssparamset; |
| 276 | mrvlietypes_ratesparamset_t ratesParamSet; |
| 277 | #endif |
| 278 | } __attribute__ ((packed)); |
| 279 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 280 | struct cmd_ds_802_11_associate_rsp { |
Dan Williams | 5fd164e | 2009-05-22 20:01:21 -0400 | [diff] [blame^] | 281 | struct ieee_assoc_response response; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 282 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 283 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 284 | struct cmd_ds_802_11_set_wep { |
David Woodhouse | f70dd45 | 2007-12-18 00:18:05 -0500 | [diff] [blame] | 285 | struct cmd_header hdr; |
| 286 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 287 | /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 288 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 289 | |
| 290 | /* key Index selected for Tx */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 291 | __le16 keyindex; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 292 | |
| 293 | /* 40, 128bit or TXWEP */ |
David Woodhouse | f70dd45 | 2007-12-18 00:18:05 -0500 | [diff] [blame] | 294 | uint8_t keytype[4]; |
| 295 | uint8_t keymaterial[4][16]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 296 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 297 | |
| 298 | struct cmd_ds_802_3_get_stat { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 299 | __le32 xmitok; |
| 300 | __le32 rcvok; |
| 301 | __le32 xmiterror; |
| 302 | __le32 rcverror; |
| 303 | __le32 rcvnobuffer; |
| 304 | __le32 rcvcrcerror; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 305 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 306 | |
| 307 | struct cmd_ds_802_11_get_stat { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 308 | __le32 txfragmentcnt; |
| 309 | __le32 mcasttxframecnt; |
| 310 | __le32 failedcnt; |
| 311 | __le32 retrycnt; |
| 312 | __le32 Multipleretrycnt; |
| 313 | __le32 rtssuccesscnt; |
| 314 | __le32 rtsfailurecnt; |
| 315 | __le32 ackfailurecnt; |
| 316 | __le32 frameduplicatecnt; |
| 317 | __le32 rxfragmentcnt; |
| 318 | __le32 mcastrxframecnt; |
| 319 | __le32 fcserrorcnt; |
| 320 | __le32 bcasttxframecnt; |
| 321 | __le32 bcastrxframecnt; |
| 322 | __le32 txbeacon; |
| 323 | __le32 rxbeacon; |
| 324 | __le32 wepundecryptable; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 325 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 326 | |
| 327 | struct cmd_ds_802_11_snmp_mib { |
Dan Williams | 39fcf7a | 2008-09-10 12:49:00 -0400 | [diff] [blame] | 328 | struct cmd_header hdr; |
| 329 | |
| 330 | __le16 action; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 331 | __le16 oid; |
| 332 | __le16 bufsize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 333 | u8 value[128]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 334 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 335 | |
| 336 | struct cmd_ds_mac_reg_map { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 337 | __le16 buffersize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 338 | u8 regmap[128]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 339 | __le16 reserved; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 340 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 341 | |
| 342 | struct cmd_ds_bbp_reg_map { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 343 | __le16 buffersize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 344 | u8 regmap[128]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 345 | __le16 reserved; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 346 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 347 | |
| 348 | struct cmd_ds_rf_reg_map { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 349 | __le16 buffersize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 350 | u8 regmap[64]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 351 | __le16 reserved; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 352 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 353 | |
| 354 | struct cmd_ds_mac_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 355 | __le16 action; |
| 356 | __le16 offset; |
| 357 | __le32 value; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 358 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 359 | |
| 360 | struct cmd_ds_bbp_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 361 | __le16 action; |
| 362 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 363 | u8 value; |
| 364 | u8 reserved[3]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 365 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 366 | |
| 367 | struct cmd_ds_rf_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 368 | __le16 action; |
| 369 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 370 | u8 value; |
| 371 | u8 reserved[3]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 372 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 373 | |
| 374 | struct cmd_ds_802_11_radio_control { |
David Woodhouse | a7c4589 | 2007-12-17 22:43:48 -0500 | [diff] [blame] | 375 | struct cmd_header hdr; |
| 376 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 377 | __le16 action; |
| 378 | __le16 control; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 379 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 380 | |
Brajesh Dave | 96287ac | 2007-11-20 17:44:28 -0500 | [diff] [blame] | 381 | struct cmd_ds_802_11_beacon_control { |
| 382 | __le16 action; |
| 383 | __le16 beacon_enable; |
| 384 | __le16 beacon_period; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 385 | } __attribute__ ((packed)); |
Brajesh Dave | 96287ac | 2007-11-20 17:44:28 -0500 | [diff] [blame] | 386 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 387 | struct cmd_ds_802_11_sleep_params { |
David Woodhouse | 3fbe104 | 2007-12-17 23:48:31 -0500 | [diff] [blame] | 388 | struct cmd_header hdr; |
| 389 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 390 | /* ACT_GET/ACT_SET */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 391 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 392 | |
| 393 | /* Sleep clock error in ppm */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 394 | __le16 error; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 395 | |
| 396 | /* Wakeup offset in usec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 397 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 398 | |
| 399 | /* Clock stabilization time in usec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 400 | __le16 stabletime; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 401 | |
| 402 | /* control periodic calibration */ |
David Woodhouse | 3fbe104 | 2007-12-17 23:48:31 -0500 | [diff] [blame] | 403 | uint8_t calcontrol; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 404 | |
| 405 | /* control the use of external sleep clock */ |
David Woodhouse | 3fbe104 | 2007-12-17 23:48:31 -0500 | [diff] [blame] | 406 | uint8_t externalsleepclk; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 407 | |
| 408 | /* reserved field, should be set to zero */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 409 | __le16 reserved; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 410 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 411 | |
| 412 | struct cmd_ds_802_11_inactivity_timeout { |
David Woodhouse | 6e5cc4f | 2007-12-17 23:04:37 -0500 | [diff] [blame] | 413 | struct cmd_header hdr; |
| 414 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 415 | /* ACT_GET/ACT_SET */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 416 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 417 | |
| 418 | /* Inactivity timeout in msec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 419 | __le16 timeout; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 420 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 421 | |
| 422 | struct cmd_ds_802_11_rf_channel { |
Dan Williams | 2dd4b26 | 2007-12-11 16:54:15 -0500 | [diff] [blame] | 423 | struct cmd_header hdr; |
| 424 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 425 | __le16 action; |
Dan Williams | 2dd4b26 | 2007-12-11 16:54:15 -0500 | [diff] [blame] | 426 | __le16 channel; |
| 427 | __le16 rftype; /* unused */ |
| 428 | __le16 reserved; /* unused */ |
| 429 | u8 channellist[32]; /* unused */ |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 430 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 431 | |
| 432 | struct cmd_ds_802_11_rssi { |
| 433 | /* weighting factor */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 434 | __le16 N; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 435 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 436 | __le16 reserved_0; |
| 437 | __le16 reserved_1; |
| 438 | __le16 reserved_2; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 439 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 440 | |
| 441 | struct cmd_ds_802_11_rssi_rsp { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 442 | __le16 SNR; |
| 443 | __le16 noisefloor; |
| 444 | __le16 avgSNR; |
| 445 | __le16 avgnoisefloor; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 446 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 447 | |
| 448 | struct cmd_ds_802_11_mac_address { |
Holger Schurig | 2af9f03 | 2008-03-26 09:58:32 +0100 | [diff] [blame] | 449 | struct cmd_header hdr; |
| 450 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 451 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 452 | u8 macadd[ETH_ALEN]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 453 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 454 | |
| 455 | struct cmd_ds_802_11_rf_tx_power { |
Dan Williams | 87c8c72 | 2008-08-19 15:15:35 -0400 | [diff] [blame] | 456 | struct cmd_header hdr; |
| 457 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 458 | __le16 action; |
Dan Williams | 87c8c72 | 2008-08-19 15:15:35 -0400 | [diff] [blame] | 459 | __le16 curlevel; |
| 460 | s8 maxlevel; |
| 461 | s8 minlevel; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 462 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 463 | |
| 464 | struct cmd_ds_802_11_rf_antenna { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 465 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 466 | |
| 467 | /* Number of antennas or 0xffff(diversity) */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 468 | __le16 antennamode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 469 | |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 470 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 471 | |
Luis Carlos Cobo | 965f8bb | 2007-08-02 13:16:55 -0400 | [diff] [blame] | 472 | struct cmd_ds_802_11_monitor_mode { |
Holger Schurig | c2df2ef | 2007-12-07 15:30:44 +0000 | [diff] [blame] | 473 | __le16 action; |
| 474 | __le16 mode; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 475 | } __attribute__ ((packed)); |
Luis Carlos Cobo | 965f8bb | 2007-08-02 13:16:55 -0400 | [diff] [blame] | 476 | |
Luis Carlos Cobo | 63f0023 | 2007-08-02 13:19:24 -0400 | [diff] [blame] | 477 | struct cmd_ds_set_boot2_ver { |
Dan Williams | 7ad994d | 2007-12-11 12:33:30 -0500 | [diff] [blame] | 478 | struct cmd_header hdr; |
| 479 | |
Holger Schurig | c2df2ef | 2007-12-07 15:30:44 +0000 | [diff] [blame] | 480 | __le16 action; |
| 481 | __le16 version; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 482 | } __attribute__ ((packed)); |
Luis Carlos Cobo | 63f0023 | 2007-08-02 13:19:24 -0400 | [diff] [blame] | 483 | |
David Woodhouse | c6ad373 | 2007-12-16 21:43:40 -0500 | [diff] [blame] | 484 | struct cmd_ds_802_11_fw_wake_method { |
| 485 | struct cmd_header hdr; |
| 486 | |
| 487 | __le16 action; |
| 488 | __le16 method; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 489 | } __attribute__ ((packed)); |
David Woodhouse | c6ad373 | 2007-12-16 21:43:40 -0500 | [diff] [blame] | 490 | |
| 491 | struct cmd_ds_802_11_sleep_period { |
| 492 | struct cmd_header hdr; |
| 493 | |
| 494 | __le16 action; |
| 495 | __le16 period; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 496 | } __attribute__ ((packed)); |
David Woodhouse | c6ad373 | 2007-12-16 21:43:40 -0500 | [diff] [blame] | 497 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 498 | struct cmd_ds_802_11_ps_mode { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 499 | __le16 action; |
| 500 | __le16 nullpktinterval; |
| 501 | __le16 multipledtim; |
| 502 | __le16 reserved; |
| 503 | __le16 locallisteninterval; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 504 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 505 | |
Holger Schurig | f539f2e | 2008-03-26 13:22:11 +0100 | [diff] [blame] | 506 | struct cmd_confirm_sleep { |
| 507 | struct cmd_header hdr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 508 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 509 | __le16 action; |
Holger Schurig | f539f2e | 2008-03-26 13:22:11 +0100 | [diff] [blame] | 510 | __le16 nullpktinterval; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 511 | __le16 multipledtim; |
| 512 | __le16 reserved; |
| 513 | __le16 locallisteninterval; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 514 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 515 | |
| 516 | struct cmd_ds_802_11_data_rate { |
Dan Williams | 8e3c91b | 2007-12-11 15:50:59 -0500 | [diff] [blame] | 517 | struct cmd_header hdr; |
| 518 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 519 | __le16 action; |
Dan Williams | 8c51276 | 2007-08-02 11:40:45 -0400 | [diff] [blame] | 520 | __le16 reserved; |
| 521 | u8 rates[MAX_RATES]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 522 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 523 | |
| 524 | struct cmd_ds_802_11_rate_adapt_rateset { |
Javier Cardona | 85319f9 | 2008-05-24 10:59:49 +0100 | [diff] [blame] | 525 | struct cmd_header hdr; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 526 | __le16 action; |
| 527 | __le16 enablehwauto; |
| 528 | __le16 bitmap; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 529 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 530 | |
| 531 | struct cmd_ds_802_11_ad_hoc_start { |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 532 | struct cmd_header hdr; |
| 533 | |
Dan Williams | b44898e | 2007-08-02 11:18:40 -0400 | [diff] [blame] | 534 | u8 ssid[IW_ESSID_MAX_SIZE]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 535 | u8 bsstype; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 536 | __le16 beaconperiod; |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 537 | u8 dtimperiod; /* Reserved on v9 and later */ |
Dan Williams | 5fd164e | 2009-05-22 20:01:21 -0400 | [diff] [blame^] | 538 | struct ieee_ie_ibss_param_set ibss; |
| 539 | u8 reserved1[4]; |
| 540 | struct ieee_ie_ds_param_set ds; |
| 541 | u8 reserved2[4]; |
| 542 | __le16 probedelay; /* Reserved on v9 and later */ |
Dan Williams | 0c9ca69 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 543 | __le16 capability; |
Dan Williams | 8c51276 | 2007-08-02 11:40:45 -0400 | [diff] [blame] | 544 | u8 rates[MAX_RATES]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 545 | u8 tlv_memory_size_pad[100]; |
| 546 | } __attribute__ ((packed)); |
| 547 | |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 548 | struct cmd_ds_802_11_ad_hoc_result { |
| 549 | struct cmd_header hdr; |
| 550 | |
| 551 | u8 pad[3]; |
| 552 | u8 bssid[ETH_ALEN]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 553 | } __attribute__ ((packed)); |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 554 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 555 | struct adhoc_bssdesc { |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 556 | u8 bssid[ETH_ALEN]; |
| 557 | u8 ssid[IW_ESSID_MAX_SIZE]; |
Dan Williams | 0c9ca69 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 558 | u8 type; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 559 | __le16 beaconperiod; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 560 | u8 dtimperiod; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 561 | __le64 timestamp; |
| 562 | __le64 localtime; |
Dan Williams | 5fd164e | 2009-05-22 20:01:21 -0400 | [diff] [blame^] | 563 | struct ieee_ie_ds_param_set ds; |
| 564 | u8 reserved1[4]; |
| 565 | struct ieee_ie_ibss_param_set ibss; |
| 566 | u8 reserved2[4]; |
Dan Williams | 0c9ca69 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 567 | __le16 capability; |
Dan Williams | 8c51276 | 2007-08-02 11:40:45 -0400 | [diff] [blame] | 568 | u8 rates[MAX_RATES]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 569 | |
| 570 | /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the |
| 571 | * Adhoc join command and will cause a binary layout mismatch with |
| 572 | * the firmware |
| 573 | */ |
| 574 | } __attribute__ ((packed)); |
| 575 | |
| 576 | struct cmd_ds_802_11_ad_hoc_join { |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 577 | struct cmd_header hdr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 578 | |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 579 | struct adhoc_bssdesc bss; |
| 580 | __le16 failtimeout; /* Reserved on v9 and later */ |
| 581 | __le16 probedelay; /* Reserved on v9 and later */ |
| 582 | } __attribute__ ((packed)); |
| 583 | |
| 584 | struct cmd_ds_802_11_ad_hoc_stop { |
| 585 | struct cmd_header hdr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 586 | } __attribute__ ((packed)); |
| 587 | |
| 588 | struct cmd_ds_802_11_enable_rsn { |
David Woodhouse | 4f59abf | 2007-12-18 00:47:17 -0500 | [diff] [blame] | 589 | struct cmd_header hdr; |
| 590 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 591 | __le16 action; |
| 592 | __le16 enable; |
Dan Williams | 18c96c34 | 2007-06-18 12:01:12 -0400 | [diff] [blame] | 593 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 594 | |
| 595 | struct MrvlIEtype_keyParamSet { |
| 596 | /* type ID */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 597 | __le16 type; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 598 | |
| 599 | /* length of Payload */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 600 | __le16 length; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 601 | |
| 602 | /* type of key: WEP=0, TKIP=1, AES=2 */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 603 | __le16 keytypeid; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 604 | |
| 605 | /* key control Info specific to a keytypeid */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 606 | __le16 keyinfo; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 607 | |
| 608 | /* length of key */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 609 | __le16 keylen; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 610 | |
| 611 | /* key material of size keylen */ |
| 612 | u8 key[32]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 613 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 614 | |
Anna Neal | 582c1b5 | 2008-10-20 16:46:56 -0700 | [diff] [blame] | 615 | #define MAX_WOL_RULES 16 |
| 616 | |
| 617 | struct host_wol_rule { |
| 618 | uint8_t rule_no; |
| 619 | uint8_t rule_ops; |
| 620 | __le16 sig_offset; |
| 621 | __le16 sig_length; |
| 622 | __le16 reserve; |
| 623 | __be32 sig_mask; |
| 624 | __be32 signature; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 625 | } __attribute__ ((packed)); |
Anna Neal | 582c1b5 | 2008-10-20 16:46:56 -0700 | [diff] [blame] | 626 | |
| 627 | struct wol_config { |
| 628 | uint8_t action; |
| 629 | uint8_t pattern; |
| 630 | uint8_t no_rules_in_cmd; |
| 631 | uint8_t result; |
| 632 | struct host_wol_rule rule[MAX_WOL_RULES]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 633 | } __attribute__ ((packed)); |
Anna Neal | 582c1b5 | 2008-10-20 16:46:56 -0700 | [diff] [blame] | 634 | |
David Woodhouse | 6ce4fd2 | 2007-12-12 15:19:29 -0500 | [diff] [blame] | 635 | struct cmd_ds_host_sleep { |
| 636 | struct cmd_header hdr; |
| 637 | __le32 criteria; |
| 638 | uint8_t gpio; |
Anna Neal | 582c1b5 | 2008-10-20 16:46:56 -0700 | [diff] [blame] | 639 | uint16_t gap; |
| 640 | struct wol_config wol_conf; |
David Woodhouse | 6ce4fd2 | 2007-12-12 15:19:29 -0500 | [diff] [blame] | 641 | } __attribute__ ((packed)); |
| 642 | |
Anna Neal | 582c1b5 | 2008-10-20 16:46:56 -0700 | [diff] [blame] | 643 | |
| 644 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 645 | struct cmd_ds_802_11_key_material { |
David Woodhouse | 9e1228d | 2008-03-03 12:15:39 +0100 | [diff] [blame] | 646 | struct cmd_header hdr; |
| 647 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 648 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 649 | struct MrvlIEtype_keyParamSet keyParamSet[2]; |
| 650 | } __attribute__ ((packed)); |
| 651 | |
| 652 | struct cmd_ds_802_11_eeprom_access { |
Holger Schurig | 7460f5a | 2008-03-26 10:03:48 +0100 | [diff] [blame] | 653 | struct cmd_header hdr; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 654 | __le16 action; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 655 | __le16 offset; |
Holger Schurig | 7460f5a | 2008-03-26 10:03:48 +0100 | [diff] [blame] | 656 | __le16 len; |
| 657 | /* firmware says it returns a maximum of 20 bytes */ |
| 658 | #define LBS_EEPROM_READ_LEN 20 |
| 659 | u8 value[LBS_EEPROM_READ_LEN]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 660 | } __attribute__ ((packed)); |
| 661 | |
| 662 | struct cmd_ds_802_11_tpc_cfg { |
Anna Neal | 0112c9e | 2008-09-11 11:17:25 -0700 | [diff] [blame] | 663 | struct cmd_header hdr; |
| 664 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 665 | __le16 action; |
Anna Neal | 0112c9e | 2008-09-11 11:17:25 -0700 | [diff] [blame] | 666 | uint8_t enable; |
| 667 | int8_t P0; |
| 668 | int8_t P1; |
| 669 | int8_t P2; |
| 670 | uint8_t usesnr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 671 | } __attribute__ ((packed)); |
| 672 | |
Anna Neal | 0112c9e | 2008-09-11 11:17:25 -0700 | [diff] [blame] | 673 | |
| 674 | struct cmd_ds_802_11_pa_cfg { |
| 675 | struct cmd_header hdr; |
| 676 | |
| 677 | __le16 action; |
| 678 | uint8_t enable; |
| 679 | int8_t P0; |
| 680 | int8_t P1; |
| 681 | int8_t P2; |
| 682 | } __attribute__ ((packed)); |
| 683 | |
| 684 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 685 | struct cmd_ds_802_11_led_ctrl { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 686 | __le16 action; |
| 687 | __le16 numled; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 688 | u8 data[256]; |
| 689 | } __attribute__ ((packed)); |
| 690 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 691 | struct cmd_ds_802_11_afc { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 692 | __le16 afc_auto; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 693 | union { |
| 694 | struct { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 695 | __le16 threshold; |
| 696 | __le16 period; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 697 | }; |
| 698 | struct { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 699 | __le16 timing_offset; /* signed */ |
| 700 | __le16 carrier_offset; /* signed */ |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 701 | }; |
| 702 | }; |
| 703 | } __attribute__ ((packed)); |
| 704 | |
| 705 | struct cmd_tx_rate_query { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 706 | __le16 txrate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 707 | } __attribute__ ((packed)); |
| 708 | |
| 709 | struct cmd_ds_get_tsf { |
| 710 | __le64 tsfvalue; |
| 711 | } __attribute__ ((packed)); |
| 712 | |
| 713 | struct cmd_ds_bt_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 714 | __le16 action; |
| 715 | __le32 id; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 716 | u8 addr1[ETH_ALEN]; |
| 717 | u8 addr2[ETH_ALEN]; |
| 718 | } __attribute__ ((packed)); |
| 719 | |
| 720 | struct cmd_ds_fwt_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 721 | __le16 action; |
| 722 | __le32 id; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 723 | u8 valid; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 724 | u8 da[ETH_ALEN]; |
| 725 | u8 dir; |
| 726 | u8 ra[ETH_ALEN]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 727 | __le32 ssn; |
| 728 | __le32 dsn; |
| 729 | __le32 metric; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 730 | u8 rate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 731 | u8 hopcount; |
| 732 | u8 ttl; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 733 | __le32 expiration; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 734 | u8 sleepmode; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 735 | __le32 snr; |
| 736 | __le32 references; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 737 | u8 prec[ETH_ALEN]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 738 | } __attribute__ ((packed)); |
| 739 | |
David Woodhouse | 23a397a | 2007-12-11 18:56:42 -0500 | [diff] [blame] | 740 | |
| 741 | struct cmd_ds_mesh_config { |
| 742 | struct cmd_header hdr; |
| 743 | |
| 744 | __le16 action; |
| 745 | __le16 channel; |
| 746 | __le16 type; |
| 747 | __le16 length; |
| 748 | u8 data[128]; /* last position reserved */ |
| 749 | } __attribute__ ((packed)); |
| 750 | |
| 751 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 752 | struct cmd_ds_mesh_access { |
David Woodhouse | 301eacb | 2007-12-11 15:23:59 -0500 | [diff] [blame] | 753 | struct cmd_header hdr; |
| 754 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 755 | __le16 action; |
| 756 | __le32 data[32]; /* last position reserved */ |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 757 | } __attribute__ ((packed)); |
| 758 | |
Javier Cardona | 0601e7e | 2007-05-25 12:12:06 -0400 | [diff] [blame] | 759 | /* Number of stats counters returned by the firmware */ |
| 760 | #define MESH_STATS_NUM 8 |
| 761 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 762 | struct cmd_ds_command { |
| 763 | /* command header */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 764 | __le16 command; |
| 765 | __le16 size; |
| 766 | __le16 seqnum; |
| 767 | __le16 result; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 768 | |
| 769 | /* command Body */ |
| 770 | union { |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 771 | struct cmd_ds_802_11_ps_mode psmode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 772 | struct cmd_ds_802_11_associate associate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 773 | struct cmd_ds_802_11_authenticate auth; |
| 774 | struct cmd_ds_802_11_get_stat gstat; |
| 775 | struct cmd_ds_802_3_get_stat gstat_8023; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 776 | struct cmd_ds_802_11_rf_antenna rant; |
Luis Carlos Cobo | 965f8bb | 2007-08-02 13:16:55 -0400 | [diff] [blame] | 777 | struct cmd_ds_802_11_monitor_mode monitor; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 778 | struct cmd_ds_802_11_rssi rssi; |
| 779 | struct cmd_ds_802_11_rssi_rsp rssirsp; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 780 | struct cmd_ds_mac_reg_access macreg; |
| 781 | struct cmd_ds_bbp_reg_access bbpreg; |
| 782 | struct cmd_ds_rf_reg_access rfreg; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 783 | |
| 784 | struct cmd_ds_802_11d_domain_info domaininfo; |
| 785 | struct cmd_ds_802_11d_domain_info domaininforesp; |
| 786 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 787 | struct cmd_ds_802_11_tpc_cfg tpccfg; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 788 | struct cmd_ds_802_11_afc afc; |
| 789 | struct cmd_ds_802_11_led_ctrl ledgpio; |
| 790 | |
| 791 | struct cmd_tx_rate_query txrate; |
| 792 | struct cmd_ds_bt_access bt; |
| 793 | struct cmd_ds_fwt_access fwt; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 794 | struct cmd_ds_get_tsf gettsf; |
Brajesh Dave | 96287ac | 2007-11-20 17:44:28 -0500 | [diff] [blame] | 795 | struct cmd_ds_802_11_beacon_control bcn_ctrl; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 796 | } params; |
| 797 | } __attribute__ ((packed)); |
| 798 | |
| 799 | #endif |