mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Change "){" to ") {"
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
c137ff21e5
commit
0a97479cee
46 changed files with 464 additions and 464 deletions
|
@ -440,7 +440,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
/* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */
|
||||
if (psta->sleepq_len > (NR_XMITFRAME/pstapriv->asoc_list_cnt)
|
||||
&& padapter->xmitpriv.free_xmitframe_cnt < ((NR_XMITFRAME/pstapriv->asoc_list_cnt)/2)
|
||||
){
|
||||
) {
|
||||
DBG_871X("%s sta:"MAC_FMT", sleepq_len:%u, free_xmitframe_cnt:%u, asoc_list_cnt:%u, clear sleep_q\n", __func__
|
||||
, MAC_ARG(psta->hwaddr)
|
||||
, psta->sleepq_len, padapter->xmitpriv.free_xmitframe_cnt, pstapriv->asoc_list_cnt);
|
||||
|
|
120
core/rtw_cmd.c
120
core/rtw_cmd.c
|
@ -57,7 +57,7 @@ sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv)
|
|||
|
||||
pcmdpriv->cmd_allocated_buf = rtw_zmalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ);
|
||||
|
||||
if (pcmdpriv->cmd_allocated_buf == NULL){
|
||||
if (pcmdpriv->cmd_allocated_buf == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv)
|
|||
|
||||
pcmdpriv->rsp_allocated_buf = rtw_zmalloc(MAX_RSPSZ + 4);
|
||||
|
||||
if (pcmdpriv->rsp_allocated_buf == NULL){
|
||||
if (pcmdpriv->rsp_allocated_buf == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv)
|
|||
{
|
||||
;
|
||||
|
||||
if (pcmdpriv){
|
||||
if (pcmdpriv) {
|
||||
_rtw_free_sema(&(pcmdpriv->cmd_queue_sema));
|
||||
_rtw_free_sema(&(pcmdpriv->terminate_cmdthread_sema));
|
||||
|
||||
|
@ -552,7 +552,7 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,
|
|||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true){
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
|
||||
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
|
||||
}
|
||||
|
||||
|
@ -714,13 +714,13 @@ u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch)
|
|||
;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
psetphypara = (struct setphy_parm*)rtw_zmalloc(sizeof(struct setphy_parm));
|
||||
|
||||
if (psetphypara == NULL){
|
||||
if (psetphypara == NULL) {
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -747,13 +747,13 @@ u8 rtw_setbbreg_cmd(struct adapter*padapter, u8 offset, u8 val)
|
|||
u8 res =_SUCCESS;
|
||||
;
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
pwritebbparm = (struct writeBB_parm*)rtw_zmalloc(sizeof(struct writeBB_parm));
|
||||
|
||||
if (pwritebbparm == NULL){
|
||||
if (pwritebbparm == NULL) {
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -779,13 +779,13 @@ u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval)
|
|||
|
||||
;
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
prdbbparm = (struct readBB_parm*)rtw_zmalloc(sizeof(struct readBB_parm));
|
||||
|
||||
if (prdbbparm == NULL){
|
||||
if (prdbbparm == NULL) {
|
||||
rtw_mfree((unsigned char *) ph2c, sizeof(struct cmd_obj));
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -813,13 +813,13 @@ u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val)
|
|||
u8 res =_SUCCESS;
|
||||
;
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
pwriterfparm = (struct writeRF_parm*)rtw_zmalloc(sizeof(struct writeRF_parm));
|
||||
|
||||
if (pwriterfparm == NULL){
|
||||
if (pwriterfparm == NULL) {
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -846,13 +846,13 @@ u8 rtw_getrfreg_cmd(struct adapter *padapter, u8 offset, u8 *pval)
|
|||
;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
prdrfparm = (struct readRF_parm*)rtw_zmalloc(sizeof(struct readRF_parm));
|
||||
if (prdrfparm == NULL){
|
||||
if (prdrfparm == NULL) {
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -909,14 +909,14 @@ u8 rtw_createbss_cmd(struct adapter *padapter)
|
|||
|
||||
rtw_led_control(padapter, LED_CTL_START_TO_LINK);
|
||||
|
||||
if (pmlmepriv->assoc_ssid.SsidLength == 0){
|
||||
if (pmlmepriv->assoc_ssid.SsidLength == 0) {
|
||||
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for Any SSid:%s\n", pmlmepriv->assoc_ssid.Ssid));
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for SSid:%s\n", pmlmepriv->assoc_ssid.Ssid));
|
||||
}
|
||||
|
||||
pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmd == NULL){
|
||||
if (pcmd == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -948,7 +948,7 @@ u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss, unsigned
|
|||
;
|
||||
|
||||
pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmd == NULL){
|
||||
if (pcmd == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -989,14 +989,14 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork)
|
|||
|
||||
rtw_led_control(padapter, LED_CTL_START_TO_LINK);
|
||||
|
||||
if (pmlmepriv->assoc_ssid.SsidLength == 0){
|
||||
if (pmlmepriv->assoc_ssid.SsidLength == 0) {
|
||||
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+Join cmd: Any SSid\n"));
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid =[%s]\n", pmlmepriv->assoc_ssid.Ssid));
|
||||
}
|
||||
|
||||
pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmd == NULL){
|
||||
if (pcmd == NULL) {
|
||||
res =_FAIL;
|
||||
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("rtw_joinbss_cmd: memory allocate for cmd_obj fail!!!\n"));
|
||||
goto exit;
|
||||
|
@ -1180,15 +1180,15 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum NDIS_802_11_NETWORK_INFRAST
|
|||
;
|
||||
psetop = (struct setopmode_parm*)rtw_zmalloc(sizeof(struct setopmode_parm));
|
||||
|
||||
if (psetop == NULL){
|
||||
if (psetop == NULL) {
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
psetop->mode = (u8)networktype;
|
||||
|
||||
if (enqueue){
|
||||
if (enqueue) {
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
rtw_mfree((u8 *)psetop, sizeof(*psetop));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1223,14 +1223,14 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key, bool en
|
|||
;
|
||||
|
||||
psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm));
|
||||
if (psetstakey_para == NULL){
|
||||
if (psetstakey_para == NULL) {
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
memcpy(psetstakey_para->addr, sta->hwaddr, ETH_ALEN);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)){
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
||||
psetstakey_para->algorithm =(unsigned char) psecuritypriv->dot11PrivacyAlgrthm;
|
||||
}else{
|
||||
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false);
|
||||
|
@ -1249,14 +1249,14 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key, bool en
|
|||
if (enqueue)
|
||||
{
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if ( ph2c == NULL){
|
||||
if ( ph2c == NULL) {
|
||||
rtw_mfree((u8 *) psetstakey_para, sizeof(struct set_stakey_parm));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetstakey_rsp = (struct set_stakey_rsp*)rtw_zmalloc(sizeof(struct set_stakey_rsp));
|
||||
if (psetstakey_rsp == NULL){
|
||||
if (psetstakey_rsp == NULL) {
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
rtw_mfree((u8 *) psetstakey_para, sizeof(struct set_stakey_parm));
|
||||
res =_FAIL;
|
||||
|
@ -1299,20 +1299,20 @@ u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue)
|
|||
else
|
||||
{
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if ( ph2c == NULL){
|
||||
if ( ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm));
|
||||
if (psetstakey_para == NULL){
|
||||
if (psetstakey_para == NULL) {
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetstakey_rsp = (struct set_stakey_rsp*)rtw_zmalloc(sizeof(struct set_stakey_rsp));
|
||||
if (psetstakey_rsp == NULL){
|
||||
if (psetstakey_rsp == NULL) {
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
rtw_mfree((u8 *) psetstakey_para, sizeof(struct set_stakey_parm));
|
||||
res =_FAIL;
|
||||
|
@ -1349,13 +1349,13 @@ u8 rtw_setrttbl_cmd(struct adapter *padapter, struct setratable_parm *prate_tab
|
|||
;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
psetrttblparm = (struct setratable_parm*)rtw_zmalloc(sizeof(struct setratable_parm));
|
||||
|
||||
if (psetrttblparm == NULL){
|
||||
if (psetrttblparm == NULL) {
|
||||
rtw_mfree((unsigned char *) ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1381,13 +1381,13 @@ u8 rtw_getrttbl_cmd(struct adapter *padapter, struct getratable_rsp *pval)
|
|||
;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
pgetrttblparm = (struct getratable_parm*)rtw_zmalloc(sizeof(struct getratable_parm));
|
||||
|
||||
if (pgetrttblparm == NULL){
|
||||
if (pgetrttblparm == NULL) {
|
||||
rtw_mfree((unsigned char *) ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1423,20 +1423,20 @@ u8 rtw_setassocsta_cmd(struct adapter *padapter, u8 *mac_addr)
|
|||
;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetassocsta_para = (struct set_assocsta_parm*)rtw_zmalloc(sizeof(struct set_assocsta_parm));
|
||||
if (psetassocsta_para == NULL){
|
||||
if (psetassocsta_para == NULL) {
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetassocsta_rsp = (struct set_stakey_rsp*)rtw_zmalloc(sizeof(struct set_assocsta_rsp));
|
||||
if (psetassocsta_rsp == NULL){
|
||||
if (psetassocsta_rsp == NULL) {
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
rtw_mfree((u8 *) psetassocsta_para, sizeof(struct set_assocsta_parm));
|
||||
return _FAIL;
|
||||
|
@ -1468,13 +1468,13 @@ u8 rtw_addbareq_cmd(struct adapter*padapter, u8 tid, u8 *addr)
|
|||
;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
paddbareq_parm = (struct addBaReq_parm*)rtw_zmalloc(sizeof(struct addBaReq_parm));
|
||||
if (paddbareq_parm == NULL){
|
||||
if (paddbareq_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1507,13 +1507,13 @@ u8 rtw_reset_securitypriv_cmd(struct adapter*padapter)
|
|||
;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL){
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1547,13 +1547,13 @@ u8 rtw_free_assoc_resources_cmd(struct adapter*padapter)
|
|||
;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL){
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1585,13 +1585,13 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter*padapter)
|
|||
u8 res =_SUCCESS;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL){
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1643,7 +1643,7 @@ u8 rtw_set_ch_cmd(struct adapter*padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueu
|
|||
if (enqueue) {
|
||||
/* need enqueue, prepare cmd_obj and enqueue */
|
||||
pcmdobj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmdobj == NULL){
|
||||
if (pcmdobj == NULL) {
|
||||
rtw_mfree((u8 *)set_ch_parm, sizeof(*set_ch_parm));
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
|
@ -1700,7 +1700,7 @@ u8 rtw_set_chplan_cmd(struct adapter*padapter, u8 chplan, u8 enqueue)
|
|||
{
|
||||
/* need enqueue, prepare cmd_obj and enqueue */
|
||||
pcmdobj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmdobj == NULL){
|
||||
if (pcmdobj == NULL) {
|
||||
rtw_mfree((u8 *)setChannelPlan_param, sizeof(struct SetChannelPlan_param));
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
|
@ -1742,7 +1742,7 @@ u8 rtw_led_blink_cmd(struct adapter*padapter, PLED_871x pLed)
|
|||
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_led_blink_cmd\n"));
|
||||
|
||||
pcmdobj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmdobj == NULL){
|
||||
if (pcmdobj == NULL) {
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1780,7 +1780,7 @@ u8 rtw_set_csa_cmd(struct adapter*padapter, u8 new_ch_no)
|
|||
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_set_csa_cmd\n"));
|
||||
|
||||
pcmdobj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmdobj == NULL){
|
||||
if (pcmdobj == NULL) {
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -2039,13 +2039,13 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter*padapter, u8 lps_ctrl_type, u8 enqueue)
|
|||
|
||||
if (enqueue) {
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL){
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -2088,13 +2088,13 @@ u8 rtw_rpt_timer_cfg_cmd(struct adapter*padapter, u16 minRptTime)
|
|||
|
||||
;
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL){
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -2135,13 +2135,13 @@ u8 rtw_antenna_select_cmd(struct adapter*padapter, u8 antenna, u8 enqueue)
|
|||
if (true == enqueue)
|
||||
{
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL){
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -2198,13 +2198,13 @@ u8 p2p_protocol_wk_cmd(struct adapter*padapter, int intCmdType )
|
|||
}
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL){
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -2236,13 +2236,13 @@ u8 rtw_ps_cmd(struct adapter*padapter)
|
|||
u8 res = _SUCCESS;
|
||||
|
||||
ppscmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ppscmd == NULL){
|
||||
if (ppscmd == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL){
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ppscmd, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -2319,13 +2319,13 @@ u8 rtw_chk_hi_queue_cmd(struct adapter*padapter)
|
|||
u8 res = _SUCCESS;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL){
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
|
|
@ -481,7 +481,7 @@ efuse_OneByteWrite(
|
|||
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+3, 0xF2);/* write cmd */
|
||||
|
||||
while ((0x80 & rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx<100) ){
|
||||
while ((0x80 & rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx<100) ) {
|
||||
tmpidx++;
|
||||
}
|
||||
|
||||
|
@ -716,7 +716,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
|
|||
return _FAIL;
|
||||
|
||||
map = rtw_zmalloc(mapLen);
|
||||
if (map == NULL){
|
||||
if (map == NULL) {
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
@ -814,7 +814,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
|
|||
return _FAIL;
|
||||
|
||||
map = rtw_zmalloc(mapLen);
|
||||
if (map == NULL){
|
||||
if (map == NULL) {
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ u8 *rtw_get_ie(u8 *pbuf, sint index, sint *len, sint limit)
|
|||
sint tmp, i;
|
||||
u8 *p;
|
||||
;
|
||||
if (limit < 1){
|
||||
if (limit < 1) {
|
||||
;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -763,7 +763,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie,
|
|||
if (wpa_ie) {
|
||||
memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt+1]+2);
|
||||
|
||||
for (i =0;i<(in_ie[cnt+1]+2);i =i+8){
|
||||
for (i =0;i<(in_ie[cnt+1]+2);i =i+8) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n %2x,%2x,%2x,%2x,%2x,%2x,%2x,%2x\n",
|
||||
wpa_ie[i], wpa_ie[i+1], wpa_ie[i+2], wpa_ie[i+3], wpa_ie[i+4],
|
||||
wpa_ie[i+5], wpa_ie[i+6], wpa_ie[i+7]));
|
||||
|
@ -782,7 +782,7 @@ int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie,
|
|||
if (rsn_ie) {
|
||||
memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt+1]+2);
|
||||
|
||||
for (i =0;i<(in_ie[cnt+1]+2);i =i+8){
|
||||
for (i =0;i<(in_ie[cnt+1]+2);i =i+8) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n %2x,%2x,%2x,%2x,%2x,%2x,%2x,%2x\n",
|
||||
rsn_ie[i], rsn_ie[i+1], rsn_ie[i+2], rsn_ie[i+3], rsn_ie[i+4],
|
||||
rsn_ie[i+5], rsn_ie[i+6], rsn_ie[i+7]));
|
||||
|
@ -1295,7 +1295,7 @@ void dump_ies(u8 *buf, u32 buf_len)
|
|||
u8* pos = (u8*)buf;
|
||||
u8 id, len;
|
||||
|
||||
while (pos-buf<=buf_len){
|
||||
while (pos-buf<=buf_len) {
|
||||
id = *pos;
|
||||
len = *(pos+1);
|
||||
|
||||
|
@ -1326,7 +1326,7 @@ void dump_wps_ie(u8 *ie, u32 ie_len)
|
|||
return;
|
||||
|
||||
pos+=6;
|
||||
while (pos-ie < ie_len){
|
||||
while (pos-ie < ie_len) {
|
||||
id = RTW_GET_BE16(pos);
|
||||
len = RTW_GET_BE16(pos + 2);
|
||||
|
||||
|
@ -1421,7 +1421,7 @@ void dump_p2p_ie(u8 *ie, u32 ie_len) {
|
|||
return;
|
||||
|
||||
pos+=6;
|
||||
while (pos-ie < ie_len){
|
||||
while (pos-ie < ie_len) {
|
||||
id = *pos;
|
||||
len = RTW_GET_LE16(pos+1);
|
||||
|
||||
|
@ -1683,7 +1683,7 @@ void dump_wfd_ie(u8 *ie, u32 ie_len)
|
|||
return;
|
||||
|
||||
pos+=6;
|
||||
while (pos-ie < ie_len){
|
||||
while (pos-ie < ie_len) {
|
||||
id = *pos;
|
||||
len = RTW_GET_BE16(pos+1);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
|
|||
for (i = 0; i < ssid->SsidLength; i++)
|
||||
{
|
||||
/* wifi, printable ascii code must be supported */
|
||||
if (!( (ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e) )){
|
||||
if (!( (ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e) )) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid has nonprintabl ascii\n"));
|
||||
ret = false;
|
||||
break;
|
||||
|
@ -187,7 +187,7 @@ u8 rtw_do_join(struct adapter * padapter)
|
|||
)
|
||||
{
|
||||
/* DBG_871X("rtw_do_join() when no desired bss in scanning queue\n"); */
|
||||
if ( _SUCCESS!=(ret =rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ){
|
||||
if ( _SUCCESS!=(ret =rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) ) {
|
||||
pmlmepriv->to_join = false;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("do_join(): site survey return error\n."));
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ u8 rtw_set_802_11_ssid(struct adapter* padapter, struct ndis_802_11_ssid *ssid)
|
|||
DBG_871X_LEVEL(_drv_always_, "set ssid [%s] fw_state =0x%08x\n",
|
||||
ssid->Ssid, get_fwstate(pmlmepriv));
|
||||
|
||||
if (padapter->hw_init_completed ==false){
|
||||
if (padapter->hw_init_completed ==false) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
("set_ssid: hw_init_completed ==false =>exit!!!\n"));
|
||||
status = _FAIL;
|
||||
|
@ -434,7 +434,7 @@ u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, struct ndis_802_1
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (padapter->hw_init_completed ==false){
|
||||
if (padapter->hw_init_completed ==false) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
|
||||
("set_ssid: hw_init_completed ==false =>exit!!!\n"));
|
||||
status = _FAIL;
|
||||
|
@ -602,7 +602,7 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, struct ndis_802_11_s
|
|||
res =false;
|
||||
goto exit;
|
||||
}
|
||||
if (padapter->hw_init_completed ==false){
|
||||
if (padapter->hw_init_completed ==false) {
|
||||
res = false;
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n ===rtw_set_802_11_bssid_list_scan:hw_init_completed ==false ===\n"));
|
||||
goto exit;
|
||||
|
@ -615,7 +615,7 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, struct ndis_802_11_s
|
|||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_bssid_list_scan fail since fw_state = %x\n", get_fwstate(pmlmepriv)));
|
||||
res = true;
|
||||
|
||||
if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING)) == true){
|
||||
if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING)) == true) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n\n"));
|
||||
} else {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n###pmlmepriv->sitesurveyctrl.traffic_busy ==true\n\n"));
|
||||
|
@ -663,7 +663,7 @@ u8 rtw_set_802_11_authentication_mode(struct adapter* padapter, enum NDIS_802_11
|
|||
return ret;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_add_wep(struct adapter* padapter, struct ndis_802_11_wep *wep){
|
||||
u8 rtw_set_802_11_add_wep(struct adapter* padapter, struct ndis_802_11_wep *wep) {
|
||||
|
||||
u8 bdefaultkey;
|
||||
u8 btransmitkey;
|
||||
|
@ -728,13 +728,13 @@ exit:
|
|||
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_remove_wep(struct adapter* padapter, u32 keyindex){
|
||||
u8 rtw_set_802_11_remove_wep(struct adapter* padapter, u32 keyindex) {
|
||||
|
||||
u8 ret =_SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
if (keyindex >= 0x80000000 || padapter == NULL){
|
||||
if (keyindex >= 0x80000000 || padapter == NULL) {
|
||||
|
||||
ret =false;
|
||||
goto exit;
|
||||
|
@ -744,7 +744,7 @@ u8 rtw_set_802_11_remove_wep(struct adapter* padapter, u32 keyindex){
|
|||
{
|
||||
int res;
|
||||
struct security_priv* psecuritypriv =&(padapter->securitypriv);
|
||||
if ( keyindex < 4 ){
|
||||
if ( keyindex < 4 ) {
|
||||
|
||||
memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16);
|
||||
|
||||
|
@ -771,7 +771,7 @@ exit:
|
|||
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key){
|
||||
u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key) {
|
||||
|
||||
uint encryptionalgo;
|
||||
u8 * pbssid;
|
||||
|
@ -782,7 +782,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
|
||||
;
|
||||
|
||||
if (((key->KeyIndex & 0x80000000) == 0) && ((key->KeyIndex & 0x40000000) > 0)){
|
||||
if (((key->KeyIndex & 0x80000000) == 0) && ((key->KeyIndex & 0x40000000) > 0)) {
|
||||
|
||||
/* It is invalid to clear bit 31 and set bit 30. If the miniport driver encounters this combination, */
|
||||
/* it must fail the request and return NDIS_STATUS_INVALID_DATA. */
|
||||
|
@ -802,7 +802,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
pbssid =get_bssid(&padapter->mlmepriv);
|
||||
stainfo =rtw_get_stainfo(&padapter->stapriv, pbssid);
|
||||
|
||||
if ((stainfo!=NULL)&&(padapter->securitypriv.dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X)){
|
||||
if ((stainfo!=NULL)&&(padapter->securitypriv.dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X)) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY:( stainfo!=NULL)&&(Adapter->securitypriv.dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X)\n"));
|
||||
encryptionalgo =stainfo->dot118021XPrivacy;
|
||||
}
|
||||
|
@ -815,11 +815,11 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_add_key: (Adapter->securitypriv.dot11PrivacyAlgrthm ==%d)!\n", padapter->securitypriv.dot11PrivacyAlgrthm));
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_add_key: (Adapter->securitypriv.dot11AuthAlgrthm ==%d)!\n", padapter->securitypriv.dot11AuthAlgrthm));
|
||||
|
||||
if ((stainfo!=NULL)){
|
||||
if ((stainfo!=NULL)) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_add_key: (stainfo->dot118021XPrivacy ==%d)!\n", stainfo->dot118021XPrivacy));
|
||||
}
|
||||
|
||||
if (key->KeyIndex & 0x000000FF){
|
||||
if (key->KeyIndex & 0x000000FF) {
|
||||
/* The key index is specified in the lower 8 bits by values of zero to 255. */
|
||||
/* The key index should be set to zero for a Pairwise key, and the driver should fail with */
|
||||
/* NDIS_STATUS_INVALID_DATA if the lower 8 bits is not zero */
|
||||
|
@ -829,7 +829,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
}
|
||||
|
||||
/* check BSSID */
|
||||
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == true){
|
||||
if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == true) {
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("MacAddr_isBcst(key->BSSID)\n"));
|
||||
ret = false;
|
||||
|
@ -838,7 +838,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
|
||||
/* Check key length for TKIP. */
|
||||
/* if (encryptionAlgorithm == RT_ENC_TKIP_ENCRYPTION && key->KeyLength != 32) */
|
||||
if ((encryptionalgo == _TKIP_)&& (key->KeyLength != 32)){
|
||||
if ((encryptionalgo == _TKIP_)&& (key->KeyLength != 32)) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("TKIP KeyLength:0x%x != 32\n", key->KeyLength));
|
||||
ret =_FAIL;
|
||||
goto exit;
|
||||
|
@ -987,7 +987,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
|
||||
}
|
||||
|
||||
if (key->KeyIndex & 0x20000000){
|
||||
if (key->KeyIndex & 0x20000000) {
|
||||
/* SetRSC */
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY: +++++ SetRSC+++++\n"));
|
||||
if (bgroup == true)
|
||||
|
@ -1014,7 +1014,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
padapter->securitypriv.dot118021XGrpKeyid =(u8)key->KeyIndex;
|
||||
}
|
||||
|
||||
if ((key->KeyIndex&0x3) == 0){
|
||||
if ((key->KeyIndex&0x3) == 0) {
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1091,7 +1091,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key)
|
|||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n ==========_set_timer\n"));
|
||||
|
||||
/* if TKIP, save the Receive/Transmit MIC key in KeyMaterial[128-255] */
|
||||
if ((key->KeyIndex & 0x10000000)){
|
||||
if ((key->KeyIndex & 0x10000000)) {
|
||||
memcpy(&stainfo->dot11tkiptxmickey, key->KeyMaterial + 16, 8);
|
||||
memcpy(&stainfo->dot11tkiprxmickey, key->KeyMaterial + 24, 8);
|
||||
|
||||
|
@ -1133,7 +1133,7 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_remove_key(struct adapter* padapter, struct ndis_802_11_remove_key *key){
|
||||
u8 rtw_set_802_11_remove_key(struct adapter* padapter, struct ndis_802_11_remove_key *key) {
|
||||
|
||||
uint encryptionalgo;
|
||||
u8 * pbssid;
|
||||
|
@ -1161,7 +1161,7 @@ u8 rtw_set_802_11_remove_key(struct adapter* padapter, struct ndis_802_11_remove
|
|||
} else {
|
||||
pbssid =get_bssid(&padapter->mlmepriv);
|
||||
stainfo =rtw_get_stainfo(&padapter->stapriv , pbssid );
|
||||
if (stainfo !=NULL){
|
||||
if (stainfo !=NULL) {
|
||||
encryptionalgo =stainfo->dot118021XPrivacy;
|
||||
|
||||
/* clear key by BSSID */
|
||||
|
|
|
@ -219,7 +219,7 @@ int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame)
|
|||
u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame)
|
||||
{
|
||||
u8 is_cmd_bndy = false;
|
||||
if (((pxmit_frame->attrib.pktlen+32)%256) + 8 >= 256){
|
||||
if (((pxmit_frame->attrib.pktlen+32)%256) + 8 >= 256) {
|
||||
rtw_IOL_append_END_cmd(pxmit_frame);
|
||||
pxmit_frame->attrib.pktlen = ((((pxmit_frame->attrib.pktlen+32)/256)+1)*256 );
|
||||
|
||||
|
@ -236,7 +236,7 @@ void rtw_IOL_cmd_buf_dump(struct adapter *Adapter, int buf_len, u8 *pbuf)
|
|||
int j =1;
|
||||
|
||||
printk("###### %s ######\n", __FUNCTION__);
|
||||
for (i =0;i< buf_len;i++){
|
||||
for (i =0;i< buf_len;i++) {
|
||||
printk("%02x-",*(pbuf+i));
|
||||
|
||||
if (j%32 == 0) printk("\n");j++;
|
||||
|
|
|
@ -69,7 +69,7 @@ sint _rtw_init_mlme_priv (struct adapter* padapter)
|
|||
|
||||
pbuf = rtw_zvmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
|
||||
|
||||
if (pbuf == NULL){
|
||||
if (pbuf == NULL) {
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr)
|
|||
|
||||
;
|
||||
|
||||
if (_rtw_memcmp(zero_addr, addr, ETH_ALEN)){
|
||||
if (_rtw_memcmp(zero_addr, addr, ETH_ALEN)) {
|
||||
pnetwork =NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ sint rtw_if_up(struct adapter *padapter) {
|
|||
;
|
||||
|
||||
if ( padapter->bDriverStopped || padapter->bSurpriseRemoved ||
|
||||
(check_fwstate(&padapter->mlmepriv, _FW_LINKED) == false)){
|
||||
(check_fwstate(&padapter->mlmepriv, _FW_LINKED) == false)) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_if_up:bDriverStopped(%d) OR bSurpriseRemoved(%d)", padapter->bDriverStopped, padapter->bSurpriseRemoved));
|
||||
res =false;
|
||||
}
|
||||
|
@ -795,7 +795,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
|
|||
|
||||
pnetwork = rtw_alloc_network(pmlmepriv); /* will update scan_time */
|
||||
|
||||
if (pnetwork == NULL){
|
||||
if (pnetwork == NULL) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n\n\nsomething wrong here\n\n\n"));
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1605,7 +1605,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
|||
pcur_wlan->fixed = false;
|
||||
|
||||
pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
|
||||
if (pcur_sta){
|
||||
if (pcur_sta) {
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
rtw_free_stainfo(adapter, pcur_sta);
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
|
@ -1722,7 +1722,7 @@ static u8 search_max_mac_id(struct adapter *padapter)
|
|||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
||||
#if defined (CONFIG_AP_MODE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)){
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
|
||||
|
||||
for (aid = (pstapriv->max_num_sta); aid > 0; aid--)
|
||||
{
|
||||
|
@ -1913,7 +1913,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
|
||||
DBG_871X("%s(mac_id =%d) =" MAC_FMT "\n", __func__, mac_id, MAC_ARG(pstadel->macaddr));
|
||||
|
||||
if (mac_id>=0){
|
||||
if (mac_id>=0) {
|
||||
u16 media_status;
|
||||
media_status = (mac_id<<8)|0; /* MACID|OPMODE:0 means disconnect */
|
||||
/* for STA, AP, ADHOC mode, report disconnect stauts to FW */
|
||||
|
@ -2258,7 +2258,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
|
|||
updated = true;
|
||||
}
|
||||
|
||||
if (updated){
|
||||
if (updated) {
|
||||
DBG_871X("[by_bssid:%u][assoc_ssid:%s]"
|
||||
"[to_roaming:%u] "
|
||||
"new candidate: %s("MAC_FMT") rssi:%d\n",
|
||||
|
@ -2308,7 +2308,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
|||
while (!rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) {
|
||||
|
||||
pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned, struct wlan_network, list);
|
||||
if (pnetwork == NULL){
|
||||
if (pnetwork == NULL) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s return _FAIL:(pnetwork == NULL)\n", __FUNCTION__));
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
|
@ -2371,13 +2371,13 @@ sint rtw_set_auth(struct adapter * adapter, struct security_priv *psecuritypriv)
|
|||
;
|
||||
|
||||
pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmd == NULL){
|
||||
if (pcmd == NULL) {
|
||||
res = _FAIL; /* try again */
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetauthparm =(struct setauth_parm*)rtw_zmalloc(sizeof(struct setauth_parm));
|
||||
if (psetauthparm == NULL){
|
||||
if (psetauthparm == NULL) {
|
||||
rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -2420,13 +2420,13 @@ sint rtw_set_key(struct adapter * adapter, struct security_priv *psecuritypriv,
|
|||
;
|
||||
|
||||
psetkeyparm =(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm));
|
||||
if (psetkeyparm == NULL){
|
||||
if (psetkeyparm == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
memset(psetkeyparm, 0, sizeof(struct setkey_parm));
|
||||
|
||||
if (psecuritypriv->dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X){
|
||||
if (psecuritypriv->dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X) {
|
||||
psetkeyparm->algorithm =(unsigned char)psecuritypriv->dot118021XGrpPrivacy;
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n rtw_set_key: psetkeyparm->algorithm =(unsigned char)psecuritypriv->dot118021XGrpPrivacy =%d\n", psetkeyparm->algorithm));
|
||||
}
|
||||
|
@ -2443,7 +2443,7 @@ sint rtw_set_key(struct adapter * adapter, struct security_priv *psecuritypriv,
|
|||
DBG_871X("==> rtw_set_key algorithm(%x), keyid(%x), key_mask(%x)\n", psetkeyparm->algorithm, psetkeyparm->keyid, psecuritypriv->key_mask);
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n rtw_set_key: psetkeyparm->algorithm =%d psetkeyparm->keyid =(u8)keyid =%d\n", psetkeyparm->algorithm, keyid));
|
||||
|
||||
switch (psetkeyparm->algorithm){
|
||||
switch (psetkeyparm->algorithm) {
|
||||
|
||||
case _WEP40_:
|
||||
keylen =5;
|
||||
|
@ -2471,9 +2471,9 @@ sint rtw_set_key(struct adapter * adapter, struct security_priv *psecuritypriv,
|
|||
}
|
||||
|
||||
|
||||
if (enqueue){
|
||||
if (enqueue) {
|
||||
pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmd == NULL){
|
||||
if (pcmd == NULL) {
|
||||
rtw_mfree((unsigned char *)psetkeyparm, sizeof(struct setkey_parm));
|
||||
res = _FAIL; /* try again */
|
||||
goto exit;
|
||||
|
@ -2592,7 +2592,7 @@ static int rtw_append_pmkid(struct adapter *Adapter, int iEntry, u8 *ie, uint ie
|
|||
{
|
||||
struct security_priv *psecuritypriv =&Adapter->securitypriv;
|
||||
|
||||
if (ie[13]<=20){
|
||||
if (ie[13]<=20) {
|
||||
/* The RSN IE didn't include the PMK ID, append the PMK information */
|
||||
ie[ie_len]=1;
|
||||
ie_len++;
|
||||
|
|
|
@ -222,7 +222,7 @@ static struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03, 0
|
|||
int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch)
|
||||
{
|
||||
int i;
|
||||
for (i =0;ch_set[i].ChannelNum!=0;i++){
|
||||
for (i =0;ch_set[i].ChannelNum!=0;i++) {
|
||||
if (ch == ch_set[i].ChannelNum)
|
||||
break;
|
||||
}
|
||||
|
@ -6856,7 +6856,7 @@ void issue_assocreq(struct adapter *padapter)
|
|||
/* Commented by Kurt 20110629 */
|
||||
/* In some older APs, WPS handshake */
|
||||
/* would be fail if we append vender extensions informations to AP */
|
||||
if (_rtw_memcmp(pIE->data, WPS_OUI, 4)){
|
||||
if (_rtw_memcmp(pIE->data, WPS_OUI, 4)) {
|
||||
pIE->Length =14;
|
||||
}
|
||||
}
|
||||
|
@ -8062,7 +8062,7 @@ void site_survey(struct adapter *padapter)
|
|||
}
|
||||
}
|
||||
|
||||
if (0){
|
||||
if (0) {
|
||||
DBG_871X(FUNC_ADPT_FMT" ch:%u (cnt:%u, idx:%d) at %dms, %c%c%c\n"
|
||||
, FUNC_ADPT_ARG(padapter)
|
||||
, survey_channel
|
||||
|
@ -8116,7 +8116,7 @@ void site_survey(struct adapter *padapter)
|
|||
#endif /* CONFIG_P2P */
|
||||
{
|
||||
int i;
|
||||
for (i =0;i<RTW_SSID_SCAN_AMOUNT;i++){
|
||||
for (i =0;i<RTW_SSID_SCAN_AMOUNT;i++) {
|
||||
if (pmlmeext->sitesurvey_res.ssid[i].SsidLength) {
|
||||
/* todo: to issue two probe req??? */
|
||||
issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL);
|
||||
|
@ -9277,7 +9277,7 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
|
|||
/* restore to initial setting. */
|
||||
update_tx_basic_rate(padapter, padapter->registrypriv.wireless_mode);
|
||||
|
||||
if (psta){/* only for STA mode */
|
||||
if (psta) {/* only for STA mode */
|
||||
media_status = (psta->mac_id<<8)|0; /* MACID|OPMODE:1 connect */
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_MEDIA_STATUS_RPT, (u8 *)&media_status);
|
||||
}
|
||||
|
@ -10160,7 +10160,7 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf)
|
|||
pmlmeext->sitesurvey_res.bss_cnt = 0;
|
||||
pmlmeext->sitesurvey_res.channel_idx = 0;
|
||||
|
||||
for (i =0;i<RTW_SSID_SCAN_AMOUNT;i++){
|
||||
for (i =0;i<RTW_SSID_SCAN_AMOUNT;i++) {
|
||||
if (pparm->ssid[i].SsidLength) {
|
||||
memcpy(pmlmeext->sitesurvey_res.ssid[i].Ssid, pparm->ssid[i].Ssid, IW_ESSID_MAX_SIZE);
|
||||
pmlmeext->sitesurvey_res.ssid[i].SsidLength = pparm->ssid[i].SsidLength;
|
||||
|
|
|
@ -4032,13 +4032,13 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
|||
if (enqueue)
|
||||
{
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c == NULL){
|
||||
if (ph2c == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
|
||||
if (pdrvextra_cmd_parm == NULL){
|
||||
if (pdrvextra_cmd_parm == NULL) {
|
||||
rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
|
|
@ -175,7 +175,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_INTEL_PROXIM
|
||||
if (adapter->proximity.proxim_on ==true){
|
||||
if (adapter->proximity.proxim_on ==true) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -908,7 +908,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
}
|
||||
|
||||
/* System suspend is not allowed to wakeup */
|
||||
if ((pwrpriv->bInternalAutoSuspend == false) && (true == pwrpriv->bInSuspend )){
|
||||
if ((pwrpriv->bInternalAutoSuspend == false) && (true == pwrpriv->bInSuspend )) {
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -923,8 +923,8 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
|
||||
{
|
||||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
if (true ==pwrpriv->bInternalAutoSuspend){
|
||||
if (0 ==pwrpriv->autopm_cnt){
|
||||
if (true ==pwrpriv->bInternalAutoSuspend) {
|
||||
if (0 ==pwrpriv->autopm_cnt) {
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2, 6, 33))
|
||||
if (usb_autopm_get_interface(adapter_to_dvobj(padapter)->pusbintf) < 0)
|
||||
{
|
||||
|
@ -981,7 +981,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
if (padapter->bDriverStopped
|
||||
|| !padapter->bup
|
||||
|| !padapter->hw_init_completed
|
||||
){
|
||||
) {
|
||||
DBG_8192C("%s: bDriverStopped =%d, bup =%d, hw_init_completed =%u\n"
|
||||
, caller
|
||||
, padapter->bDriverStopped
|
||||
|
@ -1036,7 +1036,7 @@ int rtw_pm_set_ips(struct adapter *padapter, u8 mode)
|
|||
DBG_871X("%s %s\n", __FUNCTION__, mode == IPS_NORMAL?"IPS_NORMAL":"IPS_LEVEL_2");
|
||||
return 0;
|
||||
}
|
||||
else if (mode ==IPS_NONE){
|
||||
else if (mode ==IPS_NONE) {
|
||||
rtw_ips_mode_req(pwrctrlpriv, mode);
|
||||
DBG_871X("%s %s\n", __FUNCTION__, "IPS_NONE");
|
||||
if ((padapter->bSurpriseRemoved == 0)&&(_FAIL == rtw_pwr_wakeup(padapter)) )
|
||||
|
|
|
@ -82,7 +82,7 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
|
|||
|
||||
precvpriv->pallocated_frame_buf = rtw_zvmalloc(NR_RECVFRAME * sizeof(union recv_frame) + RXFRAME_ALIGN_SZ);
|
||||
|
||||
if (precvpriv->pallocated_frame_buf == NULL){
|
||||
if (precvpriv->pallocated_frame_buf == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
|
|||
|
||||
rtw_list_delete(&precvframe->u.hdr.list);
|
||||
padapter =precvframe->u.hdr.adapter;
|
||||
if (padapter !=NULL){
|
||||
if (padapter !=NULL) {
|
||||
precvpriv =&padapter->recvpriv;
|
||||
if (pfree_recv_queue == &precvpriv->free_recv_queue)
|
||||
precvpriv->free_recvframe_cnt--;
|
||||
|
@ -219,7 +219,7 @@ int rtw_free_recvframe(union recv_frame *precvframe, struct __queue *pfree_recv
|
|||
|
||||
rtw_list_insert_tail(&(precvframe->u.hdr.list), get_list_head(pfree_recv_queue));
|
||||
|
||||
if (padapter !=NULL){
|
||||
if (padapter !=NULL) {
|
||||
if (pfree_recv_queue == &precvpriv->free_recv_queue)
|
||||
precvpriv->free_recvframe_cnt++;
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue)
|
|||
}
|
||||
|
||||
sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe);
|
||||
sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe){
|
||||
sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe) {
|
||||
|
||||
sint i, res =_SUCCESS;
|
||||
u32 datalen;
|
||||
|
@ -436,15 +436,15 @@ sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe){
|
|||
|
||||
bmic_err =false;
|
||||
|
||||
for (i =0;i<8;i++){
|
||||
if (miccode[i] != *(pframemic+i)){
|
||||
for (i =0;i<8;i++) {
|
||||
if (miccode[i] != *(pframemic+i)) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("recvframe_chkmic:miccode[%d](%02x) != *(pframemic+%d)(%02x) ", i, miccode[i], i,*(pframemic+i)));
|
||||
bmic_err =true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (bmic_err ==true){
|
||||
if (bmic_err ==true) {
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("\n *(pframemic-8)-*(pframemic-1) =0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
|
||||
*(pframemic-8),*(pframemic-7),*(pframemic-6),*(pframemic-5),*(pframemic-4),*(pframemic-3),*(pframemic-2),*(pframemic-1)));
|
||||
|
@ -454,7 +454,7 @@ sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe){
|
|||
{
|
||||
uint i;
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("\n ======demp packet (len =%d) ======\n", precvframe->u.hdr.len));
|
||||
for (i =0;i<precvframe->u.hdr.len;i =i+8){
|
||||
for (i =0;i<precvframe->u.hdr.len;i =i+8) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x",
|
||||
*(precvframe->u.hdr.rx_data+i),*(precvframe->u.hdr.rx_data+i+1),
|
||||
*(precvframe->u.hdr.rx_data+i+2),*(precvframe->u.hdr.rx_data+i+3),
|
||||
|
@ -491,7 +491,7 @@ sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe){
|
|||
}
|
||||
else{
|
||||
/* mic checked ok */
|
||||
if ((psecuritypriv->bcheck_grpkey ==false)&&(IS_MCAST(prxattrib->ra) ==true)){
|
||||
if ((psecuritypriv->bcheck_grpkey ==false)&&(IS_MCAST(prxattrib->ra) ==true)) {
|
||||
psecuritypriv->bcheck_grpkey =true;
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("psecuritypriv->bcheck_grpkey =true"));
|
||||
}
|
||||
|
@ -533,7 +533,7 @@ static union recv_frame *decryptor(struct adapter *padapter, union recv_frame *p
|
|||
{
|
||||
DBG_871X("prxattrib->key_index(%d) > WEP_KEYS\n", prxattrib->key_index);
|
||||
|
||||
switch (prxattrib->encrypt){
|
||||
switch (prxattrib->encrypt) {
|
||||
case _WEP40_:
|
||||
case _WEP104_:
|
||||
prxattrib->key_index = psecuritypriv->dot11PrivacyKeyIndex;
|
||||
|
@ -556,7 +556,7 @@ static union recv_frame *decryptor(struct adapter *padapter, union recv_frame *p
|
|||
, prxattrib->bdecrypted , prxattrib->encrypt, psecuritypriv->hw_decrypted);
|
||||
#endif
|
||||
|
||||
switch (prxattrib->encrypt){
|
||||
switch (prxattrib->encrypt) {
|
||||
case _WEP40_:
|
||||
case _WEP104_:
|
||||
rtw_wep_decrypt(padapter, (u8 *)precv_frame);
|
||||
|
@ -668,7 +668,7 @@ static union recv_frame * portctrl(struct adapter *adapter, union recv_frame * p
|
|||
|
||||
prtnframe =precv_frame;
|
||||
/* check is the EAPOL frame or not (Rekey) */
|
||||
if (ether_type == eapol_type){
|
||||
if (ether_type == eapol_type) {
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("########portctrl:ether_type == 0x888e\n"));
|
||||
/* check Rekey */
|
||||
|
@ -849,7 +849,7 @@ static void count_rx_stats(struct adapter *padapter, union recv_frame *prframe,
|
|||
|
||||
padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++;
|
||||
|
||||
if ( (!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst))){
|
||||
if ( (!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst))) {
|
||||
padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++;
|
||||
}
|
||||
|
||||
|
@ -894,13 +894,13 @@ sint sta2sta_data_frame(
|
|||
{
|
||||
|
||||
/* filter packets that SA is myself or multicast or broadcast */
|
||||
if (_rtw_memcmp(myhwaddr, pattrib->src, ETH_ALEN)){
|
||||
if (_rtw_memcmp(myhwaddr, pattrib->src, ETH_ALEN)) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" SA ==myself\n"));
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if ( (!_rtw_memcmp(myhwaddr, pattrib->dst, ETH_ALEN)) && (!bmcast) ){
|
||||
if ( (!_rtw_memcmp(myhwaddr, pattrib->dst, ETH_ALEN)) && (!bmcast) ) {
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -934,7 +934,7 @@ sint sta2sta_data_frame(
|
|||
if (bmcast)
|
||||
{
|
||||
/* For AP mode, if DA == MCAST, then BSSID should be also MCAST */
|
||||
if (!IS_MCAST(pattrib->bssid)){
|
||||
if (!IS_MCAST(pattrib->bssid)) {
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1012,7 +1012,7 @@ sint ap2sta_data_frame(
|
|||
{
|
||||
|
||||
/* filter packets that SA is myself or multicast or broadcast */
|
||||
if (_rtw_memcmp(myhwaddr, pattrib->src, ETH_ALEN)){
|
||||
if (_rtw_memcmp(myhwaddr, pattrib->src, ETH_ALEN)) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" SA ==myself\n"));
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s SA ="MAC_FMT", myhwaddr ="MAC_FMT"\n",
|
||||
|
@ -1480,7 +1480,7 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f
|
|||
psa = get_sa(ptr);
|
||||
pbssid = get_hdr_bssid(ptr);
|
||||
|
||||
if (pbssid == NULL){
|
||||
if (pbssid == NULL) {
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s pbssid == NULL\n", __func__);
|
||||
#endif
|
||||
|
@ -1526,7 +1526,7 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f
|
|||
|
||||
}
|
||||
|
||||
if (ret ==_FAIL){
|
||||
if (ret ==_FAIL) {
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s case:%d, res:%d\n", __FUNCTION__, pattrib->to_fr_ds, ret);
|
||||
#endif
|
||||
|
@ -1536,7 +1536,7 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f
|
|||
}
|
||||
|
||||
|
||||
if (psta == NULL){
|
||||
if (psta == NULL) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" after to_fr_ds_chk; psta == NULL\n"));
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s psta == NULL\n", __func__);
|
||||
|
@ -1590,7 +1590,7 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (pattrib->privacy){
|
||||
if (pattrib->privacy) {
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("validate_recv_data_frame:pattrib->privacy =%x\n", pattrib->privacy));
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("\n ^^^^^^^^^^^IS_MCAST(pattrib->ra(0x%02x)) =%d^^^^^^^^^^^^^^^6\n", pattrib->ra[0], IS_MCAST(pattrib->ra)));
|
||||
|
@ -1761,7 +1761,7 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
|
|||
#endif
|
||||
|
||||
/* add version chk */
|
||||
if (ver!=0){
|
||||
if (ver!=0) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("validate_recv_data_frame fail! (ver!=0)\n"));
|
||||
retval = _FAIL;
|
||||
goto exit;
|
||||
|
@ -1782,7 +1782,7 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
|
|||
pattrib->order = GetOrder(ptr);
|
||||
|
||||
rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt));
|
||||
if (bDumpRxPkt ==1){/* dump all rx packets */
|
||||
if (bDumpRxPkt ==1) {/* dump all rx packets */
|
||||
int i;
|
||||
DBG_871X("#############################\n");
|
||||
|
||||
|
@ -1791,8 +1791,8 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
|
|||
*(ptr+i+1), *(ptr+i+2) ,*(ptr+i+3) ,*(ptr+i+4),*(ptr+i+5), *(ptr+i+6), *(ptr+i+7));
|
||||
DBG_871X("#############################\n");
|
||||
}
|
||||
else if (bDumpRxPkt ==2){
|
||||
if (type == WIFI_MGT_TYPE){
|
||||
else if (bDumpRxPkt ==2) {
|
||||
if (type == WIFI_MGT_TYPE) {
|
||||
int i;
|
||||
DBG_871X("#############################\n");
|
||||
|
||||
|
@ -1802,8 +1802,8 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
|
|||
DBG_871X("#############################\n");
|
||||
}
|
||||
}
|
||||
else if (bDumpRxPkt ==3){
|
||||
if (type == WIFI_DATA_TYPE){
|
||||
else if (bDumpRxPkt ==3) {
|
||||
if (type == WIFI_DATA_TYPE) {
|
||||
int i;
|
||||
DBG_871X("#############################\n");
|
||||
|
||||
|
@ -1886,7 +1886,7 @@ static sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
|||
|
||||
;
|
||||
|
||||
if (pattrib->encrypt){
|
||||
if (pattrib->encrypt) {
|
||||
recvframe_pull_tail(precvframe, pattrib->icv_len);
|
||||
}
|
||||
|
||||
|
@ -1898,7 +1898,7 @@ static sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
|||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == false) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) ==false) )||
|
||||
/* eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || */
|
||||
_rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)){
|
||||
_rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)) {
|
||||
/* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
|
||||
bsnaphdr = true;
|
||||
}
|
||||
|
@ -2253,7 +2253,7 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
|
|||
}
|
||||
}
|
||||
|
||||
for (i =0; i<nr_subframes; i++){
|
||||
for (i =0; i<nr_subframes; i++) {
|
||||
sub_skb = subframes[i];
|
||||
/* convert hdr + possible LLC headers into Ethernet header */
|
||||
#ifdef ENDIAN_FREE
|
||||
|
@ -2609,7 +2609,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *
|
|||
preorder_ctrl->indicate_seq, pattrib->seq_num);
|
||||
#endif
|
||||
|
||||
if (retval != _SUCCESS){
|
||||
if (retval != _SUCCESS) {
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s amsdu_to_msdu fail\n", __FUNCTION__);
|
||||
#endif
|
||||
|
@ -2914,7 +2914,7 @@ _recv_entry_drop:
|
|||
return ret;
|
||||
}
|
||||
|
||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS) {
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
struct recv_priv *recvpriv = &adapter->recvpriv;
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ static void crc32_init(void)
|
|||
for (i = 0; i < 256; ++i)
|
||||
{
|
||||
k = crc32_reverseBit((u8)i);
|
||||
for (c = ((u32)k) << 24, j = 8; j > 0; --j){
|
||||
for (c = ((u32)k) << 24, j = 8; j > 0; --j) {
|
||||
c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1);
|
||||
}
|
||||
p1 = (u8 *)&crc32_table[i];
|
||||
|
@ -390,7 +390,7 @@ void rtw_seccalctkipmic(u8 * key, u8 *header, u8 *data, u32 data_len, u8 *mic_co
|
|||
priority[0]=pri;
|
||||
|
||||
/* Michael MIC pseudo header: DA, SA, 3 x 0, Priority */
|
||||
if (header[1]&1){ /* ToDS ==1 */
|
||||
if (header[1]&1) { /* ToDS ==1 */
|
||||
rtw_secmicappend(&micdata, &header[16], 6); /* DA */
|
||||
if (header[1]&2) /* From Ds ==1 */
|
||||
rtw_secmicappend(&micdata, &header[24], 6);
|
||||
|
@ -654,7 +654,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
pframe = ((struct xmit_frame*)pxmitframe)->buf_addr + hw_hdr_offset;
|
||||
/* 4 start to encrypt each fragment */
|
||||
if (pattrib->encrypt ==_TKIP_){
|
||||
if (pattrib->encrypt ==_TKIP_) {
|
||||
|
||||
if (pattrib->psta)
|
||||
{
|
||||
|
@ -666,7 +666,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
stainfo =rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0] );
|
||||
}
|
||||
|
||||
if (stainfo!=NULL){
|
||||
if (stainfo!=NULL) {
|
||||
|
||||
if (!(stainfo->state &_FW_LINKED))
|
||||
{
|
||||
|
@ -687,7 +687,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
prwskeylen =16;
|
||||
|
||||
for (curfragnum =0;curfragnum<pattrib->nr_frags;curfragnum++){
|
||||
for (curfragnum =0;curfragnum<pattrib->nr_frags;curfragnum++) {
|
||||
iv =pframe+pattrib->hdrlen;
|
||||
payload =pframe+pattrib->iv_len+pattrib->hdrlen;
|
||||
|
||||
|
@ -700,7 +700,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
phase2(&rc4key[0], prwskey, (u16 *)&ttkey[0], pnl);
|
||||
|
||||
if ((curfragnum+1) ==pattrib->nr_frags){ /* 4 the last fragment */
|
||||
if ((curfragnum+1) ==pattrib->nr_frags) { /* 4 the last fragment */
|
||||
length =pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len- pattrib->icv_len;
|
||||
RT_TRACE(_module_rtl871x_security_c_, _drv_info_, ("pattrib->iv_len =%x, pattrib->icv_len =%x\n", pattrib->iv_len, pattrib->icv_len));
|
||||
*((__le32 *)crc) =getcrc32(payload, length);/* modified by Amy*/
|
||||
|
@ -762,10 +762,10 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
|
|||
pframe =(unsigned char *)((union recv_frame*)precvframe)->u.hdr.rx_data;
|
||||
|
||||
/* 4 start to decrypt recvframe */
|
||||
if (prxattrib->encrypt ==_TKIP_){
|
||||
if (prxattrib->encrypt ==_TKIP_) {
|
||||
|
||||
stainfo =rtw_get_stainfo(&padapter->stapriv ,&prxattrib->ta[0] );
|
||||
if (stainfo!=NULL){
|
||||
if (stainfo!=NULL) {
|
||||
|
||||
if (IS_MCAST(prxattrib->ra))
|
||||
{
|
||||
|
@ -1552,7 +1552,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
pframe = ((struct xmit_frame*)pxmitframe)->buf_addr + hw_hdr_offset;
|
||||
|
||||
/* 4 start to encrypt each fragment */
|
||||
if ((pattrib->encrypt ==_AES_)){
|
||||
if ((pattrib->encrypt ==_AES_)) {
|
||||
if (pattrib->psta) {
|
||||
stainfo = pattrib->psta;
|
||||
} else {
|
||||
|
@ -1560,7 +1560,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
stainfo =rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0] );
|
||||
}
|
||||
|
||||
if (stainfo!=NULL){
|
||||
if (stainfo!=NULL) {
|
||||
if (!(stainfo->state &_FW_LINKED)) {
|
||||
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, stainfo->state);
|
||||
return _FAIL;
|
||||
|
@ -1574,9 +1574,9 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
prwskey =&stainfo->dot118021x_UncstKey.skey[0];
|
||||
prwskeylen =16;
|
||||
|
||||
for (curfragnum =0;curfragnum<pattrib->nr_frags;curfragnum++){
|
||||
for (curfragnum =0;curfragnum<pattrib->nr_frags;curfragnum++) {
|
||||
|
||||
if ((curfragnum+1) ==pattrib->nr_frags){ /* 4 the last fragment */
|
||||
if ((curfragnum+1) ==pattrib->nr_frags) { /* 4 the last fragment */
|
||||
length =pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len- pattrib->icv_len;
|
||||
|
||||
aes_cipher(prwskey, pattrib->hdrlen, pframe, length);
|
||||
|
@ -1656,7 +1656,7 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
|||
((frtype|frsubtype) == WIFI_DATA_CFPOLL)||
|
||||
((frtype|frsubtype) == WIFI_DATA_CFACKPOLL)) {
|
||||
qc_exists = 1;
|
||||
if (hdrlen != WLAN_HDR_A3_QOS_LEN){
|
||||
if (hdrlen != WLAN_HDR_A3_QOS_LEN) {
|
||||
hdrlen += 2;
|
||||
}
|
||||
}/* only for data packet . add for CONFIG_IEEE80211W, none 11w also can use */
|
||||
|
@ -1665,7 +1665,7 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
|||
(frsubtype == 0x09)||
|
||||
(frsubtype == 0x0a)||
|
||||
(frsubtype == 0x0b))) {
|
||||
if (hdrlen != WLAN_HDR_A3_QOS_LEN){
|
||||
if (hdrlen != WLAN_HDR_A3_QOS_LEN) {
|
||||
hdrlen += 2;
|
||||
}
|
||||
qc_exists = 1;
|
||||
|
@ -1848,7 +1848,7 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
|||
for (j =0; j<8;j++) message[payload_index++] = chain_buffer[j];
|
||||
|
||||
/* compare the mic */
|
||||
for (i =0;i<8;i++){
|
||||
for (i =0;i<8;i++) {
|
||||
if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i])
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("aes_decipher:mic check error mic[%d]: pframe(%x) != message(%x)\n",
|
||||
|
@ -1873,9 +1873,9 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
|
|||
;
|
||||
pframe =(unsigned char *)((union recv_frame*)precvframe)->u.hdr.rx_data;
|
||||
/* 4 start to encrypt each fragment */
|
||||
if ((prxattrib->encrypt ==_AES_)){
|
||||
if ((prxattrib->encrypt ==_AES_)) {
|
||||
stainfo =rtw_get_stainfo(&padapter->stapriv ,&prxattrib->ta[0] );
|
||||
if (stainfo!=NULL){
|
||||
if (stainfo!=NULL) {
|
||||
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo!=NULL!!!\n"));
|
||||
|
||||
if (IS_MCAST(prxattrib->ra)) {
|
||||
|
@ -2769,8 +2769,8 @@ void rtw_sec_restore_wep_key(struct adapter *adapter)
|
|||
sint keyid;
|
||||
|
||||
if ((_WEP40_ == securitypriv->dot11PrivacyAlgrthm) ||(_WEP104_ == securitypriv->dot11PrivacyAlgrthm)) {
|
||||
for (keyid =0;keyid<4;keyid++){
|
||||
if (securitypriv->key_mask & BIT(keyid)){
|
||||
for (keyid =0;keyid<4;keyid++) {
|
||||
if (securitypriv->key_mask & BIT(keyid)) {
|
||||
if (keyid == securitypriv->dot11PrivacyKeyIndex)
|
||||
rtw_set_key(adapter, securitypriv, keyid, 1, true);
|
||||
else
|
||||
|
|
|
@ -55,10 +55,10 @@ u8 sreset_get_wifi_status(struct adapter *padapter)
|
|||
return status;
|
||||
}
|
||||
val32 =rtw_read32(padapter, REG_TXDMA_STATUS);
|
||||
if (val32 == 0xeaeaeaea){
|
||||
if (val32 == 0xeaeaeaea) {
|
||||
psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST;
|
||||
}
|
||||
else if (val32!=0){
|
||||
else if (val32!=0) {
|
||||
DBG_8192C("txdmastatu(%x)\n", val32);
|
||||
psrtpriv->Wifi_Error_Status = WIFI_MAC_TXDMA_ERROR;
|
||||
}
|
||||
|
|
|
@ -207,7 +207,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
|||
struct recv_reorder_ctrl *preorder_ctrl;
|
||||
int index;
|
||||
|
||||
if (pstapriv){
|
||||
if (pstapriv) {
|
||||
/* delete all reordering_ctrl_timer */
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
for (index = 0; index < NUM_STA; index++)
|
||||
|
@ -278,7 +278,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_info_, ("rtw_alloc_stainfo: index = %x", index));
|
||||
|
||||
if (index >= NUM_STA){
|
||||
if (index >= NUM_STA) {
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("ERROR => rtw_alloc_stainfo: index >= NUM_STA"));
|
||||
psta = NULL;
|
||||
goto exit;
|
||||
|
@ -606,7 +606,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter)
|
|||
|
||||
psta = rtw_alloc_stainfo(pstapriv, bcast_addr);
|
||||
|
||||
if (psta == NULL){
|
||||
if (psta == NULL) {
|
||||
res =_FAIL;
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail"));
|
||||
goto exit;
|
||||
|
|
|
@ -1830,7 +1830,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
|
|||
if (ralink_vendor_flag && !epigram_vendor_flag) {
|
||||
DBG_871X("link to Ralink AP\n");
|
||||
return HT_IOT_PEER_RALINK;
|
||||
} else if (ralink_vendor_flag && epigram_vendor_flag){
|
||||
} else if (ralink_vendor_flag && epigram_vendor_flag) {
|
||||
DBG_871X("link to Tenda W311R AP\n");
|
||||
return HT_IOT_PEER_TENDA;
|
||||
} else {
|
||||
|
|
|
@ -113,7 +113,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
|||
|
||||
pxmitpriv->pallocated_frame_buf = rtw_zvmalloc(NR_XMITFRAME * sizeof(struct xmit_frame) + 4);
|
||||
|
||||
if (pxmitpriv->pallocated_frame_buf == NULL){
|
||||
if (pxmitpriv->pallocated_frame_buf == NULL) {
|
||||
pxmitpriv->pxmit_frame_buf =NULL;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("alloc xmit_frame fail!\n"));
|
||||
res = _FAIL;
|
||||
|
@ -153,7 +153,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
|||
|
||||
pxmitpriv->pallocated_xmitbuf = rtw_zvmalloc(NR_XMITBUFF * sizeof(struct xmit_buf) + 4);
|
||||
|
||||
if (pxmitpriv->pallocated_xmitbuf == NULL){
|
||||
if (pxmitpriv->pallocated_xmitbuf == NULL) {
|
||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("alloc xmit_buf fail!\n"));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -200,7 +200,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
|||
|
||||
pxmitpriv->xframe_ext_alloc_addr = rtw_zvmalloc(num_xmit_extbuf * sizeof(struct xmit_frame) + 4);
|
||||
|
||||
if (pxmitpriv->xframe_ext_alloc_addr == NULL){
|
||||
if (pxmitpriv->xframe_ext_alloc_addr == NULL) {
|
||||
pxmitpriv->xframe_ext = NULL;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("alloc xframe_ext fail!\n"));
|
||||
res = _FAIL;
|
||||
|
@ -233,7 +233,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
|||
|
||||
pxmitpriv->pallocated_xmit_extbuf = rtw_zvmalloc(num_xmit_extbuf * sizeof(struct xmit_buf) + 4);
|
||||
|
||||
if (pxmitpriv->pallocated_xmit_extbuf == NULL){
|
||||
if (pxmitpriv->pallocated_xmit_extbuf == NULL) {
|
||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("alloc xmit_extbuf fail!\n"));
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
|
@ -828,7 +828,7 @@ exit:
|
|||
return res;
|
||||
}
|
||||
|
||||
static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitframe){
|
||||
static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitframe) {
|
||||
sint curfragnum, length;
|
||||
u8 *pframe, *payload, mic[8];
|
||||
struct mic_data micdata;
|
||||
|
@ -870,14 +870,14 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
if (pattrib->encrypt ==_TKIP_)/* if (psecuritypriv->dot11PrivacyAlgrthm ==_TKIP_PRIVACY_) */
|
||||
{
|
||||
/* encode mic code */
|
||||
if (stainfo!= NULL){
|
||||
if (stainfo!= NULL) {
|
||||
u8 null_key[16]={0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
|
||||
|
||||
pframe = pxmitframe->buf_addr + hw_hdr_offset;
|
||||
|
||||
if (bmcst)
|
||||
{
|
||||
if (_rtw_memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16) ==true){
|
||||
if (_rtw_memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16) ==true) {
|
||||
/* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey == 0\n"); */
|
||||
/* rtw_msleep_os(10); */
|
||||
return _FAIL;
|
||||
|
@ -887,7 +887,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
}
|
||||
else
|
||||
{
|
||||
if (_rtw_memcmp(&stainfo->dot11tkiptxmickey.skey[0], null_key, 16) ==true){
|
||||
if (_rtw_memcmp(&stainfo->dot11tkiptxmickey.skey[0], null_key, 16) ==true) {
|
||||
/* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey == 0\n"); */
|
||||
/* rtw_msleep_os(10); */
|
||||
return _FAIL;
|
||||
|
@ -896,7 +896,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
rtw_secmicsetkey(&micdata, &stainfo->dot11tkiptxmickey.skey[0]);
|
||||
}
|
||||
|
||||
if (pframe[1]&1){ /* ToDS ==1 */
|
||||
if (pframe[1]&1) { /* ToDS ==1 */
|
||||
rtw_secmicappend(&micdata, &pframe[16], 6); /* DA */
|
||||
if (pframe[1]&2) /* From Ds ==1 */
|
||||
rtw_secmicappend(&micdata, &pframe[24], 6);
|
||||
|
@ -920,14 +920,14 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
|
||||
payload =pframe;
|
||||
|
||||
for (curfragnum =0;curfragnum<pattrib->nr_frags;curfragnum++){
|
||||
for (curfragnum =0;curfragnum<pattrib->nr_frags;curfragnum++) {
|
||||
payload =(u8 *)RND4((SIZE_PTR)(payload));
|
||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("===curfragnum =%d, pframe = 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x,!!!\n",
|
||||
curfragnum,*payload, *(payload+1),*(payload+2),*(payload+3),*(payload+4),*(payload+5),*(payload+6),*(payload+7)));
|
||||
|
||||
payload =payload+pattrib->hdrlen+pattrib->iv_len;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("curfragnum =%d pattrib->hdrlen =%d pattrib->iv_len =%d", curfragnum, pattrib->hdrlen, pattrib->iv_len));
|
||||
if ((curfragnum+1) ==pattrib->nr_frags){
|
||||
if ((curfragnum+1) ==pattrib->nr_frags) {
|
||||
length =pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len-( (pattrib->bswenc) ? pattrib->icv_len : 0);
|
||||
rtw_secmicappend(&micdata, payload, length);
|
||||
payload =payload+length;
|
||||
|
@ -967,7 +967,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
return _SUCCESS;
|
||||
}
|
||||
|
||||
static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmitframe){
|
||||
static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmitframe) {
|
||||
|
||||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||
/* struct security_priv *psecuritypriv =&padapter->securitypriv; */
|
||||
|
@ -979,7 +979,7 @@ static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmi
|
|||
{
|
||||
/* DBG_871X("start xmitframe_swencrypt\n"); */
|
||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_alert_, ("### xmitframe_swencrypt\n"));
|
||||
switch (pattrib->encrypt){
|
||||
switch (pattrib->encrypt) {
|
||||
case _WEP40_:
|
||||
case _WEP104_:
|
||||
rtw_wep_encrypt(padapter, (u8 *)pxmitframe);
|
||||
|
@ -1109,7 +1109,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
|
|||
|
||||
/* Update Seq Num will be handled by f/w */
|
||||
{
|
||||
if (psta){
|
||||
if (psta) {
|
||||
|
||||
psta->sta_xmitpriv.txseq_tid[pattrib->priority]++;
|
||||
psta->sta_xmitpriv.txseq_tid[pattrib->priority] &= 0xFFF;
|
||||
|
@ -1308,7 +1308,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
if (pxmitframe->buf_addr == NULL){
|
||||
if (pxmitframe->buf_addr == NULL) {
|
||||
DBG_8192C("==> %s buf_addr == NULL\n", __FUNCTION__);
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -2097,7 +2097,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (pxmitframe->pkt){
|
||||
if (pxmitframe->pkt) {
|
||||
pndis_pkt = pxmitframe->pkt;
|
||||
pxmitframe->pkt = NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue