rtl871x_cmd.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. * Modifications for inclusion into the Linux staging tree are
  19. * Copyright(c) 2010 Larry Finger. All rights reserved.
  20. *
  21. * Contact information:
  22. * WLAN FAE <wlanfae@realtek.com>
  23. * Larry Finger <Larry.Finger@lwfinger.net>
  24. *
  25. ******************************************************************************/
  26. #ifndef __RTL871X_CMD_H_
  27. #define __RTL871X_CMD_H_
  28. #include "wlan_bssdef.h"
  29. #include "rtl871x_rf.h"
  30. #define C2H_MEM_SZ (16*1024)
  31. #include "osdep_service.h"
  32. #include "ieee80211.h"
  33. #define FREE_CMDOBJ_SZ 128
  34. #define MAX_CMDSZ 512
  35. #define MAX_RSPSZ 512
  36. #define MAX_EVTSZ 1024
  37. #define CMDBUFF_ALIGN_SZ 512
  38. struct cmd_obj {
  39. u16 cmdcode;
  40. u8 res;
  41. u8 *parmbuf;
  42. u32 cmdsz;
  43. u8 *rsp;
  44. u32 rspsz;
  45. struct list_head list;
  46. };
  47. struct cmd_priv {
  48. struct semaphore cmd_queue_sema;
  49. struct semaphore terminate_cmdthread_sema;
  50. struct __queue cmd_queue;
  51. u8 cmd_seq;
  52. u8 *cmd_buf; /*shall be non-paged, and 4 bytes aligned*/
  53. u8 *cmd_allocated_buf;
  54. u8 *rsp_buf; /*shall be non-paged, and 4 bytes aligned*/
  55. u8 *rsp_allocated_buf;
  56. u32 cmd_issued_cnt;
  57. u32 cmd_done_cnt;
  58. u32 rsp_cnt;
  59. struct _adapter *padapter;
  60. };
  61. struct evt_obj {
  62. u16 evtcode;
  63. u8 res;
  64. u8 *parmbuf;
  65. u32 evtsz;
  66. struct list_head list;
  67. };
  68. struct evt_priv {
  69. struct __queue evt_queue;
  70. u8 event_seq;
  71. u8 *evt_buf; /*shall be non-paged, and 4 bytes aligned*/
  72. u8 *evt_allocated_buf;
  73. u32 evt_done_cnt;
  74. struct tasklet_struct event_tasklet;
  75. };
  76. #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
  77. do {\
  78. INIT_LIST_HEAD(&pcmd->list);\
  79. pcmd->cmdcode = code;\
  80. pcmd->parmbuf = (u8 *)(pparm);\
  81. pcmd->cmdsz = sizeof(*pparm);\
  82. pcmd->rsp = NULL;\
  83. pcmd->rspsz = 0;\
  84. } while (0)
  85. u32 r8712_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj);
  86. u32 r8712_enqueue_cmd_ex(struct cmd_priv *pcmdpriv, struct cmd_obj *obj);
  87. struct cmd_obj *r8712_dequeue_cmd(struct __queue *queue);
  88. void r8712_free_cmd_obj(struct cmd_obj *pcmd);
  89. int r8712_cmd_thread(void *context);
  90. u32 r8712_init_cmd_priv(struct cmd_priv *pcmdpriv);
  91. void r8712_free_cmd_priv(struct cmd_priv *pcmdpriv);
  92. u32 r8712_init_evt_priv(struct evt_priv *pevtpriv);
  93. void r8712_free_evt_priv(struct evt_priv *pevtpriv);
  94. enum rtl871x_drvint_cid {
  95. NONE_WK_CID,
  96. WDG_WK_CID,
  97. MAX_WK_CID
  98. };
  99. enum RFINTFS {
  100. SWSI,
  101. HWSI,
  102. HWPI,
  103. };
  104. /*
  105. * Caller Mode: Infra, Ad-HoC(C)
  106. * Notes: To enter USB suspend mode
  107. * Command Mode
  108. */
  109. struct usb_suspend_parm {
  110. u32 action; /* 1: sleep, 0:resume */
  111. };
  112. /*
  113. * Caller Mode: Infra, Ad-HoC(C)
  114. * Notes: To disconnect the current associated BSS
  115. * Command Mode
  116. */
  117. struct disconnect_parm {
  118. u32 rsvd;
  119. };
  120. /*
  121. * Caller Mode: AP, Ad-HoC, Infra
  122. * Notes: To set the NIC mode of RTL8711
  123. * Command Mode
  124. * The definition of mode:
  125. *
  126. * #define IW_MODE_AUTO 0 // Let the driver decides which AP to join
  127. * #define IW_MODE_ADHOC 1 // Single cell network (Ad-Hoc Clients)
  128. * #define IW_MODE_INFRA 2 // Multi cell network, roaming, ..
  129. * #define IW_MODE_MASTER 3 // Synchronisation master or AP
  130. * #define IW_MODE_REPEAT 4 // Wireless Repeater (forwarder)
  131. * #define IW_MODE_SECOND 5 // Secondary master/repeater (backup)
  132. * #define IW_MODE_MONITOR 6 // Passive monitor (listen only)
  133. */
  134. struct setopmode_parm {
  135. u8 mode;
  136. u8 rsvd[3];
  137. };
  138. /*
  139. * Caller Mode: AP, Ad-HoC, Infra
  140. * Notes: To ask RTL8711 performing site-survey
  141. * Command-Event Mode
  142. */
  143. struct sitesurvey_parm {
  144. sint passive_mode; /*active: 1, passive: 0 */
  145. sint bsslimit; /* 1 ~ 48 */
  146. sint ss_ssidlen;
  147. u8 ss_ssid[IW_ESSID_MAX_SIZE + 1];
  148. };
  149. /*
  150. * Caller Mode: Any
  151. * Notes: To set the auth type of RTL8711. open/shared/802.1x
  152. * Command Mode
  153. */
  154. struct setauth_parm {
  155. u8 mode; /*0: legacy open, 1: legacy shared 2: 802.1x*/
  156. u8 _1x; /*0: PSK, 1: TLS*/
  157. u8 rsvd[2];
  158. };
  159. /*
  160. * Caller Mode: Infra
  161. * a. algorithm: wep40, wep104, tkip & aes
  162. * b. keytype: grp key/unicast key
  163. * c. key contents
  164. *
  165. * when shared key ==> keyid is the camid
  166. * when 802.1x ==> keyid [0:1] ==> grp key
  167. * when 802.1x ==> keyid > 2 ==> unicast key
  168. */
  169. struct setkey_parm {
  170. u8 algorithm; /* encryption algorithm, could be none, wep40,
  171. * TKIP, CCMP, wep104 */
  172. u8 keyid;
  173. u8 grpkey; /* 1: this is the grpkey for 802.1x.
  174. * 0: this is the unicast key for 802.1x */
  175. u8 key[16]; /* this could be 40 or 104 */
  176. };
  177. /*
  178. * When in AP or Ad-Hoc mode, this is used to
  179. * allocate an sw/hw entry for a newly associated sta.
  180. * Command
  181. * when shared key ==> algorithm/keyid
  182. */
  183. struct set_stakey_parm {
  184. u8 addr[ETH_ALEN];
  185. u8 algorithm;
  186. u8 key[16];
  187. };
  188. struct set_stakey_rsp {
  189. u8 addr[ETH_ALEN];
  190. u8 keyid;
  191. u8 rsvd;
  192. };
  193. struct SetMacAddr_param {
  194. u8 MacAddr[ETH_ALEN];
  195. };
  196. /*
  197. Caller Ad-Hoc/AP
  198. Command -Rsp(AID == CAMID) mode
  199. This is to force fw to add an sta_data entry per driver's request.
  200. FW will write an cam entry associated with it.
  201. */
  202. struct set_assocsta_parm {
  203. u8 addr[ETH_ALEN];
  204. };
  205. struct set_assocsta_rsp {
  206. u8 cam_id;
  207. u8 rsvd[3];
  208. };
  209. /*
  210. Caller Ad-Hoc/AP
  211. Command mode
  212. This is to force fw to del an sta_data entry per driver's request
  213. FW will invalidate the cam entry associated with it.
  214. */
  215. struct del_assocsta_parm {
  216. u8 addr[ETH_ALEN];
  217. };
  218. /*
  219. Caller Mode: AP/Ad-HoC(M)
  220. Notes: To notify fw that given staid has changed its power state
  221. Command Mode
  222. */
  223. struct setstapwrstate_parm {
  224. u8 staid;
  225. u8 status;
  226. u8 hwaddr[6];
  227. };
  228. /*
  229. Caller Mode: Any
  230. Notes: To setup the basic rate of RTL8711
  231. Command Mode
  232. */
  233. struct setbasicrate_parm {
  234. u8 basicrates[NumRates];
  235. };
  236. /*
  237. Caller Mode: Any
  238. Notes: To read the current basic rate
  239. Command-Rsp Mode
  240. */
  241. struct getbasicrate_parm {
  242. u32 rsvd;
  243. };
  244. struct getbasicrate_rsp {
  245. u8 basicrates[NumRates];
  246. };
  247. /*
  248. Caller Mode: Any
  249. Notes: To setup the data rate of RTL8711
  250. Command Mode
  251. */
  252. struct setdatarate_parm {
  253. u8 mac_id;
  254. u8 datarates[NumRates];
  255. };
  256. enum _RT_CHANNEL_DOMAIN {
  257. RT_CHANNEL_DOMAIN_FCC = 0,
  258. RT_CHANNEL_DOMAIN_IC = 1,
  259. RT_CHANNEL_DOMAIN_ETSI = 2,
  260. RT_CHANNEL_DOMAIN_SPAIN = 3,
  261. RT_CHANNEL_DOMAIN_FRANCE = 4,
  262. RT_CHANNEL_DOMAIN_MKK = 5,
  263. RT_CHANNEL_DOMAIN_MKK1 = 6,
  264. RT_CHANNEL_DOMAIN_ISRAEL = 7,
  265. RT_CHANNEL_DOMAIN_TELEC = 8,
  266. /* Be compatible with old channel plan. No good! */
  267. RT_CHANNEL_DOMAIN_MIC = 9,
  268. RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN = 10,
  269. RT_CHANNEL_DOMAIN_WORLD_WIDE_13 = 11,
  270. RT_CHANNEL_DOMAIN_TELEC_NETGEAR = 12,
  271. RT_CHANNEL_DOMAIN_NCC = 13,
  272. RT_CHANNEL_DOMAIN_5G = 14,
  273. RT_CHANNEL_DOMAIN_5G_40M = 15,
  274. /*===== Add new channel plan above this line===============*/
  275. RT_CHANNEL_DOMAIN_MAX,
  276. };
  277. struct SetChannelPlan_param {
  278. enum _RT_CHANNEL_DOMAIN ChannelPlan;
  279. };
  280. /*
  281. Caller Mode: Any
  282. Notes: To read the current data rate
  283. Command-Rsp Mode
  284. */
  285. struct getdatarate_parm {
  286. u32 rsvd;
  287. };
  288. struct getdatarate_rsp {
  289. u8 datarates[NumRates];
  290. };
  291. /*
  292. Caller Mode: Any
  293. AP: AP can use the info for the contents of beacon frame
  294. Infra: STA can use the info when sitesurveying
  295. Ad-HoC(M): Like AP
  296. Ad-HoC(C): Like STA
  297. Notes: To set the phy capability of the NIC
  298. Command Mode
  299. */
  300. /*
  301. Caller Mode: Any
  302. Notes: To set the channel/modem/band
  303. This command will be used when channel/modem/band is changed.
  304. Command Mode
  305. */
  306. /*
  307. Caller Mode: Any
  308. Notes: To get the current setting of channel/modem/band
  309. Command-Rsp Mode
  310. */
  311. struct getphy_rsp {
  312. u8 rfchannel;
  313. u8 modem;
  314. };
  315. struct readBB_parm {
  316. u8 offset;
  317. };
  318. struct readBB_rsp {
  319. u8 value;
  320. };
  321. struct readTSSI_parm {
  322. u8 offset;
  323. };
  324. struct readTSSI_rsp {
  325. u8 value;
  326. };
  327. struct writeBB_parm {
  328. u8 offset;
  329. u8 value;
  330. };
  331. struct writePTM_parm {
  332. u8 type;
  333. };
  334. struct readRF_parm {
  335. u8 offset;
  336. };
  337. struct readRF_rsp {
  338. u32 value;
  339. };
  340. struct writeRF_parm {
  341. u32 offset;
  342. u32 value;
  343. };
  344. struct setrfintfs_parm {
  345. u8 rfintfs;
  346. };
  347. struct getrfintfs_parm {
  348. u8 rfintfs;
  349. };
  350. /*
  351. Notes: This command is used for H2C/C2H loopback testing
  352. mac[0] == 0
  353. ==> CMD mode, return H2C_SUCCESS.
  354. The following condition must be ture under CMD mode
  355. mac[1] == mac[4], mac[2] == mac[3], mac[0]=mac[5]= 0;
  356. s0 == 0x1234, s1 == 0xabcd, w0 == 0x78563412, w1 == 0x5aa5def7;
  357. s2 == (b1 << 8 | b0);
  358. mac[0] == 1
  359. ==> CMD_RSP mode, return H2C_SUCCESS_RSP
  360. The rsp layout shall be:
  361. rsp: parm:
  362. mac[0] = mac[5];
  363. mac[1] = mac[4];
  364. mac[2] = mac[3];
  365. mac[3] = mac[2];
  366. mac[4] = mac[1];
  367. mac[5] = mac[0];
  368. s0 = s1;
  369. s1 = swap16(s0);
  370. w0 = swap32(w1);
  371. b0 = b1
  372. s2 = s0 + s1
  373. b1 = b0
  374. w1 = w0
  375. mac[0] == 2
  376. ==> CMD_EVENT mode, return H2C_SUCCESS
  377. The event layout shall be:
  378. event: parm:
  379. mac[0] = mac[5];
  380. mac[1] = mac[4];
  381. mac[2] = event's sequence number, starting from 1 to parm's marc[3]
  382. mac[3] = mac[2];
  383. mac[4] = mac[1];
  384. mac[5] = mac[0];
  385. s0 = swap16(s0) - event.mac[2];
  386. s1 = s1 + event.mac[2];
  387. w0 = swap32(w0);
  388. b0 = b1
  389. s2 = s0 + event.mac[2]
  390. b1 = b0
  391. w1 = swap32(w1) - event.mac[2];
  392. parm->mac[3] is the total event counts that host requested.
  393. event will be the same with the cmd's param.
  394. */
  395. /* CMD param Formart for DRV INTERNAL CMD HDL*/
  396. struct drvint_cmd_parm {
  397. int i_cid; /*internal cmd id*/
  398. int sz; /* buf sz*/
  399. unsigned char *pbuf;
  400. };
  401. /*------------------- Below are used for RF/BB tunning ---------------------*/
  402. struct setantenna_parm {
  403. u8 tx_antset;
  404. u8 rx_antset;
  405. u8 tx_antenna;
  406. u8 rx_antenna;
  407. };
  408. struct enrateadaptive_parm {
  409. u32 en;
  410. };
  411. struct settxagctbl_parm {
  412. u32 txagc[MAX_RATES_LENGTH];
  413. };
  414. struct gettxagctbl_parm {
  415. u32 rsvd;
  416. };
  417. struct gettxagctbl_rsp {
  418. u32 txagc[MAX_RATES_LENGTH];
  419. };
  420. struct setagcctrl_parm {
  421. u32 agcctrl; /* 0: pure hw, 1: fw */
  422. };
  423. struct setssup_parm {
  424. u32 ss_ForceUp[MAX_RATES_LENGTH];
  425. };
  426. struct getssup_parm {
  427. u32 rsvd;
  428. };
  429. struct getssup_rsp {
  430. u8 ss_ForceUp[MAX_RATES_LENGTH];
  431. };
  432. struct setssdlevel_parm {
  433. u8 ss_DLevel[MAX_RATES_LENGTH];
  434. };
  435. struct getssdlevel_parm {
  436. u32 rsvd;
  437. };
  438. struct getssdlevel_rsp {
  439. u8 ss_DLevel[MAX_RATES_LENGTH];
  440. };
  441. struct setssulevel_parm {
  442. u8 ss_ULevel[MAX_RATES_LENGTH];
  443. };
  444. struct getssulevel_parm {
  445. u32 rsvd;
  446. };
  447. struct getssulevel_rsp {
  448. u8 ss_ULevel[MAX_RATES_LENGTH];
  449. };
  450. struct setcountjudge_parm {
  451. u8 count_judge[MAX_RATES_LENGTH];
  452. };
  453. struct getcountjudge_parm {
  454. u32 rsvd;
  455. };
  456. struct getcountjudge_rsp {
  457. u8 count_judge[MAX_RATES_LENGTH];
  458. };
  459. struct setpwrmode_parm {
  460. u8 mode;
  461. u8 flag_low_traffic_en;
  462. u8 flag_lpnav_en;
  463. u8 flag_rf_low_snr_en;
  464. u8 flag_dps_en; /* 1: dps, 0: 32k */
  465. u8 bcn_rx_en;
  466. u8 bcn_pass_cnt; /* fw report one beacon information to
  467. * driver when it receives bcn_pass_cnt
  468. * beacons. */
  469. u8 bcn_to; /* beacon TO (ms). ¡§=0¡¨ no limit.*/
  470. u16 bcn_itv;
  471. u8 app_itv; /* only for VOIP mode. */
  472. u8 awake_bcn_itv;
  473. u8 smart_ps;
  474. u8 bcn_pass_time; /* unit: 100ms */
  475. };
  476. struct setatim_parm {
  477. u8 op; /*0: add, 1:del*/
  478. u8 txid; /* id of dest station.*/
  479. };
  480. struct setratable_parm {
  481. u8 ss_ForceUp[NumRates];
  482. u8 ss_ULevel[NumRates];
  483. u8 ss_DLevel[NumRates];
  484. u8 count_judge[NumRates];
  485. };
  486. struct getratable_parm {
  487. uint rsvd;
  488. };
  489. struct getratable_rsp {
  490. u8 ss_ForceUp[NumRates];
  491. u8 ss_ULevel[NumRates];
  492. u8 ss_DLevel[NumRates];
  493. u8 count_judge[NumRates];
  494. };
  495. /*to get TX,RX retry count*/
  496. struct gettxretrycnt_parm {
  497. unsigned int rsvd;
  498. };
  499. struct gettxretrycnt_rsp {
  500. unsigned long tx_retrycnt;
  501. };
  502. struct getrxretrycnt_parm {
  503. unsigned int rsvd;
  504. };
  505. struct getrxretrycnt_rsp {
  506. unsigned long rx_retrycnt;
  507. };
  508. /*to get BCNOK,BCNERR count*/
  509. struct getbcnokcnt_parm {
  510. unsigned int rsvd;
  511. };
  512. struct getbcnokcnt_rsp {
  513. unsigned long bcnokcnt;
  514. };
  515. struct getbcnerrcnt_parm {
  516. unsigned int rsvd;
  517. };
  518. struct getbcnerrcnt_rsp {
  519. unsigned long bcnerrcnt;
  520. };
  521. /* to get current TX power level*/
  522. struct getcurtxpwrlevel_parm {
  523. unsigned int rsvd;
  524. };
  525. struct getcurtxpwrlevel_rsp {
  526. unsigned short tx_power;
  527. };
  528. /*dynamic on/off DIG*/
  529. struct setdig_parm {
  530. unsigned char dig_on; /* 1:on , 0:off */
  531. };
  532. /*dynamic on/off RA*/
  533. struct setra_parm {
  534. unsigned char ra_on; /* 1:on , 0:off */
  535. };
  536. struct setprobereqextraie_parm {
  537. unsigned char e_id;
  538. unsigned char ie_len;
  539. unsigned char ie[0];
  540. };
  541. struct setassocreqextraie_parm {
  542. unsigned char e_id;
  543. unsigned char ie_len;
  544. unsigned char ie[0];
  545. };
  546. struct setproberspextraie_parm {
  547. unsigned char e_id;
  548. unsigned char ie_len;
  549. unsigned char ie[0];
  550. };
  551. struct setassocrspextraie_parm {
  552. unsigned char e_id;
  553. unsigned char ie_len;
  554. unsigned char ie[0];
  555. };
  556. struct addBaReq_parm {
  557. unsigned int tid;
  558. };
  559. /*H2C Handler index: 46 */
  560. struct SetChannel_parm {
  561. u32 curr_ch;
  562. };
  563. /*H2C Handler index: 61 */
  564. struct DisconnectCtrlEx_param {
  565. /* MAXTIME = (2 * FirstStageTO) + (TryPktCnt * TryPktInterval) */
  566. unsigned char EnableDrvCtrl;
  567. unsigned char TryPktCnt;
  568. unsigned char TryPktInterval; /* Unit: ms */
  569. unsigned char rsvd;
  570. unsigned int FirstStageTO; /* Unit: ms */
  571. };
  572. #define GEN_CMD_CODE(cmd) cmd ## _CMD_
  573. /*
  574. * Result:
  575. * 0x00: success
  576. * 0x01: success, and check Response.
  577. * 0x02: cmd ignored due to duplicated sequence number
  578. * 0x03: cmd dropped due to invalid cmd code
  579. * 0x04: reserved.
  580. */
  581. #define H2C_RSP_OFFSET 512
  582. #define H2C_SUCCESS 0x00
  583. #define H2C_SUCCESS_RSP 0x01
  584. #define H2C_DUPLICATED 0x02
  585. #define H2C_DROPPED 0x03
  586. #define H2C_PARAMETERS_ERROR 0x04
  587. #define H2C_REJECTED 0x05
  588. #define H2C_CMD_OVERFLOW 0x06
  589. #define H2C_RESERVED 0x07
  590. u8 r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr);
  591. u8 r8712_setassocsta_cmd(struct _adapter *padapter, u8 *mac_addr);
  592. u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
  593. struct ndis_802_11_ssid *pssid);
  594. u8 r8712_createbss_cmd(struct _adapter *padapter);
  595. u8 r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key);
  596. u8 r8712_joinbss_cmd(struct _adapter *padapter,
  597. struct wlan_network *pnetwork);
  598. u8 r8712_disassoc_cmd(struct _adapter *padapter);
  599. u8 r8712_setopmode_cmd(struct _adapter *padapter,
  600. enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
  601. u8 r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset);
  602. u8 r8712_set_chplan_cmd(struct _adapter *padapter, int chplan);
  603. u8 r8712_setbasicrate_cmd(struct _adapter *padapter, u8 *rateset);
  604. u8 r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval);
  605. u8 r8712_setrfintfs_cmd(struct _adapter *padapter, u8 mode);
  606. u8 r8712_setrfreg_cmd(struct _adapter *padapter, u8 offset, u32 val);
  607. u8 r8712_setrttbl_cmd(struct _adapter *padapter,
  608. struct setratable_parm *prate_table);
  609. u8 r8712_gettssi_cmd(struct _adapter *padapter, u8 offset, u8 *pval);
  610. u8 r8712_setptm_cmd(struct _adapter *padapter, u8 type);
  611. u8 r8712_setfwdig_cmd(struct _adapter *padapter, u8 type);
  612. u8 r8712_setfwra_cmd(struct _adapter *padapter, u8 type);
  613. u8 r8712_addbareq_cmd(struct _adapter *padapter, u8 tid);
  614. u8 r8712_wdg_wk_cmd(struct _adapter *padapter);
  615. void r8712_survey_cmd_callback(struct _adapter *padapter,
  616. struct cmd_obj *pcmd);
  617. void r8712_disassoc_cmd_callback(struct _adapter *padapter,
  618. struct cmd_obj *pcmd);
  619. void r8712_joinbss_cmd_callback(struct _adapter *padapter,
  620. struct cmd_obj *pcmd);
  621. void r8712_createbss_cmd_callback(struct _adapter *padapter,
  622. struct cmd_obj *pcmd);
  623. void r8712_getbbrfreg_cmdrsp_callback(struct _adapter *padapter,
  624. struct cmd_obj *pcmd);
  625. void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter,
  626. struct cmd_obj *pcmd);
  627. void r8712_setstaKey_cmdrsp_callback(struct _adapter *padapter,
  628. struct cmd_obj *pcmd);
  629. void r8712_setassocsta_cmdrsp_callback(struct _adapter *padapter,
  630. struct cmd_obj *pcmd);
  631. u8 r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl,
  632. u32 tryPktCnt, u32 tryPktInterval, u32 firstStageTO);
  633. struct _cmd_callback {
  634. u32 cmd_code;
  635. void (*callback)(struct _adapter *padapter, struct cmd_obj *cmd);
  636. };
  637. #include "rtl8712_cmd.h"
  638. #endif /* _CMD_H_ */