diff options
author | Ali Bahar <ali@internetdog.org> | 2011-09-03 19:14:20 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-07 00:00:35 (GMT) |
commit | c6dc001f2add6d6609f94246bbec30d81494f5f7 (patch) | |
tree | 87f542e223e3580bce8794a1e7d1a08560984a8c /drivers/staging/rtl8712/rtl871x_cmd.c | |
parent | f15abb8b2051fb99bebcdb45a21e97b20b665872 (diff) | |
download | linux-fsl-qoriq-c6dc001f2add6d6609f94246bbec30d81494f5f7.tar.xz |
staging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes.
passive_mode added to private ioctls.
New private ioctls added for RSSI, link speed, mac address, scan type,
and DCE-D.
In r8711_wx_get_scan(), we now sleep only 100 times, instead of 1000.
In r8711_wx_set_essid(), added a check for Ad-Hoc state.
In r8711_wx_get_rate(), added a check for RTL8712_RF_2T2R RF type.
Added Set chplan.
In r871x_get_wireless_stats(), updated the mechanism for displaying
link quality.
Added SetDIG and SetRA commands.
r8712_joinbss_cmd() no longer checks for Ad-Hoc mode.
Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_cmd.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_cmd.c | 111 |
1 files changed, 99 insertions, 12 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index c416ee3..2d8f48c 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.c +++ b/drivers/staging/rtl8712/rtl871x_cmd.c @@ -277,6 +277,28 @@ u8 r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset) return _SUCCESS; } +u8 r8712_set_chplan_cmd(struct _adapter *padapter, int chplan) +{ + struct cmd_obj *ph2c; + struct SetChannelPlan_param *psetchplanpara; + struct cmd_priv *pcmdpriv = &padapter->cmdpriv; + + ph2c = (struct cmd_obj *)_malloc(sizeof(struct cmd_obj)); + if (ph2c == NULL) + return _FAIL; + psetchplanpara = (struct SetChannelPlan_param *) + _malloc(sizeof(struct SetChannelPlan_param)); + if (psetchplanpara == NULL) { + kfree((u8 *) ph2c); + return _FAIL; + } + init_h2fwcmd_w_parm_no_rsp(ph2c, psetchplanpara, + GEN_CMD_CODE(_SetChannelPlan)); + psetchplanpara->ChannelPlan = chplan; + r8712_enqueue_cmd(pcmdpriv, ph2c); + return _SUCCESS; +} + u8 r8712_setbasicrate_cmd(struct _adapter *padapter, u8 *rateset) { struct cmd_obj *ph2c; @@ -303,20 +325,62 @@ u8 r8712_setbasicrate_cmd(struct _adapter *padapter, u8 *rateset) u8 r8712_setptm_cmd(struct _adapter *padapter, u8 type) { struct cmd_obj *ph2c; - struct PT_param *pptparm; + struct writePTM_parm *pwriteptmparm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; ph2c = (struct cmd_obj *)_malloc(sizeof(struct cmd_obj)); if (ph2c == NULL) return _FAIL; - pptparm = (struct PT_param *)_malloc(sizeof(struct PT_param)); - if (pptparm == NULL) { + pwriteptmparm = (struct writePTM_parm *) + _malloc(sizeof(struct writePTM_parm)); + if (pwriteptmparm == NULL) { kfree((u8 *) ph2c); return _FAIL; } - init_h2fwcmd_w_parm_no_rsp(ph2c, pptparm, - GEN_CMD_CODE(_SetPowerTracking)); - pptparm->PT_En = type; + init_h2fwcmd_w_parm_no_rsp(ph2c, pwriteptmparm, GEN_CMD_CODE(_SetPT)); + pwriteptmparm->type = type; + r8712_enqueue_cmd(pcmdpriv, ph2c); + return _SUCCESS; +} + +u8 r8712_setfwdig_cmd(struct _adapter *padapter, u8 type) +{ + struct cmd_obj *ph2c; + struct writePTM_parm *pwriteptmparm; + struct cmd_priv *pcmdpriv = &padapter->cmdpriv; + + ph2c = (struct cmd_obj *)_malloc(sizeof(struct cmd_obj)); + if (ph2c == NULL) + return _FAIL; + pwriteptmparm = (struct writePTM_parm *) + _malloc(sizeof(struct setdig_parm)); + if (pwriteptmparm == NULL) { + kfree((u8 *) ph2c); + return _FAIL; + } + init_h2fwcmd_w_parm_no_rsp(ph2c, pwriteptmparm, GEN_CMD_CODE(_SetDIG)); + pwriteptmparm->type = type; + r8712_enqueue_cmd(pcmdpriv, ph2c); + return _SUCCESS; +} + +u8 r8712_setfwra_cmd(struct _adapter *padapter, u8 type) +{ + struct cmd_obj *ph2c; + struct writePTM_parm *pwriteptmparm; + struct cmd_priv *pcmdpriv = &padapter->cmdpriv; + + ph2c = (struct cmd_obj *)_malloc(sizeof(struct cmd_obj)); + if (ph2c == NULL) + return _FAIL; + pwriteptmparm = (struct writePTM_parm *) + _malloc(sizeof(struct setra_parm)); + if (pwriteptmparm == NULL) { + kfree((u8 *) ph2c); + return _FAIL; + } + init_h2fwcmd_w_parm_no_rsp(ph2c, pwriteptmparm, GEN_CMD_CODE(_SetRA)); + pwriteptmparm->type = type; r8712_enqueue_cmd(pcmdpriv, ph2c); return _SUCCESS; } @@ -512,12 +576,6 @@ u8 r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork) &psecnetwork->IEs[0], pnetwork->network.IELength, &psecnetwork->IELength); - if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) - r8712_add_ht_addt_info(padapter, - &pnetwork->network.IEs[0], - &psecnetwork->IEs[0], - pnetwork->network.IELength, - &psecnetwork->IELength); } } psecuritypriv->supplicant_ie[0] = (u8)psecnetwork->IELength; @@ -950,3 +1008,32 @@ void r8712_setassocsta_cmdrsp_callback(struct _adapter *padapter, spin_unlock_irqrestore(&pmlmepriv->lock, irqL); r8712_free_cmd_obj(pcmd); } + +u8 r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl, + u32 tryPktCnt, u32 tryPktInterval, u32 firstStageTO) +{ + struct cmd_obj *ph2c; + struct DisconnectCtrlEx_param *param; + struct cmd_priv *pcmdpriv = &adapter->cmdpriv; + + ph2c = (struct cmd_obj *)_malloc(sizeof(struct cmd_obj)); + if (ph2c == NULL) + return _FAIL; + param = (struct DisconnectCtrlEx_param *) + _malloc(sizeof(struct DisconnectCtrlEx_param)); + if (param == NULL) { + kfree((unsigned char *) ph2c); + return _FAIL; + } + memset(param, 0, sizeof(struct DisconnectCtrlEx_param)); + + param->EnableDrvCtrl = (unsigned char)enableDrvCtrl; + param->TryPktCnt = (unsigned char)tryPktCnt; + param->TryPktInterval = (unsigned char)tryPktInterval; + param->FirstStageTO = (unsigned int)firstStageTO; + + init_h2fwcmd_w_parm_no_rsp(ph2c, param, + GEN_CMD_CODE(_DisconnectCtrlEx)); + r8712_enqueue_cmd(pcmdpriv, ph2c); + return _SUCCESS; +} |