Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /******************************************************************************
0003  *
0004  * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
0005  *
0006  * Modifications for inclusion into the Linux staging tree are
0007  * Copyright(c) 2010 Larry Finger. All rights reserved.
0008  *
0009  * Contact information:
0010  * WLAN FAE <wlanfae@realtek.com>
0011  * Larry Finger <Larry.Finger@lwfinger.net>
0012  *
0013  ******************************************************************************/
0014 #ifndef __RTL871X_CMD_H_
0015 #define __RTL871X_CMD_H_
0016 
0017 #include "wlan_bssdef.h"
0018 #include "rtl871x_rf.h"
0019 #define C2H_MEM_SZ (16*1024)
0020 
0021 #include "osdep_service.h"
0022 #include "ieee80211.h"
0023 
0024 #define FREE_CMDOBJ_SZ  128
0025 #define MAX_CMDSZ   512
0026 #define MAX_RSPSZ   512
0027 #define MAX_EVTSZ   1024
0028 #define CMDBUFF_ALIGN_SZ 512
0029 
0030 struct cmd_obj {
0031     u16 cmdcode;
0032     u8  res;
0033     u8  *parmbuf;
0034     u32 cmdsz;
0035     u8  *rsp;
0036     u32 rspsz;
0037     struct list_head list;
0038 };
0039 
0040 struct cmd_priv {
0041     struct completion cmd_queue_comp;
0042     struct completion terminate_cmdthread_comp;
0043     struct  __queue cmd_queue;
0044     u8 cmd_seq;
0045     u8 *cmd_buf;    /*shall be non-paged, and 4 bytes aligned*/
0046     u8 *cmd_allocated_buf;
0047     u8 *rsp_buf;    /*shall be non-paged, and 4 bytes aligned*/
0048     u8 *rsp_allocated_buf;
0049     u32 cmd_issued_cnt;
0050     u32 cmd_done_cnt;
0051     u32 rsp_cnt;
0052     struct _adapter *padapter;
0053 };
0054 
0055 struct evt_obj {
0056     u16 evtcode;
0057     u8 res;
0058     u8 *parmbuf;
0059     u32 evtsz;
0060     struct list_head list;
0061 };
0062 
0063 struct  evt_priv {
0064     struct  __queue evt_queue;
0065     u8  event_seq;
0066     u8  *evt_buf;   /*shall be non-paged, and 4 bytes aligned*/
0067     u8  *evt_allocated_buf;
0068     u32 evt_done_cnt;
0069 };
0070 
0071 #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
0072 do {\
0073     INIT_LIST_HEAD(&pcmd->list);\
0074     pcmd->cmdcode = code;\
0075     pcmd->parmbuf = (u8 *)(pparm);\
0076     pcmd->cmdsz = sizeof(*pparm);\
0077     pcmd->rsp = NULL;\
0078     pcmd->rspsz = 0;\
0079 } while (0)
0080 
0081 void r8712_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj);
0082 void r8712_enqueue_cmd_ex(struct cmd_priv *pcmdpriv, struct cmd_obj *obj);
0083 struct cmd_obj *r8712_dequeue_cmd(struct  __queue *queue);
0084 void r8712_free_cmd_obj(struct cmd_obj *pcmd);
0085 int r8712_cmd_thread(void *context);
0086 int r8712_init_cmd_priv(struct cmd_priv *pcmdpriv);
0087 void r8712_free_cmd_priv(struct cmd_priv *pcmdpriv);
0088 int r8712_init_evt_priv(struct evt_priv *pevtpriv);
0089 void r8712_free_evt_priv(struct evt_priv *pevtpriv);
0090 
0091 enum rtl871x_drvint_cid {
0092     NONE_WK_CID,
0093     WDG_WK_CID,
0094     MAX_WK_CID
0095 };
0096 
0097 enum RFINTFS {
0098     SWSI,
0099     HWSI,
0100     HWPI,
0101 };
0102 
0103 /*
0104  * Caller Mode: Infra, Ad-HoC(C)
0105  * Notes: To enter USB suspend mode
0106  * Command Mode
0107  */
0108 struct usb_suspend_parm {
0109     u32 action; /* 1: sleep, 0:resume */
0110 };
0111 
0112 /*
0113  * Caller Mode: Infra, Ad-HoC(C)
0114  * Notes: To disconnect the current associated BSS
0115  * Command Mode
0116  */
0117 struct disconnect_parm {
0118     u32 rsvd;
0119 };
0120 
0121 /*
0122  * Caller Mode: AP, Ad-HoC, Infra
0123  * Notes: To set the NIC mode of RTL8711
0124  * Command Mode
0125  * The definition of mode:
0126  *
0127  * #define IW_MODE_AUTO 0   // Let the driver decides which AP to join
0128  * #define IW_MODE_ADHOC    1   // Single cell network (Ad-Hoc Clients)
0129  * #define IW_MODE_INFRA    2   // Multi cell network, roaming, ..
0130  * #define IW_MODE_MASTER   3   // Synchronisation master or AP
0131  * #define IW_MODE_REPEAT   4   // Wireless Repeater (forwarder)
0132  * #define IW_MODE_SECOND   5   // Secondary master/repeater (backup)
0133  * #define IW_MODE_MONITOR  6   // Passive monitor (listen only)
0134  */
0135 struct  setopmode_parm {
0136     u8  mode;
0137     u8  rsvd[3];
0138 };
0139 
0140 /*
0141  * Caller Mode: AP, Ad-HoC, Infra
0142  * Notes: To ask RTL8711 performing site-survey
0143  * Command-Event Mode
0144  */
0145 struct sitesurvey_parm {
0146     __le32  passive_mode;   /*active: 1, passive: 0 */
0147     __le32  bsslimit;   /* 1 ~ 48 */
0148     __le32  ss_ssidlen;
0149     u8  ss_ssid[IW_ESSID_MAX_SIZE + 1];
0150 };
0151 
0152 /*
0153  * Caller Mode: Any
0154  * Notes: To set the auth type of RTL8711. open/shared/802.1x
0155  * Command Mode
0156  */
0157 struct setauth_parm {
0158     u8 mode;  /*0: legacy open, 1: legacy shared 2: 802.1x*/
0159     u8 _1x;   /*0: PSK, 1: TLS*/
0160     u8 rsvd[2];
0161 };
0162 
0163 /*
0164  * Caller Mode: Infra
0165  * a. algorithm: wep40, wep104, tkip & aes
0166  * b. keytype: grp key/unicast key
0167  * c. key contents
0168  *
0169  * when shared key ==> keyid is the camid
0170  * when 802.1x ==> keyid [0:1] ==> grp key
0171  * when 802.1x ==> keyid > 2 ==> unicast key
0172  */
0173 struct setkey_parm {
0174     u8  algorithm;  /* encryption algorithm, could be none, wep40,
0175                  * TKIP, CCMP, wep104
0176                  */
0177     u8  keyid;
0178     u8  grpkey;     /* 1: this is the grpkey for 802.1x.
0179                  * 0: this is the unicast key for 802.1x
0180                  */
0181     u8  key[16];    /* this could be 40 or 104 */
0182 };
0183 
0184 /*
0185  * When in AP or Ad-Hoc mode, this is used to
0186  * allocate an sw/hw entry for a newly associated sta.
0187  * Command
0188  * when shared key ==> algorithm/keyid
0189  */
0190 struct set_stakey_parm {
0191     u8  addr[ETH_ALEN];
0192     u8  algorithm;
0193     u8  key[16];
0194 };
0195 
0196 struct set_stakey_rsp {
0197     u8  addr[ETH_ALEN];
0198     u8  keyid;
0199     u8  rsvd;
0200 };
0201 
0202 struct SetMacAddr_param {
0203     u8  MacAddr[ETH_ALEN];
0204 };
0205 
0206 /*
0207  *  Caller Ad-Hoc/AP
0208  *
0209  *  Command -Rsp(AID == CAMID) mode
0210  *
0211  *  This is to force fw to add an sta_data entry per driver's request.
0212  *
0213  *  FW will write an cam entry associated with it.
0214  *
0215  */
0216 struct set_assocsta_parm {
0217     u8  addr[ETH_ALEN];
0218 };
0219 
0220 struct set_assocsta_rsp {
0221     u8  cam_id;
0222     u8  rsvd[3];
0223 };
0224 
0225 /*
0226  *  Caller Ad-Hoc/AP
0227  *
0228  *  Command mode
0229  *
0230  *  This is to force fw to del an sta_data entry per driver's request
0231  *
0232  *  FW will invalidate the cam entry associated with it.
0233  *
0234  */
0235 struct del_assocsta_parm {
0236     u8  addr[ETH_ALEN];
0237 };
0238 
0239 /*
0240  *  Caller Mode: AP/Ad-HoC(M)
0241  *
0242  *  Notes: To notify fw that given staid has changed its power state
0243  *
0244  *  Command Mode
0245  *
0246  */
0247 struct setstapwrstate_parm {
0248     u8  staid;
0249     u8  status;
0250     u8  hwaddr[6];
0251 };
0252 
0253 /*
0254  *  Caller Mode: Any
0255  *
0256  *  Notes: To setup the basic rate of RTL8711
0257  *
0258  *  Command Mode
0259  *
0260  */
0261 struct  setbasicrate_parm {
0262     u8  basicrates[NumRates];
0263 };
0264 
0265 /*
0266  *  Caller Mode: Any
0267  *
0268  *  Notes: To read the current basic rate
0269  *
0270  *  Command-Rsp Mode
0271  *
0272  */
0273 struct getbasicrate_parm {
0274     u32 rsvd;
0275 };
0276 
0277 struct getbasicrate_rsp {
0278     u8 basicrates[NumRates];
0279 };
0280 
0281 /*
0282  *  Caller Mode: Any
0283  *
0284  *  Notes: To setup the data rate of RTL8711
0285  *
0286  *  Command Mode
0287  *
0288  */
0289 struct setdatarate_parm {
0290     u8  mac_id;
0291     u8  datarates[NumRates];
0292 };
0293 
0294 enum _RT_CHANNEL_DOMAIN {
0295     RT_CHANNEL_DOMAIN_FCC = 0,
0296     RT_CHANNEL_DOMAIN_IC = 1,
0297     RT_CHANNEL_DOMAIN_ETSI = 2,
0298     RT_CHANNEL_DOMAIN_SPAIN = 3,
0299     RT_CHANNEL_DOMAIN_FRANCE = 4,
0300     RT_CHANNEL_DOMAIN_MKK = 5,
0301     RT_CHANNEL_DOMAIN_MKK1 = 6,
0302     RT_CHANNEL_DOMAIN_ISRAEL = 7,
0303     RT_CHANNEL_DOMAIN_TELEC = 8,
0304 
0305     /* Be compatible with old channel plan. No good! */
0306     RT_CHANNEL_DOMAIN_MIC = 9,
0307     RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN = 10,
0308     RT_CHANNEL_DOMAIN_WORLD_WIDE_13 = 11,
0309     RT_CHANNEL_DOMAIN_TELEC_NETGEAR = 12,
0310 
0311     RT_CHANNEL_DOMAIN_NCC = 13,
0312     RT_CHANNEL_DOMAIN_5G = 14,
0313     RT_CHANNEL_DOMAIN_5G_40M = 15,
0314  /*===== Add new channel plan above this line===============*/
0315     RT_CHANNEL_DOMAIN_MAX,
0316 };
0317 
0318 struct SetChannelPlan_param {
0319     enum _RT_CHANNEL_DOMAIN ChannelPlan;
0320 };
0321 
0322 /*
0323  *  Caller Mode: Any
0324  *
0325  *  Notes: To read the current data rate
0326  *
0327  *  Command-Rsp Mode
0328  *
0329  */
0330 struct getdatarate_parm {
0331     u32 rsvd;
0332 
0333 };
0334 
0335 struct getdatarate_rsp {
0336     u8 datarates[NumRates];
0337 };
0338 
0339 /*
0340  *  Caller Mode: Any
0341  *  AP: AP can use the info for the contents of beacon frame
0342  *  Infra: STA can use the info when sitesurveying
0343  *  Ad-HoC(M): Like AP
0344  *  Ad-HoC(C): Like STA
0345  *
0346  *
0347  *  Notes: To set the phy capability of the NIC
0348  *
0349  *  Command Mode
0350  *
0351  */
0352 
0353 /*
0354  *  Caller Mode: Any
0355  *
0356  *  Notes: To set the channel/modem/band
0357  *  This command will be used when channel/modem/band is changed.
0358  *
0359  *  Command Mode
0360  *
0361  */
0362 /*
0363  *  Caller Mode: Any
0364  *
0365  *  Notes: To get the current setting of channel/modem/band
0366  *
0367  *  Command-Rsp Mode
0368  *
0369  */
0370 struct  getphy_rsp {
0371     u8  rfchannel;
0372     u8  modem;
0373 };
0374 
0375 struct readBB_parm {
0376     u8  offset;
0377 };
0378 
0379 struct readBB_rsp {
0380     u8  value;
0381 };
0382 
0383 struct readTSSI_parm {
0384     u8  offset;
0385 };
0386 
0387 struct readTSSI_rsp {
0388     u8  value;
0389 };
0390 
0391 struct writeBB_parm {
0392     u8  offset;
0393     u8  value;
0394 };
0395 
0396 struct writePTM_parm {
0397     u8  type;
0398 };
0399 
0400 struct readRF_parm {
0401     u8  offset;
0402 };
0403 
0404 struct readRF_rsp {
0405     u32 value;
0406 };
0407 
0408 struct writeRF_parm {
0409     u32 offset;
0410     u32 value;
0411 };
0412 
0413 struct setrfintfs_parm {
0414     u8  rfintfs;
0415 };
0416 
0417 struct getrfintfs_parm {
0418     u8  rfintfs;
0419 };
0420 
0421 /*
0422  *  Notes: This command is used for H2C/C2H loopback testing
0423  *
0424  *  mac[0] == 0
0425  *  ==> CMD mode, return H2C_SUCCESS.
0426  *  The following condition must be true under CMD mode
0427  *      mac[1] == mac[4], mac[2] == mac[3], mac[0]=mac[5]= 0;
0428  *      s0 == 0x1234, s1 == 0xabcd, w0 == 0x78563412, w1 == 0x5aa5def7;
0429  *      s2 == (b1 << 8 | b0);
0430  *
0431  *  mac[0] == 1
0432  *  ==> CMD_RSP mode, return H2C_SUCCESS_RSP
0433  *
0434  *  The rsp layout shall be:
0435  *  rsp:            parm:
0436  *      mac[0]  =   mac[5];
0437  *      mac[1]  =   mac[4];
0438  *      mac[2]  =   mac[3];
0439  *      mac[3]  =   mac[2];
0440  *      mac[4]  =   mac[1];
0441  *      mac[5]  =   mac[0];
0442  *      s0      =   s1;
0443  *      s1      =   swap16(s0);
0444  *      w0      =   swap32(w1);
0445  *      b0      =   b1
0446  *      s2      =   s0 + s1
0447  *      b1      =   b0
0448  *      w1      =   w0
0449  *
0450  *  mac[0] ==   2
0451  *  ==> CMD_EVENT mode, return  H2C_SUCCESS
0452  *  The event layout shall be:
0453  *  event:       parm:
0454  *  mac[0]  =   mac[5];
0455  *  mac[1]  =   mac[4];
0456  *  mac[2]  =   event's sequence number, starting from 1 to parm's marc[3]
0457  *  mac[3]  =   mac[2];
0458  *  mac[4]  =   mac[1];
0459  *  mac[5]  =   mac[0];
0460  *  s0      =   swap16(s0) - event.mac[2];
0461  *  s1      =   s1 + event.mac[2];
0462  *  w0      =   swap32(w0);
0463  *  b0      =   b1
0464  *  s2      =   s0 + event.mac[2]
0465  *  b1      =   b0
0466  *  w1      =   swap32(w1) - event.mac[2];
0467  *
0468  *  parm->mac[3] is the total event counts that host requested.
0469  *
0470  *
0471  *  event will be the same with the cmd's param.
0472  *
0473  */
0474 
0475 /* CMD param Formart for DRV INTERNAL CMD HDL*/
0476 struct drvint_cmd_parm {
0477     int i_cid; /*internal cmd id*/
0478     int sz; /* buf sz*/
0479     unsigned char *pbuf;
0480 };
0481 
0482 /*------------------- Below are used for RF/BB tuning ---------------------*/
0483 
0484 struct  setantenna_parm {
0485     u8  tx_antset;
0486     u8  rx_antset;
0487     u8  tx_antenna;
0488     u8  rx_antenna;
0489 };
0490 
0491 struct  enrateadaptive_parm {
0492     u32 en;
0493 };
0494 
0495 struct settxagctbl_parm {
0496     u32 txagc[MAX_RATES_LENGTH];
0497 };
0498 
0499 struct gettxagctbl_parm {
0500     u32 rsvd;
0501 };
0502 
0503 struct gettxagctbl_rsp {
0504     u32 txagc[MAX_RATES_LENGTH];
0505 };
0506 
0507 struct setagcctrl_parm {
0508     u32 agcctrl;    /* 0: pure hw, 1: fw */
0509 };
0510 
0511 struct setssup_parm {
0512     u32 ss_ForceUp[MAX_RATES_LENGTH];
0513 };
0514 
0515 struct getssup_parm {
0516     u32 rsvd;
0517 };
0518 
0519 struct getssup_rsp  {
0520     u8  ss_ForceUp[MAX_RATES_LENGTH];
0521 };
0522 
0523 struct setssdlevel_parm {
0524     u8  ss_DLevel[MAX_RATES_LENGTH];
0525 };
0526 
0527 struct getssdlevel_parm {
0528     u32 rsvd;
0529 };
0530 
0531 struct getssdlevel_rsp  {
0532     u8  ss_DLevel[MAX_RATES_LENGTH];
0533 };
0534 
0535 struct setssulevel_parm {
0536     u8  ss_ULevel[MAX_RATES_LENGTH];
0537 };
0538 
0539 struct getssulevel_parm {
0540     u32 rsvd;
0541 };
0542 
0543 struct getssulevel_rsp  {
0544     u8  ss_ULevel[MAX_RATES_LENGTH];
0545 };
0546 
0547 struct  setcountjudge_parm {
0548     u8  count_judge[MAX_RATES_LENGTH];
0549 };
0550 
0551 struct  getcountjudge_parm {
0552     u32 rsvd;
0553 };
0554 
0555 struct  getcountjudge_rsp {
0556     u8  count_judge[MAX_RATES_LENGTH];
0557 };
0558 
0559 struct setpwrmode_parm  {
0560     u8  mode;
0561     u8  flag_low_traffic_en;
0562     u8  flag_lpnav_en;
0563     u8  flag_rf_low_snr_en;
0564     u8  flag_dps_en; /* 1: dps, 0: 32k */
0565     u8  bcn_rx_en;
0566     u8  bcn_pass_cnt;     /* fw report one beacon information to
0567                    * driver  when it receives bcn_pass_cnt
0568                    * beacons.
0569                    */
0570     u8  bcn_to;       /* beacon TO (ms). ¡§=0¡¨ no limit.*/
0571     u16 bcn_itv;
0572     u8  app_itv; /* only for VOIP mode. */
0573     u8  awake_bcn_itv;
0574     u8  smart_ps;
0575     u8  bcn_pass_time;  /* unit: 100ms */
0576 };
0577 
0578 struct setatim_parm {
0579     u8 op;   /*0: add, 1:del*/
0580     u8 txid; /* id of dest station.*/
0581 };
0582 
0583 struct setratable_parm {
0584     u8 ss_ForceUp[NumRates];
0585     u8 ss_ULevel[NumRates];
0586     u8 ss_DLevel[NumRates];
0587     u8 count_judge[NumRates];
0588 };
0589 
0590 struct getratable_parm {
0591     uint rsvd;
0592 };
0593 
0594 struct getratable_rsp {
0595     u8 ss_ForceUp[NumRates];
0596     u8 ss_ULevel[NumRates];
0597     u8 ss_DLevel[NumRates];
0598     u8 count_judge[NumRates];
0599 };
0600 
0601 /*to get TX,RX retry count*/
0602 struct gettxretrycnt_parm {
0603     unsigned int rsvd;
0604 };
0605 
0606 struct gettxretrycnt_rsp {
0607     unsigned long tx_retrycnt;
0608 };
0609 
0610 struct getrxretrycnt_parm {
0611     unsigned int rsvd;
0612 };
0613 
0614 struct getrxretrycnt_rsp {
0615     unsigned long rx_retrycnt;
0616 };
0617 
0618 /*to get BCNOK,BCNERR count*/
0619 struct getbcnokcnt_parm {
0620     unsigned int rsvd;
0621 };
0622 
0623 struct getbcnokcnt_rsp {
0624     unsigned long bcnokcnt;
0625 };
0626 
0627 struct getbcnerrcnt_parm {
0628     unsigned int rsvd;
0629 };
0630 
0631 struct getbcnerrcnt_rsp {
0632     unsigned long bcnerrcnt;
0633 };
0634 
0635 /* to get current TX power level*/
0636 struct getcurtxpwrlevel_parm {
0637     unsigned int rsvd;
0638 };
0639 
0640 struct getcurtxpwrlevel_rsp {
0641     unsigned short tx_power;
0642 };
0643 
0644 /*dynamic on/off DIG*/
0645 struct setdig_parm {
0646     unsigned char dig_on;   /* 1:on , 0:off */
0647 };
0648 
0649 /*dynamic on/off RA*/
0650 struct setra_parm {
0651     unsigned char ra_on;    /* 1:on , 0:off */
0652 };
0653 
0654 struct setprobereqextraie_parm {
0655     unsigned char e_id;
0656     unsigned char ie_len;
0657     unsigned char ie[];
0658 };
0659 
0660 struct setassocreqextraie_parm {
0661     unsigned char e_id;
0662     unsigned char ie_len;
0663     unsigned char ie[];
0664 };
0665 
0666 struct setproberspextraie_parm {
0667     unsigned char e_id;
0668     unsigned char ie_len;
0669     unsigned char ie[];
0670 };
0671 
0672 struct setassocrspextraie_parm {
0673     unsigned char e_id;
0674     unsigned char ie_len;
0675     unsigned char ie[];
0676 };
0677 
0678 struct addBaReq_parm {
0679     unsigned int tid;
0680 };
0681 
0682 /*H2C Handler index: 46 */
0683 struct SetChannel_parm {
0684     u32 curr_ch;
0685 };
0686 
0687 /*H2C Handler index: 61 */
0688 struct DisconnectCtrlEx_param {
0689     /* MAXTIME = (2 * FirstStageTO) + (TryPktCnt * TryPktInterval) */
0690     unsigned char EnableDrvCtrl;
0691     unsigned char TryPktCnt;
0692     unsigned char TryPktInterval; /* Unit: ms */
0693     unsigned char rsvd;
0694     unsigned int  FirstStageTO; /* Unit: ms */
0695 };
0696 
0697 #define GEN_CMD_CODE(cmd)   cmd ## _CMD_
0698 
0699 /*
0700  * Result:
0701  * 0x00: success
0702  * 0x01: success, and check Response.
0703  * 0x02: cmd ignored due to duplicated sequence number
0704  * 0x03: cmd dropped due to invalid cmd code
0705  * 0x04: reserved.
0706  */
0707 
0708 #define H2C_RSP_OFFSET          512
0709 #define H2C_SUCCESS         0x00
0710 #define H2C_SUCCESS_RSP         0x01
0711 #define H2C_DUPLICATED          0x02
0712 #define H2C_DROPPED         0x03
0713 #define H2C_PARAMETERS_ERROR        0x04
0714 #define H2C_REJECTED            0x05
0715 #define H2C_CMD_OVERFLOW        0x06
0716 #define H2C_RESERVED            0x07
0717 
0718 void r8712_setMacAddr_cmd(struct _adapter *padapter, const u8 *mac_addr);
0719 u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
0720             struct ndis_802_11_ssid *pssid);
0721 int r8712_createbss_cmd(struct _adapter *padapter);
0722 void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key);
0723 int r8712_joinbss_cmd(struct _adapter *padapter,
0724               struct wlan_network *pnetwork);
0725 void r8712_disassoc_cmd(struct _adapter *padapter);
0726 void r8712_setopmode_cmd(struct _adapter *padapter,
0727          enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
0728 int r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset);
0729 void r8712_set_chplan_cmd(struct _adapter  *padapter, int chplan);
0730 int r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval);
0731 int r8712_setrfreg_cmd(struct _adapter  *padapter, u8 offset, u32 val);
0732 void r8712_addbareq_cmd(struct _adapter *padapter, u8 tid);
0733 void r8712_wdg_wk_cmd(struct _adapter *padapter);
0734 void r8712_survey_cmd_callback(struct _adapter  *padapter,
0735                    struct cmd_obj *pcmd);
0736 void r8712_disassoc_cmd_callback(struct _adapter  *padapter,
0737                  struct cmd_obj *pcmd);
0738 void r8712_joinbss_cmd_callback(struct _adapter  *padapter,
0739                 struct cmd_obj *pcmd);
0740 void r8712_createbss_cmd_callback(struct _adapter *padapter,
0741                   struct cmd_obj *pcmd);
0742 void r8712_getbbrfreg_cmdrsp_callback(struct _adapter *padapter,
0743                       struct cmd_obj *pcmd);
0744 void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter,
0745                 struct cmd_obj *pcmd);
0746 void r8712_setstaKey_cmdrsp_callback(struct _adapter  *padapter,
0747                      struct cmd_obj *pcmd);
0748 void r8712_setassocsta_cmdrsp_callback(struct _adapter  *padapter,
0749                        struct cmd_obj *pcmd);
0750 void r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl,
0751             u32 tryPktCnt, u32 tryPktInterval, u32 firstStageTO);
0752 
0753 struct _cmd_callback {
0754     u32 cmd_code;
0755     void (*callback)(struct _adapter  *padapter, struct cmd_obj *cmd);
0756 };
0757 
0758 #include "rtl8712_cmd.h"
0759 
0760 #endif /* _CMD_H_ */
0761