• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 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  ******************************************************************************/
15 #ifndef __RTW_CMD_H_
16 #define __RTW_CMD_H_
17 
18 #include <wlan_bssdef.h>
19 #include <rtw_rf.h>
20 
21 #define C2H_MEM_SZ (16*1024)
22 
23 #include <osdep_service.h>
24 #include <ieee80211.h> /*  <ieee80211/ieee80211.h> */
25 
26 
27 #define MAX_CMDSZ	1024
28 #define MAX_RSPSZ	512
29 #define MAX_EVTSZ	1024
30 
31 #define CMDBUFF_ALIGN_SZ 512
32 
33 struct cmd_obj {
34 	struct work_struct work;
35 	struct rtw_adapter *padapter;
36 	u16	cmdcode;
37 	int	res;
38 	u32	cmdsz;
39 	u8	*parmbuf;
40 	u8	*rsp;
41 	u32	rspsz;
42 };
43 
44 struct cmd_priv {
45 	struct workqueue_struct *wq;
46 	u32	cmd_issued_cnt;
47 	u32	cmd_done_cnt;
48 	u32	rsp_cnt;
49 	struct rtw_adapter *padapter;
50 };
51 
52 #define C2H_QUEUE_MAX_LEN 10
53 
54 struct	evt_priv {
55 	struct workqueue_struct *wq;
56 	struct work_struct irq_wk;
57 };
58 
59 #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
60 do {\
61 	pcmd->cmdcode = code;\
62 	pcmd->parmbuf = (u8 *)(pparm);\
63 	pcmd->cmdsz = sizeof (*pparm);\
64 	pcmd->rsp = NULL;\
65 	pcmd->rspsz = 0;\
66 } while(0)
67 
68 struct c2h_evt_hdr {
69 	u8 id:4;
70 	u8 plen:4;
71 	u8 seq;
72 	u8 payload[0];
73 };
74 
75 /*
76  * Do not reorder - this allows for struct evt_work to be passed on to
77  * rtw_c2h_wk_cmd23a() as a 'struct c2h_evt_hdr *' without making an
78  * additional copy.
79  */
80 struct evt_work {
81 	union {
82 		struct c2h_evt_hdr c2h_evt;
83 		u8 buf[16];
84 	} u;
85 	struct work_struct work;
86 	struct rtw_adapter *adapter;
87 };
88 
89 #define c2h_evt_exist(c2h_evt) ((c2h_evt)->id || (c2h_evt)->plen)
90 
91 void rtw_evt_work(struct work_struct *work);
92 
93 int rtw_enqueue_cmd23a(struct cmd_priv *pcmdpriv, struct cmd_obj *obj);
94 void rtw_free_cmd_obj23a(struct cmd_obj *pcmd);
95 
96 int rtw_cmd_thread23a(void *context);
97 
98 int rtw_init_cmd_priv23a(struct cmd_priv *pcmdpriv);
99 
100 u32 rtw_init_evt_priv23a (struct evt_priv *pevtpriv);
101 void rtw_free_evt_priv23a (struct evt_priv *pevtpriv);
102 void rtw_evt_notify_isr(struct evt_priv *pevtpriv);
103 
104 enum rtw_drvextra_cmd_id
105 {
106 	NONE_WK_CID,
107 	DYNAMIC_CHK_WK_CID,
108 	DM_CTRL_WK_CID,
109 	PBC_POLLING_WK_CID,
110 	POWER_SAVING_CTRL_WK_CID,/* IPS,AUTOSuspend */
111 	LPS_CTRL_WK_CID,
112 	ANT_SELECT_WK_CID,
113 	P2P_PS_WK_CID,
114 	P2P_PROTO_WK_CID,
115 	CHECK_HIQ_WK_CID,/* for softap mode, check hi queue if empty */
116 	C2H_WK_CID,
117 	RTP_TIMER_CFG_WK_CID,
118 	MAX_WK_CID
119 };
120 
121 enum LPS_CTRL_TYPE
122 {
123 	LPS_CTRL_SCAN=0,
124 	LPS_CTRL_JOINBSS=1,
125 	LPS_CTRL_CONNECT=2,
126 	LPS_CTRL_DISCONNECT=3,
127 	LPS_CTRL_SPECIAL_PACKET=4,
128 	LPS_CTRL_LEAVE=5,
129 };
130 
131 enum RFINTFS {
132 	SWSI,
133 	HWSI,
134 	HWPI,
135 };
136 
137 /*
138 Caller Mode: Infra, Ad-HoC(C)
139 
140 Notes: To enter USB suspend mode
141 
142 Command Mode
143 
144 */
145 struct usb_suspend_parm {
146 	u32 action;/*  1: sleep, 0:resume */
147 };
148 
149 /*
150 Caller Mode: Infra, Ad-HoC
151 
152 Notes: To join a known BSS.
153 
154 Command-Event Mode
155 
156 */
157 
158 /*
159 Caller Mode: Infra, Ad-HoC(C)
160 
161 Notes: To disconnect the current associated BSS
162 
163 Command Mode
164 
165 */
166 struct disconnect_parm {
167 	u32 deauth_timeout_ms;
168 };
169 
170 struct	setopmode_parm {
171 	enum nl80211_iftype mode;
172 };
173 
174 /*
175 Caller Mode: AP, Ad-HoC, Infra
176 
177 Notes: To ask RTL8711 performing site-survey
178 
179 Command-Event Mode
180 
181 */
182 
183 #define RTW_SSID_SCAN_AMOUNT 9 /*  for WEXT_CSCAN_AMOUNT 9 */
184 #define RTW_CHANNEL_SCAN_AMOUNT (14+37)
185 struct sitesurvey_parm {
186 	int scan_mode;	/* active: 1, passive: 0 */
187 	u8 ssid_num;
188 	u8 ch_num;
189 	struct cfg80211_ssid ssid[RTW_SSID_SCAN_AMOUNT];
190 	struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
191 };
192 
193 /*
194 Caller Mode: Any
195 
196 Notes: To set the auth type of RTL8711. open/shared/802.1x
197 
198 Command Mode
199 
200 */
201 struct setauth_parm {
202 	u8 mode;  /* 0: legacy open, 1: legacy shared 2: 802.1x */
203 	u8 _1x;   /* 0: PSK, 1: TLS */
204 	u8 rsvd[2];
205 };
206 
207 /*
208 Caller Mode: Infra
209 
210 a. algorithm: wep40, wep104, tkip & aes
211 b. keytype: grp key/unicast key
212 c. key contents
213 
214 when shared key ==> keyid is the camid
215 when 802.1x ==> keyid [0:1] ==> grp key
216 when 802.1x ==> keyid > 2 ==> unicast key
217 
218 */
219 struct setkey_parm {
220 	u32	algorithm;	/*  encryption algorithm, could be none, wep40, TKIP, CCMP, wep104 */
221 	u8	keyid;
222 	u8	grpkey;		/*  1: this is the grpkey for 802.1x. 0: this is the unicast key for 802.1x */
223 	u8	set_tx;		/*  1: main tx key for wep. 0: other key. */
224 	u8	key[16];	/*  this could be 40 or 104 */
225 };
226 
227 /*
228 When in AP or Ad-Hoc mode, this is used to
229 allocate an sw/hw entry for a newly associated sta.
230 
231 Command
232 
233 when shared key ==> algorithm/keyid
234 
235 */
236 struct set_stakey_parm {
237 	u8	addr[ETH_ALEN];
238 	u8	id;/*  currently for erasing cam entry if algorithm == _NO_PRIVACY_ */
239 	u32	algorithm;
240 	u8	key[16];
241 };
242 
243 struct set_stakey_rsp {
244 	u8	addr[ETH_ALEN];
245 	u8	keyid;
246 	u8	rsvd;
247 };
248 
249 /*
250 Caller Ad-Hoc/AP
251 
252 Command -Rsp(AID == CAMID) mode
253 
254 This is to force fw to add an sta_data entry per driver's request.
255 
256 FW will write an cam entry associated with it.
257 
258 */
259 struct set_assocsta_parm {
260 	u8	addr[ETH_ALEN];
261 };
262 
263 struct set_assocsta_rsp {
264 	u8	cam_id;
265 	u8	rsvd[3];
266 };
267 
268 /*
269 	Caller Ad-Hoc/AP
270 
271 	Command mode
272 
273 	This is to force fw to del an sta_data entry per driver's request
274 
275 	FW will invalidate the cam entry associated with it.
276 
277 */
278 struct del_assocsta_parm {
279 	u8	addr[ETH_ALEN];
280 };
281 
282 /*
283 Caller Mode: AP/Ad-HoC(M)
284 
285 Notes: To notify fw that given staid has changed its power state
286 
287 Command Mode
288 
289 */
290 struct setstapwrstate_parm {
291 	u8	staid;
292 	u8	status;
293 	u8	hwaddr[6];
294 };
295 
296 /*
297 Caller Mode: Any
298 
299 Notes: To setup the basic rate of RTL8711
300 
301 Command Mode
302 
303 */
304 struct	setbasicrate_parm {
305 	u8	basicrates[NumRates];
306 };
307 
308 /*
309 Caller Mode: Any
310 
311 Notes: To read the current basic rate
312 
313 Command-Rsp Mode
314 
315 */
316 struct getbasicrate_parm {
317 	u32 rsvd;
318 };
319 
320 struct getbasicrate_rsp {
321 	u8 basicrates[NumRates];
322 };
323 
324 /*
325 Caller Mode: Any
326 
327 Notes: To setup the data rate of RTL8711
328 
329 Command Mode
330 
331 */
332 struct setdatarate_parm {
333 	u8	mac_id;
334 	u8	datarates[NumRates];
335 };
336 
337 /*
338 Caller Mode: Any
339 
340 Notes: To read the current data rate
341 
342 Command-Rsp Mode
343 
344 */
345 struct getdatarate_parm {
346 	u32 rsvd;
347 };
348 
349 struct getdatarate_rsp {
350 	u8 datarates[NumRates];
351 };
352 
353 
354 /*
355 Caller Mode: Any
356 AP: AP can use the info for the contents of beacon frame
357 Infra: STA can use the info when sitesurveying
358 Ad-HoC(M): Like AP
359 Ad-HoC(C): Like STA
360 
361 
362 Notes: To set the phy capability of the NIC
363 
364 Command Mode
365 
366 */
367 
368 struct	setphyinfo_parm {
369 	struct regulatory_class class_sets[NUM_REGULATORYS];
370 	u8	status;
371 };
372 
373 struct	getphyinfo_parm {
374 	u32 rsvd;
375 };
376 
377 struct	getphyinfo_rsp {
378 	struct regulatory_class class_sets[NUM_REGULATORYS];
379 	u8	status;
380 };
381 
382 /*
383 Caller Mode: Any
384 
385 Notes: To set the channel/modem/band
386 This command will be used when channel/modem/band is changed.
387 
388 Command Mode
389 
390 */
391 struct	setphy_parm {
392 	u8	rfchannel;
393 	u8	modem;
394 };
395 
396 /*
397 Caller Mode: Any
398 
399 Notes: To get the current setting of channel/modem/band
400 
401 Command-Rsp Mode
402 
403 */
404 struct	getphy_parm {
405 	u32 rsvd;
406 };
407 
408 struct	getphy_rsp {
409 	u8	rfchannel;
410 	u8	modem;
411 };
412 
413 struct readBB_parm {
414 	u8	offset;
415 };
416 
417 struct readBB_rsp {
418 	u8	value;
419 };
420 
421 struct readTSSI_parm {
422 	u8	offset;
423 };
424 
425 struct readTSSI_rsp {
426 	u8	value;
427 };
428 
429 struct writeBB_parm {
430 	u8	offset;
431 	u8	value;
432 };
433 
434 struct readRF_parm {
435 	u8	offset;
436 };
437 
438 struct readRF_rsp {
439 	u32	value;
440 };
441 
442 struct writeRF_parm {
443 	u32	offset;
444 	u32	value;
445 };
446 
447 struct getrfintfs_parm {
448 	u8	rfintfs;
449 };
450 
451 struct Tx_Beacon_param {
452 	struct wlan_bssid_ex network;
453 };
454 
455 /*  CMD param Formart for driver extra cmd handler */
456 struct drvextra_cmd_parm {
457 	int ec_id; /* extra cmd id */
458 	int type_size; /*  Can use this field as the type id or command size */
459 	unsigned char *pbuf;
460 };
461 
462 /*------------------- Below are used for RF/BB tunning ---------------------*/
463 
464 struct	setantenna_parm {
465 	u8	tx_antset;
466 	u8	rx_antset;
467 	u8	tx_antenna;
468 	u8	rx_antenna;
469 };
470 
471 struct	enrateadaptive_parm {
472 	u32	en;
473 };
474 
475 struct settxagctbl_parm {
476 	u32	txagc[MAX_RATES_LENGTH];
477 };
478 
479 struct gettxagctbl_parm {
480 	u32 rsvd;
481 };
482 
483 struct gettxagctbl_rsp {
484 	u32	txagc[MAX_RATES_LENGTH];
485 };
486 
487 struct setagcctrl_parm {
488 	u32	agcctrl;		/*  0: pure hw, 1: fw */
489 };
490 
491 struct setssup_parm	{
492 	u32	ss_ForceUp[MAX_RATES_LENGTH];
493 };
494 
495 struct getssup_parm	{
496 	u32 rsvd;
497 };
498 
499 struct getssup_rsp	{
500 	u8	ss_ForceUp[MAX_RATES_LENGTH];
501 };
502 
503 struct setssdlevel_parm	{
504 	u8	ss_DLevel[MAX_RATES_LENGTH];
505 };
506 
507 struct getssdlevel_parm	{
508 	u32 rsvd;
509 };
510 
511 struct getssdlevel_rsp	{
512 	u8	ss_DLevel[MAX_RATES_LENGTH];
513 };
514 
515 struct setssulevel_parm	{
516 	u8	ss_ULevel[MAX_RATES_LENGTH];
517 };
518 
519 struct getssulevel_parm	{
520 	u32 rsvd;
521 };
522 
523 struct getssulevel_rsp	{
524 	u8	ss_ULevel[MAX_RATES_LENGTH];
525 };
526 
527 struct	setcountjudge_parm {
528 	u8	count_judge[MAX_RATES_LENGTH];
529 };
530 
531 struct	getcountjudge_parm {
532 	u32 rsvd;
533 };
534 
535 struct	getcountjudge_rsp {
536 	u8	count_judge[MAX_RATES_LENGTH];
537 };
538 
539 struct setratable_parm {
540 	u8 ss_ForceUp[NumRates];
541 	u8 ss_ULevel[NumRates];
542 	u8 ss_DLevel[NumRates];
543 	u8 count_judge[NumRates];
544 };
545 
546 struct getratable_parm {
547 	uint rsvd;
548 };
549 
550 struct getratable_rsp {
551 	u8 ss_ForceUp[NumRates];
552 	u8 ss_ULevel[NumRates];
553 	u8 ss_DLevel[NumRates];
554 	u8 count_judge[NumRates];
555 };
556 
557 /* to get TX,RX retry count */
558 struct gettxretrycnt_parm{
559 	unsigned int rsvd;
560 };
561 struct gettxretrycnt_rsp{
562 	unsigned long tx_retrycnt;
563 };
564 
565 struct getrxretrycnt_parm{
566 	unsigned int rsvd;
567 };
568 struct getrxretrycnt_rsp{
569 	unsigned long rx_retrycnt;
570 };
571 
572 /* to get BCNOK,BCNERR count */
573 struct getbcnokcnt_parm{
574 	unsigned int rsvd;
575 };
576 struct getbcnokcnt_rsp{
577 	unsigned long  bcnokcnt;
578 };
579 
580 struct getbcnerrcnt_parm{
581 	unsigned int rsvd;
582 };
583 struct getbcnerrcnt_rsp{
584 	unsigned long bcnerrcnt;
585 };
586 
587 /*  to get current TX power level */
588 struct getcurtxpwrlevel_parm{
589 	unsigned int rsvd;
590 };
591 
592 struct getcurtxpwrlevel_rsp{
593 	unsigned short tx_power;
594 };
595 
596 struct setprobereqextraie_parm {
597 	unsigned char e_id;
598 	unsigned char ie_len;
599 	unsigned char ie[0];
600 };
601 
602 struct setassocreqextraie_parm {
603 	unsigned char e_id;
604 	unsigned char ie_len;
605 	unsigned char ie[0];
606 };
607 
608 struct setproberspextraie_parm {
609 	unsigned char e_id;
610 	unsigned char ie_len;
611 	unsigned char ie[0];
612 };
613 
614 struct setassocrspextraie_parm {
615 	unsigned char e_id;
616 	unsigned char ie_len;
617 	unsigned char ie[0];
618 };
619 
620 struct addBaReq_parm {
621 	unsigned int tid;
622 	u8	addr[ETH_ALEN];
623 };
624 
625 /*H2C Handler index: 46 */
626 struct set_ch_parm {
627 	u8 ch;
628 	u8 bw;
629 	u8 ch_offset;
630 };
631 
632 /*H2C Handler index: 59 */
633 struct SetChannelPlan_param {
634 	u8 channel_plan;
635 };
636 
637 /*H2C Handler index: 60 */
638 struct LedBlink_param {
639 	struct led_8723a *pLed;
640 };
641 
642 /*H2C Handler index: 61 */
643 struct SetChannelSwitch_param {
644 	u8 new_ch_no;
645 };
646 
647 /*H2C Handler index: 62 */
648 struct TDLSoption_param {
649 	u8 addr[ETH_ALEN];
650 	u8 option;
651 };
652 
653 #define GEN_CMD_CODE(cmd)	cmd ## _CMD_
654 
655 
656 /*
657 
658 Result:
659 0x00: success
660 0x01: success, and check Response.
661 0x02: cmd ignored due to duplicated sequcne number
662 0x03: cmd dropped due to invalid cmd code
663 0x04: reserved.
664 
665 */
666 
667 #define H2C_RSP_OFFSET			512
668 
669 #define H2C_SUCCESS			0x00
670 #define H2C_SUCCESS_RSP			0x01
671 #define H2C_DUPLICATED			0x02
672 #define H2C_DROPPED			0x03
673 #define H2C_PARAMETERS_ERROR		0x04
674 #define H2C_REJECTED			0x05
675 #define H2C_CMD_OVERFLOW		0x06
676 #define H2C_RESERVED			0x07
677 
678 int rtw_setassocsta_cmd(struct rtw_adapter  *padapter, u8 *mac_addr);
679 int rtw_setstandby_cmd(struct rtw_adapter *padapter, uint action);
680 int rtw_sitesurvey_cmd23a(struct rtw_adapter  *padapter, struct cfg80211_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num);
681 int rtw_createbss_cmd23a(struct rtw_adapter  *padapter);
682 int rtw_createbss_cmd23a_ex(struct rtw_adapter  *padapter, unsigned char *pbss, unsigned int sz);
683 int rtw_setphy_cmd(struct rtw_adapter  *padapter, u8 modem, u8 ch);
684 int rtw_setstakey_cmd23a(struct rtw_adapter  *padapter, u8 *psta, u8 unicast_key);
685 int rtw_clearstakey_cmd23a(struct rtw_adapter *padapter, u8 *psta, u8 entry, u8 enqueue);
686 int rtw_joinbss_cmd23a(struct rtw_adapter  *padapter, struct wlan_network* pnetwork);
687 int rtw_disassoc_cmd23a(struct rtw_adapter *padapter, u32 deauth_timeout_ms, bool enqueue);
688 int rtw_setopmode_cmd23a(struct rtw_adapter *padapter, enum nl80211_iftype ifmode);
689 int rtw_setdatarate_cmd(struct rtw_adapter  *padapter, u8 *rateset);
690 int rtw_setbasicrate_cmd(struct rtw_adapter  *padapter, u8 *rateset);
691 int rtw_setbbreg_cmd(struct rtw_adapter *padapter, u8 offset, u8 val);
692 int rtw_setrfreg_cmd(struct rtw_adapter *padapter, u8 offset, u32 val);
693 int rtw_getbbreg_cmd(struct rtw_adapter *padapter, u8 offset, u8 *pval);
694 int rtw_getrfreg_cmd(struct rtw_adapter *padapter, u8 offset, u8 *pval);
695 int rtw_setrfintfs_cmd(struct rtw_adapter  *padapter, u8 mode);
696 int rtw_setrttbl_cmd(struct rtw_adapter  *padapter, struct setratable_parm *prate_table);
697 int rtw_getrttbl_cmd(struct rtw_adapter  *padapter, struct getratable_rsp *pval);
698 
699 int rtw_gettssi_cmd(struct rtw_adapter  *padapter, u8 offset, u8 *pval);
700 int rtw_setfwdig_cmd(struct rtw_adapter*padapter, u8 type);
701 int rtw_setfwra_cmd(struct rtw_adapter*padapter, u8 type);
702 
703 int rtw_addbareq_cmd23a(struct rtw_adapter*padapter, u8 tid, u8 *addr);
704 
705 int rtw_dynamic_chk_wk_cmd23a(struct rtw_adapter *adapter);
706 
707 int rtw_lps_ctrl_wk_cmd23a(struct rtw_adapter*padapter, u8 lps_ctrl_type, u8 enqueue);
708 
709 int rtw_ps_cmd23a(struct rtw_adapter*padapter);
710 
711 #ifdef CONFIG_8723AU_AP_MODE
712 int rtw_chk_hi_queue_cmd23a(struct rtw_adapter*padapter);
713 #endif
714 
715 int rtw_set_chplan_cmd(struct rtw_adapter*padapter, u8 chplan, u8 enqueue);
716 int rtw_led_blink_cmd(struct rtw_adapter*padapter, struct led_8723a *pLed);
717 int rtw_set_csa_cmd(struct rtw_adapter*padapter, u8 new_ch_no);
718 
719 int rtw_c2h_wk_cmd23a(struct rtw_adapter *padapter, u8 *c2h_evt);
720 
721 int rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
722 
723 void rtw_survey_cmd_callback23a(struct rtw_adapter  *padapter, struct cmd_obj *pcmd);
724 void rtw_disassoc_cmd23a_callback(struct rtw_adapter  *padapter, struct cmd_obj *pcmd);
725 void rtw_joinbss_cmd23a_callback(struct rtw_adapter  *padapter, struct cmd_obj *pcmd);
726 void rtw_createbss_cmd23a_callback(struct rtw_adapter  *padapter, struct cmd_obj *pcmd);
727 void rtw_getbbrfreg_cmdrsp_callback23a(struct rtw_adapter  *padapter, struct cmd_obj *pcmd);
728 
729 void rtw_setstaKey_cmdrsp_callback23a(struct rtw_adapter  *padapter,  struct cmd_obj *pcmd);
730 void rtw_setassocsta_cmdrsp_callback23a(struct rtw_adapter  *padapter,  struct cmd_obj *pcmd);
731 
732 struct _cmd_callback {
733 	u32	cmd_code;
734 	void (*callback)(struct rtw_adapter  *padapter, struct cmd_obj *cmd);
735 };
736 
737 enum rtw_h2c_cmd {
738 	GEN_CMD_CODE(_Read_MACREG) ,	/*0*/
739 	GEN_CMD_CODE(_Write_MACREG) ,
740 	GEN_CMD_CODE(_Read_BBREG) ,
741 	GEN_CMD_CODE(_Write_BBREG) ,
742 	GEN_CMD_CODE(_Read_RFREG) ,
743 	GEN_CMD_CODE(_Write_RFREG) , /*5*/
744 	GEN_CMD_CODE(_Read_EEPROM) ,
745 	GEN_CMD_CODE(_Write_EEPROM) ,
746 	GEN_CMD_CODE(_Read_EFUSE) ,
747 	GEN_CMD_CODE(_Write_EFUSE) ,
748 
749 	GEN_CMD_CODE(_Read_CAM) ,	/*10*/
750 	GEN_CMD_CODE(_Write_CAM) ,
751 	GEN_CMD_CODE(_setBCNITV),
752 	GEN_CMD_CODE(_setMBIDCFG),
753 	GEN_CMD_CODE(_JoinBss),   /*14*/
754 	GEN_CMD_CODE(_DisConnect) , /*15*/
755 	GEN_CMD_CODE(_CreateBss) ,
756 	GEN_CMD_CODE(_SetOpMode) ,
757 	GEN_CMD_CODE(_SiteSurvey),  /*18*/
758 	GEN_CMD_CODE(_SetAuth) ,
759 
760 	GEN_CMD_CODE(_SetKey) ,	/*20*/
761 	GEN_CMD_CODE(_SetStaKey) ,
762 	GEN_CMD_CODE(_SetAssocSta) ,
763 	GEN_CMD_CODE(_DelAssocSta) ,
764 	GEN_CMD_CODE(_SetStaPwrState) ,
765 	GEN_CMD_CODE(_SetBasicRate) , /*25*/
766 	GEN_CMD_CODE(_GetBasicRate) ,
767 	GEN_CMD_CODE(_SetDataRate) ,
768 	GEN_CMD_CODE(_GetDataRate) ,
769 	GEN_CMD_CODE(_SetPhyInfo) ,
770 
771 	GEN_CMD_CODE(_GetPhyInfo) ,	/*30*/
772 	GEN_CMD_CODE(_SetPhy) ,
773 	GEN_CMD_CODE(_GetPhy) ,
774 	GEN_CMD_CODE(_readRssi) ,
775 	GEN_CMD_CODE(_readGain) ,
776 	GEN_CMD_CODE(_SetAtim) , /*35*/
777 	GEN_CMD_CODE(_SetPwrMode) ,
778 	GEN_CMD_CODE(_JoinbssRpt),
779 	GEN_CMD_CODE(_SetRaTable) ,
780 	GEN_CMD_CODE(_GetRaTable) ,
781 
782 	GEN_CMD_CODE(_GetCCXReport), /*40*/
783 	GEN_CMD_CODE(_GetDTMReport),
784 	GEN_CMD_CODE(_GetTXRateStatistics),
785 	GEN_CMD_CODE(_SetUsbSuspend),
786 	GEN_CMD_CODE(_SetH2cLbk),
787 	GEN_CMD_CODE(_AddBAReq) , /*45*/
788 	GEN_CMD_CODE(_SetChannel), /*46*/
789 	GEN_CMD_CODE(_SetTxPower),
790 	GEN_CMD_CODE(_SwitchAntenna),
791 	GEN_CMD_CODE(_SetCrystalCap),
792 	GEN_CMD_CODE(_SetSingleCarrierTx), /*50*/
793 
794 	GEN_CMD_CODE(_SetSingleToneTx),/*51*/
795 	GEN_CMD_CODE(_SetCarrierSuppressionTx),
796 	GEN_CMD_CODE(_SetContinuousTx),
797 	GEN_CMD_CODE(_SwitchBandwidth), /*54*/
798 	GEN_CMD_CODE(_TX_Beacon), /*55*/
799 
800 	GEN_CMD_CODE(_Set_MLME_EVT), /*56*/
801 	GEN_CMD_CODE(_Set_Drv_Extra), /*57*/
802 	GEN_CMD_CODE(_Set_H2C_MSG), /*58*/
803 
804 	GEN_CMD_CODE(_SetChannelPlan), /*59*/
805 	GEN_CMD_CODE(_LedBlink), /*60*/
806 
807 	GEN_CMD_CODE(_SetChannelSwitch), /*61*/
808 	GEN_CMD_CODE(_TDLS), /*62*/
809 
810 	MAX_H2CCMD
811 };
812 
813 extern struct _cmd_callback	rtw_cmd_callback[];
814 
815 #endif /*  _CMD_H_ */
816