hostcmd.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800
  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. } __attribute__ ((packed)) bss;
  56. } __attribute__ ((packed)) 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. struct cmd_header hdr;
  214. u8 bssid[ETH_ALEN];
  215. u8 authtype;
  216. u8 reserved[10];
  217. } __attribute__ ((packed));
  218. struct cmd_ds_802_11_deauthenticate {
  219. struct cmd_header hdr;
  220. u8 macaddr[ETH_ALEN];
  221. __le16 reasoncode;
  222. } __attribute__ ((packed));
  223. struct cmd_ds_802_11_associate {
  224. struct cmd_header hdr;
  225. u8 bssid[6];
  226. __le16 capability;
  227. __le16 listeninterval;
  228. __le16 bcnperiod;
  229. u8 dtimperiod;
  230. u8 iebuf[512]; /* Enough for required and most optional IEs */
  231. } __attribute__ ((packed));
  232. struct cmd_ds_802_11_associate_response {
  233. struct cmd_header hdr;
  234. __le16 capability;
  235. __le16 statuscode;
  236. __le16 aid;
  237. u8 iebuf[512];
  238. } __attribute__ ((packed));
  239. struct cmd_ds_802_11_set_wep {
  240. struct cmd_header hdr;
  241. /* ACT_ADD, ACT_REMOVE or ACT_ENABLE */
  242. __le16 action;
  243. /* key Index selected for Tx */
  244. __le16 keyindex;
  245. /* 40, 128bit or TXWEP */
  246. uint8_t keytype[4];
  247. uint8_t keymaterial[4][16];
  248. } __attribute__ ((packed));
  249. struct cmd_ds_802_3_get_stat {
  250. __le32 xmitok;
  251. __le32 rcvok;
  252. __le32 xmiterror;
  253. __le32 rcverror;
  254. __le32 rcvnobuffer;
  255. __le32 rcvcrcerror;
  256. } __attribute__ ((packed));
  257. struct cmd_ds_802_11_get_stat {
  258. __le32 txfragmentcnt;
  259. __le32 mcasttxframecnt;
  260. __le32 failedcnt;
  261. __le32 retrycnt;
  262. __le32 Multipleretrycnt;
  263. __le32 rtssuccesscnt;
  264. __le32 rtsfailurecnt;
  265. __le32 ackfailurecnt;
  266. __le32 frameduplicatecnt;
  267. __le32 rxfragmentcnt;
  268. __le32 mcastrxframecnt;
  269. __le32 fcserrorcnt;
  270. __le32 bcasttxframecnt;
  271. __le32 bcastrxframecnt;
  272. __le32 txbeacon;
  273. __le32 rxbeacon;
  274. __le32 wepundecryptable;
  275. } __attribute__ ((packed));
  276. struct cmd_ds_802_11_snmp_mib {
  277. struct cmd_header hdr;
  278. __le16 action;
  279. __le16 oid;
  280. __le16 bufsize;
  281. u8 value[128];
  282. } __attribute__ ((packed));
  283. struct cmd_ds_mac_reg_map {
  284. __le16 buffersize;
  285. u8 regmap[128];
  286. __le16 reserved;
  287. } __attribute__ ((packed));
  288. struct cmd_ds_bbp_reg_map {
  289. __le16 buffersize;
  290. u8 regmap[128];
  291. __le16 reserved;
  292. } __attribute__ ((packed));
  293. struct cmd_ds_rf_reg_map {
  294. __le16 buffersize;
  295. u8 regmap[64];
  296. __le16 reserved;
  297. } __attribute__ ((packed));
  298. struct cmd_ds_mac_reg_access {
  299. __le16 action;
  300. __le16 offset;
  301. __le32 value;
  302. } __attribute__ ((packed));
  303. struct cmd_ds_bbp_reg_access {
  304. __le16 action;
  305. __le16 offset;
  306. u8 value;
  307. u8 reserved[3];
  308. } __attribute__ ((packed));
  309. struct cmd_ds_rf_reg_access {
  310. __le16 action;
  311. __le16 offset;
  312. u8 value;
  313. u8 reserved[3];
  314. } __attribute__ ((packed));
  315. struct cmd_ds_802_11_radio_control {
  316. struct cmd_header hdr;
  317. __le16 action;
  318. __le16 control;
  319. } __attribute__ ((packed));
  320. struct cmd_ds_802_11_beacon_control {
  321. __le16 action;
  322. __le16 beacon_enable;
  323. __le16 beacon_period;
  324. } __attribute__ ((packed));
  325. struct cmd_ds_802_11_sleep_params {
  326. struct cmd_header hdr;
  327. /* ACT_GET/ACT_SET */
  328. __le16 action;
  329. /* Sleep clock error in ppm */
  330. __le16 error;
  331. /* Wakeup offset in usec */
  332. __le16 offset;
  333. /* Clock stabilization time in usec */
  334. __le16 stabletime;
  335. /* control periodic calibration */
  336. uint8_t calcontrol;
  337. /* control the use of external sleep clock */
  338. uint8_t externalsleepclk;
  339. /* reserved field, should be set to zero */
  340. __le16 reserved;
  341. } __attribute__ ((packed));
  342. struct cmd_ds_802_11_inactivity_timeout {
  343. struct cmd_header hdr;
  344. /* ACT_GET/ACT_SET */
  345. __le16 action;
  346. /* Inactivity timeout in msec */
  347. __le16 timeout;
  348. } __attribute__ ((packed));
  349. struct cmd_ds_802_11_rf_channel {
  350. struct cmd_header hdr;
  351. __le16 action;
  352. __le16 channel;
  353. __le16 rftype; /* unused */
  354. __le16 reserved; /* unused */
  355. u8 channellist[32]; /* unused */
  356. } __attribute__ ((packed));
  357. struct cmd_ds_802_11_rssi {
  358. /* weighting factor */
  359. __le16 N;
  360. __le16 reserved_0;
  361. __le16 reserved_1;
  362. __le16 reserved_2;
  363. } __attribute__ ((packed));
  364. struct cmd_ds_802_11_rssi_rsp {
  365. __le16 SNR;
  366. __le16 noisefloor;
  367. __le16 avgSNR;
  368. __le16 avgnoisefloor;
  369. } __attribute__ ((packed));
  370. struct cmd_ds_802_11_mac_address {
  371. struct cmd_header hdr;
  372. __le16 action;
  373. u8 macadd[ETH_ALEN];
  374. } __attribute__ ((packed));
  375. struct cmd_ds_802_11_rf_tx_power {
  376. struct cmd_header hdr;
  377. __le16 action;
  378. __le16 curlevel;
  379. s8 maxlevel;
  380. s8 minlevel;
  381. } __attribute__ ((packed));
  382. struct cmd_ds_802_11_rf_antenna {
  383. __le16 action;
  384. /* Number of antennas or 0xffff(diversity) */
  385. __le16 antennamode;
  386. } __attribute__ ((packed));
  387. struct cmd_ds_802_11_monitor_mode {
  388. __le16 action;
  389. __le16 mode;
  390. } __attribute__ ((packed));
  391. struct cmd_ds_set_boot2_ver {
  392. struct cmd_header hdr;
  393. __le16 action;
  394. __le16 version;
  395. } __attribute__ ((packed));
  396. struct cmd_ds_802_11_fw_wake_method {
  397. struct cmd_header hdr;
  398. __le16 action;
  399. __le16 method;
  400. } __attribute__ ((packed));
  401. struct cmd_ds_802_11_sleep_period {
  402. struct cmd_header hdr;
  403. __le16 action;
  404. __le16 period;
  405. } __attribute__ ((packed));
  406. struct cmd_ds_802_11_ps_mode {
  407. __le16 action;
  408. __le16 nullpktinterval;
  409. __le16 multipledtim;
  410. __le16 reserved;
  411. __le16 locallisteninterval;
  412. } __attribute__ ((packed));
  413. struct cmd_confirm_sleep {
  414. struct cmd_header hdr;
  415. __le16 action;
  416. __le16 nullpktinterval;
  417. __le16 multipledtim;
  418. __le16 reserved;
  419. __le16 locallisteninterval;
  420. } __attribute__ ((packed));
  421. struct cmd_ds_802_11_data_rate {
  422. struct cmd_header hdr;
  423. __le16 action;
  424. __le16 reserved;
  425. u8 rates[MAX_RATES];
  426. } __attribute__ ((packed));
  427. struct cmd_ds_802_11_rate_adapt_rateset {
  428. struct cmd_header hdr;
  429. __le16 action;
  430. __le16 enablehwauto;
  431. __le16 bitmap;
  432. } __attribute__ ((packed));
  433. struct cmd_ds_802_11_ad_hoc_start {
  434. struct cmd_header hdr;
  435. u8 ssid[IW_ESSID_MAX_SIZE];
  436. u8 bsstype;
  437. __le16 beaconperiod;
  438. u8 dtimperiod; /* Reserved on v9 and later */
  439. struct ieee_ie_ibss_param_set ibss;
  440. u8 reserved1[4];
  441. struct ieee_ie_ds_param_set ds;
  442. u8 reserved2[4];
  443. __le16 probedelay; /* Reserved on v9 and later */
  444. __le16 capability;
  445. u8 rates[MAX_RATES];
  446. u8 tlv_memory_size_pad[100];
  447. } __attribute__ ((packed));
  448. struct cmd_ds_802_11_ad_hoc_result {
  449. struct cmd_header hdr;
  450. u8 pad[3];
  451. u8 bssid[ETH_ALEN];
  452. } __attribute__ ((packed));
  453. struct adhoc_bssdesc {
  454. u8 bssid[ETH_ALEN];
  455. u8 ssid[IW_ESSID_MAX_SIZE];
  456. u8 type;
  457. __le16 beaconperiod;
  458. u8 dtimperiod;
  459. __le64 timestamp;
  460. __le64 localtime;
  461. struct ieee_ie_ds_param_set ds;
  462. u8 reserved1[4];
  463. struct ieee_ie_ibss_param_set ibss;
  464. u8 reserved2[4];
  465. __le16 capability;
  466. u8 rates[MAX_RATES];
  467. /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
  468. * Adhoc join command and will cause a binary layout mismatch with
  469. * the firmware
  470. */
  471. } __attribute__ ((packed));
  472. struct cmd_ds_802_11_ad_hoc_join {
  473. struct cmd_header hdr;
  474. struct adhoc_bssdesc bss;
  475. __le16 failtimeout; /* Reserved on v9 and later */
  476. __le16 probedelay; /* Reserved on v9 and later */
  477. } __attribute__ ((packed));
  478. struct cmd_ds_802_11_ad_hoc_stop {
  479. struct cmd_header hdr;
  480. } __attribute__ ((packed));
  481. struct cmd_ds_802_11_enable_rsn {
  482. struct cmd_header hdr;
  483. __le16 action;
  484. __le16 enable;
  485. } __attribute__ ((packed));
  486. struct MrvlIEtype_keyParamSet {
  487. /* type ID */
  488. __le16 type;
  489. /* length of Payload */
  490. __le16 length;
  491. /* type of key: WEP=0, TKIP=1, AES=2 */
  492. __le16 keytypeid;
  493. /* key control Info specific to a keytypeid */
  494. __le16 keyinfo;
  495. /* length of key */
  496. __le16 keylen;
  497. /* key material of size keylen */
  498. u8 key[32];
  499. } __attribute__ ((packed));
  500. #define MAX_WOL_RULES 16
  501. struct host_wol_rule {
  502. uint8_t rule_no;
  503. uint8_t rule_ops;
  504. __le16 sig_offset;
  505. __le16 sig_length;
  506. __le16 reserve;
  507. __be32 sig_mask;
  508. __be32 signature;
  509. } __attribute__ ((packed));
  510. struct wol_config {
  511. uint8_t action;
  512. uint8_t pattern;
  513. uint8_t no_rules_in_cmd;
  514. uint8_t result;
  515. struct host_wol_rule rule[MAX_WOL_RULES];
  516. } __attribute__ ((packed));
  517. struct cmd_ds_host_sleep {
  518. struct cmd_header hdr;
  519. __le32 criteria;
  520. uint8_t gpio;
  521. uint16_t gap;
  522. struct wol_config wol_conf;
  523. } __attribute__ ((packed));
  524. struct cmd_ds_802_11_key_material {
  525. struct cmd_header hdr;
  526. __le16 action;
  527. struct MrvlIEtype_keyParamSet keyParamSet[2];
  528. } __attribute__ ((packed));
  529. struct cmd_ds_802_11_eeprom_access {
  530. struct cmd_header hdr;
  531. __le16 action;
  532. __le16 offset;
  533. __le16 len;
  534. /* firmware says it returns a maximum of 20 bytes */
  535. #define LBS_EEPROM_READ_LEN 20
  536. u8 value[LBS_EEPROM_READ_LEN];
  537. } __attribute__ ((packed));
  538. struct cmd_ds_802_11_tpc_cfg {
  539. struct cmd_header hdr;
  540. __le16 action;
  541. uint8_t enable;
  542. int8_t P0;
  543. int8_t P1;
  544. int8_t P2;
  545. uint8_t usesnr;
  546. } __attribute__ ((packed));
  547. struct cmd_ds_802_11_pa_cfg {
  548. struct cmd_header hdr;
  549. __le16 action;
  550. uint8_t enable;
  551. int8_t P0;
  552. int8_t P1;
  553. int8_t P2;
  554. } __attribute__ ((packed));
  555. struct cmd_ds_802_11_led_ctrl {
  556. __le16 action;
  557. __le16 numled;
  558. u8 data[256];
  559. } __attribute__ ((packed));
  560. struct cmd_ds_802_11_afc {
  561. __le16 afc_auto;
  562. union {
  563. struct {
  564. __le16 threshold;
  565. __le16 period;
  566. };
  567. struct {
  568. __le16 timing_offset; /* signed */
  569. __le16 carrier_offset; /* signed */
  570. };
  571. };
  572. } __attribute__ ((packed));
  573. struct cmd_tx_rate_query {
  574. __le16 txrate;
  575. } __attribute__ ((packed));
  576. struct cmd_ds_get_tsf {
  577. __le64 tsfvalue;
  578. } __attribute__ ((packed));
  579. struct cmd_ds_bt_access {
  580. __le16 action;
  581. __le32 id;
  582. u8 addr1[ETH_ALEN];
  583. u8 addr2[ETH_ALEN];
  584. } __attribute__ ((packed));
  585. struct cmd_ds_fwt_access {
  586. __le16 action;
  587. __le32 id;
  588. u8 valid;
  589. u8 da[ETH_ALEN];
  590. u8 dir;
  591. u8 ra[ETH_ALEN];
  592. __le32 ssn;
  593. __le32 dsn;
  594. __le32 metric;
  595. u8 rate;
  596. u8 hopcount;
  597. u8 ttl;
  598. __le32 expiration;
  599. u8 sleepmode;
  600. __le32 snr;
  601. __le32 references;
  602. u8 prec[ETH_ALEN];
  603. } __attribute__ ((packed));
  604. struct cmd_ds_mesh_config {
  605. struct cmd_header hdr;
  606. __le16 action;
  607. __le16 channel;
  608. __le16 type;
  609. __le16 length;
  610. u8 data[128]; /* last position reserved */
  611. } __attribute__ ((packed));
  612. struct cmd_ds_mesh_access {
  613. struct cmd_header hdr;
  614. __le16 action;
  615. __le32 data[32]; /* last position reserved */
  616. } __attribute__ ((packed));
  617. /* Number of stats counters returned by the firmware */
  618. #define MESH_STATS_NUM 8
  619. struct cmd_ds_command {
  620. /* command header */
  621. __le16 command;
  622. __le16 size;
  623. __le16 seqnum;
  624. __le16 result;
  625. /* command Body */
  626. union {
  627. struct cmd_ds_802_11_ps_mode psmode;
  628. struct cmd_ds_802_11_get_stat gstat;
  629. struct cmd_ds_802_3_get_stat gstat_8023;
  630. struct cmd_ds_802_11_rf_antenna rant;
  631. struct cmd_ds_802_11_monitor_mode monitor;
  632. struct cmd_ds_802_11_rssi rssi;
  633. struct cmd_ds_802_11_rssi_rsp rssirsp;
  634. struct cmd_ds_mac_reg_access macreg;
  635. struct cmd_ds_bbp_reg_access bbpreg;
  636. struct cmd_ds_rf_reg_access rfreg;
  637. struct cmd_ds_802_11d_domain_info domaininfo;
  638. struct cmd_ds_802_11d_domain_info domaininforesp;
  639. struct cmd_ds_802_11_tpc_cfg tpccfg;
  640. struct cmd_ds_802_11_afc afc;
  641. struct cmd_ds_802_11_led_ctrl ledgpio;
  642. struct cmd_tx_rate_query txrate;
  643. struct cmd_ds_bt_access bt;
  644. struct cmd_ds_fwt_access fwt;
  645. struct cmd_ds_get_tsf gettsf;
  646. struct cmd_ds_802_11_beacon_control bcn_ctrl;
  647. } params;
  648. } __attribute__ ((packed));
  649. #endif