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 { |
Dan Williams | be0d76e | 2009-05-22 20:05:25 -0400 | [diff] [blame^] | 253 | struct cmd_header hdr; |
| 254 | |
| 255 | u8 bssid[ETH_ALEN]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 256 | u8 authtype; |
| 257 | u8 reserved[10]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 258 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 259 | |
| 260 | struct cmd_ds_802_11_deauthenticate { |
Dan Williams | 191bb40 | 2008-08-21 17:46:18 -0400 | [diff] [blame] | 261 | struct cmd_header hdr; |
| 262 | |
| 263 | u8 macaddr[ETH_ALEN]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 264 | __le16 reasoncode; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 265 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 266 | |
| 267 | struct cmd_ds_802_11_associate { |
| 268 | u8 peerstaaddr[6]; |
Dan Williams | 0c9ca69 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 269 | __le16 capability; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 270 | __le16 listeninterval; |
| 271 | __le16 bcnperiod; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 272 | u8 dtimperiod; |
| 273 | |
| 274 | #if 0 |
| 275 | mrvlietypes_ssidparamset_t ssidParamSet; |
| 276 | mrvlietypes_phyparamset_t phyparamset; |
| 277 | mrvlietypes_ssparamset_t ssparamset; |
| 278 | mrvlietypes_ratesparamset_t ratesParamSet; |
| 279 | #endif |
| 280 | } __attribute__ ((packed)); |
| 281 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 282 | struct cmd_ds_802_11_associate_rsp { |
Dan Williams | 5fd164e | 2009-05-22 20:01:21 -0400 | [diff] [blame] | 283 | struct ieee_assoc_response response; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 284 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 285 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 286 | struct cmd_ds_802_11_set_wep { |
David Woodhouse | f70dd45 | 2007-12-18 00:18:05 -0500 | [diff] [blame] | 287 | struct cmd_header hdr; |
| 288 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 289 | /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 290 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 291 | |
| 292 | /* key Index selected for Tx */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 293 | __le16 keyindex; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 294 | |
| 295 | /* 40, 128bit or TXWEP */ |
David Woodhouse | f70dd45 | 2007-12-18 00:18:05 -0500 | [diff] [blame] | 296 | uint8_t keytype[4]; |
| 297 | uint8_t keymaterial[4][16]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 298 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 299 | |
| 300 | struct cmd_ds_802_3_get_stat { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 301 | __le32 xmitok; |
| 302 | __le32 rcvok; |
| 303 | __le32 xmiterror; |
| 304 | __le32 rcverror; |
| 305 | __le32 rcvnobuffer; |
| 306 | __le32 rcvcrcerror; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 307 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 308 | |
| 309 | struct cmd_ds_802_11_get_stat { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 310 | __le32 txfragmentcnt; |
| 311 | __le32 mcasttxframecnt; |
| 312 | __le32 failedcnt; |
| 313 | __le32 retrycnt; |
| 314 | __le32 Multipleretrycnt; |
| 315 | __le32 rtssuccesscnt; |
| 316 | __le32 rtsfailurecnt; |
| 317 | __le32 ackfailurecnt; |
| 318 | __le32 frameduplicatecnt; |
| 319 | __le32 rxfragmentcnt; |
| 320 | __le32 mcastrxframecnt; |
| 321 | __le32 fcserrorcnt; |
| 322 | __le32 bcasttxframecnt; |
| 323 | __le32 bcastrxframecnt; |
| 324 | __le32 txbeacon; |
| 325 | __le32 rxbeacon; |
| 326 | __le32 wepundecryptable; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 327 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 328 | |
| 329 | struct cmd_ds_802_11_snmp_mib { |
Dan Williams | 39fcf7a | 2008-09-10 12:49:00 -0400 | [diff] [blame] | 330 | struct cmd_header hdr; |
| 331 | |
| 332 | __le16 action; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 333 | __le16 oid; |
| 334 | __le16 bufsize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 335 | u8 value[128]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 336 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 337 | |
| 338 | struct cmd_ds_mac_reg_map { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 339 | __le16 buffersize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 340 | u8 regmap[128]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 341 | __le16 reserved; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 342 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 343 | |
| 344 | struct cmd_ds_bbp_reg_map { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 345 | __le16 buffersize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 346 | u8 regmap[128]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 347 | __le16 reserved; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 348 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 349 | |
| 350 | struct cmd_ds_rf_reg_map { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 351 | __le16 buffersize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 352 | u8 regmap[64]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 353 | __le16 reserved; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 354 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 355 | |
| 356 | struct cmd_ds_mac_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 357 | __le16 action; |
| 358 | __le16 offset; |
| 359 | __le32 value; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 360 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 361 | |
| 362 | struct cmd_ds_bbp_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 363 | __le16 action; |
| 364 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 365 | u8 value; |
| 366 | u8 reserved[3]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 367 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 368 | |
| 369 | struct cmd_ds_rf_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 370 | __le16 action; |
| 371 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 372 | u8 value; |
| 373 | u8 reserved[3]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 374 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 375 | |
| 376 | struct cmd_ds_802_11_radio_control { |
David Woodhouse | a7c4589 | 2007-12-17 22:43:48 -0500 | [diff] [blame] | 377 | struct cmd_header hdr; |
| 378 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 379 | __le16 action; |
| 380 | __le16 control; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 381 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 382 | |
Brajesh Dave | 96287ac | 2007-11-20 17:44:28 -0500 | [diff] [blame] | 383 | struct cmd_ds_802_11_beacon_control { |
| 384 | __le16 action; |
| 385 | __le16 beacon_enable; |
| 386 | __le16 beacon_period; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 387 | } __attribute__ ((packed)); |
Brajesh Dave | 96287ac | 2007-11-20 17:44:28 -0500 | [diff] [blame] | 388 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 389 | struct cmd_ds_802_11_sleep_params { |
David Woodhouse | 3fbe104 | 2007-12-17 23:48:31 -0500 | [diff] [blame] | 390 | struct cmd_header hdr; |
| 391 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 392 | /* ACT_GET/ACT_SET */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 393 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 394 | |
| 395 | /* Sleep clock error in ppm */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 396 | __le16 error; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 397 | |
| 398 | /* Wakeup offset in usec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 399 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 400 | |
| 401 | /* Clock stabilization time in usec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 402 | __le16 stabletime; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 403 | |
| 404 | /* control periodic calibration */ |
David Woodhouse | 3fbe104 | 2007-12-17 23:48:31 -0500 | [diff] [blame] | 405 | uint8_t calcontrol; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 406 | |
| 407 | /* control the use of external sleep clock */ |
David Woodhouse | 3fbe104 | 2007-12-17 23:48:31 -0500 | [diff] [blame] | 408 | uint8_t externalsleepclk; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 409 | |
| 410 | /* reserved field, should be set to zero */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 411 | __le16 reserved; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 412 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 413 | |
| 414 | struct cmd_ds_802_11_inactivity_timeout { |
David Woodhouse | 6e5cc4f | 2007-12-17 23:04:37 -0500 | [diff] [blame] | 415 | struct cmd_header hdr; |
| 416 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 417 | /* ACT_GET/ACT_SET */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 418 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 419 | |
| 420 | /* Inactivity timeout in msec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 421 | __le16 timeout; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 422 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 423 | |
| 424 | struct cmd_ds_802_11_rf_channel { |
Dan Williams | 2dd4b26 | 2007-12-11 16:54:15 -0500 | [diff] [blame] | 425 | struct cmd_header hdr; |
| 426 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 427 | __le16 action; |
Dan Williams | 2dd4b26 | 2007-12-11 16:54:15 -0500 | [diff] [blame] | 428 | __le16 channel; |
| 429 | __le16 rftype; /* unused */ |
| 430 | __le16 reserved; /* unused */ |
| 431 | u8 channellist[32]; /* unused */ |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 432 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 433 | |
| 434 | struct cmd_ds_802_11_rssi { |
| 435 | /* weighting factor */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 436 | __le16 N; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 437 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 438 | __le16 reserved_0; |
| 439 | __le16 reserved_1; |
| 440 | __le16 reserved_2; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 441 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 442 | |
| 443 | struct cmd_ds_802_11_rssi_rsp { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 444 | __le16 SNR; |
| 445 | __le16 noisefloor; |
| 446 | __le16 avgSNR; |
| 447 | __le16 avgnoisefloor; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 448 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 449 | |
| 450 | struct cmd_ds_802_11_mac_address { |
Holger Schurig | 2af9f03 | 2008-03-26 09:58:32 +0100 | [diff] [blame] | 451 | struct cmd_header hdr; |
| 452 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 453 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 454 | u8 macadd[ETH_ALEN]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 455 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 456 | |
| 457 | struct cmd_ds_802_11_rf_tx_power { |
Dan Williams | 87c8c72 | 2008-08-19 15:15:35 -0400 | [diff] [blame] | 458 | struct cmd_header hdr; |
| 459 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 460 | __le16 action; |
Dan Williams | 87c8c72 | 2008-08-19 15:15:35 -0400 | [diff] [blame] | 461 | __le16 curlevel; |
| 462 | s8 maxlevel; |
| 463 | s8 minlevel; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 464 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 465 | |
| 466 | struct cmd_ds_802_11_rf_antenna { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 467 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 468 | |
| 469 | /* Number of antennas or 0xffff(diversity) */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 470 | __le16 antennamode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 471 | |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 472 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 473 | |
Luis Carlos Cobo | 965f8bb | 2007-08-02 13:16:55 -0400 | [diff] [blame] | 474 | struct cmd_ds_802_11_monitor_mode { |
Holger Schurig | c2df2ef | 2007-12-07 15:30:44 +0000 | [diff] [blame] | 475 | __le16 action; |
| 476 | __le16 mode; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 477 | } __attribute__ ((packed)); |
Luis Carlos Cobo | 965f8bb | 2007-08-02 13:16:55 -0400 | [diff] [blame] | 478 | |
Luis Carlos Cobo | 63f0023 | 2007-08-02 13:19:24 -0400 | [diff] [blame] | 479 | struct cmd_ds_set_boot2_ver { |
Dan Williams | 7ad994d | 2007-12-11 12:33:30 -0500 | [diff] [blame] | 480 | struct cmd_header hdr; |
| 481 | |
Holger Schurig | c2df2ef | 2007-12-07 15:30:44 +0000 | [diff] [blame] | 482 | __le16 action; |
| 483 | __le16 version; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 484 | } __attribute__ ((packed)); |
Luis Carlos Cobo | 63f0023 | 2007-08-02 13:19:24 -0400 | [diff] [blame] | 485 | |
David Woodhouse | c6ad373 | 2007-12-16 21:43:40 -0500 | [diff] [blame] | 486 | struct cmd_ds_802_11_fw_wake_method { |
| 487 | struct cmd_header hdr; |
| 488 | |
| 489 | __le16 action; |
| 490 | __le16 method; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 491 | } __attribute__ ((packed)); |
David Woodhouse | c6ad373 | 2007-12-16 21:43:40 -0500 | [diff] [blame] | 492 | |
| 493 | struct cmd_ds_802_11_sleep_period { |
| 494 | struct cmd_header hdr; |
| 495 | |
| 496 | __le16 action; |
| 497 | __le16 period; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 498 | } __attribute__ ((packed)); |
David Woodhouse | c6ad373 | 2007-12-16 21:43:40 -0500 | [diff] [blame] | 499 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 500 | struct cmd_ds_802_11_ps_mode { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 501 | __le16 action; |
| 502 | __le16 nullpktinterval; |
| 503 | __le16 multipledtim; |
| 504 | __le16 reserved; |
| 505 | __le16 locallisteninterval; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 506 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 507 | |
Holger Schurig | f539f2e | 2008-03-26 13:22:11 +0100 | [diff] [blame] | 508 | struct cmd_confirm_sleep { |
| 509 | struct cmd_header hdr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 510 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 511 | __le16 action; |
Holger Schurig | f539f2e | 2008-03-26 13:22:11 +0100 | [diff] [blame] | 512 | __le16 nullpktinterval; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 513 | __le16 multipledtim; |
| 514 | __le16 reserved; |
| 515 | __le16 locallisteninterval; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 516 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 517 | |
| 518 | struct cmd_ds_802_11_data_rate { |
Dan Williams | 8e3c91b | 2007-12-11 15:50:59 -0500 | [diff] [blame] | 519 | struct cmd_header hdr; |
| 520 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 521 | __le16 action; |
Dan Williams | 8c51276 | 2007-08-02 11:40:45 -0400 | [diff] [blame] | 522 | __le16 reserved; |
| 523 | u8 rates[MAX_RATES]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 524 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 525 | |
| 526 | struct cmd_ds_802_11_rate_adapt_rateset { |
Javier Cardona | 85319f9 | 2008-05-24 10:59:49 +0100 | [diff] [blame] | 527 | struct cmd_header hdr; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 528 | __le16 action; |
| 529 | __le16 enablehwauto; |
| 530 | __le16 bitmap; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 531 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 532 | |
| 533 | struct cmd_ds_802_11_ad_hoc_start { |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 534 | struct cmd_header hdr; |
| 535 | |
Dan Williams | b44898e | 2007-08-02 11:18:40 -0400 | [diff] [blame] | 536 | u8 ssid[IW_ESSID_MAX_SIZE]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 537 | u8 bsstype; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 538 | __le16 beaconperiod; |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 539 | u8 dtimperiod; /* Reserved on v9 and later */ |
Dan Williams | 5fd164e | 2009-05-22 20:01:21 -0400 | [diff] [blame] | 540 | struct ieee_ie_ibss_param_set ibss; |
| 541 | u8 reserved1[4]; |
| 542 | struct ieee_ie_ds_param_set ds; |
| 543 | u8 reserved2[4]; |
| 544 | __le16 probedelay; /* Reserved on v9 and later */ |
Dan Williams | 0c9ca69 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 545 | __le16 capability; |
Dan Williams | 8c51276 | 2007-08-02 11:40:45 -0400 | [diff] [blame] | 546 | u8 rates[MAX_RATES]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 547 | u8 tlv_memory_size_pad[100]; |
| 548 | } __attribute__ ((packed)); |
| 549 | |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 550 | struct cmd_ds_802_11_ad_hoc_result { |
| 551 | struct cmd_header hdr; |
| 552 | |
| 553 | u8 pad[3]; |
| 554 | u8 bssid[ETH_ALEN]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 555 | } __attribute__ ((packed)); |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 556 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 557 | struct adhoc_bssdesc { |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 558 | u8 bssid[ETH_ALEN]; |
| 559 | u8 ssid[IW_ESSID_MAX_SIZE]; |
Dan Williams | 0c9ca69 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 560 | u8 type; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 561 | __le16 beaconperiod; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 562 | u8 dtimperiod; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 563 | __le64 timestamp; |
| 564 | __le64 localtime; |
Dan Williams | 5fd164e | 2009-05-22 20:01:21 -0400 | [diff] [blame] | 565 | struct ieee_ie_ds_param_set ds; |
| 566 | u8 reserved1[4]; |
| 567 | struct ieee_ie_ibss_param_set ibss; |
| 568 | u8 reserved2[4]; |
Dan Williams | 0c9ca69 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 569 | __le16 capability; |
Dan Williams | 8c51276 | 2007-08-02 11:40:45 -0400 | [diff] [blame] | 570 | u8 rates[MAX_RATES]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 571 | |
| 572 | /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the |
| 573 | * Adhoc join command and will cause a binary layout mismatch with |
| 574 | * the firmware |
| 575 | */ |
| 576 | } __attribute__ ((packed)); |
| 577 | |
| 578 | struct cmd_ds_802_11_ad_hoc_join { |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 579 | struct cmd_header hdr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 580 | |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 581 | struct adhoc_bssdesc bss; |
| 582 | __le16 failtimeout; /* Reserved on v9 and later */ |
| 583 | __le16 probedelay; /* Reserved on v9 and later */ |
| 584 | } __attribute__ ((packed)); |
| 585 | |
| 586 | struct cmd_ds_802_11_ad_hoc_stop { |
| 587 | struct cmd_header hdr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 588 | } __attribute__ ((packed)); |
| 589 | |
| 590 | struct cmd_ds_802_11_enable_rsn { |
David Woodhouse | 4f59abf | 2007-12-18 00:47:17 -0500 | [diff] [blame] | 591 | struct cmd_header hdr; |
| 592 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 593 | __le16 action; |
| 594 | __le16 enable; |
Dan Williams | 18c96c34 | 2007-06-18 12:01:12 -0400 | [diff] [blame] | 595 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 596 | |
| 597 | struct MrvlIEtype_keyParamSet { |
| 598 | /* type ID */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 599 | __le16 type; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 600 | |
| 601 | /* length of Payload */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 602 | __le16 length; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 603 | |
| 604 | /* type of key: WEP=0, TKIP=1, AES=2 */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 605 | __le16 keytypeid; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 606 | |
| 607 | /* key control Info specific to a keytypeid */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 608 | __le16 keyinfo; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 609 | |
| 610 | /* length of key */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 611 | __le16 keylen; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 612 | |
| 613 | /* key material of size keylen */ |
| 614 | u8 key[32]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 615 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 616 | |
Anna Neal | 582c1b5 | 2008-10-20 16:46:56 -0700 | [diff] [blame] | 617 | #define MAX_WOL_RULES 16 |
| 618 | |
| 619 | struct host_wol_rule { |
| 620 | uint8_t rule_no; |
| 621 | uint8_t rule_ops; |
| 622 | __le16 sig_offset; |
| 623 | __le16 sig_length; |
| 624 | __le16 reserve; |
| 625 | __be32 sig_mask; |
| 626 | __be32 signature; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 627 | } __attribute__ ((packed)); |
Anna Neal | 582c1b5 | 2008-10-20 16:46:56 -0700 | [diff] [blame] | 628 | |
| 629 | struct wol_config { |
| 630 | uint8_t action; |
| 631 | uint8_t pattern; |
| 632 | uint8_t no_rules_in_cmd; |
| 633 | uint8_t result; |
| 634 | struct host_wol_rule rule[MAX_WOL_RULES]; |
Andrey Yurovsky | d71038c | 2009-01-12 13:14:27 -0800 | [diff] [blame] | 635 | } __attribute__ ((packed)); |
Anna Neal | 582c1b5 | 2008-10-20 16:46:56 -0700 | [diff] [blame] | 636 | |
David Woodhouse | 6ce4fd2 | 2007-12-12 15:19:29 -0500 | [diff] [blame] | 637 | struct cmd_ds_host_sleep { |
| 638 | struct cmd_header hdr; |
| 639 | __le32 criteria; |
| 640 | uint8_t gpio; |
Anna Neal | 582c1b5 | 2008-10-20 16:46:56 -0700 | [diff] [blame] | 641 | uint16_t gap; |
| 642 | struct wol_config wol_conf; |
David Woodhouse | 6ce4fd2 | 2007-12-12 15:19:29 -0500 | [diff] [blame] | 643 | } __attribute__ ((packed)); |
| 644 | |
Anna Neal | 582c1b5 | 2008-10-20 16:46:56 -0700 | [diff] [blame] | 645 | |
| 646 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 647 | struct cmd_ds_802_11_key_material { |
David Woodhouse | 9e1228d | 2008-03-03 12:15:39 +0100 | [diff] [blame] | 648 | struct cmd_header hdr; |
| 649 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 650 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 651 | struct MrvlIEtype_keyParamSet keyParamSet[2]; |
| 652 | } __attribute__ ((packed)); |
| 653 | |
| 654 | struct cmd_ds_802_11_eeprom_access { |
Holger Schurig | 7460f5a | 2008-03-26 10:03:48 +0100 | [diff] [blame] | 655 | struct cmd_header hdr; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 656 | __le16 action; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 657 | __le16 offset; |
Holger Schurig | 7460f5a | 2008-03-26 10:03:48 +0100 | [diff] [blame] | 658 | __le16 len; |
| 659 | /* firmware says it returns a maximum of 20 bytes */ |
| 660 | #define LBS_EEPROM_READ_LEN 20 |
| 661 | u8 value[LBS_EEPROM_READ_LEN]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 662 | } __attribute__ ((packed)); |
| 663 | |
| 664 | struct cmd_ds_802_11_tpc_cfg { |
Anna Neal | 0112c9e | 2008-09-11 11:17:25 -0700 | [diff] [blame] | 665 | struct cmd_header hdr; |
| 666 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 667 | __le16 action; |
Anna Neal | 0112c9e | 2008-09-11 11:17:25 -0700 | [diff] [blame] | 668 | uint8_t enable; |
| 669 | int8_t P0; |
| 670 | int8_t P1; |
| 671 | int8_t P2; |
| 672 | uint8_t usesnr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 673 | } __attribute__ ((packed)); |
| 674 | |
Anna Neal | 0112c9e | 2008-09-11 11:17:25 -0700 | [diff] [blame] | 675 | |
| 676 | struct cmd_ds_802_11_pa_cfg { |
| 677 | struct cmd_header hdr; |
| 678 | |
| 679 | __le16 action; |
| 680 | uint8_t enable; |
| 681 | int8_t P0; |
| 682 | int8_t P1; |
| 683 | int8_t P2; |
| 684 | } __attribute__ ((packed)); |
| 685 | |
| 686 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 687 | struct cmd_ds_802_11_led_ctrl { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 688 | __le16 action; |
| 689 | __le16 numled; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 690 | u8 data[256]; |
| 691 | } __attribute__ ((packed)); |
| 692 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 693 | struct cmd_ds_802_11_afc { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 694 | __le16 afc_auto; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 695 | union { |
| 696 | struct { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 697 | __le16 threshold; |
| 698 | __le16 period; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 699 | }; |
| 700 | struct { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 701 | __le16 timing_offset; /* signed */ |
| 702 | __le16 carrier_offset; /* signed */ |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 703 | }; |
| 704 | }; |
| 705 | } __attribute__ ((packed)); |
| 706 | |
| 707 | struct cmd_tx_rate_query { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 708 | __le16 txrate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 709 | } __attribute__ ((packed)); |
| 710 | |
| 711 | struct cmd_ds_get_tsf { |
| 712 | __le64 tsfvalue; |
| 713 | } __attribute__ ((packed)); |
| 714 | |
| 715 | struct cmd_ds_bt_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 716 | __le16 action; |
| 717 | __le32 id; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 718 | u8 addr1[ETH_ALEN]; |
| 719 | u8 addr2[ETH_ALEN]; |
| 720 | } __attribute__ ((packed)); |
| 721 | |
| 722 | struct cmd_ds_fwt_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 723 | __le16 action; |
| 724 | __le32 id; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 725 | u8 valid; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 726 | u8 da[ETH_ALEN]; |
| 727 | u8 dir; |
| 728 | u8 ra[ETH_ALEN]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 729 | __le32 ssn; |
| 730 | __le32 dsn; |
| 731 | __le32 metric; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 732 | u8 rate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 733 | u8 hopcount; |
| 734 | u8 ttl; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 735 | __le32 expiration; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 736 | u8 sleepmode; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 737 | __le32 snr; |
| 738 | __le32 references; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 739 | u8 prec[ETH_ALEN]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 740 | } __attribute__ ((packed)); |
| 741 | |
David Woodhouse | 23a397a | 2007-12-11 18:56:42 -0500 | [diff] [blame] | 742 | |
| 743 | struct cmd_ds_mesh_config { |
| 744 | struct cmd_header hdr; |
| 745 | |
| 746 | __le16 action; |
| 747 | __le16 channel; |
| 748 | __le16 type; |
| 749 | __le16 length; |
| 750 | u8 data[128]; /* last position reserved */ |
| 751 | } __attribute__ ((packed)); |
| 752 | |
| 753 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 754 | struct cmd_ds_mesh_access { |
David Woodhouse | 301eacb | 2007-12-11 15:23:59 -0500 | [diff] [blame] | 755 | struct cmd_header hdr; |
| 756 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 757 | __le16 action; |
| 758 | __le32 data[32]; /* last position reserved */ |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 759 | } __attribute__ ((packed)); |
| 760 | |
Javier Cardona | 0601e7e | 2007-05-25 12:12:06 -0400 | [diff] [blame] | 761 | /* Number of stats counters returned by the firmware */ |
| 762 | #define MESH_STATS_NUM 8 |
| 763 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 764 | struct cmd_ds_command { |
| 765 | /* command header */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 766 | __le16 command; |
| 767 | __le16 size; |
| 768 | __le16 seqnum; |
| 769 | __le16 result; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 770 | |
| 771 | /* command Body */ |
| 772 | union { |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 773 | struct cmd_ds_802_11_ps_mode psmode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 774 | struct cmd_ds_802_11_associate associate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 775 | struct cmd_ds_802_11_get_stat gstat; |
| 776 | struct cmd_ds_802_3_get_stat gstat_8023; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 777 | struct cmd_ds_802_11_rf_antenna rant; |
Luis Carlos Cobo | 965f8bb | 2007-08-02 13:16:55 -0400 | [diff] [blame] | 778 | struct cmd_ds_802_11_monitor_mode monitor; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 779 | struct cmd_ds_802_11_rssi rssi; |
| 780 | struct cmd_ds_802_11_rssi_rsp rssirsp; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 781 | struct cmd_ds_mac_reg_access macreg; |
| 782 | struct cmd_ds_bbp_reg_access bbpreg; |
| 783 | struct cmd_ds_rf_reg_access rfreg; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 784 | |
| 785 | struct cmd_ds_802_11d_domain_info domaininfo; |
| 786 | struct cmd_ds_802_11d_domain_info domaininforesp; |
| 787 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 788 | struct cmd_ds_802_11_tpc_cfg tpccfg; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 789 | struct cmd_ds_802_11_afc afc; |
| 790 | struct cmd_ds_802_11_led_ctrl ledgpio; |
| 791 | |
| 792 | struct cmd_tx_rate_query txrate; |
| 793 | struct cmd_ds_bt_access bt; |
| 794 | struct cmd_ds_fwt_access fwt; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 795 | struct cmd_ds_get_tsf gettsf; |
Brajesh Dave | 96287ac | 2007-11-20 17:44:28 -0500 | [diff] [blame] | 796 | struct cmd_ds_802_11_beacon_control bcn_ctrl; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 797 | } params; |
| 798 | } __attribute__ ((packed)); |
| 799 | |
| 800 | #endif |