1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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.
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
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
19 ******************************************************************************/
24 #include <wlan_bssdef.h>
28 #define C2H_MEM_SZ (16*1024)
30 #ifndef CONFIG_RTL8711FW
32 #include <osdep_service.h>
33 #include <ieee80211.h> // <ieee80211/ieee80211.h>
36 #define FREE_CMDOBJ_SZ 128
38 #define MAX_CMDSZ 1024
40 #define MAX_EVTSZ 1024
42 #define CMDBUFF_ALIGN_SZ 512
52 //struct semaphore cmd_sem;
57 struct semaphore cmd_queue_sema;
58 //struct semaphore cmd_done_sema;
59 struct semaphore terminate_cmdthread_sema;
62 u8 *cmd_buf; //shall be non-paged, and 4 bytes aligned
63 u8 *cmd_allocated_buf;
64 u8 *rsp_buf; //shall be non-paged, and 4 bytes aligned
65 u8 *rsp_allocated_buf;
73 #ifdef CONFIG_EVENT_THREAD_MODE
84 #ifdef CONFIG_EVENT_THREAD_MODE
85 struct semaphore evt_notify;
86 struct semaphore terminate_evtthread_sema;
94 struct rtw_cbuf *c2h_queue;
95 #define C2H_QUEUE_MAX_LEN 10
99 struct semaphore lbkevt_done;
105 u8 *evt_buf; //shall be non-paged, and 4 bytes aligned
106 u8 *evt_allocated_buf;
108 #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
110 u8 *allocated_c2h_mem;
115 #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
117 _rtw_init_listhead(&pcmd->list);\
118 pcmd->cmdcode = code;\
119 pcmd->parmbuf = (u8 *)(pparm);\
120 pcmd->cmdsz = sizeof (*pparm);\
132 #define c2h_evt_exist(c2h_evt) ((c2h_evt)->id || (c2h_evt)->plen)
134 extern u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj);
135 extern struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv);
136 extern void rtw_free_cmd_obj(struct cmd_obj *pcmd);
138 #ifdef CONFIG_EVENT_THREAD_MODE
139 extern u32 rtw_enqueue_evt(struct evt_priv *pevtpriv, struct evt_obj *obj);
140 extern struct evt_obj *rtw_dequeue_evt(_queue *queue);
141 extern void rtw_free_evt_obj(struct evt_obj *pcmd);
144 thread_return rtw_cmd_thread(thread_context context);
146 extern u32 rtw_init_cmd_priv (struct cmd_priv *pcmdpriv);
147 extern void rtw_free_cmd_priv (struct cmd_priv *pcmdpriv);
149 extern u32 rtw_init_evt_priv (struct evt_priv *pevtpriv);
150 extern void rtw_free_evt_priv (struct evt_priv *pevtpriv);
151 extern void rtw_cmd_clr_isr(struct cmd_priv *pcmdpriv);
152 extern void rtw_evt_notify_isr(struct evt_priv *pevtpriv);
154 u8 p2p_protocol_wk_cmd(_adapter*padapter, int intCmdType );
158 #include <ieee80211.h>
159 #endif /* CONFIG_RTL8711FW */
161 enum rtw_drvextra_cmd_id
167 POWER_SAVING_CTRL_WK_CID,//IPS,AUTOSuspend
172 CHECK_HIQ_WK_CID,//for softap mode, check hi queue if empty
175 RTP_TIMER_CFG_WK_CID,
184 LPS_CTRL_DISCONNECT=3,
185 LPS_CTRL_SPECIAL_PACKET=4,
196 Caller Mode: Infra, Ad-HoC(C)
198 Notes: To enter USB suspend mode
203 struct usb_suspend_parm {
204 u32 action;// 1: sleep, 0:resume
208 Caller Mode: Infra, Ad-HoC
210 Notes: To join a known BSS.
217 Caller Mode: Infra, Ad-Hoc
219 Notes: To join the specified bss
224 struct joinbss_parm {
225 WLAN_BSSID_EX network;
229 Caller Mode: Infra, Ad-HoC(C)
231 Notes: To disconnect the current associated BSS
236 struct disconnect_parm {
237 u32 deauth_timeout_ms;
241 Caller Mode: AP, Ad-HoC(M)
243 Notes: To create a BSS
247 struct createbss_parm {
248 WLAN_BSSID_EX network;
252 Caller Mode: AP, Ad-HoC, Infra
254 Notes: To set the NIC mode of RTL8711
258 The definition of mode:
260 #define IW_MODE_AUTO 0 // Let the driver decides which AP to join
261 #define IW_MODE_ADHOC 1 // Single cell network (Ad-Hoc Clients)
262 #define IW_MODE_INFRA 2 // Multi cell network, roaming, ..
263 #define IW_MODE_MASTER 3 // Synchronisation master or Access Point
264 #define IW_MODE_REPEAT 4 // Wireless Repeater (forwarder)
265 #define IW_MODE_SECOND 5 // Secondary master/repeater (backup)
266 #define IW_MODE_MONITOR 6 // Passive monitor (listen only)
269 struct setopmode_parm {
275 Caller Mode: AP, Ad-HoC, Infra
277 Notes: To ask RTL8711 performing site-survey
283 #define RTW_SSID_SCAN_AMOUNT 9 // for WEXT_CSCAN_AMOUNT 9
284 #define RTW_CHANNEL_SCAN_AMOUNT (14+37)
285 struct sitesurvey_parm {
286 int scan_mode; //active: 1, passive: 0
287 /* int bsslimit; // 1 ~ 48 */
290 NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT];
291 struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
297 Notes: To set the auth type of RTL8711. open/shared/802.1x
302 struct setauth_parm {
303 u8 mode; //0: legacy open, 1: legacy shared 2: 802.1x
304 u8 _1x; //0: PSK, 1: TLS
311 a. algorithm: wep40, wep104, tkip & aes
312 b. keytype: grp key/unicast key
315 when shared key ==> keyid is the camid
316 when 802.1x ==> keyid [0:1] ==> grp key
317 when 802.1x ==> keyid > 2 ==> unicast key
321 u8 algorithm; // encryption algorithm, could be none, wep40, TKIP, CCMP, wep104
323 u8 grpkey; // 1: this is the grpkey for 802.1x. 0: this is the unicast key for 802.1x
324 u8 set_tx; // 1: main tx key for wep. 0: other key.
325 u8 key[16]; // this could be 40 or 104
329 When in AP or Ad-Hoc mode, this is used to
330 allocate an sw/hw entry for a newly associated sta.
334 when shared key ==> algorithm/keyid
337 struct set_stakey_parm {
340 u8 id;// currently for erasing cam entry if algorithm == _NO_PRIVACY_
344 struct set_stakey_rsp {
353 Command -Rsp(AID == CAMID) mode
355 This is to force fw to add an sta_data entry per driver's request.
357 FW will write an cam entry associated with it.
360 struct set_assocsta_parm {
364 struct set_assocsta_rsp {
374 This is to force fw to del an sta_data entry per driver's request
376 FW will invalidate the cam entry associated with it.
379 struct del_assocsta_parm {
384 Caller Mode: AP/Ad-HoC(M)
386 Notes: To notify fw that given staid has changed its power state
391 struct setstapwrstate_parm {
400 Notes: To setup the basic rate of RTL8711
405 struct setbasicrate_parm {
406 u8 basicrates[NumRates];
412 Notes: To read the current basic rate
417 struct getbasicrate_parm {
421 struct getbasicrate_rsp {
422 u8 basicrates[NumRates];
428 Notes: To setup the data rate of RTL8711
433 struct setdatarate_parm {
434 #ifdef MP_FIRMWARE_OFFLOAD
438 u8 datarates[NumRates];
445 Notes: To read the current data rate
450 struct getdatarate_parm {
454 struct getdatarate_rsp {
455 u8 datarates[NumRates];
461 AP: AP can use the info for the contents of beacon frame
462 Infra: STA can use the info when sitesurveying
467 Notes: To set the phy capability of the NIC
473 struct setphyinfo_parm {
474 struct regulatory_class class_sets[NUM_REGULATORYS];
478 struct getphyinfo_parm {
482 struct getphyinfo_rsp {
483 struct regulatory_class class_sets[NUM_REGULATORYS];
490 Notes: To set the channel/modem/band
491 This command will be used when channel/modem/band is changed.
504 Notes: To get the current setting of channel/modem/band
526 struct readTSSI_parm {
530 struct readTSSI_rsp {
534 struct writeBB_parm {
547 struct writeRF_parm {
552 struct getrfintfs_parm {
556 struct Tx_Beacon_param
558 WLAN_BSSID_EX network;
563 struct seth2clbk_parm {
574 struct geth2clbk_parm {
578 struct geth2clbk_rsp {
589 #endif /* CONFIG_H2CLBK */
591 // CMD param Formart for driver extra cmd handler
592 struct drvextra_cmd_parm {
593 int ec_id; //extra cmd id
594 int type_size; // Can use this field as the type id or command size
598 /*------------------- Below are used for RF/BB tunning ---------------------*/
600 struct setantenna_parm {
607 struct enrateadaptive_parm {
611 struct settxagctbl_parm {
612 u32 txagc[MAX_RATES_LENGTH];
615 struct gettxagctbl_parm {
619 struct gettxagctbl_rsp {
620 u32 txagc[MAX_RATES_LENGTH];
623 struct setagcctrl_parm {
624 u32 agcctrl; // 0: pure hw, 1: fw
627 struct setssup_parm {
628 u32 ss_ForceUp[MAX_RATES_LENGTH];
631 struct getssup_parm {
636 u8 ss_ForceUp[MAX_RATES_LENGTH];
639 struct setssdlevel_parm {
640 u8 ss_DLevel[MAX_RATES_LENGTH];
643 struct getssdlevel_parm {
647 struct getssdlevel_rsp {
648 u8 ss_DLevel[MAX_RATES_LENGTH];
651 struct setssulevel_parm {
652 u8 ss_ULevel[MAX_RATES_LENGTH];
655 struct getssulevel_parm {
659 struct getssulevel_rsp {
660 u8 ss_ULevel[MAX_RATES_LENGTH];
663 struct setcountjudge_parm {
664 u8 count_judge[MAX_RATES_LENGTH];
667 struct getcountjudge_parm {
671 struct getcountjudge_rsp {
672 u8 count_judge[MAX_RATES_LENGTH];
675 struct setratable_parm {
676 u8 ss_ForceUp[NumRates];
677 u8 ss_ULevel[NumRates];
678 u8 ss_DLevel[NumRates];
679 u8 count_judge[NumRates];
682 struct getratable_parm {
686 struct getratable_rsp {
687 u8 ss_ForceUp[NumRates];
688 u8 ss_ULevel[NumRates];
689 u8 ss_DLevel[NumRates];
690 u8 count_judge[NumRates];
693 //to get TX,RX retry count
694 struct gettxretrycnt_parm{
697 struct gettxretrycnt_rsp{
698 unsigned long tx_retrycnt;
701 struct getrxretrycnt_parm{
704 struct getrxretrycnt_rsp{
705 unsigned long rx_retrycnt;
708 //to get BCNOK,BCNERR count
709 struct getbcnokcnt_parm{
712 struct getbcnokcnt_rsp{
713 unsigned long bcnokcnt;
716 struct getbcnerrcnt_parm{
719 struct getbcnerrcnt_rsp{
720 unsigned long bcnerrcnt;
723 // to get current TX power level
724 struct getcurtxpwrlevel_parm{
728 struct getcurtxpwrlevel_rsp{
729 unsigned short tx_power;
732 struct setprobereqextraie_parm {
734 unsigned char ie_len;
738 struct setassocreqextraie_parm {
740 unsigned char ie_len;
744 struct setproberspextraie_parm {
746 unsigned char ie_len;
750 struct setassocrspextraie_parm {
752 unsigned char ie_len;
756 struct addBaReq_parm {
761 /*H2C Handler index: 46 */
768 #ifdef MP_FIRMWARE_OFFLOAD
769 /*H2C Handler index: 47 */
770 struct SetTxPower_parm {
774 /*H2C Handler index: 48 */
775 struct SwitchAntenna_parm {
781 /*H2C Handler index: 49 */
782 struct SetCrystalCap_parm {
786 /*H2C Handler index: 50 */
787 struct SetSingleCarrierTx_parm {
791 /*H2C Handler index: 51 */
792 struct SetSingleToneTx_parm {
797 /*H2C Handler index: 52 */
798 struct SetCarrierSuppressionTx_parm {
803 /*H2C Handler index: 53 */
804 struct SetContinuousTx_parm {
806 u8 CCK_flag; /*1:CCK 2:OFDM*/
810 /*H2C Handler index: 54 */
811 struct SwitchBandwidth_parm {
815 #endif /* MP_FIRMWARE_OFFLOAD */
817 /*H2C Handler index: 59 */
818 struct SetChannelPlan_param {
822 /*H2C Handler index: 60 */
823 struct LedBlink_param {
827 /*H2C Handler index: 61 */
828 struct SetChannelSwitch_param {
832 /*H2C Handler index: 62 */
833 struct TDLSoption_param {
838 #define GEN_CMD_CODE(cmd) cmd ## _CMD_
845 0x01: sucess, and check Response.
846 0x02: cmd ignored due to duplicated sequcne number
847 0x03: cmd dropped due to invalid cmd code
852 #define H2C_RSP_OFFSET 512
854 #define H2C_SUCCESS 0x00
855 #define H2C_SUCCESS_RSP 0x01
856 #define H2C_DUPLICATED 0x02
857 #define H2C_DROPPED 0x03
858 #define H2C_PARAMETERS_ERROR 0x04
859 #define H2C_REJECTED 0x05
860 #define H2C_CMD_OVERFLOW 0x06
861 #define H2C_RESERVED 0x07
863 u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr);
864 u8 rtw_setstandby_cmd(_adapter *padapter, uint action);
865 u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num);
866 u8 rtw_createbss_cmd(_adapter *padapter);
867 u8 rtw_createbss_cmd_ex(_adapter *padapter, unsigned char *pbss, unsigned int sz);
868 u8 rtw_setphy_cmd(_adapter *padapter, u8 modem, u8 ch);
869 u8 rtw_setstakey_cmd(_adapter *padapter, u8 *psta, u8 unicast_key);
870 u8 rtw_clearstakey_cmd(_adapter *padapter, u8 *psta, u8 entry, u8 enqueue);
871 u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network* pnetwork);
872 u8 rtw_disassoc_cmd(_adapter *padapter, u32 deauth_timeout_ms, bool enqueue);
873 u8 rtw_setopmode_cmd(_adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
874 u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset);
875 u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset);
876 u8 rtw_setbbreg_cmd(_adapter * padapter, u8 offset, u8 val);
877 u8 rtw_setrfreg_cmd(_adapter * padapter, u8 offset, u32 val);
878 u8 rtw_getbbreg_cmd(_adapter * padapter, u8 offset, u8 * pval);
879 u8 rtw_getrfreg_cmd(_adapter * padapter, u8 offset, u8 * pval);
880 u8 rtw_setrfintfs_cmd(_adapter *padapter, u8 mode);
881 u8 rtw_setrttbl_cmd(_adapter *padapter, struct setratable_parm *prate_table);
882 u8 rtw_getrttbl_cmd(_adapter *padapter, struct getratable_rsp *pval);
884 u8 rtw_gettssi_cmd(_adapter *padapter, u8 offset,u8 *pval);
885 u8 rtw_setfwdig_cmd(_adapter*padapter, u8 type);
886 u8 rtw_setfwra_cmd(_adapter*padapter, u8 type);
888 u8 rtw_addbareq_cmd(_adapter*padapter, u8 tid, u8 *addr);
890 u8 rtw_dynamic_chk_wk_cmd(_adapter *adapter);
892 u8 rtw_lps_ctrl_wk_cmd(_adapter*padapter, u8 lps_ctrl_type, u8 enqueue);
893 #if (RATE_ADAPTIVE_SUPPORT==1)
894 u8 rtw_rpt_timer_cfg_cmd(_adapter*padapter, u16 minRptTime);
897 #ifdef CONFIG_ANTENNA_DIVERSITY
898 u8 rtw_antenna_select_cmd(_adapter*padapter, u8 antenna,u8 enqueue);
901 extern u8 rtw_ps_cmd(_adapter*padapter);
903 #ifdef CONFIG_AP_MODE
904 u8 rtw_chk_hi_queue_cmd(_adapter*padapter);
907 u8 rtw_set_ch_cmd(_adapter*padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueue);
908 u8 rtw_set_chplan_cmd(_adapter*padapter, u8 chplan, u8 enqueue);
909 u8 rtw_led_blink_cmd(_adapter*padapter, PLED_871x pLed);
910 u8 rtw_set_csa_cmd(_adapter*padapter, u8 new_ch_no);
911 u8 rtw_tdls_cmd(_adapter*padapter, u8 *addr, u8 option);
913 u8 rtw_c2h_wk_cmd(PADAPTER padapter, u8 *c2h_evt);
915 u8 rtw_drvextra_cmd_hdl(_adapter *padapter, unsigned char *pbuf);
917 void rtw_survey_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
918 void rtw_disassoc_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
919 void rtw_joinbss_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
920 void rtw_createbss_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
921 void rtw_getbbrfreg_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
922 void rtw_readtssi_cmdrsp_callback(_adapter* padapter, struct cmd_obj *pcmd);
924 void rtw_setstaKey_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
925 void rtw_setassocsta_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
926 void rtw_getrttbl_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
928 struct _cmd_callback {
930 void (*callback)(_adapter *padapter, struct cmd_obj *cmd);
934 GEN_CMD_CODE(_Read_MACREG) , /*0*/
935 GEN_CMD_CODE(_Write_MACREG) ,
936 GEN_CMD_CODE(_Read_BBREG) ,
937 GEN_CMD_CODE(_Write_BBREG) ,
938 GEN_CMD_CODE(_Read_RFREG) ,
939 GEN_CMD_CODE(_Write_RFREG) , /*5*/
940 GEN_CMD_CODE(_Read_EEPROM) ,
941 GEN_CMD_CODE(_Write_EEPROM) ,
942 GEN_CMD_CODE(_Read_EFUSE) ,
943 GEN_CMD_CODE(_Write_EFUSE) ,
945 GEN_CMD_CODE(_Read_CAM) , /*10*/
946 GEN_CMD_CODE(_Write_CAM) ,
947 GEN_CMD_CODE(_setBCNITV),
948 GEN_CMD_CODE(_setMBIDCFG),
949 GEN_CMD_CODE(_JoinBss), /*14*/
950 GEN_CMD_CODE(_DisConnect) , /*15*/
951 GEN_CMD_CODE(_CreateBss) ,
952 GEN_CMD_CODE(_SetOpMode) ,
953 GEN_CMD_CODE(_SiteSurvey), /*18*/
954 GEN_CMD_CODE(_SetAuth) ,
956 GEN_CMD_CODE(_SetKey) , /*20*/
957 GEN_CMD_CODE(_SetStaKey) ,
958 GEN_CMD_CODE(_SetAssocSta) ,
959 GEN_CMD_CODE(_DelAssocSta) ,
960 GEN_CMD_CODE(_SetStaPwrState) ,
961 GEN_CMD_CODE(_SetBasicRate) , /*25*/
962 GEN_CMD_CODE(_GetBasicRate) ,
963 GEN_CMD_CODE(_SetDataRate) ,
964 GEN_CMD_CODE(_GetDataRate) ,
965 GEN_CMD_CODE(_SetPhyInfo) ,
967 GEN_CMD_CODE(_GetPhyInfo) , /*30*/
968 GEN_CMD_CODE(_SetPhy) ,
969 GEN_CMD_CODE(_GetPhy) ,
970 GEN_CMD_CODE(_readRssi) ,
971 GEN_CMD_CODE(_readGain) ,
972 GEN_CMD_CODE(_SetAtim) , /*35*/
973 GEN_CMD_CODE(_SetPwrMode) ,
974 GEN_CMD_CODE(_JoinbssRpt),
975 GEN_CMD_CODE(_SetRaTable) ,
976 GEN_CMD_CODE(_GetRaTable) ,
978 GEN_CMD_CODE(_GetCCXReport), /*40*/
979 GEN_CMD_CODE(_GetDTMReport),
980 GEN_CMD_CODE(_GetTXRateStatistics),
981 GEN_CMD_CODE(_SetUsbSuspend),
982 GEN_CMD_CODE(_SetH2cLbk),
983 GEN_CMD_CODE(_AddBAReq) , /*45*/
984 GEN_CMD_CODE(_SetChannel), /*46*/
985 GEN_CMD_CODE(_SetTxPower),
986 GEN_CMD_CODE(_SwitchAntenna),
987 GEN_CMD_CODE(_SetCrystalCap),
988 GEN_CMD_CODE(_SetSingleCarrierTx), /*50*/
990 GEN_CMD_CODE(_SetSingleToneTx),/*51*/
991 GEN_CMD_CODE(_SetCarrierSuppressionTx),
992 GEN_CMD_CODE(_SetContinuousTx),
993 GEN_CMD_CODE(_SwitchBandwidth), /*54*/
994 GEN_CMD_CODE(_TX_Beacon), /*55*/
996 GEN_CMD_CODE(_Set_MLME_EVT), /*56*/
997 GEN_CMD_CODE(_Set_Drv_Extra), /*57*/
998 GEN_CMD_CODE(_Set_H2C_MSG), /*58*/
1000 GEN_CMD_CODE(_SetChannelPlan), /*59*/
1001 GEN_CMD_CODE(_LedBlink), /*60*/
1003 GEN_CMD_CODE(_SetChannelSwitch), /*61*/
1004 GEN_CMD_CODE(_TDLS), /*62*/
1009 #define _GetBBReg_CMD_ _Read_BBREG_CMD_
1010 #define _SetBBReg_CMD_ _Write_BBREG_CMD_
1011 #define _GetRFReg_CMD_ _Read_RFREG_CMD_
1012 #define _SetRFReg_CMD_ _Write_RFREG_CMD_
1015 struct _cmd_callback rtw_cmd_callback[] = {
1016 {GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
1017 {GEN_CMD_CODE(_Write_MACREG), NULL},
1018 {GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback},
1019 {GEN_CMD_CODE(_Write_BBREG), NULL},
1020 {GEN_CMD_CODE(_Read_RFREG), &rtw_getbbrfreg_cmdrsp_callback},
1021 {GEN_CMD_CODE(_Write_RFREG), NULL}, /*5*/
1022 {GEN_CMD_CODE(_Read_EEPROM), NULL},
1023 {GEN_CMD_CODE(_Write_EEPROM), NULL},
1024 {GEN_CMD_CODE(_Read_EFUSE), NULL},
1025 {GEN_CMD_CODE(_Write_EFUSE), NULL},
1027 {GEN_CMD_CODE(_Read_CAM), NULL}, /*10*/
1028 {GEN_CMD_CODE(_Write_CAM), NULL},
1029 {GEN_CMD_CODE(_setBCNITV), NULL},
1030 {GEN_CMD_CODE(_setMBIDCFG), NULL},
1031 {GEN_CMD_CODE(_JoinBss), &rtw_joinbss_cmd_callback}, /*14*/
1032 {GEN_CMD_CODE(_DisConnect), &rtw_disassoc_cmd_callback}, /*15*/
1033 {GEN_CMD_CODE(_CreateBss), &rtw_createbss_cmd_callback},
1034 {GEN_CMD_CODE(_SetOpMode), NULL},
1035 {GEN_CMD_CODE(_SiteSurvey), &rtw_survey_cmd_callback}, /*18*/
1036 {GEN_CMD_CODE(_SetAuth), NULL},
1038 {GEN_CMD_CODE(_SetKey), NULL}, /*20*/
1039 {GEN_CMD_CODE(_SetStaKey), &rtw_setstaKey_cmdrsp_callback},
1040 {GEN_CMD_CODE(_SetAssocSta), &rtw_setassocsta_cmdrsp_callback},
1041 {GEN_CMD_CODE(_DelAssocSta), NULL},
1042 {GEN_CMD_CODE(_SetStaPwrState), NULL},
1043 {GEN_CMD_CODE(_SetBasicRate), NULL}, /*25*/
1044 {GEN_CMD_CODE(_GetBasicRate), NULL},
1045 {GEN_CMD_CODE(_SetDataRate), NULL},
1046 {GEN_CMD_CODE(_GetDataRate), NULL},
1047 {GEN_CMD_CODE(_SetPhyInfo), NULL},
1049 {GEN_CMD_CODE(_GetPhyInfo), NULL}, /*30*/
1050 {GEN_CMD_CODE(_SetPhy), NULL},
1051 {GEN_CMD_CODE(_GetPhy), NULL},
1052 {GEN_CMD_CODE(_readRssi), NULL},
1053 {GEN_CMD_CODE(_readGain), NULL},
1054 {GEN_CMD_CODE(_SetAtim), NULL}, /*35*/
1055 {GEN_CMD_CODE(_SetPwrMode), NULL},
1056 {GEN_CMD_CODE(_JoinbssRpt), NULL},
1057 {GEN_CMD_CODE(_SetRaTable), NULL},
1058 {GEN_CMD_CODE(_GetRaTable) , NULL},
1060 {GEN_CMD_CODE(_GetCCXReport), NULL}, /*40*/
1061 {GEN_CMD_CODE(_GetDTMReport), NULL},
1062 {GEN_CMD_CODE(_GetTXRateStatistics), NULL},
1063 {GEN_CMD_CODE(_SetUsbSuspend), NULL},
1064 {GEN_CMD_CODE(_SetH2cLbk), NULL},
1065 {GEN_CMD_CODE(_AddBAReq), NULL}, /*45*/
1066 {GEN_CMD_CODE(_SetChannel), NULL}, /*46*/
1067 {GEN_CMD_CODE(_SetTxPower), NULL},
1068 {GEN_CMD_CODE(_SwitchAntenna), NULL},
1069 {GEN_CMD_CODE(_SetCrystalCap), NULL},
1070 {GEN_CMD_CODE(_SetSingleCarrierTx), NULL}, /*50*/
1072 {GEN_CMD_CODE(_SetSingleToneTx), NULL}, /*51*/
1073 {GEN_CMD_CODE(_SetCarrierSuppressionTx), NULL},
1074 {GEN_CMD_CODE(_SetContinuousTx), NULL},
1075 {GEN_CMD_CODE(_SwitchBandwidth), NULL}, /*54*/
1076 {GEN_CMD_CODE(_TX_Beacon), NULL},/*55*/
1078 {GEN_CMD_CODE(_Set_MLME_EVT), NULL},/*56*/
1079 {GEN_CMD_CODE(_Set_Drv_Extra), NULL},/*57*/
1080 {GEN_CMD_CODE(_Set_H2C_MSG), NULL},/*58*/
1081 {GEN_CMD_CODE(_SetChannelPlan), NULL},/*59*/
1082 {GEN_CMD_CODE(_LedBlink), NULL},/*60*/
1084 {GEN_CMD_CODE(_SetChannelSwitch), NULL},/*61*/
1085 {GEN_CMD_CODE(_TDLS), NULL},/*62*/
1088 extern struct _cmd_callback rtw_cmd_callback[];