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