hostcmd.h 16 KB

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