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