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