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 | */ |
| 5 | #ifndef __HOSTCMD__H |
| 6 | #define __HOSTCMD__H |
| 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 | |
| 68 | struct cmd_ctrl_node { |
| 69 | /* CMD link list */ |
| 70 | struct list_head list; |
| 71 | u32 status; |
| 72 | /* CMD ID */ |
| 73 | u32 cmd_oid; |
| 74 | /*CMD wait option: wait for finish or no wait */ |
| 75 | u16 wait_option; |
| 76 | /* command parameter */ |
| 77 | void *pdata_buf; |
| 78 | /*command data */ |
| 79 | u8 *bufvirtualaddr; |
| 80 | u16 cmdflags; |
| 81 | /* wait queue */ |
| 82 | u16 cmdwaitqwoken; |
| 83 | wait_queue_head_t cmdwait_q; |
| 84 | }; |
| 85 | |
Dan Williams | 1443b65 | 2007-08-02 10:45:55 -0400 | [diff] [blame^] | 86 | /* Generic structure to hold all key types. */ |
| 87 | struct enc_key { |
| 88 | u16 len; |
| 89 | u16 flags; /* KEY_INFO_* from wlan_defs.h */ |
| 90 | u16 type; /* KEY_TYPE_* from wlan_defs.h */ |
| 91 | u8 key[32]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 92 | }; |
| 93 | |
| 94 | struct IE_WPA { |
| 95 | u8 elementid; |
| 96 | u8 len; |
| 97 | u8 oui[4]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 98 | __le16 version; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 99 | }; |
| 100 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 101 | /* wlan_offset_value */ |
| 102 | struct wlan_offset_value { |
| 103 | u32 offset; |
| 104 | u32 value; |
| 105 | }; |
| 106 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 107 | struct WLAN_802_11_VARIABLE_IEs { |
| 108 | u8 elementid; |
| 109 | u8 length; |
| 110 | u8 data[1]; |
| 111 | }; |
| 112 | |
| 113 | /* Define general data structure */ |
| 114 | /* cmd_DS_GEN */ |
| 115 | struct cmd_ds_gen { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 116 | __le16 command; |
| 117 | __le16 size; |
| 118 | __le16 seqnum; |
| 119 | __le16 result; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 120 | }; |
| 121 | |
| 122 | #define S_DS_GEN sizeof(struct cmd_ds_gen) |
| 123 | /* |
| 124 | * Define data structure for cmd_get_hw_spec |
| 125 | * This structure defines the response for the GET_HW_SPEC command |
| 126 | */ |
| 127 | struct cmd_ds_get_hw_spec { |
| 128 | /* HW Interface version number */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 129 | __le16 hwifversion; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 130 | /* HW version number */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 131 | __le16 version; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 132 | /* Max number of TxPD FW can handle */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 133 | __le16 nr_txpd; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 134 | /* Max no of Multicast address */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 135 | __le16 nr_mcast_adr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 136 | /* MAC address */ |
| 137 | u8 permanentaddr[6]; |
| 138 | |
| 139 | /* region Code */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 140 | __le16 regioncode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 141 | |
| 142 | /* Number of antenna used */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 143 | __le16 nr_antenna; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 144 | |
David Woodhouse | e5b3d47 | 2007-05-25 23:40:21 -0400 | [diff] [blame] | 145 | /* FW release number, example 1,2,3,4 = 3.2.1p4 */ |
| 146 | u8 fwreleasenumber[4]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 147 | |
| 148 | /* Base Address of TxPD queue */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 149 | __le32 wcb_base; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 150 | /* Read Pointer of RxPd queue */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 151 | __le32 rxpd_rdptr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 152 | |
| 153 | /* Write Pointer of RxPd queue */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 154 | __le32 rxpd_wrptr; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 155 | |
| 156 | /*FW/HW capability */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 157 | __le32 fwcapinfo; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 158 | } __attribute__ ((packed)); |
| 159 | |
| 160 | struct cmd_ds_802_11_reset { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 161 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 162 | }; |
| 163 | |
| 164 | struct cmd_ds_802_11_subscribe_event { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 165 | __le16 action; |
| 166 | __le16 events; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 167 | }; |
| 168 | |
| 169 | /* |
| 170 | * This scan handle Country Information IE(802.11d compliant) |
| 171 | * Define data structure for cmd_802_11_scan |
| 172 | */ |
| 173 | struct cmd_ds_802_11_scan { |
| 174 | u8 bsstype; |
| 175 | u8 BSSID[ETH_ALEN]; |
| 176 | u8 tlvbuffer[1]; |
| 177 | #if 0 |
| 178 | mrvlietypes_ssidparamset_t ssidParamSet; |
| 179 | mrvlietypes_chanlistparamset_t ChanListParamSet; |
| 180 | mrvlietypes_ratesparamset_t OpRateSet; |
| 181 | #endif |
| 182 | }; |
| 183 | |
| 184 | struct cmd_ds_802_11_scan_rsp { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 185 | __le16 bssdescriptsize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 186 | u8 nr_sets; |
| 187 | u8 bssdesc_and_tlvbuffer[1]; |
| 188 | }; |
| 189 | |
| 190 | struct cmd_ds_802_11_get_log { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 191 | __le32 mcasttxframe; |
| 192 | __le32 failed; |
| 193 | __le32 retry; |
| 194 | __le32 multiretry; |
| 195 | __le32 framedup; |
| 196 | __le32 rtssuccess; |
| 197 | __le32 rtsfailure; |
| 198 | __le32 ackfailure; |
| 199 | __le32 rxfrag; |
| 200 | __le32 mcastrxframe; |
| 201 | __le32 fcserror; |
| 202 | __le32 txframe; |
| 203 | __le32 wepundecryptable; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 204 | }; |
| 205 | |
| 206 | struct cmd_ds_mac_control { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 207 | __le16 action; |
| 208 | __le16 reserved; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 209 | }; |
| 210 | |
| 211 | struct cmd_ds_mac_multicast_adr { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 212 | __le16 action; |
| 213 | __le16 nr_of_adrs; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 214 | u8 maclist[ETH_ALEN * MRVDRV_MAX_MULTICAST_LIST_SIZE]; |
| 215 | }; |
| 216 | |
| 217 | struct cmd_ds_802_11_authenticate { |
| 218 | u8 macaddr[ETH_ALEN]; |
| 219 | u8 authtype; |
| 220 | u8 reserved[10]; |
| 221 | }; |
| 222 | |
| 223 | struct cmd_ds_802_11_deauthenticate { |
| 224 | u8 macaddr[6]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 225 | __le16 reasoncode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 226 | }; |
| 227 | |
| 228 | struct cmd_ds_802_11_associate { |
| 229 | u8 peerstaaddr[6]; |
Dan Williams | 0c9ca690 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 230 | __le16 capability; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 231 | __le16 listeninterval; |
| 232 | __le16 bcnperiod; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 233 | u8 dtimperiod; |
| 234 | |
| 235 | #if 0 |
| 236 | mrvlietypes_ssidparamset_t ssidParamSet; |
| 237 | mrvlietypes_phyparamset_t phyparamset; |
| 238 | mrvlietypes_ssparamset_t ssparamset; |
| 239 | mrvlietypes_ratesparamset_t ratesParamSet; |
| 240 | #endif |
| 241 | } __attribute__ ((packed)); |
| 242 | |
| 243 | struct cmd_ds_802_11_disassociate { |
| 244 | u8 destmacaddr[6]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 245 | __le16 reasoncode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 246 | }; |
| 247 | |
| 248 | struct cmd_ds_802_11_associate_rsp { |
| 249 | struct ieeetypes_assocrsp assocRsp; |
| 250 | }; |
| 251 | |
| 252 | struct cmd_ds_802_11_ad_hoc_result { |
| 253 | u8 PAD[3]; |
| 254 | u8 BSSID[ETH_ALEN]; |
| 255 | }; |
| 256 | |
| 257 | struct cmd_ds_802_11_set_wep { |
| 258 | /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 259 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 260 | |
| 261 | /* key Index selected for Tx */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 262 | __le16 keyindex; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 263 | |
| 264 | /* 40, 128bit or TXWEP */ |
| 265 | u8 keytype[4]; |
| 266 | u8 keymaterial[4][16]; |
| 267 | }; |
| 268 | |
| 269 | struct cmd_ds_802_3_get_stat { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 270 | __le32 xmitok; |
| 271 | __le32 rcvok; |
| 272 | __le32 xmiterror; |
| 273 | __le32 rcverror; |
| 274 | __le32 rcvnobuffer; |
| 275 | __le32 rcvcrcerror; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 276 | }; |
| 277 | |
| 278 | struct cmd_ds_802_11_get_stat { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 279 | __le32 txfragmentcnt; |
| 280 | __le32 mcasttxframecnt; |
| 281 | __le32 failedcnt; |
| 282 | __le32 retrycnt; |
| 283 | __le32 Multipleretrycnt; |
| 284 | __le32 rtssuccesscnt; |
| 285 | __le32 rtsfailurecnt; |
| 286 | __le32 ackfailurecnt; |
| 287 | __le32 frameduplicatecnt; |
| 288 | __le32 rxfragmentcnt; |
| 289 | __le32 mcastrxframecnt; |
| 290 | __le32 fcserrorcnt; |
| 291 | __le32 bcasttxframecnt; |
| 292 | __le32 bcastrxframecnt; |
| 293 | __le32 txbeacon; |
| 294 | __le32 rxbeacon; |
| 295 | __le32 wepundecryptable; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 296 | }; |
| 297 | |
| 298 | struct cmd_ds_802_11_snmp_mib { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 299 | __le16 querytype; |
| 300 | __le16 oid; |
| 301 | __le16 bufsize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 302 | u8 value[128]; |
| 303 | }; |
| 304 | |
| 305 | struct cmd_ds_mac_reg_map { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 306 | __le16 buffersize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 307 | u8 regmap[128]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 308 | __le16 reserved; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 309 | }; |
| 310 | |
| 311 | struct cmd_ds_bbp_reg_map { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 312 | __le16 buffersize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 313 | u8 regmap[128]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 314 | __le16 reserved; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 315 | }; |
| 316 | |
| 317 | struct cmd_ds_rf_reg_map { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 318 | __le16 buffersize; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 319 | u8 regmap[64]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 320 | __le16 reserved; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 321 | }; |
| 322 | |
| 323 | struct cmd_ds_mac_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 324 | __le16 action; |
| 325 | __le16 offset; |
| 326 | __le32 value; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 327 | }; |
| 328 | |
| 329 | struct cmd_ds_bbp_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 330 | __le16 action; |
| 331 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 332 | u8 value; |
| 333 | u8 reserved[3]; |
| 334 | }; |
| 335 | |
| 336 | struct cmd_ds_rf_reg_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 337 | __le16 action; |
| 338 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 339 | u8 value; |
| 340 | u8 reserved[3]; |
| 341 | }; |
| 342 | |
| 343 | struct cmd_ds_802_11_radio_control { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 344 | __le16 action; |
| 345 | __le16 control; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 346 | }; |
| 347 | |
| 348 | struct cmd_ds_802_11_sleep_params { |
| 349 | /* ACT_GET/ACT_SET */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 350 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 351 | |
| 352 | /* Sleep clock error in ppm */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 353 | __le16 error; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 354 | |
| 355 | /* Wakeup offset in usec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 356 | __le16 offset; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 357 | |
| 358 | /* Clock stabilization time in usec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 359 | __le16 stabletime; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 360 | |
| 361 | /* control periodic calibration */ |
| 362 | u8 calcontrol; |
| 363 | |
| 364 | /* control the use of external sleep clock */ |
| 365 | u8 externalsleepclk; |
| 366 | |
| 367 | /* reserved field, should be set to zero */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 368 | __le16 reserved; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 369 | }; |
| 370 | |
| 371 | struct cmd_ds_802_11_inactivity_timeout { |
| 372 | /* ACT_GET/ACT_SET */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 373 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 374 | |
| 375 | /* Inactivity timeout in msec */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 376 | __le16 timeout; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 377 | }; |
| 378 | |
| 379 | struct cmd_ds_802_11_rf_channel { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 380 | __le16 action; |
| 381 | __le16 currentchannel; |
| 382 | __le16 rftype; |
| 383 | __le16 reserved; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 384 | u8 channellist[32]; |
| 385 | }; |
| 386 | |
| 387 | struct cmd_ds_802_11_rssi { |
| 388 | /* weighting factor */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 389 | __le16 N; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 390 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 391 | __le16 reserved_0; |
| 392 | __le16 reserved_1; |
| 393 | __le16 reserved_2; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 394 | }; |
| 395 | |
| 396 | struct cmd_ds_802_11_rssi_rsp { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 397 | __le16 SNR; |
| 398 | __le16 noisefloor; |
| 399 | __le16 avgSNR; |
| 400 | __le16 avgnoisefloor; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 401 | }; |
| 402 | |
| 403 | struct cmd_ds_802_11_mac_address { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 404 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 405 | u8 macadd[ETH_ALEN]; |
| 406 | }; |
| 407 | |
| 408 | struct cmd_ds_802_11_rf_tx_power { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 409 | __le16 action; |
| 410 | __le16 currentlevel; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 411 | }; |
| 412 | |
| 413 | struct cmd_ds_802_11_rf_antenna { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 414 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 415 | |
| 416 | /* Number of antennas or 0xffff(diversity) */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 417 | __le16 antennamode; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 418 | |
| 419 | }; |
| 420 | |
| 421 | struct cmd_ds_802_11_ps_mode { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 422 | __le16 action; |
| 423 | __le16 nullpktinterval; |
| 424 | __le16 multipledtim; |
| 425 | __le16 reserved; |
| 426 | __le16 locallisteninterval; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 427 | }; |
| 428 | |
| 429 | struct PS_CMD_ConfirmSleep { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 430 | __le16 command; |
| 431 | __le16 size; |
| 432 | __le16 seqnum; |
| 433 | __le16 result; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 434 | |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 435 | __le16 action; |
| 436 | __le16 reserved1; |
| 437 | __le16 multipledtim; |
| 438 | __le16 reserved; |
| 439 | __le16 locallisteninterval; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 440 | }; |
| 441 | |
| 442 | struct cmd_ds_802_11_data_rate { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 443 | __le16 action; |
| 444 | __le16 reserverd; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 445 | u8 datarate[G_SUPPORTED_RATES]; |
| 446 | }; |
| 447 | |
| 448 | struct cmd_ds_802_11_rate_adapt_rateset { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 449 | __le16 action; |
| 450 | __le16 enablehwauto; |
| 451 | __le16 bitmap; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 452 | }; |
| 453 | |
| 454 | struct cmd_ds_802_11_ad_hoc_start { |
| 455 | u8 SSID[IW_ESSID_MAX_SIZE]; |
| 456 | u8 bsstype; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 457 | __le16 beaconperiod; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 458 | u8 dtimperiod; |
| 459 | union IEEEtypes_ssparamset ssparamset; |
| 460 | union ieeetypes_phyparamset phyparamset; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 461 | __le16 probedelay; |
Dan Williams | 0c9ca690 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 462 | __le16 capability; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 463 | u8 datarate[G_SUPPORTED_RATES]; |
| 464 | u8 tlv_memory_size_pad[100]; |
| 465 | } __attribute__ ((packed)); |
| 466 | |
| 467 | struct adhoc_bssdesc { |
Dan Williams | 0c9ca690 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 468 | u8 bssid[6]; |
| 469 | u8 ssid[32]; |
| 470 | u8 type; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 471 | __le16 beaconperiod; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 472 | u8 dtimperiod; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 473 | __le64 timestamp; |
| 474 | __le64 localtime; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 475 | union ieeetypes_phyparamset phyparamset; |
| 476 | union IEEEtypes_ssparamset ssparamset; |
Dan Williams | 0c9ca690 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 477 | __le16 capability; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 478 | u8 datarates[G_SUPPORTED_RATES]; |
| 479 | |
| 480 | /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the |
| 481 | * Adhoc join command and will cause a binary layout mismatch with |
| 482 | * the firmware |
| 483 | */ |
| 484 | } __attribute__ ((packed)); |
| 485 | |
| 486 | struct cmd_ds_802_11_ad_hoc_join { |
Dan Williams | 0c9ca690 | 2007-08-02 10:43:44 -0400 | [diff] [blame] | 487 | struct adhoc_bssdesc bss; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 488 | __le16 failtimeout; |
| 489 | __le16 probedelay; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 490 | |
| 491 | } __attribute__ ((packed)); |
| 492 | |
| 493 | struct cmd_ds_802_11_enable_rsn { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 494 | __le16 action; |
| 495 | __le16 enable; |
Dan Williams | 18c96c34 | 2007-06-18 12:01:12 -0400 | [diff] [blame] | 496 | } __attribute__ ((packed)); |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 497 | |
| 498 | struct MrvlIEtype_keyParamSet { |
| 499 | /* type ID */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 500 | __le16 type; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 501 | |
| 502 | /* length of Payload */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 503 | __le16 length; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 504 | |
| 505 | /* type of key: WEP=0, TKIP=1, AES=2 */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 506 | __le16 keytypeid; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 507 | |
| 508 | /* key control Info specific to a keytypeid */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 509 | __le16 keyinfo; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 510 | |
| 511 | /* length of key */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 512 | __le16 keylen; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 513 | |
| 514 | /* key material of size keylen */ |
| 515 | u8 key[32]; |
| 516 | }; |
| 517 | |
| 518 | struct cmd_ds_802_11_key_material { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 519 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 520 | struct MrvlIEtype_keyParamSet keyParamSet[2]; |
| 521 | } __attribute__ ((packed)); |
| 522 | |
| 523 | struct cmd_ds_802_11_eeprom_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 524 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 525 | |
| 526 | /* multiple 4 */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 527 | __le16 offset; |
| 528 | __le16 bytecount; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 529 | u8 value; |
| 530 | } __attribute__ ((packed)); |
| 531 | |
| 532 | struct cmd_ds_802_11_tpc_cfg { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 533 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 534 | u8 enable; |
| 535 | s8 P0; |
| 536 | s8 P1; |
| 537 | s8 P2; |
| 538 | u8 usesnr; |
| 539 | } __attribute__ ((packed)); |
| 540 | |
| 541 | struct cmd_ds_802_11_led_ctrl { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 542 | __le16 action; |
| 543 | __le16 numled; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 544 | u8 data[256]; |
| 545 | } __attribute__ ((packed)); |
| 546 | |
| 547 | struct cmd_ds_802_11_pwr_cfg { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 548 | __le16 action; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 549 | u8 enable; |
| 550 | s8 PA_P0; |
| 551 | s8 PA_P1; |
| 552 | s8 PA_P2; |
| 553 | } __attribute__ ((packed)); |
| 554 | |
| 555 | struct cmd_ds_802_11_afc { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 556 | __le16 afc_auto; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 557 | union { |
| 558 | struct { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 559 | __le16 threshold; |
| 560 | __le16 period; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 561 | }; |
| 562 | struct { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 563 | __le16 timing_offset; /* signed */ |
| 564 | __le16 carrier_offset; /* signed */ |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 565 | }; |
| 566 | }; |
| 567 | } __attribute__ ((packed)); |
| 568 | |
| 569 | struct cmd_tx_rate_query { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 570 | __le16 txrate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 571 | } __attribute__ ((packed)); |
| 572 | |
| 573 | struct cmd_ds_get_tsf { |
| 574 | __le64 tsfvalue; |
| 575 | } __attribute__ ((packed)); |
| 576 | |
| 577 | struct cmd_ds_bt_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 578 | __le16 action; |
| 579 | __le32 id; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 580 | u8 addr1[ETH_ALEN]; |
| 581 | u8 addr2[ETH_ALEN]; |
| 582 | } __attribute__ ((packed)); |
| 583 | |
| 584 | struct cmd_ds_fwt_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 585 | __le16 action; |
| 586 | __le32 id; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 587 | u8 valid; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 588 | u8 da[ETH_ALEN]; |
| 589 | u8 dir; |
| 590 | u8 ra[ETH_ALEN]; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 591 | __le32 ssn; |
| 592 | __le32 dsn; |
| 593 | __le32 metric; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 594 | u8 rate; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 595 | u8 hopcount; |
| 596 | u8 ttl; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 597 | __le32 expiration; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 598 | u8 sleepmode; |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 599 | __le32 snr; |
| 600 | __le32 references; |
Luis Carlos Cobo | 90e8eaf | 2007-05-25 13:53:26 -0400 | [diff] [blame] | 601 | u8 prec[ETH_ALEN]; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 602 | } __attribute__ ((packed)); |
| 603 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 604 | struct cmd_ds_mesh_access { |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 605 | __le16 action; |
| 606 | __le32 data[32]; /* last position reserved */ |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 607 | } __attribute__ ((packed)); |
| 608 | |
Javier Cardona | 0601e7e | 2007-05-25 12:12:06 -0400 | [diff] [blame] | 609 | /* Number of stats counters returned by the firmware */ |
| 610 | #define MESH_STATS_NUM 8 |
| 611 | |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 612 | struct cmd_ds_command { |
| 613 | /* command header */ |
David Woodhouse | 981f187 | 2007-05-25 23:36:54 -0400 | [diff] [blame] | 614 | __le16 command; |
| 615 | __le16 size; |
| 616 | __le16 seqnum; |
| 617 | __le16 result; |
Marcelo Tosatti | 876c9d3 | 2007-02-10 12:25:27 -0200 | [diff] [blame] | 618 | |
| 619 | /* command Body */ |
| 620 | union { |
| 621 | struct cmd_ds_get_hw_spec hwspec; |
| 622 | struct cmd_ds_802_11_ps_mode psmode; |
| 623 | struct cmd_ds_802_11_scan scan; |
| 624 | struct cmd_ds_802_11_scan_rsp scanresp; |
| 625 | struct cmd_ds_mac_control macctrl; |
| 626 | struct cmd_ds_802_11_associate associate; |
| 627 | struct cmd_ds_802_11_deauthenticate deauth; |
| 628 | struct cmd_ds_802_11_set_wep wep; |
| 629 | struct cmd_ds_802_11_ad_hoc_start ads; |
| 630 | struct cmd_ds_802_11_reset reset; |
| 631 | struct cmd_ds_802_11_ad_hoc_result result; |
| 632 | struct cmd_ds_802_11_get_log glog; |
| 633 | struct cmd_ds_802_11_authenticate auth; |
| 634 | struct cmd_ds_802_11_get_stat gstat; |
| 635 | struct cmd_ds_802_3_get_stat gstat_8023; |
| 636 | struct cmd_ds_802_11_snmp_mib smib; |
| 637 | struct cmd_ds_802_11_rf_tx_power txp; |
| 638 | struct cmd_ds_802_11_rf_antenna rant; |
| 639 | struct cmd_ds_802_11_data_rate drate; |
| 640 | struct cmd_ds_802_11_rate_adapt_rateset rateset; |
| 641 | struct cmd_ds_mac_multicast_adr madr; |
| 642 | struct cmd_ds_802_11_ad_hoc_join adj; |
| 643 | struct cmd_ds_802_11_radio_control radio; |
| 644 | struct cmd_ds_802_11_rf_channel rfchannel; |
| 645 | struct cmd_ds_802_11_rssi rssi; |
| 646 | struct cmd_ds_802_11_rssi_rsp rssirsp; |
| 647 | struct cmd_ds_802_11_disassociate dassociate; |
| 648 | struct cmd_ds_802_11_mac_address macadd; |
| 649 | struct cmd_ds_802_11_enable_rsn enbrsn; |
| 650 | struct cmd_ds_802_11_key_material keymaterial; |
| 651 | struct cmd_ds_mac_reg_access macreg; |
| 652 | struct cmd_ds_bbp_reg_access bbpreg; |
| 653 | struct cmd_ds_rf_reg_access rfreg; |
| 654 | struct cmd_ds_802_11_eeprom_access rdeeprom; |
| 655 | |
| 656 | struct cmd_ds_802_11d_domain_info domaininfo; |
| 657 | struct cmd_ds_802_11d_domain_info domaininforesp; |
| 658 | |
| 659 | struct cmd_ds_802_11_sleep_params sleep_params; |
| 660 | struct cmd_ds_802_11_inactivity_timeout inactivity_timeout; |
| 661 | struct cmd_ds_802_11_tpc_cfg tpccfg; |
| 662 | struct cmd_ds_802_11_pwr_cfg pwrcfg; |
| 663 | struct cmd_ds_802_11_afc afc; |
| 664 | struct cmd_ds_802_11_led_ctrl ledgpio; |
| 665 | |
| 666 | struct cmd_tx_rate_query txrate; |
| 667 | struct cmd_ds_bt_access bt; |
| 668 | struct cmd_ds_fwt_access fwt; |
| 669 | struct cmd_ds_mesh_access mesh; |
| 670 | struct cmd_ds_get_tsf gettsf; |
| 671 | struct cmd_ds_802_11_subscribe_event subscribe_event; |
| 672 | } params; |
| 673 | } __attribute__ ((packed)); |
| 674 | |
| 675 | #endif |