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; |
| 35 | }; |
| 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]; |
| 66 | }; |
| 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; |
| 100 | }; |
| 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]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 110 | }; |
| 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 | |
| 154 | struct cmd_ds_802_11_reset { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 155 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 156 | }; |
| 157 | |
| 158 | struct cmd_ds_802_11_subscribe_event { |
David Woodhouse | 5844d12 | 2007-12-18 02:01:37 -0500 | [diff] [blame] | 159 | struct cmd_header hdr; |
| 160 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 161 | __le16 action; |
| 162 | __le16 events; |
Holger Schurig | 3a18864 | 2007-11-26 10:07:14 +0100 | [diff] [blame] | 163 | |
| 164 | /* A TLV to the CMD_802_11_SUBSCRIBE_EVENT command can contain a |
| 165 | * number of TLVs. From the v5.1 manual, those TLVs would add up to |
| 166 | * 40 bytes. However, future firmware might add additional TLVs, so I |
| 167 | * bump this up a bit. |
| 168 | */ |
David Woodhouse | 5844d12 | 2007-12-18 02:01:37 -0500 | [diff] [blame] | 169 | uint8_t tlv[128]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 170 | }; |
| 171 | |
| 172 | /* |
| 173 | * This scan handle Country Information IE(802.11d compliant) |
Dan Williams | 0aef64d | 2007-08-02 11:31:18 -0400 | [diff] [blame] | 174 | * Define data structure for CMD_802_11_SCAN |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 175 | */ |
| 176 | struct cmd_ds_802_11_scan { |
David Woodhouse | fa62f99 | 2008-03-03 12:18:03 +0100 | [diff] [blame] | 177 | struct cmd_header hdr; |
| 178 | |
| 179 | uint8_t bsstype; |
| 180 | uint8_t bssid[ETH_ALEN]; |
| 181 | uint8_t tlvbuffer[0]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 182 | #if 0 |
| 183 | mrvlietypes_ssidparamset_t ssidParamSet; |
| 184 | mrvlietypes_chanlistparamset_t ChanListParamSet; |
| 185 | mrvlietypes_ratesparamset_t OpRateSet; |
| 186 | #endif |
| 187 | }; |
| 188 | |
| 189 | struct cmd_ds_802_11_scan_rsp { |
David Woodhouse | fa62f99 | 2008-03-03 12:18:03 +0100 | [diff] [blame] | 190 | struct cmd_header hdr; |
| 191 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 192 | __le16 bssdescriptsize; |
David Woodhouse | fa62f99 | 2008-03-03 12:18:03 +0100 | [diff] [blame] | 193 | uint8_t nr_sets; |
| 194 | uint8_t bssdesc_and_tlvbuffer[0]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 195 | }; |
| 196 | |
| 197 | struct cmd_ds_802_11_get_log { |
Holger Schurig | c49c3b7 | 2008-03-17 12:45:58 +0100 | [diff] [blame] | 198 | struct cmd_header hdr; |
| 199 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 200 | __le32 mcasttxframe; |
| 201 | __le32 failed; |
| 202 | __le32 retry; |
| 203 | __le32 multiretry; |
| 204 | __le32 framedup; |
| 205 | __le32 rtssuccess; |
| 206 | __le32 rtsfailure; |
| 207 | __le32 ackfailure; |
| 208 | __le32 rxfrag; |
| 209 | __le32 mcastrxframe; |
| 210 | __le32 fcserror; |
| 211 | __le32 txframe; |
| 212 | __le32 wepundecryptable; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 213 | }; |
| 214 | |
| 215 | struct cmd_ds_mac_control { |
Holger Schurig | 835d3ac | 2008-03-12 16:05:40 +0100 | [diff] [blame] | 216 | struct cmd_header hdr; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 217 | __le16 action; |
Holger Schurig | 835d3ac | 2008-03-12 16:05:40 +0100 | [diff] [blame] | 218 | u16 reserved; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 219 | }; |
| 220 | |
| 221 | struct cmd_ds_mac_multicast_adr { |
David Woodhouse | 75bf45a | 2008-05-20 13:32:45 +0100 | [diff] [blame] | 222 | struct cmd_header hdr; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 223 | __le16 action; |
| 224 | __le16 nr_of_adrs; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 225 | u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE]; |
| 226 | }; |
| 227 | |
| 228 | struct cmd_ds_802_11_authenticate { |
| 229 | u8 macaddr[ETH_ALEN]; |
| 230 | u8 authtype; |
| 231 | u8 reserved[10]; |
| 232 | }; |
| 233 | |
| 234 | struct cmd_ds_802_11_deauthenticate { |
Dan Williams | 191bb40 | 2008-08-21 17:46:18 -0400 | [diff] [blame] | 235 | struct cmd_header hdr; |
| 236 | |
| 237 | u8 macaddr[ETH_ALEN]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 238 | __le16 reasoncode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 239 | }; |
| 240 | |
| 241 | struct cmd_ds_802_11_associate { |
| 242 | u8 peerstaaddr[6]; |
Dan Williams | 0c9ca690 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 243 | __le16 capability; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 244 | __le16 listeninterval; |
| 245 | __le16 bcnperiod; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 246 | u8 dtimperiod; |
| 247 | |
| 248 | #if 0 |
| 249 | mrvlietypes_ssidparamset_t ssidParamSet; |
| 250 | mrvlietypes_phyparamset_t phyparamset; |
| 251 | mrvlietypes_ssparamset_t ssparamset; |
| 252 | mrvlietypes_ratesparamset_t ratesParamSet; |
| 253 | #endif |
| 254 | } __attribute__ ((packed)); |
| 255 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 256 | struct cmd_ds_802_11_associate_rsp { |
| 257 | struct ieeetypes_assocrsp assocRsp; |
| 258 | }; |
| 259 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 260 | struct cmd_ds_802_11_set_wep { |
David Woodhouse | f70dd45 | 2007-12-18 00:18:05 -0500 | [diff] [blame] | 261 | struct cmd_header hdr; |
| 262 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 263 | /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 264 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 265 | |
| 266 | /* key Index selected for Tx */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 267 | __le16 keyindex; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 268 | |
| 269 | /* 40, 128bit or TXWEP */ |
David Woodhouse | f70dd45 | 2007-12-18 00:18:05 -0500 | [diff] [blame] | 270 | uint8_t keytype[4]; |
| 271 | uint8_t keymaterial[4][16]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 272 | }; |
| 273 | |
| 274 | struct cmd_ds_802_3_get_stat { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 275 | __le32 xmitok; |
| 276 | __le32 rcvok; |
| 277 | __le32 xmiterror; |
| 278 | __le32 rcverror; |
| 279 | __le32 rcvnobuffer; |
| 280 | __le32 rcvcrcerror; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 281 | }; |
| 282 | |
| 283 | struct cmd_ds_802_11_get_stat { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 284 | __le32 txfragmentcnt; |
| 285 | __le32 mcasttxframecnt; |
| 286 | __le32 failedcnt; |
| 287 | __le32 retrycnt; |
| 288 | __le32 Multipleretrycnt; |
| 289 | __le32 rtssuccesscnt; |
| 290 | __le32 rtsfailurecnt; |
| 291 | __le32 ackfailurecnt; |
| 292 | __le32 frameduplicatecnt; |
| 293 | __le32 rxfragmentcnt; |
| 294 | __le32 mcastrxframecnt; |
| 295 | __le32 fcserrorcnt; |
| 296 | __le32 bcasttxframecnt; |
| 297 | __le32 bcastrxframecnt; |
| 298 | __le32 txbeacon; |
| 299 | __le32 rxbeacon; |
| 300 | __le32 wepundecryptable; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 301 | }; |
| 302 | |
| 303 | struct cmd_ds_802_11_snmp_mib { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 304 | __le16 querytype; |
| 305 | __le16 oid; |
| 306 | __le16 bufsize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 307 | u8 value[128]; |
| 308 | }; |
| 309 | |
| 310 | struct cmd_ds_mac_reg_map { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 311 | __le16 buffersize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 312 | u8 regmap[128]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 313 | __le16 reserved; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 314 | }; |
| 315 | |
| 316 | struct cmd_ds_bbp_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; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 320 | }; |
| 321 | |
| 322 | struct cmd_ds_rf_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[64]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 325 | __le16 reserved; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 326 | }; |
| 327 | |
| 328 | struct cmd_ds_mac_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 329 | __le16 action; |
| 330 | __le16 offset; |
| 331 | __le32 value; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 332 | }; |
| 333 | |
| 334 | struct cmd_ds_bbp_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 335 | __le16 action; |
| 336 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 337 | u8 value; |
| 338 | u8 reserved[3]; |
| 339 | }; |
| 340 | |
| 341 | struct cmd_ds_rf_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 342 | __le16 action; |
| 343 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 344 | u8 value; |
| 345 | u8 reserved[3]; |
| 346 | }; |
| 347 | |
| 348 | struct cmd_ds_802_11_radio_control { |
David Woodhouse | a7c4589 | 2007-12-17 22:43:48 -0500 | [diff] [blame] | 349 | struct cmd_header hdr; |
| 350 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 351 | __le16 action; |
| 352 | __le16 control; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 353 | }; |
| 354 | |
Brajesh Dave | 96287ac | 2007-11-20 17:44:28 -0500 | [diff] [blame] | 355 | struct cmd_ds_802_11_beacon_control { |
| 356 | __le16 action; |
| 357 | __le16 beacon_enable; |
| 358 | __le16 beacon_period; |
| 359 | }; |
| 360 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 361 | struct cmd_ds_802_11_sleep_params { |
David Woodhouse | 3fbe104 | 2007-12-17 23:48:31 -0500 | [diff] [blame] | 362 | struct cmd_header hdr; |
| 363 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 364 | /* ACT_GET/ACT_SET */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 365 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 366 | |
| 367 | /* Sleep clock error in ppm */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 368 | __le16 error; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 369 | |
| 370 | /* Wakeup offset in usec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 371 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 372 | |
| 373 | /* Clock stabilization time in usec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 374 | __le16 stabletime; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 375 | |
| 376 | /* control periodic calibration */ |
David Woodhouse | 3fbe104 | 2007-12-17 23:48:31 -0500 | [diff] [blame] | 377 | uint8_t calcontrol; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 378 | |
| 379 | /* control the use of external sleep clock */ |
David Woodhouse | 3fbe104 | 2007-12-17 23:48:31 -0500 | [diff] [blame] | 380 | uint8_t externalsleepclk; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 381 | |
| 382 | /* reserved field, should be set to zero */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 383 | __le16 reserved; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 384 | }; |
| 385 | |
| 386 | struct cmd_ds_802_11_inactivity_timeout { |
David Woodhouse | 6e5cc4f | 2007-12-17 23:04:37 -0500 | [diff] [blame] | 387 | struct cmd_header hdr; |
| 388 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 389 | /* ACT_GET/ACT_SET */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 390 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 391 | |
| 392 | /* Inactivity timeout in msec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 393 | __le16 timeout; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 394 | }; |
| 395 | |
| 396 | struct cmd_ds_802_11_rf_channel { |
Dan Williams | 2dd4b26 | 2007-12-11 16:54:15 -0500 | [diff] [blame] | 397 | struct cmd_header hdr; |
| 398 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 399 | __le16 action; |
Dan Williams | 2dd4b26 | 2007-12-11 16:54:15 -0500 | [diff] [blame] | 400 | __le16 channel; |
| 401 | __le16 rftype; /* unused */ |
| 402 | __le16 reserved; /* unused */ |
| 403 | u8 channellist[32]; /* unused */ |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 404 | }; |
| 405 | |
| 406 | struct cmd_ds_802_11_rssi { |
| 407 | /* weighting factor */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 408 | __le16 N; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 409 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 410 | __le16 reserved_0; |
| 411 | __le16 reserved_1; |
| 412 | __le16 reserved_2; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 413 | }; |
| 414 | |
| 415 | struct cmd_ds_802_11_rssi_rsp { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 416 | __le16 SNR; |
| 417 | __le16 noisefloor; |
| 418 | __le16 avgSNR; |
| 419 | __le16 avgnoisefloor; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 420 | }; |
| 421 | |
| 422 | struct cmd_ds_802_11_mac_address { |
Holger Schurig | 2af9f03 | 2008-03-26 09:58:32 +0100 | [diff] [blame] | 423 | struct cmd_header hdr; |
| 424 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 425 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 426 | u8 macadd[ETH_ALEN]; |
| 427 | }; |
| 428 | |
| 429 | struct cmd_ds_802_11_rf_tx_power { |
Dan Williams | 87c8c72 | 2008-08-19 15:15:35 -0400 | [diff] [blame] | 430 | struct cmd_header hdr; |
| 431 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 432 | __le16 action; |
Dan Williams | 87c8c72 | 2008-08-19 15:15:35 -0400 | [diff] [blame] | 433 | __le16 curlevel; |
| 434 | s8 maxlevel; |
| 435 | s8 minlevel; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 436 | }; |
| 437 | |
| 438 | struct cmd_ds_802_11_rf_antenna { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 439 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 440 | |
| 441 | /* Number of antennas or 0xffff(diversity) */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 442 | __le16 antennamode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 443 | |
| 444 | }; |
| 445 | |
Luis Carlos Cobo | 965f8bbc | 2007-08-02 13:16:55 -0400 | [diff] [blame] | 446 | struct cmd_ds_802_11_monitor_mode { |
Holger Schurig | c2df2ef | 2007-12-07 15:30:44 +0000 | [diff] [blame] | 447 | __le16 action; |
| 448 | __le16 mode; |
Luis Carlos Cobo | 965f8bbc | 2007-08-02 13:16:55 -0400 | [diff] [blame] | 449 | }; |
| 450 | |
Luis Carlos Cobo | 63f0023 | 2007-08-02 13:19:24 -0400 | [diff] [blame] | 451 | struct cmd_ds_set_boot2_ver { |
Dan Williams | 7ad994d | 2007-12-11 12:33:30 -0500 | [diff] [blame] | 452 | struct cmd_header hdr; |
| 453 | |
Holger Schurig | c2df2ef | 2007-12-07 15:30:44 +0000 | [diff] [blame] | 454 | __le16 action; |
| 455 | __le16 version; |
Luis Carlos Cobo | 63f0023 | 2007-08-02 13:19:24 -0400 | [diff] [blame] | 456 | }; |
| 457 | |
David Woodhouse | c6ad373 | 2007-12-16 21:43:40 -0500 | [diff] [blame] | 458 | struct cmd_ds_802_11_fw_wake_method { |
| 459 | struct cmd_header hdr; |
| 460 | |
| 461 | __le16 action; |
| 462 | __le16 method; |
| 463 | }; |
| 464 | |
| 465 | struct cmd_ds_802_11_sleep_period { |
| 466 | struct cmd_header hdr; |
| 467 | |
| 468 | __le16 action; |
| 469 | __le16 period; |
| 470 | }; |
| 471 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 472 | struct cmd_ds_802_11_ps_mode { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 473 | __le16 action; |
| 474 | __le16 nullpktinterval; |
| 475 | __le16 multipledtim; |
| 476 | __le16 reserved; |
| 477 | __le16 locallisteninterval; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 478 | }; |
| 479 | |
Holger Schurig | f539f2e | 2008-03-26 13:22:11 +0100 | [diff] [blame] | 480 | struct cmd_confirm_sleep { |
| 481 | struct cmd_header hdr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 482 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 483 | __le16 action; |
Holger Schurig | f539f2e | 2008-03-26 13:22:11 +0100 | [diff] [blame] | 484 | __le16 nullpktinterval; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 485 | __le16 multipledtim; |
| 486 | __le16 reserved; |
| 487 | __le16 locallisteninterval; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 488 | }; |
| 489 | |
| 490 | struct cmd_ds_802_11_data_rate { |
Dan Williams | 8e3c91b | 2007-12-11 15:50:59 -0500 | [diff] [blame] | 491 | struct cmd_header hdr; |
| 492 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 493 | __le16 action; |
Dan Williams | 8c51276 | 2007-08-02 11:40:45 -0400 | [diff] [blame] | 494 | __le16 reserved; |
| 495 | u8 rates[MAX_RATES]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 496 | }; |
| 497 | |
| 498 | struct cmd_ds_802_11_rate_adapt_rateset { |
Javier Cardona | 85319f9 | 2008-05-24 10:59:49 +0100 | [diff] [blame] | 499 | struct cmd_header hdr; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 500 | __le16 action; |
| 501 | __le16 enablehwauto; |
| 502 | __le16 bitmap; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 503 | }; |
| 504 | |
| 505 | struct cmd_ds_802_11_ad_hoc_start { |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 506 | struct cmd_header hdr; |
| 507 | |
Dan Williams | b44898e | 2007-08-02 11:18:40 -0400 | [diff] [blame] | 508 | u8 ssid[IW_ESSID_MAX_SIZE]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 509 | u8 bsstype; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 510 | __le16 beaconperiod; |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 511 | u8 dtimperiod; /* Reserved on v9 and later */ |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 512 | union IEEEtypes_ssparamset ssparamset; |
| 513 | union ieeetypes_phyparamset phyparamset; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 514 | __le16 probedelay; |
Dan Williams | 0c9ca690 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 515 | __le16 capability; |
Dan Williams | 8c51276 | 2007-08-02 11:40:45 -0400 | [diff] [blame] | 516 | u8 rates[MAX_RATES]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 517 | u8 tlv_memory_size_pad[100]; |
| 518 | } __attribute__ ((packed)); |
| 519 | |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 520 | struct cmd_ds_802_11_ad_hoc_result { |
| 521 | struct cmd_header hdr; |
| 522 | |
| 523 | u8 pad[3]; |
| 524 | u8 bssid[ETH_ALEN]; |
| 525 | }; |
| 526 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 527 | struct adhoc_bssdesc { |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 528 | u8 bssid[ETH_ALEN]; |
| 529 | u8 ssid[IW_ESSID_MAX_SIZE]; |
Dan Williams | 0c9ca690 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 530 | u8 type; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 531 | __le16 beaconperiod; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 532 | u8 dtimperiod; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 533 | __le64 timestamp; |
| 534 | __le64 localtime; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 535 | union ieeetypes_phyparamset phyparamset; |
| 536 | union IEEEtypes_ssparamset ssparamset; |
Dan Williams | 0c9ca690 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 537 | __le16 capability; |
Dan Williams | 8c51276 | 2007-08-02 11:40:45 -0400 | [diff] [blame] | 538 | u8 rates[MAX_RATES]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 539 | |
| 540 | /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the |
| 541 | * Adhoc join command and will cause a binary layout mismatch with |
| 542 | * the firmware |
| 543 | */ |
| 544 | } __attribute__ ((packed)); |
| 545 | |
| 546 | struct cmd_ds_802_11_ad_hoc_join { |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 547 | struct cmd_header hdr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 548 | |
Dan Williams | f5fe1fd | 2008-08-21 21:46:59 -0400 | [diff] [blame] | 549 | struct adhoc_bssdesc bss; |
| 550 | __le16 failtimeout; /* Reserved on v9 and later */ |
| 551 | __le16 probedelay; /* Reserved on v9 and later */ |
| 552 | } __attribute__ ((packed)); |
| 553 | |
| 554 | struct cmd_ds_802_11_ad_hoc_stop { |
| 555 | struct cmd_header hdr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 556 | } __attribute__ ((packed)); |
| 557 | |
| 558 | struct cmd_ds_802_11_enable_rsn { |
David Woodhouse | 4f59abf | 2007-12-18 00:47:17 -0500 | [diff] [blame] | 559 | struct cmd_header hdr; |
| 560 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 561 | __le16 action; |
| 562 | __le16 enable; |
Dan Williams | 18c96c34 | 2007-06-18 12:01:12 -0400 | [diff] [blame] | 563 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 564 | |
| 565 | struct MrvlIEtype_keyParamSet { |
| 566 | /* type ID */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 567 | __le16 type; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 568 | |
| 569 | /* length of Payload */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 570 | __le16 length; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 571 | |
| 572 | /* type of key: WEP=0, TKIP=1, AES=2 */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 573 | __le16 keytypeid; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 574 | |
| 575 | /* key control Info specific to a keytypeid */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 576 | __le16 keyinfo; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 577 | |
| 578 | /* length of key */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 579 | __le16 keylen; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 580 | |
| 581 | /* key material of size keylen */ |
| 582 | u8 key[32]; |
| 583 | }; |
| 584 | |
David Woodhouse | 6ce4fd2 | 2007-12-12 15:19:29 -0500 | [diff] [blame] | 585 | struct cmd_ds_host_sleep { |
| 586 | struct cmd_header hdr; |
| 587 | __le32 criteria; |
| 588 | uint8_t gpio; |
| 589 | uint8_t gap; |
| 590 | } __attribute__ ((packed)); |
| 591 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 592 | struct cmd_ds_802_11_key_material { |
David Woodhouse | 9e1228d | 2008-03-03 12:15:39 +0100 | [diff] [blame] | 593 | struct cmd_header hdr; |
| 594 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 595 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 596 | struct MrvlIEtype_keyParamSet keyParamSet[2]; |
| 597 | } __attribute__ ((packed)); |
| 598 | |
| 599 | struct cmd_ds_802_11_eeprom_access { |
Holger Schurig | 7460f5a | 2008-03-26 10:03:48 +0100 | [diff] [blame] | 600 | struct cmd_header hdr; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 601 | __le16 action; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 602 | __le16 offset; |
Holger Schurig | 7460f5a | 2008-03-26 10:03:48 +0100 | [diff] [blame] | 603 | __le16 len; |
| 604 | /* firmware says it returns a maximum of 20 bytes */ |
| 605 | #define LBS_EEPROM_READ_LEN 20 |
| 606 | u8 value[LBS_EEPROM_READ_LEN]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 607 | } __attribute__ ((packed)); |
| 608 | |
| 609 | struct cmd_ds_802_11_tpc_cfg { |
Anna Neal | 0112c9e | 2008-09-11 11:17:25 -0700 | [diff] [blame] | 610 | struct cmd_header hdr; |
| 611 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 612 | __le16 action; |
Anna Neal | 0112c9e | 2008-09-11 11:17:25 -0700 | [diff] [blame] | 613 | uint8_t enable; |
| 614 | int8_t P0; |
| 615 | int8_t P1; |
| 616 | int8_t P2; |
| 617 | uint8_t usesnr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 618 | } __attribute__ ((packed)); |
| 619 | |
Anna Neal | 0112c9e | 2008-09-11 11:17:25 -0700 | [diff] [blame] | 620 | |
| 621 | struct cmd_ds_802_11_pa_cfg { |
| 622 | struct cmd_header hdr; |
| 623 | |
| 624 | __le16 action; |
| 625 | uint8_t enable; |
| 626 | int8_t P0; |
| 627 | int8_t P1; |
| 628 | int8_t P2; |
| 629 | } __attribute__ ((packed)); |
| 630 | |
| 631 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 632 | struct cmd_ds_802_11_led_ctrl { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 633 | __le16 action; |
| 634 | __le16 numled; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 635 | u8 data[256]; |
| 636 | } __attribute__ ((packed)); |
| 637 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 638 | struct cmd_ds_802_11_afc { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 639 | __le16 afc_auto; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 640 | union { |
| 641 | struct { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 642 | __le16 threshold; |
| 643 | __le16 period; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 644 | }; |
| 645 | struct { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 646 | __le16 timing_offset; /* signed */ |
| 647 | __le16 carrier_offset; /* signed */ |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 648 | }; |
| 649 | }; |
| 650 | } __attribute__ ((packed)); |
| 651 | |
| 652 | struct cmd_tx_rate_query { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 653 | __le16 txrate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 654 | } __attribute__ ((packed)); |
| 655 | |
| 656 | struct cmd_ds_get_tsf { |
| 657 | __le64 tsfvalue; |
| 658 | } __attribute__ ((packed)); |
| 659 | |
| 660 | struct cmd_ds_bt_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 661 | __le16 action; |
| 662 | __le32 id; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 663 | u8 addr1[ETH_ALEN]; |
| 664 | u8 addr2[ETH_ALEN]; |
| 665 | } __attribute__ ((packed)); |
| 666 | |
| 667 | struct cmd_ds_fwt_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 668 | __le16 action; |
| 669 | __le32 id; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 670 | u8 valid; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 671 | u8 da[ETH_ALEN]; |
| 672 | u8 dir; |
| 673 | u8 ra[ETH_ALEN]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 674 | __le32 ssn; |
| 675 | __le32 dsn; |
| 676 | __le32 metric; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 677 | u8 rate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 678 | u8 hopcount; |
| 679 | u8 ttl; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 680 | __le32 expiration; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 681 | u8 sleepmode; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 682 | __le32 snr; |
| 683 | __le32 references; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 684 | u8 prec[ETH_ALEN]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 685 | } __attribute__ ((packed)); |
| 686 | |
David Woodhouse | 23a397a | 2007-12-11 18:56:42 -0500 | [diff] [blame] | 687 | |
| 688 | struct cmd_ds_mesh_config { |
| 689 | struct cmd_header hdr; |
| 690 | |
| 691 | __le16 action; |
| 692 | __le16 channel; |
| 693 | __le16 type; |
| 694 | __le16 length; |
| 695 | u8 data[128]; /* last position reserved */ |
| 696 | } __attribute__ ((packed)); |
| 697 | |
| 698 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 699 | struct cmd_ds_mesh_access { |
David Woodhouse | 301eacb | 2007-12-11 15:23:59 -0500 | [diff] [blame] | 700 | struct cmd_header hdr; |
| 701 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 702 | __le16 action; |
| 703 | __le32 data[32]; /* last position reserved */ |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 704 | } __attribute__ ((packed)); |
| 705 | |
Javier Cardona | 0601e7e | 2007-05-25 12:12:06 -0400 | [diff] [blame] | 706 | /* Number of stats counters returned by the firmware */ |
| 707 | #define MESH_STATS_NUM 8 |
| 708 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 709 | struct cmd_ds_command { |
| 710 | /* command header */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 711 | __le16 command; |
| 712 | __le16 size; |
| 713 | __le16 seqnum; |
| 714 | __le16 result; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 715 | |
| 716 | /* command Body */ |
| 717 | union { |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 718 | struct cmd_ds_802_11_ps_mode psmode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 719 | struct cmd_ds_802_11_associate associate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 720 | struct cmd_ds_802_11_reset reset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 721 | struct cmd_ds_802_11_authenticate auth; |
| 722 | struct cmd_ds_802_11_get_stat gstat; |
| 723 | struct cmd_ds_802_3_get_stat gstat_8023; |
| 724 | struct cmd_ds_802_11_snmp_mib smib; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 725 | struct cmd_ds_802_11_rf_antenna rant; |
Luis Carlos Cobo | 965f8bbc | 2007-08-02 13:16:55 -0400 | [diff] [blame] | 726 | struct cmd_ds_802_11_monitor_mode monitor; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 727 | struct cmd_ds_802_11_rssi rssi; |
| 728 | struct cmd_ds_802_11_rssi_rsp rssirsp; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 729 | struct cmd_ds_mac_reg_access macreg; |
| 730 | struct cmd_ds_bbp_reg_access bbpreg; |
| 731 | struct cmd_ds_rf_reg_access rfreg; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 732 | |
| 733 | struct cmd_ds_802_11d_domain_info domaininfo; |
| 734 | struct cmd_ds_802_11d_domain_info domaininforesp; |
| 735 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 736 | struct cmd_ds_802_11_tpc_cfg tpccfg; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 737 | struct cmd_ds_802_11_afc afc; |
| 738 | struct cmd_ds_802_11_led_ctrl ledgpio; |
| 739 | |
| 740 | struct cmd_tx_rate_query txrate; |
| 741 | struct cmd_ds_bt_access bt; |
| 742 | struct cmd_ds_fwt_access fwt; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 743 | struct cmd_ds_get_tsf gettsf; |
Brajesh Dave | 96287ac | 2007-11-20 17:44:28 -0500 | [diff] [blame] | 744 | struct cmd_ds_802_11_beacon_control bcn_ctrl; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 745 | } params; |
| 746 | } __attribute__ ((packed)); |
| 747 | |
| 748 | #endif |