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;
53 struct list_head list;
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
79 struct list_head list;
84 #ifdef CONFIG_EVENT_THREAD_MODE
85 struct semaphore evt_notify;
86 struct semaphore terminate_evtthread_sema;
92 struct work_struct c2h_wk;
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;
110 #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
112 INIT_LIST_HEAD(&pcmd->list);\
113 pcmd->cmdcode = code;\
114 pcmd->parmbuf = (u8 *)(pparm);\
115 pcmd->cmdsz = sizeof (*pparm);\
127 #define c2h_evt_exist(c2h_evt) ((c2h_evt)->id || (c2h_evt)->plen)
129 extern u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj);
130 extern struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv);
131 extern void rtw_free_cmd_obj(struct cmd_obj *pcmd);
133 #ifdef CONFIG_EVENT_THREAD_MODE
134 extern u32 rtw_enqueue_evt(struct evt_priv *pevtpriv, struct evt_obj *obj);
135 extern struct evt_obj *rtw_dequeue_evt(_queue *queue);
136 extern void rtw_free_evt_obj(struct evt_obj *pcmd);
139 thread_return rtw_cmd_thread(thread_context context);
141 extern u32 rtw_init_cmd_priv (struct cmd_priv *pcmdpriv);
142 extern void rtw_free_cmd_priv (struct cmd_priv *pcmdpriv);
144 extern u32 rtw_init_evt_priv (struct evt_priv *pevtpriv);
145 extern void rtw_free_evt_priv (struct evt_priv *pevtpriv);
146 extern void rtw_cmd_clr_isr(struct cmd_priv *pcmdpriv);
147 extern void rtw_evt_notify_isr(struct evt_priv *pevtpriv);
149 u8 p2p_protocol_wk_cmd(_adapter*padapter, int intCmdType );
153 #include <ieee80211.h>
154 #endif /* CONFIG_RTL8711FW */
156 enum rtw_drvextra_cmd_id
162 POWER_SAVING_CTRL_WK_CID,//IPS,AUTOSuspend
167 CHECK_HIQ_WK_CID,//for softap mode, check hi queue if empty
169 RTP_TIMER_CFG_WK_CID,
178 LPS_CTRL_DISCONNECT=3,
179 LPS_CTRL_SPECIAL_PACKET=4,
190 Caller Mode: Infra, Ad-HoC(C)
192 Notes: To enter USB suspend mode
197 struct usb_suspend_parm {
198 u32 action;// 1: sleep, 0:resume
202 Caller Mode: Infra, Ad-HoC
204 Notes: To join a known BSS.
211 Caller Mode: Infra, Ad-Hoc
213 Notes: To join the specified bss
218 struct joinbss_parm {
219 WLAN_BSSID_EX network;
223 Caller Mode: Infra, Ad-HoC(C)
225 Notes: To disconnect the current associated BSS
230 struct disconnect_parm {
231 u32 deauth_timeout_ms;
235 Caller Mode: AP, Ad-HoC(M)
237 Notes: To create a BSS
241 struct createbss_parm {
242 WLAN_BSSID_EX network;
246 Caller Mode: AP, Ad-HoC, Infra
248 Notes: To set the NIC mode of RTL8711
252 The definition of mode:
254 #define IW_MODE_AUTO 0 // Let the driver decides which AP to join
255 #define IW_MODE_ADHOC 1 // Single cell network (Ad-Hoc Clients)
256 #define IW_MODE_INFRA 2 // Multi cell network, roaming, ..
257 #define IW_MODE_MASTER 3 // Synchronisation master or Access Point
258 #define IW_MODE_REPEAT 4 // Wireless Repeater (forwarder)
259 #define IW_MODE_SECOND 5 // Secondary master/repeater (backup)
260 #define IW_MODE_MONITOR 6 // Passive monitor (listen only)
263 struct setopmode_parm {
269 Caller Mode: AP, Ad-HoC, Infra
271 Notes: To ask RTL8711 performing site-survey
277 #define RTW_SSID_SCAN_AMOUNT 9 // for WEXT_CSCAN_AMOUNT 9
278 #define RTW_CHANNEL_SCAN_AMOUNT (14+37)
279 struct sitesurvey_parm {
280 int scan_mode; //active: 1, passive: 0
281 /* int bsslimit; // 1 ~ 48 */
284 NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT];
285 struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
291 Notes: To set the auth type of RTL8711. open/shared/802.1x
296 struct setauth_parm {
297 u8 mode; //0: legacy open, 1: legacy shared 2: 802.1x
298 u8 _1x; //0: PSK, 1: TLS
305 a. algorithm: wep40, wep104, tkip & aes
306 b. keytype: grp key/unicast key
309 when shared key ==> keyid is the camid
310 when 802.1x ==> keyid [0:1] ==> grp key
311 when 802.1x ==> keyid > 2 ==> unicast key
315 u8 algorithm; // encryption algorithm, could be none, wep40, TKIP, CCMP, wep104
317 u8 grpkey; // 1: this is the grpkey for 802.1x. 0: this is the unicast key for 802.1x
318 u8 set_tx; // 1: main tx key for wep. 0: other key.
319 u8 key[16]; // this could be 40 or 104
323 When in AP or Ad-Hoc mode, this is used to
324 allocate an sw/hw entry for a newly associated sta.
328 when shared key ==> algorithm/keyid
331 struct set_stakey_parm {
334 u8 id;// currently for erasing cam entry if algorithm == _NO_PRIVACY_
338 struct set_stakey_rsp {
347 Command -Rsp(AID == CAMID) mode
349 This is to force fw to add an sta_data entry per driver's request.
351 FW will write an cam entry associated with it.
354 struct set_assocsta_parm {
358 struct set_assocsta_rsp {
368 This is to force fw to del an sta_data entry per driver's request
370 FW will invalidate the cam entry associated with it.
373 struct del_assocsta_parm {
378 Caller Mode: AP/Ad-HoC(M)
380 Notes: To notify fw that given staid has changed its power state
385 struct setstapwrstate_parm {
394 Notes: To setup the basic rate of RTL8711
399 struct setbasicrate_parm {
400 u8 basicrates[NumRates];
406 Notes: To read the current basic rate
411 struct getbasicrate_parm {
415 struct getbasicrate_rsp {
416 u8 basicrates[NumRates];
422 Notes: To setup the data rate of RTL8711
427 struct setdatarate_parm {
428 #ifdef MP_FIRMWARE_OFFLOAD
432 u8 datarates[NumRates];
439 Notes: To read the current data rate
444 struct getdatarate_parm {
448 struct getdatarate_rsp {
449 u8 datarates[NumRates];
455 AP: AP can use the info for the contents of beacon frame
456 Infra: STA can use the info when sitesurveying
461 Notes: To set the phy capability of the NIC
467 struct setphyinfo_parm {
468 struct regulatory_class class_sets[NUM_REGULATORYS];
472 struct getphyinfo_parm {
476 struct getphyinfo_rsp {
477 struct regulatory_class class_sets[NUM_REGULATORYS];
484 Notes: To set the channel/modem/band
485 This command will be used when channel/modem/band is changed.
498 Notes: To get the current setting of channel/modem/band
520 struct readTSSI_parm {
524 struct readTSSI_rsp {
528 struct writeBB_parm {
541 struct writeRF_parm {
546 struct getrfintfs_parm {
550 struct Tx_Beacon_param
552 WLAN_BSSID_EX network;
557 struct seth2clbk_parm {
568 struct geth2clbk_parm {
572 struct geth2clbk_rsp {
583 #endif /* CONFIG_H2CLBK */
585 // CMD param Formart for driver extra cmd handler
586 struct drvextra_cmd_parm {
587 int ec_id; //extra cmd id
588 int type_size; // Can use this field as the type id or command size
592 /*------------------- Below are used for RF/BB tunning ---------------------*/
594 struct setantenna_parm {
601 struct enrateadaptive_parm {
605 struct settxagctbl_parm {
606 u32 txagc[MAX_RATES_LENGTH];
609 struct gettxagctbl_parm {
613 struct gettxagctbl_rsp {
614 u32 txagc[MAX_RATES_LENGTH];
617 struct setagcctrl_parm {
618 u32 agcctrl; // 0: pure hw, 1: fw
621 struct setssup_parm {
622 u32 ss_ForceUp[MAX_RATES_LENGTH];
625 struct getssup_parm {
630 u8 ss_ForceUp[MAX_RATES_LENGTH];
633 struct setssdlevel_parm {
634 u8 ss_DLevel[MAX_RATES_LENGTH];
637 struct getssdlevel_parm {
641 struct getssdlevel_rsp {
642 u8 ss_DLevel[MAX_RATES_LENGTH];
645 struct setssulevel_parm {
646 u8 ss_ULevel[MAX_RATES_LENGTH];
649 struct getssulevel_parm {
653 struct getssulevel_rsp {
654 u8 ss_ULevel[MAX_RATES_LENGTH];
657 struct setcountjudge_parm {
658 u8 count_judge[MAX_RATES_LENGTH];
661 struct getcountjudge_parm {
665 struct getcountjudge_rsp {
666 u8 count_judge[MAX_RATES_LENGTH];
669 struct setratable_parm {
670 u8 ss_ForceUp[NumRates];
671 u8 ss_ULevel[NumRates];
672 u8 ss_DLevel[NumRates];
673 u8 count_judge[NumRates];
676 struct getratable_parm {
680 struct getratable_rsp {
681 u8 ss_ForceUp[NumRates];
682 u8 ss_ULevel[NumRates];
683 u8 ss_DLevel[NumRates];
684 u8 count_judge[NumRates];
687 //to get TX,RX retry count
688 struct gettxretrycnt_parm{
691 struct gettxretrycnt_rsp{
692 unsigned long tx_retrycnt;
695 struct getrxretrycnt_parm{
698 struct getrxretrycnt_rsp{
699 unsigned long rx_retrycnt;
702 //to get BCNOK,BCNERR count
703 struct getbcnokcnt_parm{
706 struct getbcnokcnt_rsp{
707 unsigned long bcnokcnt;
710 struct getbcnerrcnt_parm{
713 struct getbcnerrcnt_rsp{
714 unsigned long bcnerrcnt;
717 // to get current TX power level
718 struct getcurtxpwrlevel_parm{
722 struct getcurtxpwrlevel_rsp{
723 unsigned short tx_power;
726 struct setprobereqextraie_parm {
728 unsigned char ie_len;
732 struct setassocreqextraie_parm {
734 unsigned char ie_len;
738 struct setproberspextraie_parm {
740 unsigned char ie_len;
744 struct setassocrspextraie_parm {
746 unsigned char ie_len;
750 struct addBaReq_parm {
755 /*H2C Handler index: 46 */
762 #ifdef MP_FIRMWARE_OFFLOAD
763 /*H2C Handler index: 47 */
764 struct SetTxPower_parm {
768 /*H2C Handler index: 48 */
769 struct SwitchAntenna_parm {
775 /*H2C Handler index: 49 */
776 struct SetCrystalCap_parm {
780 /*H2C Handler index: 50 */
781 struct SetSingleCarrierTx_parm {
785 /*H2C Handler index: 51 */
786 struct SetSingleToneTx_parm {
791 /*H2C Handler index: 52 */
792 struct SetCarrierSuppressionTx_parm {
797 /*H2C Handler index: 53 */
798 struct SetContinuousTx_parm {
800 u8 CCK_flag; /*1:CCK 2:OFDM*/
804 /*H2C Handler index: 54 */
805 struct SwitchBandwidth_parm {
809 #endif /* MP_FIRMWARE_OFFLOAD */
811 /*H2C Handler index: 59 */
812 struct SetChannelPlan_param {
816 /*H2C Handler index: 60 */
817 struct LedBlink_param {
821 /*H2C Handler index: 61 */
822 struct SetChannelSwitch_param {
826 /*H2C Handler index: 62 */
827 struct TDLSoption_param {
832 #define GEN_CMD_CODE(cmd) cmd ## _CMD_
839 0x01: sucess, and check Response.
840 0x02: cmd ignored due to duplicated sequcne number
841 0x03: cmd dropped due to invalid cmd code
846 #define H2C_RSP_OFFSET 512
848 #define H2C_SUCCESS 0x00
849 #define H2C_SUCCESS_RSP 0x01
850 #define H2C_DUPLICATED 0x02
851 #define H2C_DROPPED 0x03
852 #define H2C_PARAMETERS_ERROR 0x04
853 #define H2C_REJECTED 0x05
854 #define H2C_CMD_OVERFLOW 0x06
855 #define H2C_RESERVED 0x07
857 u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr);
858 u8 rtw_setstandby_cmd(_adapter *padapter, uint action);
859 u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num);
860 u8 rtw_createbss_cmd(_adapter *padapter);
861 u8 rtw_createbss_cmd_ex(_adapter *padapter, unsigned char *pbss, unsigned int sz);
862 u8 rtw_setphy_cmd(_adapter *padapter, u8 modem, u8 ch);
863 u8 rtw_setstakey_cmd(_adapter *padapter, u8 *psta, u8 unicast_key);
864 u8 rtw_clearstakey_cmd(_adapter *padapter, u8 *psta, u8 entry, u8 enqueue);
865 u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network* pnetwork);
866 u8 rtw_disassoc_cmd(_adapter *padapter, u32 deauth_timeout_ms, bool enqueue);
867 u8 rtw_setopmode_cmd(_adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
868 u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset);
869 u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset);
870 u8 rtw_setbbreg_cmd(_adapter * padapter, u8 offset, u8 val);
871 u8 rtw_setrfreg_cmd(_adapter * padapter, u8 offset, u32 val);
872 u8 rtw_getbbreg_cmd(_adapter * padapter, u8 offset, u8 * pval);
873 u8 rtw_getrfreg_cmd(_adapter * padapter, u8 offset, u8 * pval);
874 u8 rtw_setrfintfs_cmd(_adapter *padapter, u8 mode);
875 u8 rtw_setrttbl_cmd(_adapter *padapter, struct setratable_parm *prate_table);
876 u8 rtw_getrttbl_cmd(_adapter *padapter, struct getratable_rsp *pval);
878 u8 rtw_gettssi_cmd(_adapter *padapter, u8 offset,u8 *pval);
879 u8 rtw_setfwdig_cmd(_adapter*padapter, u8 type);
880 u8 rtw_setfwra_cmd(_adapter*padapter, u8 type);
882 u8 rtw_addbareq_cmd(_adapter*padapter, u8 tid, u8 *addr);
884 u8 rtw_dynamic_chk_wk_cmd(_adapter *adapter);
886 u8 rtw_lps_ctrl_wk_cmd(_adapter*padapter, u8 lps_ctrl_type, u8 enqueue);
887 #if (RATE_ADAPTIVE_SUPPORT==1)
888 u8 rtw_rpt_timer_cfg_cmd(_adapter*padapter, u16 minRptTime);
891 #ifdef CONFIG_ANTENNA_DIVERSITY
892 u8 rtw_antenna_select_cmd(_adapter*padapter, u8 antenna,u8 enqueue);
895 extern u8 rtw_ps_cmd(_adapter*padapter);
897 #ifdef CONFIG_AP_MODE
898 u8 rtw_chk_hi_queue_cmd(_adapter*padapter);
901 u8 rtw_set_ch_cmd(_adapter*padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueue);
902 u8 rtw_set_chplan_cmd(_adapter*padapter, u8 chplan, u8 enqueue);
903 u8 rtw_led_blink_cmd(_adapter*padapter, PLED_871x pLed);
904 u8 rtw_set_csa_cmd(_adapter*padapter, u8 new_ch_no);
905 u8 rtw_tdls_cmd(_adapter*padapter, u8 *addr, u8 option);
907 u8 rtw_c2h_wk_cmd(PADAPTER padapter, u8 *c2h_evt);
909 u8 rtw_drvextra_cmd_hdl(_adapter *padapter, unsigned char *pbuf);
911 void rtw_survey_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
912 void rtw_disassoc_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
913 void rtw_joinbss_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
914 void rtw_createbss_cmd_callback(_adapter *padapter, struct cmd_obj *pcmd);
915 void rtw_getbbrfreg_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
916 void rtw_readtssi_cmdrsp_callback(_adapter* padapter, struct cmd_obj *pcmd);
918 void rtw_setstaKey_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
919 void rtw_setassocsta_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
920 void rtw_getrttbl_cmdrsp_callback(_adapter *padapter, struct cmd_obj *pcmd);
922 struct _cmd_callback {
924 void (*callback)(_adapter *padapter, struct cmd_obj *cmd);
928 GEN_CMD_CODE(_Read_MACREG) , /*0*/
929 GEN_CMD_CODE(_Write_MACREG) ,
930 GEN_CMD_CODE(_Read_BBREG) ,
931 GEN_CMD_CODE(_Write_BBREG) ,
932 GEN_CMD_CODE(_Read_RFREG) ,
933 GEN_CMD_CODE(_Write_RFREG) , /*5*/
934 GEN_CMD_CODE(_Read_EEPROM) ,
935 GEN_CMD_CODE(_Write_EEPROM) ,
936 GEN_CMD_CODE(_Read_EFUSE) ,
937 GEN_CMD_CODE(_Write_EFUSE) ,
939 GEN_CMD_CODE(_Read_CAM) , /*10*/
940 GEN_CMD_CODE(_Write_CAM) ,
941 GEN_CMD_CODE(_setBCNITV),
942 GEN_CMD_CODE(_setMBIDCFG),
943 GEN_CMD_CODE(_JoinBss), /*14*/
944 GEN_CMD_CODE(_DisConnect) , /*15*/
945 GEN_CMD_CODE(_CreateBss) ,
946 GEN_CMD_CODE(_SetOpMode) ,
947 GEN_CMD_CODE(_SiteSurvey), /*18*/
948 GEN_CMD_CODE(_SetAuth) ,
950 GEN_CMD_CODE(_SetKey) , /*20*/
951 GEN_CMD_CODE(_SetStaKey) ,
952 GEN_CMD_CODE(_SetAssocSta) ,
953 GEN_CMD_CODE(_DelAssocSta) ,
954 GEN_CMD_CODE(_SetStaPwrState) ,
955 GEN_CMD_CODE(_SetBasicRate) , /*25*/
956 GEN_CMD_CODE(_GetBasicRate) ,
957 GEN_CMD_CODE(_SetDataRate) ,
958 GEN_CMD_CODE(_GetDataRate) ,
959 GEN_CMD_CODE(_SetPhyInfo) ,
961 GEN_CMD_CODE(_GetPhyInfo) , /*30*/
962 GEN_CMD_CODE(_SetPhy) ,
963 GEN_CMD_CODE(_GetPhy) ,
964 GEN_CMD_CODE(_readRssi) ,
965 GEN_CMD_CODE(_readGain) ,
966 GEN_CMD_CODE(_SetAtim) , /*35*/
967 GEN_CMD_CODE(_SetPwrMode) ,
968 GEN_CMD_CODE(_JoinbssRpt),
969 GEN_CMD_CODE(_SetRaTable) ,
970 GEN_CMD_CODE(_GetRaTable) ,
972 GEN_CMD_CODE(_GetCCXReport), /*40*/
973 GEN_CMD_CODE(_GetDTMReport),
974 GEN_CMD_CODE(_GetTXRateStatistics),
975 GEN_CMD_CODE(_SetUsbSuspend),
976 GEN_CMD_CODE(_SetH2cLbk),
977 GEN_CMD_CODE(_AddBAReq) , /*45*/
978 GEN_CMD_CODE(_SetChannel), /*46*/
979 GEN_CMD_CODE(_SetTxPower),
980 GEN_CMD_CODE(_SwitchAntenna),
981 GEN_CMD_CODE(_SetCrystalCap),
982 GEN_CMD_CODE(_SetSingleCarrierTx), /*50*/
984 GEN_CMD_CODE(_SetSingleToneTx),/*51*/
985 GEN_CMD_CODE(_SetCarrierSuppressionTx),
986 GEN_CMD_CODE(_SetContinuousTx),
987 GEN_CMD_CODE(_SwitchBandwidth), /*54*/
988 GEN_CMD_CODE(_TX_Beacon), /*55*/
990 GEN_CMD_CODE(_Set_MLME_EVT), /*56*/
991 GEN_CMD_CODE(_Set_Drv_Extra), /*57*/
992 GEN_CMD_CODE(_Set_H2C_MSG), /*58*/
994 GEN_CMD_CODE(_SetChannelPlan), /*59*/
995 GEN_CMD_CODE(_LedBlink), /*60*/
997 GEN_CMD_CODE(_SetChannelSwitch), /*61*/
998 GEN_CMD_CODE(_TDLS), /*62*/
1003 #define _GetBBReg_CMD_ _Read_BBREG_CMD_
1004 #define _SetBBReg_CMD_ _Write_BBREG_CMD_
1005 #define _GetRFReg_CMD_ _Read_RFREG_CMD_
1006 #define _SetRFReg_CMD_ _Write_RFREG_CMD_
1009 struct _cmd_callback rtw_cmd_callback[] = {
1010 {GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
1011 {GEN_CMD_CODE(_Write_MACREG), NULL},
1012 {GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback},
1013 {GEN_CMD_CODE(_Write_BBREG), NULL},
1014 {GEN_CMD_CODE(_Read_RFREG), &rtw_getbbrfreg_cmdrsp_callback},
1015 {GEN_CMD_CODE(_Write_RFREG), NULL}, /*5*/
1016 {GEN_CMD_CODE(_Read_EEPROM), NULL},
1017 {GEN_CMD_CODE(_Write_EEPROM), NULL},
1018 {GEN_CMD_CODE(_Read_EFUSE), NULL},
1019 {GEN_CMD_CODE(_Write_EFUSE), NULL},
1021 {GEN_CMD_CODE(_Read_CAM), NULL}, /*10*/
1022 {GEN_CMD_CODE(_Write_CAM), NULL},
1023 {GEN_CMD_CODE(_setBCNITV), NULL},
1024 {GEN_CMD_CODE(_setMBIDCFG), NULL},
1025 {GEN_CMD_CODE(_JoinBss), &rtw_joinbss_cmd_callback}, /*14*/
1026 {GEN_CMD_CODE(_DisConnect), &rtw_disassoc_cmd_callback}, /*15*/
1027 {GEN_CMD_CODE(_CreateBss), &rtw_createbss_cmd_callback},
1028 {GEN_CMD_CODE(_SetOpMode), NULL},
1029 {GEN_CMD_CODE(_SiteSurvey), &rtw_survey_cmd_callback}, /*18*/
1030 {GEN_CMD_CODE(_SetAuth), NULL},
1032 {GEN_CMD_CODE(_SetKey), NULL}, /*20*/
1033 {GEN_CMD_CODE(_SetStaKey), &rtw_setstaKey_cmdrsp_callback},
1034 {GEN_CMD_CODE(_SetAssocSta), &rtw_setassocsta_cmdrsp_callback},
1035 {GEN_CMD_CODE(_DelAssocSta), NULL},
1036 {GEN_CMD_CODE(_SetStaPwrState), NULL},
1037 {GEN_CMD_CODE(_SetBasicRate), NULL}, /*25*/
1038 {GEN_CMD_CODE(_GetBasicRate), NULL},
1039 {GEN_CMD_CODE(_SetDataRate), NULL},
1040 {GEN_CMD_CODE(_GetDataRate), NULL},
1041 {GEN_CMD_CODE(_SetPhyInfo), NULL},
1043 {GEN_CMD_CODE(_GetPhyInfo), NULL}, /*30*/
1044 {GEN_CMD_CODE(_SetPhy), NULL},
1045 {GEN_CMD_CODE(_GetPhy), NULL},
1046 {GEN_CMD_CODE(_readRssi), NULL},
1047 {GEN_CMD_CODE(_readGain), NULL},
1048 {GEN_CMD_CODE(_SetAtim), NULL}, /*35*/
1049 {GEN_CMD_CODE(_SetPwrMode), NULL},
1050 {GEN_CMD_CODE(_JoinbssRpt), NULL},
1051 {GEN_CMD_CODE(_SetRaTable), NULL},
1052 {GEN_CMD_CODE(_GetRaTable) , NULL},
1054 {GEN_CMD_CODE(_GetCCXReport), NULL}, /*40*/
1055 {GEN_CMD_CODE(_GetDTMReport), NULL},
1056 {GEN_CMD_CODE(_GetTXRateStatistics), NULL},
1057 {GEN_CMD_CODE(_SetUsbSuspend), NULL},
1058 {GEN_CMD_CODE(_SetH2cLbk), NULL},
1059 {GEN_CMD_CODE(_AddBAReq), NULL}, /*45*/
1060 {GEN_CMD_CODE(_SetChannel), NULL}, /*46*/
1061 {GEN_CMD_CODE(_SetTxPower), NULL},
1062 {GEN_CMD_CODE(_SwitchAntenna), NULL},
1063 {GEN_CMD_CODE(_SetCrystalCap), NULL},
1064 {GEN_CMD_CODE(_SetSingleCarrierTx), NULL}, /*50*/
1066 {GEN_CMD_CODE(_SetSingleToneTx), NULL}, /*51*/
1067 {GEN_CMD_CODE(_SetCarrierSuppressionTx), NULL},
1068 {GEN_CMD_CODE(_SetContinuousTx), NULL},
1069 {GEN_CMD_CODE(_SwitchBandwidth), NULL}, /*54*/
1070 {GEN_CMD_CODE(_TX_Beacon), NULL},/*55*/
1072 {GEN_CMD_CODE(_Set_MLME_EVT), NULL},/*56*/
1073 {GEN_CMD_CODE(_Set_Drv_Extra), NULL},/*57*/
1074 {GEN_CMD_CODE(_Set_H2C_MSG), NULL},/*58*/
1075 {GEN_CMD_CODE(_SetChannelPlan), NULL},/*59*/
1076 {GEN_CMD_CODE(_LedBlink), NULL},/*60*/
1078 {GEN_CMD_CODE(_SetChannelSwitch), NULL},/*61*/
1079 {GEN_CMD_CODE(_TDLS), NULL},/*62*/
1082 extern struct _cmd_callback rtw_cmd_callback[];