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