1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5  *
6  ******************************************************************************/
7 #ifndef __RTW_CMD_H_
8 #define __RTW_CMD_H_
9 
10 #include <linux/completion.h>
11 
12 #define C2H_MEM_SZ (16*1024)
13 
14 	#define FREE_CMDOBJ_SZ	128
15 
16 	#define MAX_CMDSZ	1024
17 	#define MAX_RSPSZ	512
18 	#define MAX_EVTSZ	1024
19 
20 	#define CMDBUFF_ALIGN_SZ 512
21 
22 	struct cmd_obj {
23 		struct adapter *padapter;
24 		u16 cmdcode;
25 		u8 res;
26 		u8 *parmbuf;
27 		u32 cmdsz;
28 		u8 *rsp;
29 		u32 rspsz;
30 		struct submit_ctx *sctx;
31 		struct list_head	list;
32 	};
33 
34 	/* cmd flags */
35 	enum {
36 		RTW_CMDF_DIRECTLY = BIT0,
37 		RTW_CMDF_WAIT_ACK = BIT1,
38 	};
39 
40 	struct cmd_priv {
41 		struct completion cmd_queue_comp;
42 		struct completion terminate_cmdthread_comp;
43 		struct __queue	cmd_queue;
44 		u8 cmd_seq;
45 		u8 *cmd_buf;	/* shall be non-paged, and 4 bytes aligned */
46 		u8 *cmd_allocated_buf;
47 		u8 *rsp_buf;	/* shall be non-paged, and 4 bytes aligned */
48 		u8 *rsp_allocated_buf;
49 		u32 cmd_issued_cnt;
50 		u32 cmd_done_cnt;
51 		u32 rsp_cnt;
52 		atomic_t cmdthd_running;
53 		/* u8 cmdthd_running; */
54 		u8 stop_req;
55 		struct adapter *padapter;
56 		struct mutex sctx_mutex;
57 	};
58 
59 	struct	evt_priv {
60 		struct work_struct c2h_wk;
61 		bool c2h_wk_alive;
62 		struct rtw_cbuf *c2h_queue;
63 		#define C2H_QUEUE_MAX_LEN 10
64 
65 		atomic_t event_seq;
66 		u8 *evt_buf;	/* shall be non-paged, and 4 bytes aligned */
67 		u8 *evt_allocated_buf;
68 		u32 evt_done_cnt;
69 		u8 *c2h_mem;
70 		u8 *allocated_c2h_mem;
71 	};
72 
73 #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
74 do {\
75 	INIT_LIST_HEAD(&pcmd->list);\
76 	pcmd->cmdcode = code;\
77 	pcmd->parmbuf = (u8 *)(pparm);\
78 	pcmd->cmdsz = sizeof(*pparm);\
79 	pcmd->rsp = NULL;\
80 	pcmd->rspsz = 0;\
81 } while (0)
82 
83 #define init_h2fwcmd_w_parm_no_parm_rsp(pcmd, code) \
84 do {\
85 	INIT_LIST_HEAD(&pcmd->list);\
86 	pcmd->cmdcode = code;\
87 	pcmd->parmbuf = NULL;\
88 	pcmd->cmdsz = 0;\
89 	pcmd->rsp = NULL;\
90 	pcmd->rspsz = 0;\
91 } while (0)
92 
93 struct c2h_evt_hdr {
94 	u8 id:4;
95 	u8 plen:4;
96 	u8 seq;
97 	u8 payload[];
98 };
99 
100 struct c2h_evt_hdr_88xx {
101 	u8 id;
102 	u8 seq;
103 	u8 payload[12];
104 	u8 plen;
105 	u8 trigger;
106 };
107 
108 #define c2h_evt_valid(c2h_evt) ((c2h_evt)->id || (c2h_evt)->plen)
109 
110 int rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj);
111 extern struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv);
112 extern void rtw_free_cmd_obj(struct cmd_obj *pcmd);
113 
114 void rtw_stop_cmd_thread(struct adapter *adapter);
115 int rtw_cmd_thread(void *context);
116 
117 extern void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv);
118 
119 extern void rtw_free_evt_priv(struct evt_priv *pevtpriv);
120 extern void rtw_evt_notify_isr(struct evt_priv *pevtpriv);
121 
122 enum {
123 	NONE_WK_CID,
124 	DYNAMIC_CHK_WK_CID,
125 	DM_CTRL_WK_CID,
126 	PBC_POLLING_WK_CID,
127 	POWER_SAVING_CTRL_WK_CID,/* IPS, AUTOSuspend */
128 	LPS_CTRL_WK_CID,
129 	ANT_SELECT_WK_CID,
130 	P2P_PS_WK_CID,
131 	P2P_PROTO_WK_CID,
132 	CHECK_HIQ_WK_CID,/* for softap mode, check hi queue if empty */
133 	INTEl_WIDI_WK_CID,
134 	C2H_WK_CID,
135 	RTP_TIMER_CFG_WK_CID,
136 	RESET_SECURITYPRIV, /*  add for CONFIG_IEEE80211W, none 11w also can use */
137 	FREE_ASSOC_RESOURCES, /*  add for CONFIG_IEEE80211W, none 11w also can use */
138 	DM_IN_LPS_WK_CID,
139 	DM_RA_MSK_WK_CID, /* add for STA update RAMask when bandwidth change. */
140 	BEAMFORMING_WK_CID,
141 	LPS_CHANGE_DTIM_CID,
142 	BTINFO_WK_CID,
143 	MAX_WK_CID
144 };
145 
146 enum {
147 	LPS_CTRL_SCAN = 0,
148 	LPS_CTRL_JOINBSS = 1,
149 	LPS_CTRL_CONNECT = 2,
150 	LPS_CTRL_DISCONNECT = 3,
151 	LPS_CTRL_SPECIAL_PACKET = 4,
152 	LPS_CTRL_LEAVE = 5,
153 	LPS_CTRL_TRAFFIC_BUSY = 6,
154 };
155 
156 enum {
157 	SWSI,
158 	HWSI,
159 	HWPI,
160 };
161 
162 /*
163 Caller Mode: Infra, Ad-HoC
164 
165 Notes: To join a known BSS.
166 
167 Command-Event Mode
168 
169 */
170 
171 /*
172 Caller Mode: Infra, Ad-Hoc
173 
174 Notes: To join the specified bss
175 
176 Command Event Mode
177 
178 */
179 struct joinbss_parm {
180 	struct wlan_bssid_ex network;
181 };
182 
183 /*
184 Caller Mode: Infra, Ad-HoC(C)
185 
186 Notes: To disconnect the current associated BSS
187 
188 Command Mode
189 
190 */
191 struct disconnect_parm {
192 	u32 deauth_timeout_ms;
193 };
194 
195 /*
196 Caller Mode: AP, Ad-HoC(M)
197 
198 Notes: To create a BSS
199 
200 Command Mode
201 */
202 struct createbss_parm {
203 	struct wlan_bssid_ex network;
204 };
205 
206 /*
207 Caller Mode: AP, Ad-HoC, Infra
208 
209 Notes: To set the NIC mode of RTL8711
210 
211 Command Mode
212 
213 The definition of mode:
214 
215 #define IW_MODE_AUTO	0	 Let the driver decides which AP to join
216 #define IW_MODE_ADHOC	1	 Single cell network (Ad-Hoc Clients)
217 #define IW_MODE_INFRA	2	 Multi cell network, roaming, ..
218 #define IW_MODE_MASTER	3	 Synchronisation master or Access Point
219 #define IW_MODE_REPEAT	4	 Wireless Repeater (forwarder)
220 #define IW_MODE_SECOND	5	 Secondary master/repeater (backup)
221 #define IW_MODE_MONITOR	6	 Passive monitor (listen only)
222 
223 */
224 struct	setopmode_parm {
225 	u8 mode;
226 	u8 rsvd[3];
227 };
228 
229 /*
230 Caller Mode: AP, Ad-HoC, Infra
231 
232 Notes: To ask RTL8711 performing site-survey
233 
234 Command-Event Mode
235 
236 */
237 
238 #define RTW_SSID_SCAN_AMOUNT 9 /*  for WEXT_CSCAN_AMOUNT 9 */
239 #define RTW_CHANNEL_SCAN_AMOUNT (14+37)
240 struct sitesurvey_parm {
241 	signed int scan_mode;	/* active: 1, passive: 0 */
242 	u8 ssid_num;
243 	u8 ch_num;
244 	struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
245 	struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
246 };
247 
248 /*
249 Caller Mode: Any
250 
251 Notes: To set the auth type of RTL8711. open/shared/802.1x
252 
253 Command Mode
254 
255 */
256 struct setauth_parm {
257 	u8 mode;  /* 0: legacy open, 1: legacy shared 2: 802.1x */
258 	u8 _1x;   /* 0: PSK, 1: TLS */
259 	u8 rsvd[2];
260 };
261 
262 /*
263 Caller Mode: Infra
264 
265 a. algorithm: wep40, wep104, tkip & aes
266 b. keytype: grp key/unicast key
267 c. key contents
268 
269 when shared key ==> keyid is the camid
270 when 802.1x ==> keyid [0:1] ==> grp key
271 when 802.1x ==> keyid > 2 ==> unicast key
272 
273 */
274 struct setkey_parm {
275 	u8 algorithm;	/*  encryption algorithm, could be none, wep40, TKIP, CCMP, wep104 */
276 	u8 keyid;
277 	u8 grpkey;		/*  1: this is the grpkey for 802.1x. 0: this is the unicast key for 802.1x */
278 	u8 set_tx;		/*  1: main tx key for wep. 0: other key. */
279 	u8 key[16];	/*  this could be 40 or 104 */
280 };
281 
282 /*
283 When in AP or Ad-Hoc mode, this is used to
284 allocate an sw/hw entry for a newly associated sta.
285 
286 Command
287 
288 when shared key ==> algorithm/keyid
289 
290 */
291 struct set_stakey_parm {
292 	u8 addr[ETH_ALEN];
293 	u8 algorithm;
294 	u8 keyid;
295 	u8 key[16];
296 };
297 
298 struct set_stakey_rsp {
299 	u8 addr[ETH_ALEN];
300 	u8 keyid;
301 	u8 rsvd;
302 };
303 
304 /*
305 Caller Ad-Hoc/AP
306 
307 Command -Rsp(AID == CAMID) mode
308 
309 This is to force fw to add an sta_data entry per driver's request.
310 
311 FW will write an cam entry associated with it.
312 
313 */
314 struct set_assocsta_parm {
315 	u8 addr[ETH_ALEN];
316 };
317 
318 struct set_assocsta_rsp {
319 	u8 cam_id;
320 	u8 rsvd[3];
321 };
322 
323 /*
324 	Caller Ad-Hoc/AP
325 
326 	Command mode
327 
328 	This is to force fw to del an sta_data entry per driver's request
329 
330 	FW will invalidate the cam entry associated with it.
331 
332 */
333 struct del_assocsta_parm {
334 	u8 addr[ETH_ALEN];
335 };
336 
337 /*
338 Caller Mode: AP/Ad-HoC(M)
339 
340 Notes: To notify fw that given staid has changed its power state
341 
342 Command Mode
343 
344 */
345 struct setstapwrstate_parm {
346 	u8 staid;
347 	u8 status;
348 	u8 hwaddr[6];
349 };
350 
351 /*
352 Caller Mode: Any
353 
354 Notes: To setup the basic rate of RTL8711
355 
356 Command Mode
357 
358 */
359 struct	setbasicrate_parm {
360 	u8 basicrates[NumRates];
361 };
362 
363 /*
364 Caller Mode: Any
365 
366 Notes: To read the current basic rate
367 
368 Command-Rsp Mode
369 
370 */
371 struct getbasicrate_parm {
372 	u32 rsvd;
373 };
374 
375 /*
376 Caller Mode: Any
377 
378 Notes: To setup the data rate of RTL8711
379 
380 Command Mode
381 
382 */
383 struct setdatarate_parm {
384 	u8 mac_id;
385 	u8 datarates[NumRates];
386 };
387 
388 /*
389 Caller Mode: Any
390 
391 Notes: To read the current data rate
392 
393 Command-Rsp Mode
394 
395 */
396 struct getdatarate_parm {
397 	u32 rsvd;
398 
399 };
400 
401 /*
402 Caller Mode: Any
403 AP: AP can use the info for the contents of beacon frame
404 Infra: STA can use the info when sitesurveying
405 Ad-HoC(M): Like AP
406 Ad-HoC(C): Like STA
407 
408 
409 Notes: To set the phy capability of the NIC
410 
411 Command Mode
412 
413 */
414 
415 struct	setphyinfo_parm {
416 	struct regulatory_class class_sets[NUM_REGULATORYS];
417 	u8 status;
418 };
419 
420 struct	getphyinfo_parm {
421 	u32 rsvd;
422 };
423 
424 /*
425 Caller Mode: Any
426 
427 Notes: To set the channel/modem/band
428 This command will be used when channel/modem/band is changed.
429 
430 Command Mode
431 
432 */
433 struct	setphy_parm {
434 	u8 rfchannel;
435 	u8 modem;
436 };
437 
438 /*
439 Caller Mode: Any
440 
441 Notes: To get the current setting of channel/modem/band
442 
443 Command-Rsp Mode
444 
445 */
446 struct	getphy_parm {
447 	u32 rsvd;
448 
449 };
450 
451 struct Tx_Beacon_param {
452 	struct wlan_bssid_ex network;
453 };
454 
455 /*
456 	Notes: This command is used for H2C/C2H loopback testing
457 
458 	mac[0] == 0
459 	==> CMD mode, return H2C_SUCCESS.
460 	The following condition must be true under CMD mode
461 		mac[1] == mac[4], mac[2] == mac[3], mac[0]=mac[5]= 0;
462 		s0 == 0x1234, s1 == 0xabcd, w0 == 0x78563412, w1 == 0x5aa5def7;
463 		s2 == (b1 << 8 | b0);
464 
465 	mac[0] == 1
466 	==> CMD_RSP mode, return H2C_SUCCESS_RSP
467 
468 	The rsp layout shall be:
469 	rsp:			parm:
470 		mac[0]  =   mac[5];
471 		mac[1]  =   mac[4];
472 		mac[2]  =   mac[3];
473 		mac[3]  =   mac[2];
474 		mac[4]  =   mac[1];
475 		mac[5]  =   mac[0];
476 		s0		=   s1;
477 		s1		=   swap16(s0);
478 		w0		=	swap32(w1);
479 		b0		=	b1
480 		s2		=	s0 + s1
481 		b1		=	b0
482 		w1		=	w0
483 
484 	mac[0] ==	2
485 	==> CMD_EVENT mode, return	H2C_SUCCESS
486 	The event layout shall be:
487 	event:			parm:
488 		mac[0]  =   mac[5];
489 		mac[1]  =   mac[4];
490 		mac[2]  =   event's sequence number, starting from 1 to parm's marc[3]
491 		mac[3]  =   mac[2];
492 		mac[4]  =   mac[1];
493 		mac[5]  =   mac[0];
494 		s0		=   swap16(s0) - event.mac[2];
495 		s1		=   s1 + event.mac[2];
496 		w0		=	swap32(w0);
497 		b0		=	b1
498 		s2		=	s0 + event.mac[2]
499 		b1		=	b0
500 		w1		=	swap32(w1) - event.mac[2];
501 
502 		parm->mac[3] is the total event counts that host requested.
503 
504 
505 	event will be the same with the cmd's param.
506 
507 */
508 
509 /*  CMD param Formart for driver extra cmd handler */
510 struct drvextra_cmd_parm {
511 	int ec_id; /* extra cmd id */
512 	int type; /*  Can use this field as the type id or command size */
513 	int size; /* buffer size */
514 	unsigned char *pbuf;
515 };
516 
517 /*------------------- Below are used for RF/BB tuning ---------------------*/
518 
519 struct addBaReq_parm {
520 	unsigned int tid;
521 	u8 addr[ETH_ALEN];
522 };
523 
524 /*H2C Handler index: 46 */
525 struct set_ch_parm {
526 	u8 ch;
527 	u8 bw;
528 	u8 ch_offset;
529 };
530 
531 /*H2C Handler index: 59 */
532 struct SetChannelPlan_param {
533 	u8 channel_plan;
534 };
535 
536 /*H2C Handler index: 61 */
537 struct SetChannelSwitch_param {
538 	u8 new_ch_no;
539 };
540 
541 /*H2C Handler index: 62 */
542 struct TDLSoption_param {
543 	u8 addr[ETH_ALEN];
544 	u8 option;
545 };
546 
547 /*H2C Handler index: 64 */
548 struct RunInThread_param {
549 	void (*func)(void *);
550 	void *context;
551 };
552 
553 
554 #define GEN_CMD_CODE(cmd)	cmd ## _CMD_
555 
556 
557 /*
558 
559 Result:
560 0x00: success
561 0x01: success, and check Response.
562 0x02: cmd ignored due to duplicated sequcne number
563 0x03: cmd dropped due to invalid cmd code
564 0x04: reserved.
565 
566 */
567 
568 #define H2C_RSP_OFFSET			512
569 
570 #define H2C_SUCCESS			0x00
571 #define H2C_SUCCESS_RSP			0x01
572 #define H2C_DUPLICATED			0x02
573 #define H2C_DROPPED			0x03
574 #define H2C_PARAMETERS_ERROR		0x04
575 #define H2C_REJECTED			0x05
576 #define H2C_CMD_OVERFLOW		0x06
577 #define H2C_RESERVED			0x07
578 
579 u8 rtw_sitesurvey_cmd(struct adapter  *padapter, struct ndis_802_11_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num);
580 extern u8 rtw_createbss_cmd(struct adapter  *padapter);
581 int rtw_startbss_cmd(struct adapter  *padapter, int flags);
582 
583 struct sta_info;
584 extern u8 rtw_setstakey_cmd(struct adapter  *padapter, struct sta_info *sta, u8 unicast_key, bool enqueue);
585 extern u8 rtw_clearstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 enqueue);
586 
587 extern u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork);
588 u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueue);
589 extern u8 rtw_setopmode_cmd(struct adapter  *padapter, enum ndis_802_11_network_infrastructure networktype, bool enqueue);
590 extern u8 rtw_setrfintfs_cmd(struct adapter  *padapter, u8 mode);
591 
592 extern u8 rtw_gettssi_cmd(struct adapter  *padapter, u8 offset, u8 *pval);
593 extern u8 rtw_setfwdig_cmd(struct adapter *padapter, u8 type);
594 extern u8 rtw_setfwra_cmd(struct adapter *padapter, u8 type);
595 
596 extern u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr);
597 /*  add for CONFIG_IEEE80211W, none 11w also can use */
598 extern u8 rtw_reset_securitypriv_cmd(struct adapter *padapter);
599 extern u8 rtw_free_assoc_resources_cmd(struct adapter *padapter);
600 extern u8 rtw_dynamic_chk_wk_cmd(struct adapter *adapter);
601 
602 u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue);
603 u8 rtw_dm_in_lps_wk_cmd(struct adapter *padapter);
604 
605 u8 rtw_dm_ra_mask_wk_cmd(struct adapter *padapter, u8 *psta);
606 
607 extern u8 rtw_ps_cmd(struct adapter *padapter);
608 
609 u8 rtw_chk_hi_queue_cmd(struct adapter *padapter);
610 
611 extern u8 rtw_c2h_packet_wk_cmd(struct adapter *padapter, u8 *pbuf, u16 length);
612 extern u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt);
613 
614 u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf);
615 
616 extern void rtw_survey_cmd_callback(struct adapter  *padapter, struct cmd_obj *pcmd);
617 extern void rtw_disassoc_cmd_callback(struct adapter  *padapter, struct cmd_obj *pcmd);
618 extern void rtw_joinbss_cmd_callback(struct adapter  *padapter, struct cmd_obj *pcmd);
619 extern void rtw_createbss_cmd_callback(struct adapter  *padapter, struct cmd_obj *pcmd);
620 extern void rtw_getbbrfreg_cmdrsp_callback(struct adapter  *padapter, struct cmd_obj *pcmd);
621 
622 extern void rtw_setstaKey_cmdrsp_callback(struct adapter  *padapter,  struct cmd_obj *pcmd);
623 extern void rtw_setassocsta_cmdrsp_callback(struct adapter  *padapter,  struct cmd_obj *pcmd);
624 extern void rtw_getrttbl_cmdrsp_callback(struct adapter  *padapter,  struct cmd_obj *pcmd);
625 
626 
627 struct _cmd_callback {
628 	u32 cmd_code;
629 	void (*callback)(struct adapter  *padapter, struct cmd_obj *cmd);
630 };
631 
632 enum {
633 	GEN_CMD_CODE(_Read_MACREG),	/*0*/
634 	GEN_CMD_CODE(_Write_MACREG),
635 	GEN_CMD_CODE(_Read_BBREG),
636 	GEN_CMD_CODE(_Write_BBREG),
637 	GEN_CMD_CODE(_Read_RFREG),
638 	GEN_CMD_CODE(_Write_RFREG), /*5*/
639 	GEN_CMD_CODE(_Read_EEPROM),
640 	GEN_CMD_CODE(_Write_EEPROM),
641 	GEN_CMD_CODE(_Read_EFUSE),
642 	GEN_CMD_CODE(_Write_EFUSE),
643 
644 	GEN_CMD_CODE(_Read_CAM),	/*10*/
645 	GEN_CMD_CODE(_Write_CAM),
646 	GEN_CMD_CODE(_setBCNITV),
647 	GEN_CMD_CODE(_setMBIDCFG),
648 	GEN_CMD_CODE(_JoinBss),   /*14*/
649 	GEN_CMD_CODE(_DisConnect), /*15*/
650 	GEN_CMD_CODE(_CreateBss),
651 	GEN_CMD_CODE(_SetOpMode),
652 	GEN_CMD_CODE(_SiteSurvey),  /*18*/
653 	GEN_CMD_CODE(_SetAuth),
654 
655 	GEN_CMD_CODE(_SetKey),	/*20*/
656 	GEN_CMD_CODE(_SetStaKey),
657 	GEN_CMD_CODE(_SetAssocSta),
658 	GEN_CMD_CODE(_DelAssocSta),
659 	GEN_CMD_CODE(_SetStaPwrState),
660 	GEN_CMD_CODE(_SetBasicRate), /*25*/
661 	GEN_CMD_CODE(_GetBasicRate),
662 	GEN_CMD_CODE(_SetDataRate),
663 	GEN_CMD_CODE(_GetDataRate),
664 	GEN_CMD_CODE(_SetPhyInfo),
665 
666 	GEN_CMD_CODE(_GetPhyInfo),	/*30*/
667 	GEN_CMD_CODE(_SetPhy),
668 	GEN_CMD_CODE(_GetPhy),
669 	GEN_CMD_CODE(_readRssi),
670 	GEN_CMD_CODE(_readGain),
671 	GEN_CMD_CODE(_SetAtim), /*35*/
672 	GEN_CMD_CODE(_SetPwrMode),
673 	GEN_CMD_CODE(_JoinbssRpt),
674 	GEN_CMD_CODE(_SetRaTable),
675 	GEN_CMD_CODE(_GetRaTable),
676 
677 	GEN_CMD_CODE(_GetCCXReport), /*40*/
678 	GEN_CMD_CODE(_GetDTMReport),
679 	GEN_CMD_CODE(_GetTXRateStatistics),
680 	GEN_CMD_CODE(_SetUsbSuspend),
681 	GEN_CMD_CODE(_SetH2cLbk),
682 	GEN_CMD_CODE(_AddBAReq), /*45*/
683 	GEN_CMD_CODE(_SetChannel), /*46*/
684 	GEN_CMD_CODE(_SetTxPower),
685 	GEN_CMD_CODE(_SwitchAntenna),
686 	GEN_CMD_CODE(_SetCrystalCap),
687 	GEN_CMD_CODE(_SetSingleCarrierTx), /*50*/
688 
689 	GEN_CMD_CODE(_SetSingleToneTx),/*51*/
690 	GEN_CMD_CODE(_SetCarrierSuppressionTx),
691 	GEN_CMD_CODE(_SetContinuousTx),
692 	GEN_CMD_CODE(_SwitchBandwidth), /*54*/
693 	GEN_CMD_CODE(_TX_Beacon), /*55*/
694 
695 	GEN_CMD_CODE(_Set_MLME_EVT), /*56*/
696 	GEN_CMD_CODE(_Set_Drv_Extra), /*57*/
697 	GEN_CMD_CODE(_Set_H2C_MSG), /*58*/
698 
699 	GEN_CMD_CODE(_SetChannelPlan), /*59*/
700 
701 	GEN_CMD_CODE(_SetChannelSwitch), /*60*/
702 	GEN_CMD_CODE(_TDLS), /*61*/
703 	GEN_CMD_CODE(_ChkBMCSleepq), /*62*/
704 
705 	GEN_CMD_CODE(_RunInThreadCMD), /*63*/
706 
707 	MAX_H2CCMD
708 };
709 
710 #define _GetBBReg_CMD_		_Read_BBREG_CMD_
711 #define _SetBBReg_CMD_		_Write_BBREG_CMD_
712 #define _GetRFReg_CMD_		_Read_RFREG_CMD_
713 #define _SetRFReg_CMD_		_Write_RFREG_CMD_
714 
715 #endif /*  _CMD_H_ */
716