rtl8188eu: Change "){" to ") {"

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-08-15 13:24:16 -05:00
parent c137ff21e5
commit 0a97479cee
46 changed files with 464 additions and 464 deletions

View file

@ -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 */ /* 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) if (psta->sleepq_len > (NR_XMITFRAME/pstapriv->asoc_list_cnt)
&& padapter->xmitpriv.free_xmitframe_cnt < ((NR_XMITFRAME/pstapriv->asoc_list_cnt)/2) && 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__ 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) , MAC_ARG(psta->hwaddr)
, psta->sleepq_len, padapter->xmitpriv.free_xmitframe_cnt, pstapriv->asoc_list_cnt); , psta->sleepq_len, padapter->xmitpriv.free_xmitframe_cnt, pstapriv->asoc_list_cnt);

View file

@ -57,7 +57,7 @@ sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv)
pcmdpriv->cmd_allocated_buf = rtw_zmalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ); 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; res = _FAIL;
goto exit; goto exit;
} }
@ -66,7 +66,7 @@ sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv)
pcmdpriv->rsp_allocated_buf = rtw_zmalloc(MAX_RSPSZ + 4); pcmdpriv->rsp_allocated_buf = rtw_zmalloc(MAX_RSPSZ + 4);
if (pcmdpriv->rsp_allocated_buf == NULL){ if (pcmdpriv->rsp_allocated_buf == NULL) {
res = _FAIL; res = _FAIL;
goto exit; 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->cmd_queue_sema));
_rtw_free_sema(&(pcmdpriv->terminate_cmdthread_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); struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
#endif /* CONFIG_P2P */ #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); 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)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
psetphypara = (struct setphy_parm*)rtw_zmalloc(sizeof(struct setphy_parm)); psetphypara = (struct setphy_parm*)rtw_zmalloc(sizeof(struct setphy_parm));
if (psetphypara == NULL){ if (psetphypara == NULL) {
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -747,13 +747,13 @@ u8 rtw_setbbreg_cmd(struct adapter*padapter, u8 offset, u8 val)
u8 res =_SUCCESS; u8 res =_SUCCESS;
; ;
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pwritebbparm = (struct writeBB_parm*)rtw_zmalloc(sizeof(struct writeBB_parm)); pwritebbparm = (struct writeBB_parm*)rtw_zmalloc(sizeof(struct writeBB_parm));
if (pwritebbparm == NULL){ if (pwritebbparm == NULL) {
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; 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)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res =_FAIL; res =_FAIL;
goto exit; goto exit;
} }
prdbbparm = (struct readBB_parm*)rtw_zmalloc(sizeof(struct readBB_parm)); 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)); rtw_mfree((unsigned char *) ph2c, sizeof(struct cmd_obj));
return _FAIL; return _FAIL;
} }
@ -813,13 +813,13 @@ u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val)
u8 res =_SUCCESS; u8 res =_SUCCESS;
; ;
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pwriterfparm = (struct writeRF_parm*)rtw_zmalloc(sizeof(struct writeRF_parm)); pwriterfparm = (struct writeRF_parm*)rtw_zmalloc(sizeof(struct writeRF_parm));
if (pwriterfparm == NULL){ if (pwriterfparm == NULL) {
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; 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)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
prdrfparm = (struct readRF_parm*)rtw_zmalloc(sizeof(struct readRF_parm)); prdrfparm = (struct readRF_parm*)rtw_zmalloc(sizeof(struct readRF_parm));
if (prdrfparm == NULL){ if (prdrfparm == NULL) {
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -909,14 +909,14 @@ u8 rtw_createbss_cmd(struct adapter *padapter)
rtw_led_control(padapter, LED_CTL_START_TO_LINK); 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)); RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for Any SSid:%s\n", pmlmepriv->assoc_ssid.Ssid));
} else { } else {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for SSid:%s\n", pmlmepriv->assoc_ssid.Ssid)); 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)); pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmd == NULL){ if (pcmd == NULL) {
res = _FAIL; res = _FAIL;
goto exit; 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)); pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmd == NULL){ if (pcmd == NULL) {
res = _FAIL; res = _FAIL;
goto exit; 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); 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")); RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+Join cmd: Any SSid\n"));
} else { } else {
RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid =[%s]\n", pmlmepriv->assoc_ssid.Ssid)); 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)); pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmd == NULL){ if (pcmd == NULL) {
res =_FAIL; res =_FAIL;
RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("rtw_joinbss_cmd: memory allocate for cmd_obj fail!!!\n")); RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("rtw_joinbss_cmd: memory allocate for cmd_obj fail!!!\n"));
goto exit; 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)); psetop = (struct setopmode_parm*)rtw_zmalloc(sizeof(struct setopmode_parm));
if (psetop == NULL){ if (psetop == NULL) {
res =_FAIL; res =_FAIL;
goto exit; goto exit;
} }
psetop->mode = (u8)networktype; psetop->mode = (u8)networktype;
if (enqueue){ if (enqueue) {
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
rtw_mfree((u8 *)psetop, sizeof(*psetop)); rtw_mfree((u8 *)psetop, sizeof(*psetop));
res = _FAIL; res = _FAIL;
goto exit; 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)); psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm));
if (psetstakey_para == NULL){ if (psetstakey_para == NULL) {
res =_FAIL; res =_FAIL;
goto exit; goto exit;
} }
memcpy(psetstakey_para->addr, sta->hwaddr, ETH_ALEN); 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; psetstakey_para->algorithm =(unsigned char) psecuritypriv->dot11PrivacyAlgrthm;
}else{ }else{
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false); 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) if (enqueue)
{ {
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); 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)); rtw_mfree((u8 *) psetstakey_para, sizeof(struct set_stakey_parm));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
psetstakey_rsp = (struct set_stakey_rsp*)rtw_zmalloc(sizeof(struct set_stakey_rsp)); 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 *) ph2c, sizeof(struct cmd_obj));
rtw_mfree((u8 *) psetstakey_para, sizeof(struct set_stakey_parm)); rtw_mfree((u8 *) psetstakey_para, sizeof(struct set_stakey_parm));
res =_FAIL; res =_FAIL;
@ -1299,20 +1299,20 @@ u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue)
else else
{ {
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if ( ph2c == NULL){ if ( ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm)); 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)); rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
res =_FAIL; res =_FAIL;
goto exit; goto exit;
} }
psetstakey_rsp = (struct set_stakey_rsp*)rtw_zmalloc(sizeof(struct set_stakey_rsp)); 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 *) ph2c, sizeof(struct cmd_obj));
rtw_mfree((u8 *) psetstakey_para, sizeof(struct set_stakey_parm)); rtw_mfree((u8 *) psetstakey_para, sizeof(struct set_stakey_parm));
res =_FAIL; 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)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
psetrttblparm = (struct setratable_parm*)rtw_zmalloc(sizeof(struct setratable_parm)); 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)); rtw_mfree((unsigned char *) ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; 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)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pgetrttblparm = (struct getratable_parm*)rtw_zmalloc(sizeof(struct getratable_parm)); 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)); rtw_mfree((unsigned char *) ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; 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)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
psetassocsta_para = (struct set_assocsta_parm*)rtw_zmalloc(sizeof(struct set_assocsta_parm)); 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)); rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
res =_FAIL; res =_FAIL;
goto exit; goto exit;
} }
psetassocsta_rsp = (struct set_stakey_rsp*)rtw_zmalloc(sizeof(struct set_assocsta_rsp)); 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 *) ph2c, sizeof(struct cmd_obj));
rtw_mfree((u8 *) psetassocsta_para, sizeof(struct set_assocsta_parm)); rtw_mfree((u8 *) psetassocsta_para, sizeof(struct set_assocsta_parm));
return _FAIL; 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)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
paddbareq_parm = (struct addBaReq_parm*)rtw_zmalloc(sizeof(struct addBaReq_parm)); 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)); rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -1507,13 +1507,13 @@ u8 rtw_reset_securitypriv_cmd(struct adapter*padapter)
; ;
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); 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)); rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; 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)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); 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)); rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -1585,13 +1585,13 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter*padapter)
u8 res =_SUCCESS; u8 res =_SUCCESS;
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); 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)); rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; 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) { if (enqueue) {
/* need enqueue, prepare cmd_obj and enqueue */ /* need enqueue, prepare cmd_obj and enqueue */
pcmdobj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); 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)); rtw_mfree((u8 *)set_ch_parm, sizeof(*set_ch_parm));
res =_FAIL; res =_FAIL;
goto exit; 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 */ /* need enqueue, prepare cmd_obj and enqueue */
pcmdobj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); 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)); rtw_mfree((u8 *)setChannelPlan_param, sizeof(struct SetChannelPlan_param));
res =_FAIL; res =_FAIL;
goto exit; 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")); RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_led_blink_cmd\n"));
pcmdobj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); pcmdobj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmdobj == NULL){ if (pcmdobj == NULL) {
res =_FAIL; res =_FAIL;
goto exit; 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")); RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_set_csa_cmd\n"));
pcmdobj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); pcmdobj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmdobj == NULL){ if (pcmdobj == NULL) {
res =_FAIL; res =_FAIL;
goto exit; goto exit;
} }
@ -2039,13 +2039,13 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter*padapter, u8 lps_ctrl_type, u8 enqueue)
if (enqueue) { if (enqueue) {
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); 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)); rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; 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)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); 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)); rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -2135,13 +2135,13 @@ u8 rtw_antenna_select_cmd(struct adapter*padapter, u8 antenna, u8 enqueue)
if (true == enqueue) if (true == enqueue)
{ {
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); 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)); rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; 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)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); 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)); rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -2236,13 +2236,13 @@ u8 rtw_ps_cmd(struct adapter*padapter)
u8 res = _SUCCESS; u8 res = _SUCCESS;
ppscmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ppscmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ppscmd == NULL){ if (ppscmd == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); 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)); rtw_mfree((unsigned char *)ppscmd, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -2319,13 +2319,13 @@ u8 rtw_chk_hi_queue_cmd(struct adapter*padapter)
u8 res = _SUCCESS; u8 res = _SUCCESS;
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); 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)); rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; goto exit;

View file

@ -481,7 +481,7 @@ efuse_OneByteWrite(
rtw_write8(pAdapter, EFUSE_CTRL+3, 0xF2);/* write cmd */ 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++; tmpidx++;
} }
@ -716,7 +716,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
return _FAIL; return _FAIL;
map = rtw_zmalloc(mapLen); map = rtw_zmalloc(mapLen);
if (map == NULL){ if (map == NULL) {
return _FAIL; return _FAIL;
} }
@ -814,7 +814,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data
return _FAIL; return _FAIL;
map = rtw_zmalloc(mapLen); map = rtw_zmalloc(mapLen);
if (map == NULL){ if (map == NULL) {
return _FAIL; return _FAIL;
} }

View file

@ -220,7 +220,7 @@ u8 *rtw_get_ie(u8 *pbuf, sint index, sint *len, sint limit)
sint tmp, i; sint tmp, i;
u8 *p; u8 *p;
; ;
if (limit < 1){ if (limit < 1) {
; ;
return NULL; 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) { if (wpa_ie) {
memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt+1]+2); 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", 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], 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])); 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) { if (rsn_ie) {
memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt+1]+2); 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", 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], 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])); 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* pos = (u8*)buf;
u8 id, len; u8 id, len;
while (pos-buf<=buf_len){ while (pos-buf<=buf_len) {
id = *pos; id = *pos;
len = *(pos+1); len = *(pos+1);
@ -1326,7 +1326,7 @@ void dump_wps_ie(u8 *ie, u32 ie_len)
return; return;
pos+=6; pos+=6;
while (pos-ie < ie_len){ while (pos-ie < ie_len) {
id = RTW_GET_BE16(pos); id = RTW_GET_BE16(pos);
len = RTW_GET_BE16(pos + 2); len = RTW_GET_BE16(pos + 2);
@ -1421,7 +1421,7 @@ void dump_p2p_ie(u8 *ie, u32 ie_len) {
return; return;
pos+=6; pos+=6;
while (pos-ie < ie_len){ while (pos-ie < ie_len) {
id = *pos; id = *pos;
len = RTW_GET_LE16(pos+1); len = RTW_GET_LE16(pos+1);
@ -1683,7 +1683,7 @@ void dump_wfd_ie(u8 *ie, u32 ie_len)
return; return;
pos+=6; pos+=6;
while (pos-ie < ie_len){ while (pos-ie < ie_len) {
id = *pos; id = *pos;
len = RTW_GET_BE16(pos+1); len = RTW_GET_BE16(pos+1);

View file

@ -68,7 +68,7 @@ u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
for (i = 0; i < ssid->SsidLength; i++) for (i = 0; i < ssid->SsidLength; i++)
{ {
/* wifi, printable ascii code must be supported */ /* 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")); RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid has nonprintabl ascii\n"));
ret = false; ret = false;
break; 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"); */ /* 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; pmlmepriv->to_join = false;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("do_join(): site survey return error\n.")); 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", DBG_871X_LEVEL(_drv_always_, "set ssid [%s] fw_state =0x%08x\n",
ssid->Ssid, get_fwstate(pmlmepriv)); 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_, RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
("set_ssid: hw_init_completed ==false =>exit!!!\n")); ("set_ssid: hw_init_completed ==false =>exit!!!\n"));
status = _FAIL; status = _FAIL;
@ -434,7 +434,7 @@ u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, struct ndis_802_1
goto exit; goto exit;
} }
if (padapter->hw_init_completed ==false){ if (padapter->hw_init_completed ==false) {
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
("set_ssid: hw_init_completed ==false =>exit!!!\n")); ("set_ssid: hw_init_completed ==false =>exit!!!\n"));
status = _FAIL; status = _FAIL;
@ -602,7 +602,7 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, struct ndis_802_11_s
res =false; res =false;
goto exit; goto exit;
} }
if (padapter->hw_init_completed ==false){ if (padapter->hw_init_completed ==false) {
res = 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")); RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n ===rtw_set_802_11_bssid_list_scan:hw_init_completed ==false ===\n"));
goto exit; 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))); 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; 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")); RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n\n"));
} else { } else {
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n###pmlmepriv->sitesurveyctrl.traffic_busy ==true\n\n")); 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; 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 bdefaultkey;
u8 btransmitkey; 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; u8 ret =_SUCCESS;
; ;
if (keyindex >= 0x80000000 || padapter == NULL){ if (keyindex >= 0x80000000 || padapter == NULL) {
ret =false; ret =false;
goto exit; goto exit;
@ -744,7 +744,7 @@ u8 rtw_set_802_11_remove_wep(struct adapter* padapter, u32 keyindex){
{ {
int res; int res;
struct security_priv* psecuritypriv =&(padapter->securitypriv); struct security_priv* psecuritypriv =&(padapter->securitypriv);
if ( keyindex < 4 ){ if ( keyindex < 4 ) {
memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16); 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; uint encryptionalgo;
u8 * pbssid; 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 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. */ /* 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); pbssid =get_bssid(&padapter->mlmepriv);
stainfo =rtw_get_stainfo(&padapter->stapriv, pbssid); 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")); 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; 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.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)); 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)); 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 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 */ /* 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 */ /* 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 */ /* 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")); RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("MacAddr_isBcst(key->BSSID)\n"));
ret = false; 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. */ /* Check key length for TKIP. */
/* if (encryptionAlgorithm == RT_ENC_TKIP_ENCRYPTION && key->KeyLength != 32) */ /* 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)); RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("TKIP KeyLength:0x%x != 32\n", key->KeyLength));
ret =_FAIL; ret =_FAIL;
goto exit; 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 */ /* SetRSC */
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY: +++++ SetRSC+++++\n")); RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY: +++++ SetRSC+++++\n"));
if (bgroup == true) 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; padapter->securitypriv.dot118021XGrpKeyid =(u8)key->KeyIndex;
} }
if ((key->KeyIndex&0x3) == 0){ if ((key->KeyIndex&0x3) == 0) {
ret = _FAIL; ret = _FAIL;
goto exit; 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")); 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 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->dot11tkiptxmickey, key->KeyMaterial + 16, 8);
memcpy(&stainfo->dot11tkiprxmickey, key->KeyMaterial + 24, 8); memcpy(&stainfo->dot11tkiprxmickey, key->KeyMaterial + 24, 8);
@ -1133,7 +1133,7 @@ exit:
return ret; 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; uint encryptionalgo;
u8 * pbssid; u8 * pbssid;
@ -1161,7 +1161,7 @@ u8 rtw_set_802_11_remove_key(struct adapter* padapter, struct ndis_802_11_remove
} else { } else {
pbssid =get_bssid(&padapter->mlmepriv); pbssid =get_bssid(&padapter->mlmepriv);
stainfo =rtw_get_stainfo(&padapter->stapriv , pbssid ); stainfo =rtw_get_stainfo(&padapter->stapriv , pbssid );
if (stainfo !=NULL){ if (stainfo !=NULL) {
encryptionalgo =stainfo->dot118021XPrivacy; encryptionalgo =stainfo->dot118021XPrivacy;
/* clear key by BSSID */ /* clear key by BSSID */

View file

@ -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 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame)
{ {
u8 is_cmd_bndy = false; 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); rtw_IOL_append_END_cmd(pxmit_frame);
pxmit_frame->attrib.pktlen = ((((pxmit_frame->attrib.pktlen+32)/256)+1)*256 ); 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; int j =1;
printk("###### %s ######\n", __FUNCTION__); printk("###### %s ######\n", __FUNCTION__);
for (i =0;i< buf_len;i++){ for (i =0;i< buf_len;i++) {
printk("%02x-",*(pbuf+i)); printk("%02x-",*(pbuf+i));
if (j%32 == 0) printk("\n");j++; if (j%32 == 0) printk("\n");j++;

View file

@ -69,7 +69,7 @@ sint _rtw_init_mlme_priv (struct adapter* padapter)
pbuf = rtw_zvmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network))); pbuf = rtw_zvmalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
if (pbuf == NULL){ if (pbuf == NULL) {
res =_FAIL; res =_FAIL;
goto exit; 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; pnetwork =NULL;
goto exit; goto exit;
} }
@ -399,7 +399,7 @@ sint rtw_if_up(struct adapter *padapter) {
; ;
if ( padapter->bDriverStopped || padapter->bSurpriseRemoved || 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)); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_if_up:bDriverStopped(%d) OR bSurpriseRemoved(%d)", padapter->bDriverStopped, padapter->bSurpriseRemoved));
res =false; 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 */ 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")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n\n\nsomething wrong here\n\n\n"));
goto exit; goto exit;
} }
@ -1605,7 +1605,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
pcur_wlan->fixed = false; pcur_wlan->fixed = false;
pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress); pcur_sta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress);
if (pcur_sta){ if (pcur_sta) {
spin_lock_bh(&(pstapriv->sta_hash_lock)); spin_lock_bh(&(pstapriv->sta_hash_lock));
rtw_free_stainfo(adapter, pcur_sta); rtw_free_stainfo(adapter, pcur_sta);
spin_unlock_bh(&(pstapriv->sta_hash_lock)); 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; struct sta_priv *pstapriv = &padapter->stapriv;
#if defined (CONFIG_AP_MODE) #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--) 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)); 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; u16 media_status;
media_status = (mac_id<<8)|0; /* MACID|OPMODE:0 means disconnect */ media_status = (mac_id<<8)|0; /* MACID|OPMODE:0 means disconnect */
/* for STA, AP, ADHOC mode, report disconnect stauts to FW */ /* 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; updated = true;
} }
if (updated){ if (updated) {
DBG_871X("[by_bssid:%u][assoc_ssid:%s]" DBG_871X("[by_bssid:%u][assoc_ssid:%s]"
"[to_roaming:%u] " "[to_roaming:%u] "
"new candidate: %s("MAC_FMT") rssi:%d\n", "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)) { while (!rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) {
pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned, struct wlan_network, list); 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__)); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s return _FAIL:(pnetwork == NULL)\n", __FUNCTION__));
ret = _FAIL; ret = _FAIL;
goto exit; 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)); pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmd == NULL){ if (pcmd == NULL) {
res = _FAIL; /* try again */ res = _FAIL; /* try again */
goto exit; goto exit;
} }
psetauthparm =(struct setauth_parm*)rtw_zmalloc(sizeof(struct setauth_parm)); 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)); rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; 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)); psetkeyparm =(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm));
if (psetkeyparm == NULL){ if (psetkeyparm == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
memset(psetkeyparm, 0, sizeof(struct setkey_parm)); memset(psetkeyparm, 0, sizeof(struct setkey_parm));
if (psecuritypriv->dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X){ if (psecuritypriv->dot11AuthAlgrthm ==dot11AuthAlgrthm_8021X) {
psetkeyparm->algorithm =(unsigned char)psecuritypriv->dot118021XGrpPrivacy; 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)); 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); 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)); 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_: case _WEP40_:
keylen =5; 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)); 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)); rtw_mfree((unsigned char *)psetkeyparm, sizeof(struct setkey_parm));
res = _FAIL; /* try again */ res = _FAIL; /* try again */
goto exit; 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; 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 */ /* The RSN IE didn't include the PMK ID, append the PMK information */
ie[ie_len]=1; ie[ie_len]=1;
ie_len++; ie_len++;

View file

@ -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 rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch)
{ {
int i; 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) if (ch == ch_set[i].ChannelNum)
break; break;
} }
@ -6856,7 +6856,7 @@ void issue_assocreq(struct adapter *padapter)
/* Commented by Kurt 20110629 */ /* Commented by Kurt 20110629 */
/* In some older APs, WPS handshake */ /* In some older APs, WPS handshake */
/* would be fail if we append vender extensions informations to AP */ /* 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; 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" DBG_871X(FUNC_ADPT_FMT" ch:%u (cnt:%u, idx:%d) at %dms, %c%c%c\n"
, FUNC_ADPT_ARG(padapter) , FUNC_ADPT_ARG(padapter)
, survey_channel , survey_channel
@ -8116,7 +8116,7 @@ void site_survey(struct adapter *padapter)
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
{ {
int i; 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) { if (pmlmeext->sitesurvey_res.ssid[i].SsidLength) {
/* todo: to issue two probe req??? */ /* todo: to issue two probe req??? */
issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL); 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. */ /* restore to initial setting. */
update_tx_basic_rate(padapter, padapter->registrypriv.wireless_mode); 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 */ 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); 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.bss_cnt = 0;
pmlmeext->sitesurvey_res.channel_idx = 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) { if (pparm->ssid[i].SsidLength) {
memcpy(pmlmeext->sitesurvey_res.ssid[i].Ssid, pparm->ssid[i].Ssid, IW_ESSID_MAX_SIZE); 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; pmlmeext->sitesurvey_res.ssid[i].SsidLength = pparm->ssid[i].SsidLength;

View file

@ -4032,13 +4032,13 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
if (enqueue) if (enqueue)
{ {
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL){ if (ph2c == NULL) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); 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)); rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj));
res = _FAIL; res = _FAIL;
goto exit; goto exit;

View file

@ -175,7 +175,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
#endif #endif
#ifdef CONFIG_INTEL_PROXIM #ifdef CONFIG_INTEL_PROXIM
if (adapter->proximity.proxim_on ==true){ if (adapter->proximity.proxim_on ==true) {
return; return;
} }
#endif #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 */ /* System suspend is not allowed to wakeup */
if ((pwrpriv->bInternalAutoSuspend == false) && (true == pwrpriv->bInSuspend )){ if ((pwrpriv->bInternalAutoSuspend == false) && (true == pwrpriv->bInSuspend )) {
ret = _FAIL; ret = _FAIL;
goto exit; 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 (check_fwstate(pmlmepriv, _FW_LINKED) == true)
{ {
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND) #if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
if (true ==pwrpriv->bInternalAutoSuspend){ if (true ==pwrpriv->bInternalAutoSuspend) {
if (0 ==pwrpriv->autopm_cnt){ if (0 ==pwrpriv->autopm_cnt) {
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2, 6, 33)) #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2, 6, 33))
if (usb_autopm_get_interface(adapter_to_dvobj(padapter)->pusbintf) < 0) 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 if (padapter->bDriverStopped
|| !padapter->bup || !padapter->bup
|| !padapter->hw_init_completed || !padapter->hw_init_completed
){ ) {
DBG_8192C("%s: bDriverStopped =%d, bup =%d, hw_init_completed =%u\n" DBG_8192C("%s: bDriverStopped =%d, bup =%d, hw_init_completed =%u\n"
, caller , caller
, padapter->bDriverStopped , 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"); DBG_871X("%s %s\n", __FUNCTION__, mode == IPS_NORMAL?"IPS_NORMAL":"IPS_LEVEL_2");
return 0; return 0;
} }
else if (mode ==IPS_NONE){ else if (mode ==IPS_NONE) {
rtw_ips_mode_req(pwrctrlpriv, mode); rtw_ips_mode_req(pwrctrlpriv, mode);
DBG_871X("%s %s\n", __FUNCTION__, "IPS_NONE"); DBG_871X("%s %s\n", __FUNCTION__, "IPS_NONE");
if ((padapter->bSurpriseRemoved == 0)&&(_FAIL == rtw_pwr_wakeup(padapter)) ) if ((padapter->bSurpriseRemoved == 0)&&(_FAIL == rtw_pwr_wakeup(padapter)) )

View file

@ -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); 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; res = _FAIL;
goto exit; goto exit;
} }
@ -165,7 +165,7 @@ union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
rtw_list_delete(&precvframe->u.hdr.list); rtw_list_delete(&precvframe->u.hdr.list);
padapter =precvframe->u.hdr.adapter; padapter =precvframe->u.hdr.adapter;
if (padapter !=NULL){ if (padapter !=NULL) {
precvpriv =&padapter->recvpriv; precvpriv =&padapter->recvpriv;
if (pfree_recv_queue == &precvpriv->free_recv_queue) if (pfree_recv_queue == &precvpriv->free_recv_queue)
precvpriv->free_recvframe_cnt--; 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)); 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) if (pfree_recv_queue == &precvpriv->free_recv_queue)
precvpriv->free_recvframe_cnt++; 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 recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe) {
sint i, res =_SUCCESS; sint i, res =_SUCCESS;
u32 datalen; u32 datalen;
@ -436,15 +436,15 @@ sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe){
bmic_err =false; bmic_err =false;
for (i =0;i<8;i++){ for (i =0;i<8;i++) {
if (miccode[i] != *(pframemic+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))); 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; 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", 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))); *(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; uint i;
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("\n ======demp packet (len =%d) ======\n", precvframe->u.hdr.len)); 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", 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),*(precvframe->u.hdr.rx_data+i+1),
*(precvframe->u.hdr.rx_data+i+2),*(precvframe->u.hdr.rx_data+i+3), *(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{ else{
/* mic checked ok */ /* 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; psecuritypriv->bcheck_grpkey =true;
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("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); DBG_871X("prxattrib->key_index(%d) > WEP_KEYS\n", prxattrib->key_index);
switch (prxattrib->encrypt){ switch (prxattrib->encrypt) {
case _WEP40_: case _WEP40_:
case _WEP104_: case _WEP104_:
prxattrib->key_index = psecuritypriv->dot11PrivacyKeyIndex; 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); , prxattrib->bdecrypted , prxattrib->encrypt, psecuritypriv->hw_decrypted);
#endif #endif
switch (prxattrib->encrypt){ switch (prxattrib->encrypt) {
case _WEP40_: case _WEP40_:
case _WEP104_: case _WEP104_:
rtw_wep_decrypt(padapter, (u8 *)precv_frame); 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; prtnframe =precv_frame;
/* check is the EAPOL frame or not (Rekey) */ /* 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")); RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, ("########portctrl:ether_type == 0x888e\n"));
/* check Rekey */ /* check Rekey */
@ -849,7 +849,7 @@ static void count_rx_stats(struct adapter *padapter, union recv_frame *prframe,
padapter->mlmepriv.LinkDetectInfo.NumRxOkInPeriod++; 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++; padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++;
} }
@ -894,13 +894,13 @@ sint sta2sta_data_frame(
{ {
/* filter packets that SA is myself or multicast or broadcast */ /* 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")); RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" SA ==myself\n"));
ret = _FAIL; ret = _FAIL;
goto exit; goto exit;
} }
if ( (!_rtw_memcmp(myhwaddr, pattrib->dst, ETH_ALEN)) && (!bmcast) ){ if ( (!_rtw_memcmp(myhwaddr, pattrib->dst, ETH_ALEN)) && (!bmcast) ) {
ret = _FAIL; ret = _FAIL;
goto exit; goto exit;
} }
@ -934,7 +934,7 @@ sint sta2sta_data_frame(
if (bmcast) if (bmcast)
{ {
/* For AP mode, if DA == MCAST, then BSSID should be also MCAST */ /* For AP mode, if DA == MCAST, then BSSID should be also MCAST */
if (!IS_MCAST(pattrib->bssid)){ if (!IS_MCAST(pattrib->bssid)) {
ret = _FAIL; ret = _FAIL;
goto exit; goto exit;
} }
@ -1012,7 +1012,7 @@ sint ap2sta_data_frame(
{ {
/* filter packets that SA is myself or multicast or broadcast */ /* 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")); RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" SA ==myself\n"));
#ifdef DBG_RX_DROP_FRAME #ifdef DBG_RX_DROP_FRAME
DBG_871X("DBG_RX_DROP_FRAME %s SA ="MAC_FMT", myhwaddr ="MAC_FMT"\n", 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); psa = get_sa(ptr);
pbssid = get_hdr_bssid(ptr); pbssid = get_hdr_bssid(ptr);
if (pbssid == NULL){ if (pbssid == NULL) {
#ifdef DBG_RX_DROP_FRAME #ifdef DBG_RX_DROP_FRAME
DBG_871X("DBG_RX_DROP_FRAME %s pbssid == NULL\n", __func__); DBG_871X("DBG_RX_DROP_FRAME %s pbssid == NULL\n", __func__);
#endif #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 #ifdef DBG_RX_DROP_FRAME
DBG_871X("DBG_RX_DROP_FRAME %s case:%d, res:%d\n", __FUNCTION__, pattrib->to_fr_ds, ret); DBG_871X("DBG_RX_DROP_FRAME %s case:%d, res:%d\n", __FUNCTION__, pattrib->to_fr_ds, ret);
#endif #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")); RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" after to_fr_ds_chk; psta == NULL\n"));
#ifdef DBG_RX_DROP_FRAME #ifdef DBG_RX_DROP_FRAME
DBG_871X("DBG_RX_DROP_FRAME %s psta == NULL\n", __func__); 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; 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_, ("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))); 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 #endif
/* add version chk */ /* 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")); RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("validate_recv_data_frame fail! (ver!=0)\n"));
retval = _FAIL; retval = _FAIL;
goto exit; goto exit;
@ -1782,7 +1782,7 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
pattrib->order = GetOrder(ptr); pattrib->order = GetOrder(ptr);
rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt)); 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; int i;
DBG_871X("#############################\n"); 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)); *(ptr+i+1), *(ptr+i+2) ,*(ptr+i+3) ,*(ptr+i+4),*(ptr+i+5), *(ptr+i+6), *(ptr+i+7));
DBG_871X("#############################\n"); DBG_871X("#############################\n");
} }
else if (bDumpRxPkt ==2){ else if (bDumpRxPkt ==2) {
if (type == WIFI_MGT_TYPE){ if (type == WIFI_MGT_TYPE) {
int i; int i;
DBG_871X("#############################\n"); DBG_871X("#############################\n");
@ -1802,8 +1802,8 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
DBG_871X("#############################\n"); DBG_871X("#############################\n");
} }
} }
else if (bDumpRxPkt ==3){ else if (bDumpRxPkt ==3) {
if (type == WIFI_DATA_TYPE){ if (type == WIFI_DATA_TYPE) {
int i; int i;
DBG_871X("#############################\n"); 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); 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_IPX, 2) == false) &&
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) ==false) )|| (_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2) ==false) )||
/* eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || */ /* 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 */ /* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */
bsnaphdr = true; 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]; sub_skb = subframes[i];
/* convert hdr + possible LLC headers into Ethernet header */ /* convert hdr + possible LLC headers into Ethernet header */
#ifdef ENDIAN_FREE #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); preorder_ctrl->indicate_seq, pattrib->seq_num);
#endif #endif
if (retval != _SUCCESS){ if (retval != _SUCCESS) {
#ifdef DBG_RX_DROP_FRAME #ifdef DBG_RX_DROP_FRAME
DBG_871X("DBG_RX_DROP_FRAME %s amsdu_to_msdu fail\n", __FUNCTION__); DBG_871X("DBG_RX_DROP_FRAME %s amsdu_to_msdu fail\n", __FUNCTION__);
#endif #endif
@ -2914,7 +2914,7 @@ _recv_entry_drop:
return ret; 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 adapter *adapter = (struct adapter *)FunctionContext;
struct recv_priv *recvpriv = &adapter->recvpriv; struct recv_priv *recvpriv = &adapter->recvpriv;

View file

@ -123,7 +123,7 @@ static void crc32_init(void)
for (i = 0; i < 256; ++i) for (i = 0; i < 256; ++i)
{ {
k = crc32_reverseBit((u8)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); c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1);
} }
p1 = (u8 *)&crc32_table[i]; 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; priority[0]=pri;
/* Michael MIC pseudo header: DA, SA, 3 x 0, Priority */ /* 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 */ rtw_secmicappend(&micdata, &header[16], 6); /* DA */
if (header[1]&2) /* From Ds ==1 */ if (header[1]&2) /* From Ds ==1 */
rtw_secmicappend(&micdata, &header[24], 6); 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; pframe = ((struct xmit_frame*)pxmitframe)->buf_addr + hw_hdr_offset;
/* 4 start to encrypt each fragment */ /* 4 start to encrypt each fragment */
if (pattrib->encrypt ==_TKIP_){ if (pattrib->encrypt ==_TKIP_) {
if (pattrib->psta) 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] ); stainfo =rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0] );
} }
if (stainfo!=NULL){ if (stainfo!=NULL) {
if (!(stainfo->state &_FW_LINKED)) if (!(stainfo->state &_FW_LINKED))
{ {
@ -687,7 +687,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
prwskeylen =16; prwskeylen =16;
for (curfragnum =0;curfragnum<pattrib->nr_frags;curfragnum++){ for (curfragnum =0;curfragnum<pattrib->nr_frags;curfragnum++) {
iv =pframe+pattrib->hdrlen; iv =pframe+pattrib->hdrlen;
payload =pframe+pattrib->iv_len+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); 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; 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)); 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*/ *((__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; pframe =(unsigned char *)((union recv_frame*)precvframe)->u.hdr.rx_data;
/* 4 start to decrypt recvframe */ /* 4 start to decrypt recvframe */
if (prxattrib->encrypt ==_TKIP_){ if (prxattrib->encrypt ==_TKIP_) {
stainfo =rtw_get_stainfo(&padapter->stapriv ,&prxattrib->ta[0] ); stainfo =rtw_get_stainfo(&padapter->stapriv ,&prxattrib->ta[0] );
if (stainfo!=NULL){ if (stainfo!=NULL) {
if (IS_MCAST(prxattrib->ra)) 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; pframe = ((struct xmit_frame*)pxmitframe)->buf_addr + hw_hdr_offset;
/* 4 start to encrypt each fragment */ /* 4 start to encrypt each fragment */
if ((pattrib->encrypt ==_AES_)){ if ((pattrib->encrypt ==_AES_)) {
if (pattrib->psta) { if (pattrib->psta) {
stainfo = pattrib->psta; stainfo = pattrib->psta;
} else { } else {
@ -1560,7 +1560,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
stainfo =rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0] ); stainfo =rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0] );
} }
if (stainfo!=NULL){ if (stainfo!=NULL) {
if (!(stainfo->state &_FW_LINKED)) { if (!(stainfo->state &_FW_LINKED)) {
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, stainfo->state); DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, stainfo->state);
return _FAIL; return _FAIL;
@ -1574,9 +1574,9 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
prwskey =&stainfo->dot118021x_UncstKey.skey[0]; prwskey =&stainfo->dot118021x_UncstKey.skey[0];
prwskeylen =16; 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; length =pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len- pattrib->icv_len;
aes_cipher(prwskey, pattrib->hdrlen, pframe, length); 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_CFPOLL)||
((frtype|frsubtype) == WIFI_DATA_CFACKPOLL)) { ((frtype|frsubtype) == WIFI_DATA_CFACKPOLL)) {
qc_exists = 1; qc_exists = 1;
if (hdrlen != WLAN_HDR_A3_QOS_LEN){ if (hdrlen != WLAN_HDR_A3_QOS_LEN) {
hdrlen += 2; hdrlen += 2;
} }
}/* only for data packet . add for CONFIG_IEEE80211W, none 11w also can use */ }/* 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 == 0x09)||
(frsubtype == 0x0a)|| (frsubtype == 0x0a)||
(frsubtype == 0x0b))) { (frsubtype == 0x0b))) {
if (hdrlen != WLAN_HDR_A3_QOS_LEN){ if (hdrlen != WLAN_HDR_A3_QOS_LEN) {
hdrlen += 2; hdrlen += 2;
} }
qc_exists = 1; 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]; for (j =0; j<8;j++) message[payload_index++] = chain_buffer[j];
/* compare the mic */ /* 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]) 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", 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; pframe =(unsigned char *)((union recv_frame*)precvframe)->u.hdr.rx_data;
/* 4 start to encrypt each fragment */ /* 4 start to encrypt each fragment */
if ((prxattrib->encrypt ==_AES_)){ if ((prxattrib->encrypt ==_AES_)) {
stainfo =rtw_get_stainfo(&padapter->stapriv ,&prxattrib->ta[0] ); 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")); RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo!=NULL!!!\n"));
if (IS_MCAST(prxattrib->ra)) { if (IS_MCAST(prxattrib->ra)) {
@ -2769,8 +2769,8 @@ void rtw_sec_restore_wep_key(struct adapter *adapter)
sint keyid; sint keyid;
if ((_WEP40_ == securitypriv->dot11PrivacyAlgrthm) ||(_WEP104_ == securitypriv->dot11PrivacyAlgrthm)) { if ((_WEP40_ == securitypriv->dot11PrivacyAlgrthm) ||(_WEP104_ == securitypriv->dot11PrivacyAlgrthm)) {
for (keyid =0;keyid<4;keyid++){ for (keyid =0;keyid<4;keyid++) {
if (securitypriv->key_mask & BIT(keyid)){ if (securitypriv->key_mask & BIT(keyid)) {
if (keyid == securitypriv->dot11PrivacyKeyIndex) if (keyid == securitypriv->dot11PrivacyKeyIndex)
rtw_set_key(adapter, securitypriv, keyid, 1, true); rtw_set_key(adapter, securitypriv, keyid, 1, true);
else else

View file

@ -55,10 +55,10 @@ u8 sreset_get_wifi_status(struct adapter *padapter)
return status; return status;
} }
val32 =rtw_read32(padapter, REG_TXDMA_STATUS); val32 =rtw_read32(padapter, REG_TXDMA_STATUS);
if (val32 == 0xeaeaeaea){ if (val32 == 0xeaeaeaea) {
psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST; psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST;
} }
else if (val32!=0){ else if (val32!=0) {
DBG_8192C("txdmastatu(%x)\n", val32); DBG_8192C("txdmastatu(%x)\n", val32);
psrtpriv->Wifi_Error_Status = WIFI_MAC_TXDMA_ERROR; psrtpriv->Wifi_Error_Status = WIFI_MAC_TXDMA_ERROR;
} }

View file

@ -207,7 +207,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
struct recv_reorder_ctrl *preorder_ctrl; struct recv_reorder_ctrl *preorder_ctrl;
int index; int index;
if (pstapriv){ if (pstapriv) {
/* delete all reordering_ctrl_timer */ /* delete all reordering_ctrl_timer */
spin_lock_bh(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
for (index = 0; index < NUM_STA; index++) 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)); 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")); RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("ERROR => rtw_alloc_stainfo: index >= NUM_STA"));
psta = NULL; psta = NULL;
goto exit; goto exit;
@ -606,7 +606,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter)
psta = rtw_alloc_stainfo(pstapriv, bcast_addr); psta = rtw_alloc_stainfo(pstapriv, bcast_addr);
if (psta == NULL){ if (psta == NULL) {
res =_FAIL; res =_FAIL;
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail")); RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail"));
goto exit; goto exit;

View file

@ -1830,7 +1830,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
if (ralink_vendor_flag && !epigram_vendor_flag) { if (ralink_vendor_flag && !epigram_vendor_flag) {
DBG_871X("link to Ralink AP\n"); DBG_871X("link to Ralink AP\n");
return HT_IOT_PEER_RALINK; 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"); DBG_871X("link to Tenda W311R AP\n");
return HT_IOT_PEER_TENDA; return HT_IOT_PEER_TENDA;
} else { } else {

View file

@ -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); 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; pxmitpriv->pxmit_frame_buf =NULL;
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("alloc xmit_frame fail!\n")); RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("alloc xmit_frame fail!\n"));
res = _FAIL; 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); 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")); RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("alloc xmit_buf fail!\n"));
res = _FAIL; res = _FAIL;
goto exit; 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); 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; pxmitpriv->xframe_ext = NULL;
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("alloc xframe_ext fail!\n")); RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("alloc xframe_ext fail!\n"));
res = _FAIL; 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); 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")); RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("alloc xmit_extbuf fail!\n"));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
@ -828,7 +828,7 @@ exit:
return res; 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; sint curfragnum, length;
u8 *pframe, *payload, mic[8]; u8 *pframe, *payload, mic[8];
struct mic_data micdata; 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_) */ if (pattrib->encrypt ==_TKIP_)/* if (psecuritypriv->dot11PrivacyAlgrthm ==_TKIP_PRIVACY_) */
{ {
/* encode mic code */ /* 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}; 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; pframe = pxmitframe->buf_addr + hw_hdr_offset;
if (bmcst) 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"); */ /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey == 0\n"); */
/* rtw_msleep_os(10); */ /* rtw_msleep_os(10); */
return _FAIL; return _FAIL;
@ -887,7 +887,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
} }
else 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"); */ /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey == 0\n"); */
/* rtw_msleep_os(10); */ /* rtw_msleep_os(10); */
return _FAIL; return _FAIL;
@ -896,7 +896,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
rtw_secmicsetkey(&micdata, &stainfo->dot11tkiptxmickey.skey[0]); 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 */ rtw_secmicappend(&micdata, &pframe[16], 6); /* DA */
if (pframe[1]&2) /* From Ds ==1 */ if (pframe[1]&2) /* From Ds ==1 */
rtw_secmicappend(&micdata, &pframe[24], 6); rtw_secmicappend(&micdata, &pframe[24], 6);
@ -920,14 +920,14 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
payload =pframe; payload =pframe;
for (curfragnum =0;curfragnum<pattrib->nr_frags;curfragnum++){ for (curfragnum =0;curfragnum<pattrib->nr_frags;curfragnum++) {
payload =(u8 *)RND4((SIZE_PTR)(payload)); 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", 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))); curfragnum,*payload, *(payload+1),*(payload+2),*(payload+3),*(payload+4),*(payload+5),*(payload+6),*(payload+7)));
payload =payload+pattrib->hdrlen+pattrib->iv_len; 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)); 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); length =pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len-( (pattrib->bswenc) ? pattrib->icv_len : 0);
rtw_secmicappend(&micdata, payload, length); rtw_secmicappend(&micdata, payload, length);
payload =payload+length; payload =payload+length;
@ -967,7 +967,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
return _SUCCESS; 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 pkt_attrib *pattrib = &pxmitframe->attrib;
/* struct security_priv *psecuritypriv =&padapter->securitypriv; */ /* 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"); */ /* DBG_871X("start xmitframe_swencrypt\n"); */
RT_TRACE(_module_rtl871x_xmit_c_, _drv_alert_, ("### xmitframe_swencrypt\n")); RT_TRACE(_module_rtl871x_xmit_c_, _drv_alert_, ("### xmitframe_swencrypt\n"));
switch (pattrib->encrypt){ switch (pattrib->encrypt) {
case _WEP40_: case _WEP40_:
case _WEP104_: case _WEP104_:
rtw_wep_encrypt(padapter, (u8 *)pxmitframe); 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 */ /* 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]++;
psta->sta_xmitpriv.txseq_tid[pattrib->priority] &= 0xFFF; 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; return _FAIL;
} }
if (pxmitframe->buf_addr == NULL){ if (pxmitframe->buf_addr == NULL) {
DBG_8192C("==> %s buf_addr == NULL\n", __FUNCTION__); DBG_8192C("==> %s buf_addr == NULL\n", __FUNCTION__);
return _FAIL; return _FAIL;
} }
@ -2097,7 +2097,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
goto exit; goto exit;
} }
if (pxmitframe->pkt){ if (pxmitframe->pkt) {
pndis_pkt = pxmitframe->pkt; pndis_pkt = pxmitframe->pkt;
pxmitframe->pkt = NULL; pxmitframe->pkt = NULL;
} }

View file

@ -182,11 +182,11 @@ odm_RateDown_8188E(
RateID = LowestRate; RateID = LowestRate;
} }
RateDownFinish: RateDownFinish:
if (pRaInfo->RAWaitingCounter==1){ if (pRaInfo->RAWaitingCounter==1) {
pRaInfo->RAWaitingCounter+=1; pRaInfo->RAWaitingCounter+=1;
pRaInfo->RAPendingCounter+=1; pRaInfo->RAPendingCounter+=1;
} }
else if (pRaInfo->RAWaitingCounter== 0){ else if (pRaInfo->RAWaitingCounter== 0) {
} }
else{ else{
pRaInfo->RAWaitingCounter=0; pRaInfo->RAWaitingCounter=0;
@ -225,11 +225,11 @@ odm_RateUp_8188E(
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE, ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
(" RateID=%d HighestRate=%d\n", (" RateID=%d HighestRate=%d\n",
RateID, HighestRate)); RateID, HighestRate));
if (pRaInfo->RAWaitingCounter==1){ if (pRaInfo->RAWaitingCounter==1) {
pRaInfo->RAWaitingCounter=0; pRaInfo->RAWaitingCounter=0;
pRaInfo->RAPendingCounter=0; pRaInfo->RAPendingCounter=0;
} }
else if (pRaInfo->RAWaitingCounter>1){ else if (pRaInfo->RAWaitingCounter>1) {
pRaInfo->PreRssiStaRA=pRaInfo->RssiStaRA; pRaInfo->PreRssiStaRA=pRaInfo->RssiStaRA;
goto RateUpfinish; goto RateUpfinish;
} }
@ -273,7 +273,7 @@ RateUpfinish:
return 0; return 0;
} }
static void odm_ResetRaCounter_8188E(PODM_RA_INFO_T pRaInfo){ static void odm_ResetRaCounter_8188E(PODM_RA_INFO_T pRaInfo) {
u8 RateID; u8 RateID;
RateID=pRaInfo->DecisionRate; RateID=pRaInfo->DecisionRate;
pRaInfo->NscUp=(N_THRESHOLD_HIGH[RateID]+N_THRESHOLD_LOW[RateID])>>1; pRaInfo->NscUp=(N_THRESHOLD_HIGH[RateID]+N_THRESHOLD_LOW[RateID])>>1;
@ -294,7 +294,7 @@ odm_RateDecision_8188E(
if (pRaInfo->Active && (pRaInfo->TOTAL > 0)) /* STA used and data packet exits */ if (pRaInfo->Active && (pRaInfo->TOTAL > 0)) /* STA used and data packet exits */
{ {
if ( (pRaInfo->RssiStaRA<(pRaInfo->PreRssiStaRA-3))|| (pRaInfo->RssiStaRA>(pRaInfo->PreRssiStaRA+3))){ if ( (pRaInfo->RssiStaRA<(pRaInfo->PreRssiStaRA-3))|| (pRaInfo->RssiStaRA>(pRaInfo->PreRssiStaRA+3))) {
pRaInfo->RAWaitingCounter=0; pRaInfo->RAWaitingCounter=0;
pRaInfo->RAPendingCounter=0; pRaInfo->RAPendingCounter=0;
} }
@ -381,7 +381,7 @@ odm_ARFBRefresh_8188E(
u32 MaskFromReg; u32 MaskFromReg;
s8 i; s8 i;
switch (pRaInfo->RateID){ switch (pRaInfo->RateID) {
case RATR_INX_WIRELESS_NGB: case RATR_INX_WIRELESS_NGB:
pRaInfo->RAUseRate=(pRaInfo->RateMask)&0x0f8ff015; pRaInfo->RAUseRate=(pRaInfo->RateMask)&0x0f8ff015;
break; break;
@ -425,10 +425,10 @@ odm_ARFBRefresh_8188E(
break; break;
} }
/* Highest rate */ /* Highest rate */
if (pRaInfo->RAUseRate){ if (pRaInfo->RAUseRate) {
for (i=RATESIZE;i>=0;i--) for (i=RATESIZE;i>=0;i--)
{ {
if ((pRaInfo->RAUseRate)&BIT(i)){ if ((pRaInfo->RAUseRate)&BIT(i)) {
pRaInfo->HighestRate=i; pRaInfo->HighestRate=i;
break; break;
} }
@ -438,7 +438,7 @@ odm_ARFBRefresh_8188E(
pRaInfo->HighestRate=0; pRaInfo->HighestRate=0;
} }
/* Lowest rate */ /* Lowest rate */
if (pRaInfo->RAUseRate){ if (pRaInfo->RAUseRate) {
for (i=0;i<RATESIZE;i++) for (i=0;i<RATESIZE;i++)
{ {
if ((pRaInfo->RAUseRate)&BIT(i)) if ((pRaInfo->RAUseRate)&BIT(i))
@ -588,7 +588,7 @@ odm_RATxRPTTimerSetting(
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,(" =====>odm_RATxRPTTimerSetting()\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,(" =====>odm_RATxRPTTimerSetting()\n"));
if (pDM_Odm->CurrminRptTime != minRptTime){ if (pDM_Odm->CurrminRptTime != minRptTime) {
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
(" CurrminRptTime =0x%04x minRptTime=0x%04x\n", pDM_Odm->CurrminRptTime, minRptTime)); (" CurrminRptTime =0x%04x minRptTime=0x%04x\n", pDM_Odm->CurrminRptTime, minRptTime));
rtw_rpt_timer_cfg_cmd(pDM_Odm->Adapter,minRptTime); rtw_rpt_timer_cfg_cmd(pDM_Odm->Adapter,minRptTime);
@ -622,11 +622,11 @@ ODM_RAInfo_Init(
PODM_RA_INFO_T pRaInfo = &pDM_Odm->RAInfo[MacID]; PODM_RA_INFO_T pRaInfo = &pDM_Odm->RAInfo[MacID];
u8 WirelessMode=0xFF; /* invalid value */ u8 WirelessMode=0xFF; /* invalid value */
u8 max_rate_idx = 0x13; /* MCS7 */ u8 max_rate_idx = 0x13; /* MCS7 */
if (pDM_Odm->pWirelessMode!=NULL){ if (pDM_Odm->pWirelessMode!=NULL) {
WirelessMode=*(pDM_Odm->pWirelessMode); WirelessMode=*(pDM_Odm->pWirelessMode);
} }
if (WirelessMode != 0xFF ){ if (WirelessMode != 0xFF ) {
if (WirelessMode & ODM_WM_N24G) if (WirelessMode & ODM_WM_N24G)
max_rate_idx = 0x13; max_rate_idx = 0x13;
else if (WirelessMode & ODM_WM_G) else if (WirelessMode & ODM_WM_G)
@ -854,11 +854,11 @@ ODM_RA_TxRPT2Handle_8188E(
MacIDValidEntry0 , MacIDValidEntry0 ,
MacIDValidEntry1)); MacIDValidEntry1));
#if POWER_TRAINING_ACTIVE == 1 #if POWER_TRAINING_ACTIVE == 1
if (pRAInfo->PTActive){ if (pRAInfo->PTActive) {
if (pRAInfo->RAstage<5){ if (pRAInfo->RAstage<5) {
odm_RateDecision_8188E(pDM_Odm,pRAInfo); odm_RateDecision_8188E(pDM_Odm,pRAInfo);
} }
else if (pRAInfo->RAstage==5){ /* Power training try state */ else if (pRAInfo->RAstage==5) { /* Power training try state */
odm_PTTryState_8188E(pRAInfo); odm_PTTryState_8188E(pRAInfo);
} }
else {/* RAstage==6 */ else {/* RAstage==6 */

View file

@ -263,7 +263,7 @@ odm_TxPwrTrackSetPwr88E(
ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD, ("odm_TxPwrTrackSetPwr88E CH=%d\n", *(pDM_Odm->pChannel))); ODM_RT_TRACE(pDM_Odm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD, ("odm_TxPwrTrackSetPwr88E CH=%d\n", *(pDM_Odm->pChannel)));
/* if (MP_DRIVER != 1) */ /* if (MP_DRIVER != 1) */
if ( *(pDM_Odm->mp_mode) != 1){ if ( *(pDM_Odm->mp_mode) != 1) {
PHY_SetTxPowerLevel8188E(pDM_Odm->Adapter, *pDM_Odm->pChannel); PHY_SetTxPowerLevel8188E(pDM_Odm->Adapter, *pDM_Odm->pChannel);
} }
else else
@ -539,7 +539,7 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
} }
/* if ((delta_IQK > pHalData->Delta_IQK) && (pHalData->Delta_IQK != 0)) */ /* if ((delta_IQK > pHalData->Delta_IQK) && (pHalData->Delta_IQK != 0)) */
if ((delta_IQK >= 8)){ /* Delta temperature is equal to or larger than 20 centigrade. */ if ((delta_IQK >= 8)) { /* Delta temperature is equal to or larger than 20 centigrade. */
/* printk("delta_IQK(%d) >=8 do_IQK\n",delta_IQK); */ /* printk("delta_IQK(%d) >=8 do_IQK\n",delta_IQK); */
doIQK(pDM_Odm, delta_IQK, ThermalValue, 8); doIQK(pDM_Odm, delta_IQK, ThermalValue, 8);
} }
@ -942,7 +942,7 @@ _PHY_SaveADDARegisters(
if (ODM_CheckPowerStatus(pAdapter) == false) if (ODM_CheckPowerStatus(pAdapter) == false)
return; return;
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Save ADDA parameters.\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Save ADDA parameters.\n"));
for ( i = 0 ; i < RegisterNum ; i++){ for ( i = 0 ; i < RegisterNum ; i++) {
ADDABackup[i] = ODM_GetBBReg(pDM_Odm, ADDAReg[i], bMaskDWord); ADDABackup[i] = ODM_GetBBReg(pDM_Odm, ADDAReg[i], bMaskDWord);
} }
} }
@ -960,7 +960,7 @@ _PHY_SaveMACRegisters(
PDM_ODM_T pDM_Odm = &pHalData->odmpriv; PDM_ODM_T pDM_Odm = &pHalData->odmpriv;
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Save MAC parameters.\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Save MAC parameters.\n"));
for ( i = 0 ; i < (IQK_MAC_REG_NUM - 1); i++){ for ( i = 0 ; i < (IQK_MAC_REG_NUM - 1); i++) {
MACBackup[i] = ODM_Read1Byte(pDM_Odm, MACReg[i]); MACBackup[i] = ODM_Read1Byte(pDM_Odm, MACReg[i]);
} }
MACBackup[i] = ODM_Read4Byte(pDM_Odm, MACReg[i]); MACBackup[i] = ODM_Read4Byte(pDM_Odm, MACReg[i]);
@ -999,7 +999,7 @@ _PHY_ReloadMACRegisters(
PDM_ODM_T pDM_Odm = &pHalData->odmpriv; PDM_ODM_T pDM_Odm = &pHalData->odmpriv;
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Reload MAC parameters !\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Reload MAC parameters !\n"));
for (i = 0 ; i < (IQK_MAC_REG_NUM - 1); i++){ for (i = 0 ; i < (IQK_MAC_REG_NUM - 1); i++) {
ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)MACBackup[i]); ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)MACBackup[i]);
} }
ODM_Write4Byte(pDM_Odm, MACReg[i], MACBackup[i]); ODM_Write4Byte(pDM_Odm, MACReg[i], MACBackup[i]);
@ -1022,7 +1022,7 @@ _PHY_PathADDAOn(
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("ADDA ON.\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("ADDA ON.\n"));
pathOn = isPathAOn ? 0x04db25a4 : 0x0b1b25a4; pathOn = isPathAOn ? 0x04db25a4 : 0x0b1b25a4;
if (false == is2T){ if (false == is2T) {
pathOn = 0x0bdb25a0; pathOn = 0x0bdb25a0;
ODM_SetBBReg(pDM_Odm, ADDAReg[0], bMaskDWord, 0x0b1b25a0); ODM_SetBBReg(pDM_Odm, ADDAReg[0], bMaskDWord, 0x0b1b25a0);
} }
@ -1030,7 +1030,7 @@ _PHY_PathADDAOn(
ODM_SetBBReg(pDM_Odm,ADDAReg[0], bMaskDWord, pathOn); ODM_SetBBReg(pDM_Odm,ADDAReg[0], bMaskDWord, pathOn);
} }
for ( i = 1 ; i < IQK_ADDA_REG_NUM ; i++){ for ( i = 1 ; i < IQK_ADDA_REG_NUM ; i++) {
ODM_SetBBReg(pDM_Odm,ADDAReg[i], bMaskDWord, pathOn); ODM_SetBBReg(pDM_Odm,ADDAReg[i], bMaskDWord, pathOn);
} }
@ -1051,7 +1051,7 @@ _PHY_MACSettingCalibration(
ODM_Write1Byte(pDM_Odm, MACReg[i], 0x3F); ODM_Write1Byte(pDM_Odm, MACReg[i], 0x3F);
for (i = 1 ; i < (IQK_MAC_REG_NUM - 1); i++){ for (i = 1 ; i < (IQK_MAC_REG_NUM - 1); i++) {
ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)(MACBackup[i]&(~BIT3))); ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)(MACBackup[i]&(~BIT3)));
} }
ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)(MACBackup[i]&(~BIT5))); ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)(MACBackup[i]&(~BIT5)));
@ -1272,7 +1272,7 @@ else
pDM_Odm->RFCalibrateInfo.bRfPiEnable = (u8)ODM_GetBBReg(pDM_Odm, rFPGA0_XA_HSSIParameter1, BIT(8)); pDM_Odm->RFCalibrateInfo.bRfPiEnable = (u8)ODM_GetBBReg(pDM_Odm, rFPGA0_XA_HSSIParameter1, BIT(8));
} }
if (!pDM_Odm->RFCalibrateInfo.bRfPiEnable){ if (!pDM_Odm->RFCalibrateInfo.bRfPiEnable) {
/* Switch BB to PI mode to do IQ Calibration. */ /* Switch BB to PI mode to do IQ Calibration. */
_PHY_PIModeSwitch(pAdapter, true); _PHY_PIModeSwitch(pAdapter, true);
} }
@ -1314,9 +1314,9 @@ else
ODM_SetBBReg(pDM_Odm, rTx_IQK, bMaskDWord, 0x01007c00); ODM_SetBBReg(pDM_Odm, rTx_IQK, bMaskDWord, 0x01007c00);
ODM_SetBBReg(pDM_Odm, rRx_IQK, bMaskDWord, 0x81004800); ODM_SetBBReg(pDM_Odm, rRx_IQK, bMaskDWord, 0x81004800);
for (i = 0 ; i < retryCount ; i++){ for (i = 0 ; i < retryCount ; i++) {
PathAOK = phy_PathA_IQK_8188E(pAdapter, is2T); PathAOK = phy_PathA_IQK_8188E(pAdapter, is2T);
if (PathAOK == 0x01){ if (PathAOK == 0x01) {
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path A Tx IQK Success!!\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path A Tx IQK Success!!\n"));
result[t][0] = (ODM_GetBBReg(pDM_Odm, rTx_Power_Before_IQK_A, bMaskDWord)&0x3FF0000)>>16; result[t][0] = (ODM_GetBBReg(pDM_Odm, rTx_Power_Before_IQK_A, bMaskDWord)&0x3FF0000)>>16;
result[t][1] = (ODM_GetBBReg(pDM_Odm, rTx_Power_After_IQK_A, bMaskDWord)&0x3FF0000)>>16; result[t][1] = (ODM_GetBBReg(pDM_Odm, rTx_Power_After_IQK_A, bMaskDWord)&0x3FF0000)>>16;
@ -1324,9 +1324,9 @@ else
} }
} }
for (i = 0 ; i < retryCount ; i++){ for (i = 0 ; i < retryCount ; i++) {
PathAOK = phy_PathA_RxIQK(pAdapter, is2T); PathAOK = phy_PathA_RxIQK(pAdapter, is2T);
if (PathAOK == 0x03){ if (PathAOK == 0x03) {
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path A Rx IQK Success!!\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path A Rx IQK Success!!\n"));
result[t][2] = (ODM_GetBBReg(pDM_Odm, rRx_Power_Before_IQK_A_2, bMaskDWord)&0x3FF0000)>>16; result[t][2] = (ODM_GetBBReg(pDM_Odm, rRx_Power_Before_IQK_A_2, bMaskDWord)&0x3FF0000)>>16;
result[t][3] = (ODM_GetBBReg(pDM_Odm, rRx_Power_After_IQK_A_2, bMaskDWord)&0x3FF0000)>>16; result[t][3] = (ODM_GetBBReg(pDM_Odm, rRx_Power_After_IQK_A_2, bMaskDWord)&0x3FF0000)>>16;
@ -1336,19 +1336,19 @@ else
} }
} }
if (0x00 == PathAOK){ if (0x00 == PathAOK) {
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path A IQK failed!!\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path A IQK failed!!\n"));
} }
if (is2T){ if (is2T) {
_PHY_PathAStandBy(pAdapter); _PHY_PathAStandBy(pAdapter);
/* Turn Path B ADDA on */ /* Turn Path B ADDA on */
_PHY_PathADDAOn(pAdapter, ADDA_REG, false, is2T); _PHY_PathADDAOn(pAdapter, ADDA_REG, false, is2T);
for (i = 0 ; i < retryCount ; i++){ for (i = 0 ; i < retryCount ; i++) {
PathBOK = phy_PathB_IQK_8188E(pAdapter); PathBOK = phy_PathB_IQK_8188E(pAdapter);
if (PathBOK == 0x03){ if (PathBOK == 0x03) {
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path B IQK Success!!\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path B IQK Success!!\n"));
result[t][4] = (ODM_GetBBReg(pDM_Odm, rTx_Power_Before_IQK_B, bMaskDWord)&0x3FF0000)>>16; result[t][4] = (ODM_GetBBReg(pDM_Odm, rTx_Power_Before_IQK_B, bMaskDWord)&0x3FF0000)>>16;
result[t][5] = (ODM_GetBBReg(pDM_Odm, rTx_Power_After_IQK_B, bMaskDWord)&0x3FF0000)>>16; result[t][5] = (ODM_GetBBReg(pDM_Odm, rTx_Power_After_IQK_B, bMaskDWord)&0x3FF0000)>>16;
@ -1364,7 +1364,7 @@ else
} }
} }
if (0x00 == PathBOK){ if (0x00 == PathBOK) {
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path B IQK failed!!\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path B IQK failed!!\n"));
} }
} }
@ -1374,7 +1374,7 @@ else
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0); ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0);
if (t!=0) { if (t!=0) {
if (!pDM_Odm->RFCalibrateInfo.bRfPiEnable){ if (!pDM_Odm->RFCalibrateInfo.bRfPiEnable) {
/* Switch back BB to SI mode after finish IQ Calibration. */ /* Switch back BB to SI mode after finish IQ Calibration. */
_PHY_PIModeSwitch(pAdapter, false); _PHY_PIModeSwitch(pAdapter, false);
} }
@ -1390,7 +1390,7 @@ else
/* Restore RX initial gain */ /* Restore RX initial gain */
ODM_SetBBReg(pDM_Odm, rFPGA0_XA_LSSIParameter, bMaskDWord, 0x00032ed3); ODM_SetBBReg(pDM_Odm, rFPGA0_XA_LSSIParameter, bMaskDWord, 0x00032ed3);
if (is2T){ if (is2T) {
ODM_SetBBReg(pDM_Odm, rFPGA0_XB_LSSIParameter, bMaskDWord, 0x00032ed3); ODM_SetBBReg(pDM_Odm, rFPGA0_XB_LSSIParameter, bMaskDWord, 0x00032ed3);
} }

View file

@ -33,16 +33,16 @@ void dump_chip_info(struct hal_version ChipVersion)
int cnt = 0; int cnt = 0;
u8 buf[128]; u8 buf[128];
if (IS_81XXC(ChipVersion)){ if (IS_81XXC(ChipVersion)) {
cnt += sprintf((buf+cnt), "Chip Version Info: %s_", IS_92C_SERIAL(ChipVersion)?"CHIP_8192C":"CHIP_8188C"); cnt += sprintf((buf+cnt), "Chip Version Info: %s_", IS_92C_SERIAL(ChipVersion)?"CHIP_8192C":"CHIP_8188C");
} }
else if (IS_92D(ChipVersion)){ else if (IS_92D(ChipVersion)) {
cnt += sprintf((buf+cnt), "Chip Version Info: CHIP_8192D_"); cnt += sprintf((buf+cnt), "Chip Version Info: CHIP_8192D_");
} }
else if (IS_8723_SERIES(ChipVersion)){ else if (IS_8723_SERIES(ChipVersion)) {
cnt += sprintf((buf+cnt), "Chip Version Info: CHIP_8723A_"); cnt += sprintf((buf+cnt), "Chip Version Info: CHIP_8723A_");
} }
else if (IS_8188E(ChipVersion)){ else if (IS_8188E(ChipVersion)) {
cnt += sprintf((buf+cnt), "Chip Version Info: CHIP_8188E_"); cnt += sprintf((buf+cnt), "Chip Version Info: CHIP_8188E_");
} }
@ -198,7 +198,7 @@ _TwoOutPipeMapping(
{ {
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(pAdapter); struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(pAdapter);
if (bWIFICfg){ /* WMM */ if (bWIFICfg) { /* WMM */
/* BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA */ /* BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA */
/* 0, 1, 0, 1, 0, 0, 0, 0, 0 }; */ /* 0, 1, 0, 1, 0, 0, 0, 0, 0 }; */
@ -243,7 +243,7 @@ static void _ThreeOutPipeMapping(
{ {
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(pAdapter); struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(pAdapter);
if (bWIFICfg){/* for WMM */ if (bWIFICfg) {/* for WMM */
/* BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA */ /* BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA */
/* 1, 2, 1, 0, 0, 0, 0, 0, 0 }; */ /* 1, 2, 1, 0, 0, 0, 0, 0, 0 }; */

View file

@ -105,7 +105,7 @@ uint rtw_hal_init(struct adapter *padapter)
status = padapter->HalFunc.hal_init(padapter); status = padapter->HalFunc.hal_init(padapter);
if (status == _SUCCESS){ if (status == _SUCCESS) {
for (i = 0; i<dvobj->iface_nums; i++) { for (i = 0; i<dvobj->iface_nums; i++) {
padapter = dvobj->padapters[i]; padapter = dvobj->padapters[i];
padapter->hw_init_completed = true; padapter->hw_init_completed = true;
@ -140,14 +140,14 @@ uint rtw_hal_deinit(struct adapter *padapter)
int i; int i;
; ;
if (!is_primary_adapter(padapter)){ if (!is_primary_adapter(padapter)) {
DBG_871X(" rtw_hal_deinit: Secondary adapter return l\n"); DBG_871X(" rtw_hal_deinit: Secondary adapter return l\n");
return status; return status;
} }
status = padapter->HalFunc.hal_deinit(padapter); status = padapter->HalFunc.hal_deinit(padapter);
if (status == _SUCCESS){ if (status == _SUCCESS) {
for (i = 0; i<dvobj->iface_nums; i++) { for (i = 0; i<dvobj->iface_nums; i++) {
padapter = dvobj->padapters[i]; padapter = dvobj->padapters[i];
padapter->hw_init_completed = false; padapter->hw_init_completed = false;
@ -200,7 +200,7 @@ void rtw_hal_get_odm_var(struct adapter *padapter, enum HAL_ODM_VARIABLE eVariab
void rtw_hal_enable_interrupt(struct adapter *padapter) void rtw_hal_enable_interrupt(struct adapter *padapter)
{ {
if (!is_primary_adapter(padapter)){ if (!is_primary_adapter(padapter)) {
DBG_871X(" rtw_hal_enable_interrupt: Secondary adapter return l\n"); DBG_871X(" rtw_hal_enable_interrupt: Secondary adapter return l\n");
return; return;
} }
@ -214,7 +214,7 @@ void rtw_hal_enable_interrupt(struct adapter *padapter)
void rtw_hal_disable_interrupt(struct adapter *padapter) void rtw_hal_disable_interrupt(struct adapter *padapter)
{ {
if (!is_primary_adapter(padapter)){ if (!is_primary_adapter(padapter)) {
DBG_871X(" rtw_hal_disable_interrupt: Secondary adapter return l\n"); DBG_871X(" rtw_hal_disable_interrupt: Secondary adapter return l\n");
return; return;
} }

View file

@ -1579,7 +1579,7 @@ odm_DIG(
} }
else else
{ {
if ((pDM_Odm->SupportICType & (ODM_RTL8192E|ODM_RTL8723B|ODM_RTL8812|ODM_RTL8821)) && (pDM_Odm->bBtLimitedDig==1)){ if ((pDM_Odm->SupportICType & (ODM_RTL8192E|ODM_RTL8723B|ODM_RTL8812|ODM_RTL8821)) && (pDM_Odm->bBtLimitedDig==1)) {
/* 2 Modify DIG upper bound for 92E, 8723B, 8821 & 8812 BT */ /* 2 Modify DIG upper bound for 92E, 8723B, 8821 & 8812 BT */
if ((pDM_Odm->RSSI_Min + 10) > dm_dig_max ) if ((pDM_Odm->RSSI_Min + 10) > dm_dig_max )
pDM_DigTable->rx_gain_range_max = dm_dig_max; pDM_DigTable->rx_gain_range_max = dm_dig_max;
@ -2141,7 +2141,7 @@ ODM_RF_Saving(
Rssi_Up_bound = 50 ; Rssi_Up_bound = 50 ;
Rssi_Low_bound = 45; Rssi_Low_bound = 45;
} }
if (pDM_PSTable->initialize == 0){ if (pDM_PSTable->initialize == 0) {
pDM_PSTable->Reg874 = (ODM_GetBBReg(pDM_Odm, 0x874, bMaskDWord)&0x1CC000)>>14; pDM_PSTable->Reg874 = (ODM_GetBBReg(pDM_Odm, 0x874, bMaskDWord)&0x1CC000)>>14;
pDM_PSTable->RegC70 = (ODM_GetBBReg(pDM_Odm, 0xc70, bMaskDWord)&BIT3)>>3; pDM_PSTable->RegC70 = (ODM_GetBBReg(pDM_Odm, 0xc70, bMaskDWord)&BIT3)>>3;
@ -2412,7 +2412,7 @@ odm_RefreshRateAdaptiveMaskCE(
ODM_RT_TRACE(pDM_Odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("<---- odm_RefreshRateAdaptiveMask(): driver does not control rate adaptive mask\n")); ODM_RT_TRACE(pDM_Odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("<---- odm_RefreshRateAdaptiveMask(): driver does not control rate adaptive mask\n"));
return; return;
} }
for (i=0; i<ODM_ASSOCIATE_ENTRY_NUM; i++){ for (i=0; i<ODM_ASSOCIATE_ENTRY_NUM; i++) {
PSTA_INFO_T pstat = pDM_Odm->pODM_StaInfo[i]; PSTA_INFO_T pstat = pDM_Odm->pODM_StaInfo[i];
if (IS_STA_VALID(pstat) ) { if (IS_STA_VALID(pstat) ) {
if (IS_MCAST( pstat->hwaddr)) /* if (psta->mac_id ==1) */ if (IS_MCAST( pstat->hwaddr)) /* if (psta->mac_id ==1) */
@ -2780,7 +2780,7 @@ odm_RSSIMonitorCheckCE(
for (i=0; i< sta_cnt; i++) for (i=0; i< sta_cnt; i++)
{ {
if (PWDB_rssi[i] != (0)){ if (PWDB_rssi[i] != (0)) {
if (pHalData->fw_ractrl == true)/* Report every sta's RSSI to FW */ if (pHalData->fw_ractrl == true)/* Report every sta's RSSI to FW */
{ {
} }
@ -2998,9 +2998,9 @@ void odm_SwAntDivChkAntSwitch(
PDM_ODM_T pDM_Odm, PDM_ODM_T pDM_Odm,
u8 Step u8 Step
) {} ) {}
static void ODM_SwAntDivResetBeforeLink( PDM_ODM_T pDM_Odm ){} static void ODM_SwAntDivResetBeforeLink( PDM_ODM_T pDM_Odm ) {}
void ODM_SwAntDivRestAfterLink( PDM_ODM_T pDM_Odm ){} void ODM_SwAntDivRestAfterLink( PDM_ODM_T pDM_Odm ) {}
void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext){} void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext) {}
/* 3============================================================ */ /* 3============================================================ */
/* 3 SW Antenna Diversity */ /* 3 SW Antenna Diversity */
@ -3029,7 +3029,7 @@ odm_InitHybridAntDiv_88C_92D(
ODM_SetBBReg(pDM_Odm,ODM_REG_ANTSEL_CTRL_11N, BIT8|BIT9, 0x01); /* 0x01: left antenna, 0x02: right antenna */ ODM_SetBBReg(pDM_Odm,ODM_REG_ANTSEL_CTRL_11N, BIT8|BIT9, 0x01); /* 0x01: left antenna, 0x02: right antenna */
/* only AP support different path selection temperarly */ /* only AP support different path selection temperarly */
if (!bTxPathSel){ /* PATH-A */ if (!bTxPathSel) { /* PATH-A */
ODM_SetBBReg(pDM_Odm,ODM_REG_PIN_CTRL_11N, BIT8|BIT9, 0 ); /* ANTSEL as HW control */ ODM_SetBBReg(pDM_Odm,ODM_REG_PIN_CTRL_11N, BIT8|BIT9, 0 ); /* ANTSEL as HW control */
ODM_SetBBReg(pDM_Odm,ODM_REG_ANTSEL_PATH_11N, BIT13, 1); /* select TX ANTESEL from path A */ ODM_SetBBReg(pDM_Odm,ODM_REG_ANTSEL_PATH_11N, BIT13, 1); /* select TX ANTESEL from path A */
} }
@ -3111,7 +3111,7 @@ odm_StaDefAntSel(
ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("CCK_Ant1_Cnt:%d, CCK_Ant2_Cnt:%d\n",CCK_Ant1_Cnt,CCK_Ant2_Cnt)); ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("CCK_Ant1_Cnt:%d, CCK_Ant2_Cnt:%d\n",CCK_Ant1_Cnt,CCK_Ant2_Cnt));
if (((OFDM_Ant1_Cnt+OFDM_Ant2_Cnt)== 0)&&((CCK_Ant1_Cnt + CCK_Ant2_Cnt) <10)){ if (((OFDM_Ant1_Cnt+OFDM_Ant2_Cnt)== 0)&&((CCK_Ant1_Cnt + CCK_Ant2_Cnt) <10)) {
ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("odm_StaDefAntSelect Fail: No enough packet info!\n")); ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("odm_StaDefAntSelect Fail: No enough packet info!\n"));
return false; return false;
} }
@ -3161,7 +3161,7 @@ odm_SetRxIdleAnt(
ODM_SetBBReg(pDM_Odm,ODM_REG_RX_DEFUALT_A_11N, 0xFFFF, 0x569a); /* left-side antenna */ ODM_SetBBReg(pDM_Odm,ODM_REG_RX_DEFUALT_A_11N, 0xFFFF, 0x569a); /* left-side antenna */
/* for path-B */ /* for path-B */
if (bDualPath){ if (bDualPath) {
if (Ant== 0) if (Ant== 0)
ODM_SetBBReg(pDM_Odm,ODM_REG_RX_DEFUALT_A_11N, 0xFFFF0000, 0x65a9); /* right-side antenna */ ODM_SetBBReg(pDM_Odm,ODM_REG_RX_DEFUALT_A_11N, 0xFFFF0000, 0x65a9); /* right-side antenna */
else else
@ -3270,7 +3270,7 @@ odm_HwAntDiv_92C_92D(
&pDM_SWAT_Table->TxAnt[i]); &pDM_SWAT_Table->TxAnt[i]);
/* if Tx antenna selection: successful */ /* if Tx antenna selection: successful */
if (bRet){ if (bRet) {
pDM_SWAT_Table->RSSI_Ant1_Sum[i] = 0; pDM_SWAT_Table->RSSI_Ant1_Sum[i] = 0;
pDM_SWAT_Table->RSSI_Ant2_Sum[i] = 0; pDM_SWAT_Table->RSSI_Ant2_Sum[i] = 0;
pDM_SWAT_Table->OFDM_Ant1_Cnt[i] = 0; pDM_SWAT_Table->OFDM_Ant1_Cnt[i] = 0;
@ -3566,7 +3566,7 @@ odm_PHY_SaveAFERegisters(
u32 i; u32 i;
/* RTPRINT(FINIT, INIT_IQK, ("Save ADDA parameters.\n")); */ /* RTPRINT(FINIT, INIT_IQK, ("Save ADDA parameters.\n")); */
for ( i = 0 ; i < RegisterNum ; i++){ for ( i = 0 ; i < RegisterNum ; i++) {
AFEBackup[i] = ODM_GetBBReg(pDM_Odm, AFEReg[i], bMaskDWord); AFEBackup[i] = ODM_GetBBReg(pDM_Odm, AFEReg[i], bMaskDWord);
} }
} }

View file

@ -377,7 +377,7 @@ odm_RxPhyStatus92CSeries_Parsing(
/* Modification for ext-LNA board */ /* Modification for ext-LNA board */
if (pDM_Odm->BoardType & (ODM_BOARD_EXT_LNA | ODM_BOARD_EXT_PA)) if (pDM_Odm->BoardType & (ODM_BOARD_EXT_LNA | ODM_BOARD_EXT_PA))
{ {
if ((cck_agc_rpt>>7) == 0){ if ((cck_agc_rpt>>7) == 0) {
PWDB_ALL = (PWDB_ALL>94)?100:(PWDB_ALL +6); PWDB_ALL = (PWDB_ALL>94)?100:(PWDB_ALL +6);
} }
else else
@ -413,10 +413,10 @@ odm_RxPhyStatus92CSeries_Parsing(
{ {
u8 SQ,SQ_rpt; u8 SQ,SQ_rpt;
if ((pDM_Odm->SupportPlatform == ODM_MP) &&(pDM_Odm->PatchID==19)){/* pMgntInfo->CustomerID == RT_CID_819x_Lenovo */ if ((pDM_Odm->SupportPlatform == ODM_MP) &&(pDM_Odm->PatchID==19)) {/* pMgntInfo->CustomerID == RT_CID_819x_Lenovo */
SQ = odm_SQ_process_patch_RT_CID_819x_Lenovo(pDM_Odm,isCCKrate,PWDB_ALL,0,0); SQ = odm_SQ_process_patch_RT_CID_819x_Lenovo(pDM_Odm,isCCKrate,PWDB_ALL,0,0);
} }
else if (pPhyInfo->RxPWDBAll > 40 && !pDM_Odm->bInHctTest){ else if (pPhyInfo->RxPWDBAll > 40 && !pDM_Odm->bInHctTest) {
SQ = 100; SQ = 100;
} }
else{ else{
@ -502,7 +502,7 @@ odm_RxPhyStatus92CSeries_Parsing(
pPhyInfo->RxPower = rx_pwr_all; pPhyInfo->RxPower = rx_pwr_all;
pPhyInfo->RecvSignalPower = rx_pwr_all; pPhyInfo->RecvSignalPower = rx_pwr_all;
if ((pDM_Odm->SupportPlatform == ODM_MP) &&(pDM_Odm->PatchID==19)){ if ((pDM_Odm->SupportPlatform == ODM_MP) &&(pDM_Odm->PatchID==19)) {
/* do nothing */ /* do nothing */
} else{/* pMgntInfo->CustomerID != RT_CID_819x_Lenovo */ } else{/* pMgntInfo->CustomerID != RT_CID_819x_Lenovo */
/* */ /* */
@ -636,7 +636,7 @@ odm_Process_RSSIForDM(
if (!isCCKrate)/* ofdm rate */ if (!isCCKrate)/* ofdm rate */
{ {
if (pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_B] == 0){ if (pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_B] == 0) {
RSSI_Ave = pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_A]; RSSI_Ave = pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_A];
pDM_Odm->RSSI_A = pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_A]; pDM_Odm->RSSI_A = pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_A];
pDM_Odm->RSSI_B = 0; pDM_Odm->RSSI_B = 0;

View file

@ -127,17 +127,17 @@ odm_ConfigBB_PHY_REG_PG_8188E(
u32 Data u32 Data
) )
{ {
if (Addr == 0xfe){ if (Addr == 0xfe) {
ODM_sleep_ms(50); ODM_sleep_ms(50);
} else if (Addr == 0xfd){ } else if (Addr == 0xfd) {
ODM_delay_ms(5); ODM_delay_ms(5);
} else if (Addr == 0xfc){ } else if (Addr == 0xfc) {
ODM_delay_ms(1); ODM_delay_ms(1);
} else if (Addr == 0xfb){ } else if (Addr == 0xfb) {
ODM_delay_us(50); ODM_delay_us(50);
} else if (Addr == 0xfa){ } else if (Addr == 0xfa) {
ODM_delay_us(5); ODM_delay_us(5);
} else if (Addr == 0xf9){ } else if (Addr == 0xf9) {
ODM_delay_us(1); ODM_delay_us(1);
} else{ } else{
ODM_RT_TRACE(pDM_Odm,ODM_COMP_INIT, ODM_DBG_LOUD, ("===> @@@@@@@ ODM_ConfigBBWithHeaderFile: [PHY_REG] %08X %08X %08X\n", Addr, Bitmask, Data)); ODM_RT_TRACE(pDM_Odm,ODM_COMP_INIT, ODM_DBG_LOUD, ("===> @@@@@@@ ODM_ConfigBBWithHeaderFile: [PHY_REG] %08X %08X %08X\n", Addr, Bitmask, Data));
@ -155,22 +155,22 @@ odm_ConfigBB_PHY_8188E(
u32 Data u32 Data
) )
{ {
if (Addr == 0xfe){ if (Addr == 0xfe) {
ODM_sleep_ms(50); ODM_sleep_ms(50);
} }
else if (Addr == 0xfd){ else if (Addr == 0xfd) {
ODM_delay_ms(5); ODM_delay_ms(5);
} }
else if (Addr == 0xfc){ else if (Addr == 0xfc) {
ODM_delay_ms(1); ODM_delay_ms(1);
} }
else if (Addr == 0xfb){ else if (Addr == 0xfb) {
ODM_delay_us(50); ODM_delay_us(50);
} }
else if (Addr == 0xfa){ else if (Addr == 0xfa) {
ODM_delay_us(5); ODM_delay_us(5);
} }
else if (Addr == 0xf9){ else if (Addr == 0xf9) {
ODM_delay_us(1); ODM_delay_us(1);
} }
else{ else{

View file

@ -50,7 +50,7 @@ static u8 _is_fw_read_cmd_down(struct adapter* padapter, u8 msgbox_num)
do{ do{
valid = rtw_read8(padapter,REG_HMETFR) & BIT(msgbox_num); valid = rtw_read8(padapter,REG_HMETFR) & BIT(msgbox_num);
if (0 == valid ){ if (0 == valid ) {
read_down = true; read_down = true;
} }
}while ( (!read_down) && (retry_cnts--)); }while ( (!read_down) && (retry_cnts--));
@ -109,7 +109,7 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8
do{ do{
h2c_box_num = pHalData->LastHMEBoxNum; h2c_box_num = pHalData->LastHMEBoxNum;
if (!_is_fw_read_cmd_down(padapter, h2c_box_num)){ if (!_is_fw_read_cmd_down(padapter, h2c_box_num)) {
DBG_8192C(" fw read cmd failed...\n"); DBG_8192C(" fw read cmd failed...\n");
goto exit; goto exit;
} }
@ -128,7 +128,7 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8
/* Write Ext command */ /* Write Ext command */
msgbox_ex_addr = REG_HMEBOX_EXT_0 + (h2c_box_num *RTL88E_EX_MESSAGE_BOX_SIZE); msgbox_ex_addr = REG_HMEBOX_EXT_0 + (h2c_box_num *RTL88E_EX_MESSAGE_BOX_SIZE);
#ifdef CONFIG_H2C_EF #ifdef CONFIG_H2C_EF
for (cmd_idx=0;cmd_idx<ext_cmd_len;cmd_idx++ ){ for (cmd_idx=0;cmd_idx<ext_cmd_len;cmd_idx++ ) {
rtw_write8(padapter,msgbox_ex_addr+cmd_idx,*((u8*)(&h2c_cmd_ex)+cmd_idx)); rtw_write8(padapter,msgbox_ex_addr+cmd_idx,*((u8*)(&h2c_cmd_ex)+cmd_idx));
} }
#else #else
@ -139,7 +139,7 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8
/* Write command */ /* Write command */
msgbox_addr =REG_HMEBOX_0 + (h2c_box_num *RTL88E_MESSAGE_BOX_SIZE); msgbox_addr =REG_HMEBOX_0 + (h2c_box_num *RTL88E_MESSAGE_BOX_SIZE);
#ifdef CONFIG_H2C_EF #ifdef CONFIG_H2C_EF
for (cmd_idx=0;cmd_idx<RTL88E_MESSAGE_BOX_SIZE;cmd_idx++ ){ for (cmd_idx=0;cmd_idx<RTL88E_MESSAGE_BOX_SIZE;cmd_idx++ ) {
rtw_write8(padapter,msgbox_addr+cmd_idx,*((u8*)(&h2c_cmd)+cmd_idx)); rtw_write8(padapter,msgbox_addr+cmd_idx,*((u8*)(&h2c_cmd)+cmd_idx));
} }
#else #else
@ -169,7 +169,7 @@ u8 rtl8188e_set_rssi_cmd(struct adapter*padapter, u8 *param)
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
; ;
if (pHalData->fw_ractrl == true){ if (pHalData->fw_ractrl == true) {
}else{ }else{
DBG_8192C("==>%s fw dont support RA\n",__FUNCTION__); DBG_8192C("==>%s fw dont support RA\n",__FUNCTION__);
res=_FAIL; res=_FAIL;
@ -183,7 +183,7 @@ u8 rtl8188e_set_raid_cmd(struct adapter*padapter, u32 mask)
u8 res=_SUCCESS; u8 res=_SUCCESS;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
; ;
if (pHalData->fw_ractrl == true){ if (pHalData->fw_ractrl == true) {
__le32 lmask; __le32 lmask;
memset(buf, 0, 3); memset(buf, 0, 3);
@ -312,7 +312,7 @@ void rtl8188e_set_FwMediaStatus_cmd(struct adapter *padapter, __le16 mstatus_rpt
DBG_871X("### %s: MStatus=%x MACID=%d\n", __FUNCTION__,opmode,macid); DBG_871X("### %s: MStatus=%x MACID=%d\n", __FUNCTION__,opmode,macid);
FillH2CCmd_88E(padapter, H2C_COM_MEDIA_STATUS_RPT, sizeof(mst_rpt), (u8 *)&mst_rpt); FillH2CCmd_88E(padapter, H2C_COM_MEDIA_STATUS_RPT, sizeof(mst_rpt), (u8 *)&mst_rpt);
if (macid > 31){ if (macid > 31) {
macid = macid-32; macid = macid-32;
reg_macid_no_link = REG_MACID_NO_LINK_1; reg_macid_no_link = REG_MACID_NO_LINK_1;
} }

View file

@ -161,13 +161,13 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_BWIFI_TEST,Adapter->registrypriv.wifi_spec); ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_BWIFI_TEST,Adapter->registrypriv.wifi_spec);
if (pHalData->rf_type == RF_1T1R){ if (pHalData->rf_type == RF_1T1R) {
ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_RF_TYPE,ODM_1T1R); ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_RF_TYPE,ODM_1T1R);
} }
else if (pHalData->rf_type == RF_2T2R){ else if (pHalData->rf_type == RF_2T2R) {
ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_RF_TYPE,ODM_2T2R); ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_RF_TYPE,ODM_2T2R);
} }
else if (pHalData->rf_type == RF_1T2R){ else if (pHalData->rf_type == RF_1T2R) {
ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_RF_TYPE,ODM_1T2R); ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_RF_TYPE,ODM_1T2R);
} }
@ -390,7 +390,7 @@ u8 AntDivBeforeLink8188E(struct adapter *Adapter )
} }
if (pDM_SWAT_Table->SWAS_NoLink_State == 0){ if (pDM_SWAT_Table->SWAS_NoLink_State == 0) {
/* switch channel */ /* switch channel */
pDM_SWAT_Table->SWAS_NoLink_State = 1; pDM_SWAT_Table->SWAS_NoLink_State = 1;
pDM_SWAT_Table->CurAntenna = (pDM_SWAT_Table->CurAntenna==Antenna_A)?Antenna_B:Antenna_A; pDM_SWAT_Table->CurAntenna = (pDM_SWAT_Table->CurAntenna==Antenna_A)?Antenna_B:Antenna_A;

View file

@ -408,7 +408,7 @@ s32 rtl8188e_iol_efuse_patch(struct adapter *padapter)
s32 result = _SUCCESS; s32 result = _SUCCESS;
printk("==> %s\n",__FUNCTION__); printk("==> %s\n",__FUNCTION__);
if (rtw_IOL_applied(padapter)){ if (rtw_IOL_applied(padapter)) {
iol_mode_enable(padapter, 1); iol_mode_enable(padapter, 1);
result = iol_execute(padapter, CMD_READ_EFUSE_MAP); result = iol_execute(padapter, CMD_READ_EFUSE_MAP);
if (result == _SUCCESS) if (result == _SUCCESS)
@ -458,7 +458,7 @@ static int rtl8188e_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_fram
t1= rtw_get_current_time(); t1= rtw_get_current_time();
iol_mode_enable(adapter, 1); iol_mode_enable(adapter, 1);
for (i=0;i<bndy_cnt;i++){ for (i=0;i<bndy_cnt;i++) {
u8 page_no = 0; u8 page_no = 0;
page_no = i*2 ; page_no = i*2 ;
/* printk(" i = %d, page_no = %d\n",i,page_no); */ /* printk(" i = %d, page_no = %d\n",i,page_no); */
@ -486,8 +486,8 @@ void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter,int data_len)
printk("###### %s ######\n",__FUNCTION__); printk("###### %s ######\n",__FUNCTION__);
rtw_write8(Adapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT); rtw_write8(Adapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
if (pbuf){ if (pbuf) {
for (addr=0;addr< data_cnts;addr++){ for (addr=0;addr< data_cnts;addr++) {
/* printk("==> addr:0x%02x\n",addr); */ /* printk("==> addr:0x%02x\n",addr); */
rtw_write32(Adapter,0x140,addr); rtw_write32(Adapter,0x140,addr);
rtw_usleep_os(2); rtw_usleep_os(2);
@ -495,7 +495,7 @@ void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter,int data_len)
do{ do{
rstatus=(reg_140=rtw_read32(Adapter,REG_PKTBUF_DBG_CTRL)&BIT24); rstatus=(reg_140=rtw_read32(Adapter,REG_PKTBUF_DBG_CTRL)&BIT24);
/* printk("rstatus = %02x, reg_140:0x%08x\n",rstatus,reg_140); */ /* printk("rstatus = %02x, reg_140:0x%08x\n",rstatus,reg_140); */
if (rstatus){ if (rstatus) {
fifo_data = rtw_read32(Adapter,REG_PKTBUF_DBG_DATA_L); fifo_data = rtw_read32(Adapter,REG_PKTBUF_DBG_DATA_L);
/* printk("fifo_data_144:0x%08x\n",fifo_data); */ /* printk("fifo_data_144:0x%08x\n",fifo_data); */
memcpy(pbuf+(addr*8),&fifo_data , 4); memcpy(pbuf+(addr*8),&fifo_data , 4);
@ -613,7 +613,7 @@ _BlockWrite(
("_BlockWrite: [P3] buffSize_p3(%d) blockSize_p3(%d) blockCount_p3(%d)\n", ("_BlockWrite: [P3] buffSize_p3(%d) blockSize_p3(%d) blockCount_p3(%d)\n",
(buffSize-offset), blockSize_p3, blockCount_p3)); (buffSize-offset), blockSize_p3, blockCount_p3));
for (i = 0 ; i < blockCount_p3 ; i++){ for (i = 0 ; i < blockCount_p3 ; i++) {
ret =rtw_write8(padapter, (FW_8188E_START_ADDRESS + offset + i), *(bufferPtr + offset + i)); ret =rtw_write8(padapter, (FW_8188E_START_ADDRESS + offset + i), *(bufferPtr + offset + i));
if (ret == _FAIL) if (ret == _FAIL)
@ -705,7 +705,7 @@ static void _MCUIO_Reset88E(struct adapter *padapter,u8 bReset)
{ {
u8 u1bTmp; u8 u1bTmp;
if (bReset==true){ if (bReset==true) {
/* Reset MCU IO Wrapper- sugggest by SD1-Gimmy */ /* Reset MCU IO Wrapper- sugggest by SD1-Gimmy */
u1bTmp = rtw_read8(padapter, REG_RSV_CTRL+1); u1bTmp = rtw_read8(padapter, REG_RSV_CTRL+1);
rtw_write8(padapter,REG_RSV_CTRL+1, (u1bTmp&(~BIT3))); rtw_write8(padapter,REG_RSV_CTRL+1, (u1bTmp&(~BIT3)));
@ -956,20 +956,20 @@ hal_EfusePowerSwitch_RTL8188E(
/* 1.2V Power: From VDDON with Power Cut(0x0000h[15]), defualt valid */ /* 1.2V Power: From VDDON with Power Cut(0x0000h[15]), defualt valid */
tmpV16 = rtw_read16(pAdapter,REG_SYS_ISO_CTRL); tmpV16 = rtw_read16(pAdapter,REG_SYS_ISO_CTRL);
if ( ! (tmpV16 & PWC_EV12V ) ){ if ( ! (tmpV16 & PWC_EV12V ) ) {
tmpV16 |= PWC_EV12V ; tmpV16 |= PWC_EV12V ;
rtw_write16(pAdapter,REG_SYS_ISO_CTRL,tmpV16); rtw_write16(pAdapter,REG_SYS_ISO_CTRL,tmpV16);
} }
/* Reset: 0x0000h[28], default valid */ /* Reset: 0x0000h[28], default valid */
tmpV16 = rtw_read16(pAdapter,REG_SYS_FUNC_EN); tmpV16 = rtw_read16(pAdapter,REG_SYS_FUNC_EN);
if ( !(tmpV16 & FEN_ELDR) ){ if ( !(tmpV16 & FEN_ELDR) ) {
tmpV16 |= FEN_ELDR ; tmpV16 |= FEN_ELDR ;
rtw_write16(pAdapter,REG_SYS_FUNC_EN,tmpV16); rtw_write16(pAdapter,REG_SYS_FUNC_EN,tmpV16);
} }
/* Clock: Gated(0x0008h[5]) 8M(0x0008h[1]) clock from ANA, default valid */ /* Clock: Gated(0x0008h[5]) 8M(0x0008h[1]) clock from ANA, default valid */
tmpV16 = rtw_read16(pAdapter,REG_SYS_CLKR); tmpV16 = rtw_read16(pAdapter,REG_SYS_CLKR);
if ( (!(tmpV16 & LOADER_CLK_EN) ) ||(!(tmpV16 & ANA8M) ) ){ if ( (!(tmpV16 & LOADER_CLK_EN) ) ||(!(tmpV16 & ANA8M) ) ) {
tmpV16 |= (LOADER_CLK_EN |ANA8M ) ; tmpV16 |= (LOADER_CLK_EN |ANA8M ) ;
rtw_write16(pAdapter,REG_SYS_CLKR,tmpV16); rtw_write16(pAdapter,REG_SYS_CLKR,tmpV16);
} }
@ -987,7 +987,7 @@ hal_EfusePowerSwitch_RTL8188E(
{ {
rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF); rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF);
if (bWrite == true){ if (bWrite == true) {
/* Disable LDO 2.5V after read/write action */ /* Disable LDO 2.5V after read/write action */
tempval = rtw_read8(pAdapter, EFUSE_TEST+3); tempval = rtw_read8(pAdapter, EFUSE_TEST+3);
rtw_write8(pAdapter, EFUSE_TEST+3, (tempval & 0x7F)); rtw_write8(pAdapter, EFUSE_TEST+3, (tempval & 0x7F));
@ -1563,7 +1563,7 @@ Hal_EfuseWordEnableDataWrite(struct adapter *pAdapter,
efuse_OneByteRead(pAdapter,tmpaddr, &tmpdata[0], bPseudoTest); efuse_OneByteRead(pAdapter,tmpaddr, &tmpdata[0], bPseudoTest);
efuse_OneByteRead(pAdapter,tmpaddr+1, &tmpdata[1], bPseudoTest); efuse_OneByteRead(pAdapter,tmpaddr+1, &tmpdata[1], bPseudoTest);
if ((data[0]!=tmpdata[0])||(data[1]!=tmpdata[1])){ if ((data[0]!=tmpdata[0])||(data[1]!=tmpdata[1])) {
badworden &= (~BIT0); badworden &= (~BIT0);
} }
} }
@ -1575,7 +1575,7 @@ Hal_EfuseWordEnableDataWrite(struct adapter *pAdapter,
efuse_OneByteRead(pAdapter,tmpaddr , &tmpdata[2], bPseudoTest); efuse_OneByteRead(pAdapter,tmpaddr , &tmpdata[2], bPseudoTest);
efuse_OneByteRead(pAdapter,tmpaddr+1, &tmpdata[3], bPseudoTest); efuse_OneByteRead(pAdapter,tmpaddr+1, &tmpdata[3], bPseudoTest);
if ((data[2]!=tmpdata[2])||(data[3]!=tmpdata[3])){ if ((data[2]!=tmpdata[2])||(data[3]!=tmpdata[3])) {
badworden &=( ~BIT1); badworden &=( ~BIT1);
} }
} }
@ -1587,7 +1587,7 @@ Hal_EfuseWordEnableDataWrite(struct adapter *pAdapter,
efuse_OneByteRead(pAdapter,tmpaddr, &tmpdata[4], bPseudoTest); efuse_OneByteRead(pAdapter,tmpaddr, &tmpdata[4], bPseudoTest);
efuse_OneByteRead(pAdapter,tmpaddr+1, &tmpdata[5], bPseudoTest); efuse_OneByteRead(pAdapter,tmpaddr+1, &tmpdata[5], bPseudoTest);
if ((data[4]!=tmpdata[4])||(data[5]!=tmpdata[5])){ if ((data[4]!=tmpdata[4])||(data[5]!=tmpdata[5])) {
badworden &=( ~BIT2); badworden &=( ~BIT2);
} }
} }
@ -1599,7 +1599,7 @@ Hal_EfuseWordEnableDataWrite(struct adapter *pAdapter,
efuse_OneByteRead(pAdapter,tmpaddr, &tmpdata[6], bPseudoTest); efuse_OneByteRead(pAdapter,tmpaddr, &tmpdata[6], bPseudoTest);
efuse_OneByteRead(pAdapter,tmpaddr+1, &tmpdata[7], bPseudoTest); efuse_OneByteRead(pAdapter,tmpaddr+1, &tmpdata[7], bPseudoTest);
if ((data[6]!=tmpdata[6])||(data[7]!=tmpdata[7])){ if ((data[6]!=tmpdata[6])||(data[7]!=tmpdata[7])) {
badworden &=( ~BIT3); badworden &=( ~BIT3);
} }
} }
@ -1828,7 +1828,7 @@ hal_EfusePgPacketRead_8188e(
} }
} }
} }
if (bDataEmpty==false){ if (bDataEmpty==false) {
ReadState = PG_STATE_DATA; ReadState = PG_STATE_DATA;
}else{/* read next header */ }else{/* read next header */
efuse_addr = efuse_addr + (word_cnts*2)+1; efuse_addr = efuse_addr + (word_cnts*2)+1;
@ -2520,10 +2520,10 @@ ReadChipVersion8188E(struct adapter *padapter)
pHalData->VersionID = ChipVersion; pHalData->VersionID = ChipVersion;
if (IS_1T2R(ChipVersion)){ if (IS_1T2R(ChipVersion)) {
pHalData->rf_type = RF_1T2R; pHalData->rf_type = RF_1T2R;
pHalData->NumTotalRFPath = 2; pHalData->NumTotalRFPath = 2;
} else if (IS_2T2R(ChipVersion)){ } else if (IS_2T2R(ChipVersion)) {
pHalData->rf_type = RF_2T2R; pHalData->rf_type = RF_2T2R;
pHalData->NumTotalRFPath = 2; pHalData->NumTotalRFPath = 2;
} else{ } else{
@ -2549,7 +2549,7 @@ static void rtl8188e_GetHalODMVar(
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
PDM_ODM_T podmpriv = &pHalData->odmpriv; PDM_ODM_T podmpriv = &pHalData->odmpriv;
switch (eVariable){ switch (eVariable) {
case HAL_ODM_STA_INFO: case HAL_ODM_STA_INFO:
break; break;
default: default:
@ -2566,11 +2566,11 @@ static void rtl8188e_SetHalODMVar(
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
PDM_ODM_T podmpriv = &pHalData->odmpriv; PDM_ODM_T podmpriv = &pHalData->odmpriv;
/* _irqL irqL; */ /* _irqL irqL; */
switch (eVariable){ switch (eVariable) {
case HAL_ODM_STA_INFO: case HAL_ODM_STA_INFO:
{ {
struct sta_info *psta = (struct sta_info *)pValue1; struct sta_info *psta = (struct sta_info *)pValue1;
if (bSet){ if (bSet) {
DBG_8192C("### Set STA_(%d) info\n",psta->mac_id); DBG_8192C("### Set STA_(%d) info\n",psta->mac_id);
ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS,psta->mac_id,psta); ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS,psta->mac_id,psta);
#if (RATE_ADAPTIVE_SUPPORT==1) #if (RATE_ADAPTIVE_SUPPORT==1)
@ -3112,7 +3112,7 @@ void Hal_ReadPowerSavingMode88E(
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter); struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
u8 tmpvalue; u8 tmpvalue;
if (AutoLoadFail){ if (AutoLoadFail) {
pwrctl->bHWPowerdown = false; pwrctl->bHWPowerdown = false;
pwrctl->bSupportRemoteWakeup = false; pwrctl->bSupportRemoteWakeup = false;
} }
@ -3203,7 +3203,7 @@ Hal_ReadTxPowerInfo88E(
if (!AutoLoadFail) if (!AutoLoadFail)
{ {
struct registry_priv *registry_par = &padapter->registrypriv; struct registry_priv *registry_par = &padapter->registrypriv;
if ( registry_par->regulatory_tid == 0xff){ if ( registry_par->regulatory_tid == 0xff) {
if (PROMContent[EEPROM_RF_BOARD_OPTION_88E] == 0xFF) if (PROMContent[EEPROM_RF_BOARD_OPTION_88E] == 0xFF)
pHalData->EEPROMRegulatory = (EEPROM_DEFAULT_BOARD_OPTION&0x7); /* bit0~2 */ pHalData->EEPROMRegulatory = (EEPROM_DEFAULT_BOARD_OPTION&0x7); /* bit0~2 */
else else
@ -3268,7 +3268,7 @@ Hal_EfuseParseEEPROMVer88E(
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
if (!AutoLoadFail){ if (!AutoLoadFail) {
pHalData->EEPROMVersion = hwinfo[EEPROM_VERSION_88E]; pHalData->EEPROMVersion = hwinfo[EEPROM_VERSION_88E];
if (pHalData->EEPROMVersion == 0xFF) if (pHalData->EEPROMVersion == 0xFF)
pHalData->EEPROMVersion = EEPROM_Default_Version; pHalData->EEPROMVersion = EEPROM_Default_Version;

View file

@ -145,7 +145,7 @@ sic_Read4Byte(
/* RTPRINT(FPHY, PHY_SICR, ("write cmdreg 0x%x = 0x%x\n", SIC_CMD_REG, SIC_CMD_READ)); */ /* RTPRINT(FPHY, PHY_SICR, ("write cmdreg 0x%x = 0x%x\n", SIC_CMD_REG, SIC_CMD_READ)); */
retry = 4; retry = 4;
while (retry--){ while (retry--) {
rtw_udelay_os(50); rtw_udelay_os(50);
/* PlatformStallExecution(50); */ /* PlatformStallExecution(50); */
} }
@ -179,7 +179,7 @@ sic_Write4Byte(
rtw_write8(Adapter, SIC_ADDR_REG+1, (u8)((offset&0xff00)>>8)); rtw_write8(Adapter, SIC_ADDR_REG+1, (u8)((offset&0xff00)>>8));
rtw_write32(Adapter, SIC_DATA_REG, (u32)data); rtw_write32(Adapter, SIC_DATA_REG, (u32)data);
rtw_write8(Adapter, SIC_CMD_REG, SIC_CMD_WRITE); rtw_write8(Adapter, SIC_CMD_REG, SIC_CMD_WRITE);
while (retry--){ while (retry--) {
rtw_udelay_os(50); rtw_udelay_os(50);
} }
} }
@ -205,7 +205,7 @@ SIC_SetBBReg(
/* RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_SetBBReg(), mask=0x%x, addr[0x%x]=0x%x\n", BitMask, RegAddr, Data)); */ /* RTPRINT(FPHY, PHY_SICW, ("[SIC], SIC_SetBBReg(), mask=0x%x, addr[0x%x]=0x%x\n", BitMask, RegAddr, Data)); */
if (BitMask!= bMaskDWord){/* if not "double word" write */ if (BitMask!= bMaskDWord) {/* if not "double word" write */
OriginalValue = sic_Read4Byte(Adapter, RegAddr); OriginalValue = sic_Read4Byte(Adapter, RegAddr);
/* BitShift = sic_CalculateBitShift(BitMask); */ /* BitShift = sic_CalculateBitShift(BitMask); */
BitShift = phy_CalculateBitShift(BitMask); BitShift = phy_CalculateBitShift(BitMask);
@ -360,7 +360,7 @@ rtl8188e_PHY_SetBBReg(
return; return;
#endif #endif
if (BitMask!= bMaskDWord){/* if not "double word" write */ if (BitMask!= bMaskDWord) {/* if not "double word" write */
OriginalValue = rtw_read32(Adapter, RegAddr); OriginalValue = rtw_read32(Adapter, RegAddr);
BitShift = phy_CalculateBitShift(BitMask); BitShift = phy_CalculateBitShift(BitMask);
Data = ((OriginalValue & (~BitMask)) | ((Data << BitShift) & BitMask)); Data = ((OriginalValue & (~BitMask)) | ((Data << BitShift) & BitMask));
@ -1066,7 +1066,7 @@ phy_BB8188E_Config_ParaFile(
if (HAL_STATUS_FAILURE ==ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG)) if (HAL_STATUS_FAILURE ==ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG))
rtStatus = _FAIL; rtStatus = _FAIL;
if (rtStatus != _SUCCESS){ if (rtStatus != _SUCCESS) {
/* RT_TRACE(COMP_INIT, DBG_SERIOUS, ("phy_BB8192S_Config_ParaFile():Write BB Reg Fail!!")); */ /* RT_TRACE(COMP_INIT, DBG_SERIOUS, ("phy_BB8192S_Config_ParaFile():Write BB Reg Fail!!")); */
goto phy_BB8190_Config_ParaFile_Fail; goto phy_BB8190_Config_ParaFile_Fail;
} }
@ -1090,7 +1090,7 @@ phy_BB8188E_Config_ParaFile(
rtStatus = _FAIL; rtStatus = _FAIL;
} }
if (rtStatus != _SUCCESS){ if (rtStatus != _SUCCESS) {
/* RT_TRACE(COMP_INIT, DBG_SERIOUS, ("phy_BB8192S_Config_ParaFile():BB_PG Reg Fail!!")); */ /* RT_TRACE(COMP_INIT, DBG_SERIOUS, ("phy_BB8192S_Config_ParaFile():BB_PG Reg Fail!!")); */
goto phy_BB8190_Config_ParaFile_Fail; goto phy_BB8190_Config_ParaFile_Fail;
} }
@ -1098,7 +1098,7 @@ phy_BB8188E_Config_ParaFile(
/* 3. BB AGC table Initialization */ /* 3. BB AGC table Initialization */
if (HAL_STATUS_FAILURE ==ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_AGC_TAB)) if (HAL_STATUS_FAILURE ==ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_AGC_TAB))
rtStatus = _FAIL; rtStatus = _FAIL;
if (rtStatus != _SUCCESS){ if (rtStatus != _SUCCESS) {
/* RT_TRACE(COMP_FPGA, DBG_SERIOUS, ("phy_BB8192S_Config_ParaFile():AGC Table Fail\n")); */ /* RT_TRACE(COMP_FPGA, DBG_SERIOUS, ("phy_BB8192S_Config_ParaFile():AGC Table Fail\n")); */
goto phy_BB8190_Config_ParaFile_Fail; goto phy_BB8190_Config_ParaFile_Fail;
} }
@ -1899,7 +1899,7 @@ static void phy_SpurCalibration_8188E(
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
/* DbgPrint("===> phy_SpurCalibration_8188E CurrentChannelBW = %d, CurrentChannel = %d\n", pHalData->CurrentChannelBW, pHalData->CurrentChannel); */ /* DbgPrint("===> phy_SpurCalibration_8188E CurrentChannelBW = %d, CurrentChannel = %d\n", pHalData->CurrentChannelBW, pHalData->CurrentChannel); */
if (pHalData->CurrentChannelBW == 0 && pHalData->CurrentChannel == 13){ if (pHalData->CurrentChannelBW == 0 && pHalData->CurrentChannel == 13) {
PHY_SetBBReg(Adapter, rOFDM1_CFOTracking, BIT(28), 0x1); /* enable CSI Mask */ PHY_SetBBReg(Adapter, rOFDM1_CFOTracking, BIT(28), 0x1); /* enable CSI Mask */
PHY_SetBBReg(Adapter, rOFDM1_csi_fix_mask, BIT(26)|BIT(25), 0x3); /* Fix CSI Mask Tone */ PHY_SetBBReg(Adapter, rOFDM1_csi_fix_mask, BIT(26)|BIT(25), 0x3); /* Fix CSI Mask Tone */
} }
@ -2220,7 +2220,7 @@ _PHY_DumpRFReg(struct adapter *pAdapter)
/* RTPRINT(FINIT, INIT_RF, ("PHY_DumpRFReg()====>\n")); */ /* RTPRINT(FINIT, INIT_RF, ("PHY_DumpRFReg()====>\n")); */
for (rfRegOffset = 0x00;rfRegOffset<=0x30;rfRegOffset++){ for (rfRegOffset = 0x00;rfRegOffset<=0x30;rfRegOffset++) {
rfRegValue = PHY_QueryRFReg(pAdapter,RF_PATH_A, rfRegOffset, bMaskDWord); rfRegValue = PHY_QueryRFReg(pAdapter,RF_PATH_A, rfRegOffset, bMaskDWord);
/* RTPRINT(FINIT, INIT_RF, (" 0x%02x = 0x%08x\n",rfRegOffset,rfRegValue)); */ /* RTPRINT(FINIT, INIT_RF, (" 0x%02x = 0x%08x\n",rfRegOffset,rfRegValue)); */
} }

View file

@ -674,7 +674,7 @@ phy_RF6052_Config_ParaFile(
break; break;
} }
if (rtStatus != _SUCCESS){ if (rtStatus != _SUCCESS) {
/* RT_TRACE(COMP_FPGA, DBG_LOUD, ("phy_RF6052_Config_ParaFile():Radio[%d] Fail!!", eRFPath)); */ /* RT_TRACE(COMP_FPGA, DBG_LOUD, ("phy_RF6052_Config_ParaFile():Radio[%d] Fail!!", eRFPath)); */
goto phy_RF6052_Config_ParaFile_Fail; goto phy_RF6052_Config_ParaFile_Fail;
} }

View file

@ -61,7 +61,7 @@ static void process_link_qual(struct adapter *padapter,union recv_frame *prframe
struct rx_pkt_attrib *pattrib; struct rx_pkt_attrib *pattrib;
struct signal_stat * signal_stat; struct signal_stat * signal_stat;
if (prframe == NULL || padapter== NULL){ if (prframe == NULL || padapter== NULL) {
return; return;
} }
@ -211,8 +211,8 @@ void update_recvframe_phyinfo_88e(
pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && (GetFrameSubType(wlanhdr) == WIFI_BEACON); pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && (GetFrameSubType(wlanhdr) == WIFI_BEACON);
if (pkt_info.bPacketBeacon){ if (pkt_info.bPacketBeacon) {
if (check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE) == true){ if (check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE) == true) {
sa = padapter->mlmepriv.cur_network.network.MacAddress; sa = padapter->mlmepriv.cur_network.network.MacAddress;
} }
else else

View file

@ -32,7 +32,7 @@ void rtl8188e_sreset_xmit_status_check(struct adapter *padapter)
unsigned int diff_time; unsigned int diff_time;
u32 txdma_status; u32 txdma_status;
if ( (txdma_status=rtw_read32(padapter, REG_TXDMA_STATUS)) !=0x00){ if ( (txdma_status=rtw_read32(padapter, REG_TXDMA_STATUS)) !=0x00) {
DBG_871X("%s REG_TXDMA_STATUS:0x%08x\n", __FUNCTION__, txdma_status); DBG_871X("%s REG_TXDMA_STATUS:0x%08x\n", __FUNCTION__, txdma_status);
rtw_hal_sreset_reset(padapter); rtw_hal_sreset_reset(padapter);
} }
@ -77,7 +77,7 @@ void rtl8188e_sreset_linked_status_check(struct adapter *padapter)
u32 rx_dma_status = 0; u32 rx_dma_status = 0;
u8 fw_status=0; u8 fw_status=0;
rx_dma_status = rtw_read32(padapter,REG_RXDMA_STATUS); rx_dma_status = rtw_read32(padapter,REG_RXDMA_STATUS);
if (rx_dma_status!= 0x00){ if (rx_dma_status!= 0x00) {
DBG_8192C("%s REG_RXDMA_STATUS:0x%08x\n",__FUNCTION__,rx_dma_status); DBG_8192C("%s REG_RXDMA_STATUS:0x%08x\n",__FUNCTION__,rx_dma_status);
rtw_write32(padapter,REG_RXDMA_STATUS,rx_dma_status); rtw_write32(padapter,REG_RXDMA_STATUS,rx_dma_status);
} }

View file

@ -67,22 +67,22 @@ void _dbg_dump_tx_info(struct adapter *padapter,int frame_tag,struct tx_desc *pt
u8 bDumpTxDesc = false; u8 bDumpTxDesc = false;
rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(bDumpTxPkt)); rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(bDumpTxPkt));
if (bDumpTxPkt ==1){/* dump txdesc for data frame */ if (bDumpTxPkt ==1) {/* dump txdesc for data frame */
DBG_871X("dump tx_desc for data frame\n"); DBG_871X("dump tx_desc for data frame\n");
if ((frame_tag&0x0f) == DATA_FRAMETAG){ if ((frame_tag&0x0f) == DATA_FRAMETAG) {
bDumpTxDesc = true; bDumpTxDesc = true;
} }
} }
else if (bDumpTxPkt ==2){/* dump txdesc for mgnt frame */ else if (bDumpTxPkt ==2) {/* dump txdesc for mgnt frame */
DBG_871X("dump tx_desc for mgnt frame\n"); DBG_871X("dump tx_desc for mgnt frame\n");
if ((frame_tag&0x0f) == MGNT_FRAMETAG){ if ((frame_tag&0x0f) == MGNT_FRAMETAG) {
bDumpTxDesc = true; bDumpTxDesc = true;
} }
} }
else if (bDumpTxPkt ==3){/* dump early info */ else if (bDumpTxPkt ==3) {/* dump early info */
} }
if (bDumpTxDesc){ if (bDumpTxDesc) {
DBG_8192C("=====================================\n"); DBG_8192C("=====================================\n");
DBG_8192C("txdw0(0x%08x)\n",ptxdesc->txdw0); DBG_8192C("txdw0(0x%08x)\n",ptxdesc->txdw0);
DBG_8192C("txdw1(0x%08x)\n",ptxdesc->txdw1); DBG_8192C("txdw1(0x%08x)\n",ptxdesc->txdw1);

View file

@ -64,13 +64,13 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE #ifdef CONFIG_USB_INTERRUPT_IN_PIPE
precvpriv->int_in_urb = usb_alloc_urb(0, GFP_KERNEL); precvpriv->int_in_urb = usb_alloc_urb(0, GFP_KERNEL);
if (precvpriv->int_in_urb == NULL){ if (precvpriv->int_in_urb == NULL) {
res= _FAIL; res= _FAIL;
DBG_8192C("alloc_urb for interrupt in endpoint fail !!!!\n"); DBG_8192C("alloc_urb for interrupt in endpoint fail !!!!\n");
goto exit; goto exit;
} }
precvpriv->int_in_buf = rtw_zmalloc(INTERRUPT_MSG_FORMAT_LEN); precvpriv->int_in_buf = rtw_zmalloc(INTERRUPT_MSG_FORMAT_LEN);
if (precvpriv->int_in_buf == NULL){ if (precvpriv->int_in_buf == NULL) {
res= _FAIL; res= _FAIL;
DBG_8192C("alloc_mem for interrupt in endpoint fail !!!!\n"); DBG_8192C("alloc_mem for interrupt in endpoint fail !!!!\n");
goto exit; goto exit;
@ -81,7 +81,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
_rtw_init_queue(&precvpriv->free_recv_buf_queue); _rtw_init_queue(&precvpriv->free_recv_buf_queue);
precvpriv->pallocated_recv_buf = rtw_zmalloc(NR_RECVBUFF *sizeof(struct recv_buf) + 4); precvpriv->pallocated_recv_buf = rtw_zmalloc(NR_RECVBUFF *sizeof(struct recv_buf) + 4);
if (precvpriv->pallocated_recv_buf== NULL){ if (precvpriv->pallocated_recv_buf== NULL) {
res= _FAIL; res= _FAIL;
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("alloc recv_buf fail!\n")); RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("alloc recv_buf fail!\n"));
goto exit; goto exit;

View file

@ -62,7 +62,7 @@ static void rtl8188eu_cal_txdesc_chksum(struct tx_desc *ptxdesc)
/* Clear first */ /* Clear first */
ptxdesc->txdw7 &= cpu_to_le32(0xffff0000); ptxdesc->txdw7 &= cpu_to_le32(0xffff0000);
for (index = 0 ; index < count ; index++){ for (index = 0 ; index < count ; index++) {
checksum = checksum ^ le16_to_cpu(*(__le16 *)(usPtr + index)); checksum = checksum ^ le16_to_cpu(*(__le16 *)(usPtr + index));
} }
@ -267,7 +267,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
fill_txdesc_sectype(pattrib, ptxdesc); fill_txdesc_sectype(pattrib, ptxdesc);
if (pattrib->ampdu_en==true){ if (pattrib->ampdu_en==true) {
ptxdesc->txdw2 |= cpu_to_le32(AGG_EN);/* AGG EN */ ptxdesc->txdw2 |= cpu_to_le32(AGG_EN);/* AGG EN */
ptxdesc->txdw6 = cpu_to_le32(0x6666f800); ptxdesc->txdw6 = cpu_to_le32(0x6666f800);
} else{ } else{
@ -286,7 +286,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
ptxdesc->txdw4 |= cpu_to_le32(QOS);/* QoS */ ptxdesc->txdw4 |= cpu_to_le32(QOS);/* QoS */
/* offset 20 */ /* offset 20 */
if (pxmitframe->agg_num > 1){ if (pxmitframe->agg_num > 1) {
/* DBG_8192C("%s agg_num:%d\n",__FUNCTION__,pxmitframe->agg_num ); */ /* DBG_8192C("%s agg_num:%d\n",__FUNCTION__,pxmitframe->agg_num ); */
ptxdesc->txdw5 |= cpu_to_le32((pxmitframe->agg_num << USB_TXAGG_NUM_SHT) & 0xFF000000); ptxdesc->txdw5 |= cpu_to_le32((pxmitframe->agg_num << USB_TXAGG_NUM_SHT) & 0xFF000000);
} }
@ -305,14 +305,14 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);/* DATA/RTS Rate FB LMT */ ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);/* DATA/RTS Rate FB LMT */
#if (RATE_ADAPTIVE_SUPPORT == 1) #if (RATE_ADAPTIVE_SUPPORT == 1)
if (pattrib->ht_en){ if (pattrib->ht_en) {
if ( ODM_RA_GetShortGI_8188E(&pHalData->odmpriv,pattrib->mac_id)) if ( ODM_RA_GetShortGI_8188E(&pHalData->odmpriv,pattrib->mac_id))
ptxdesc->txdw5 |= cpu_to_le32(SGI);/* SGI */ ptxdesc->txdw5 |= cpu_to_le32(SGI);/* SGI */
} }
data_rate =ODM_RA_GetDecisionRate_8188E(&pHalData->odmpriv,pattrib->mac_id); data_rate =ODM_RA_GetDecisionRate_8188E(&pHalData->odmpriv,pattrib->mac_id);
/* for debug */ /* for debug */
if (padapter->fix_rate!= 0xFF){ if (padapter->fix_rate!= 0xFF) {
data_rate = padapter->fix_rate; data_rate = padapter->fix_rate;
ptxdesc->txdw4 |= cpu_to_le32(DISDATAFB); ptxdesc->txdw4 |= cpu_to_le32(DISDATAFB);
@ -330,7 +330,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
ptxdesc->txdw5 |= cpu_to_le32(SGI);/* SGI */ ptxdesc->txdw5 |= cpu_to_le32(SGI);/* SGI */
data_rate = 0x13; /* default rate: MCS7 */ data_rate = 0x13; /* default rate: MCS7 */
if (padapter->fix_rate!= 0xFF){/* rate control by iwpriv */ if (padapter->fix_rate!= 0xFF) {/* rate control by iwpriv */
data_rate = padapter->fix_rate; data_rate = padapter->fix_rate;
ptxdesc->txdw4 | cpu_to_le32(DISDATAFB); ptxdesc->txdw4 | cpu_to_le32(DISDATAFB);
} }
@ -384,7 +384,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
ptxdesc->txdw5 |= cpu_to_le32(0x00300000);/* retry limit = 12 */ ptxdesc->txdw5 |= cpu_to_le32(0x00300000);/* retry limit = 12 */
#ifdef CONFIG_INTEL_PROXIM #ifdef CONFIG_INTEL_PROXIM
if ((padapter->proximity.proxim_on==true)&&(pattrib->intel_proxim==true)){ if ((padapter->proximity.proxim_on==true)&&(pattrib->intel_proxim==true)) {
DBG_871X("\n %s pattrib->rate=%d\n",__FUNCTION__,pattrib->rate); DBG_871X("\n %s pattrib->rate=%d\n",__FUNCTION__,pattrib->rate);
ptxdesc->txdw5 |= cpu_to_le32( pattrib->rate); ptxdesc->txdw5 |= cpu_to_le32( pattrib->rate);
} }
@ -567,7 +567,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter, struct xmit_priv *pxm
/* check xmitbuffer is ok */ /* check xmitbuffer is ok */
if (pxmitbuf == NULL) { if (pxmitbuf == NULL) {
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv); pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
if (pxmitbuf == NULL){ if (pxmitbuf == NULL) {
/* DBG_871X("%s #1, connot alloc xmitbuf!!!!\n",__FUNCTION__); */ /* DBG_871X("%s #1, connot alloc xmitbuf!!!!\n",__FUNCTION__); */
return false; return false;
} }
@ -643,13 +643,13 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter, struct xmit_priv *pxm
/* dequeue same priority packet from station tx queue */ /* dequeue same priority packet from station tx queue */
/* psta = pfirstframe->attrib.psta; */ /* psta = pfirstframe->attrib.psta; */
psta = rtw_get_stainfo(&padapter->stapriv, pfirstframe->attrib.ra); psta = rtw_get_stainfo(&padapter->stapriv, pfirstframe->attrib.ra);
if (pfirstframe->attrib.psta != psta){ if (pfirstframe->attrib.psta != psta) {
DBG_871X("%s, pattrib->psta(%p) != psta(%p)\n", __func__, pfirstframe->attrib.psta, psta); DBG_871X("%s, pattrib->psta(%p) != psta(%p)\n", __func__, pfirstframe->attrib.psta, psta);
} }
if (psta == NULL) { if (psta == NULL) {
DBG_8192C("rtw_xmit_classifier: psta == NULL\n"); DBG_8192C("rtw_xmit_classifier: psta == NULL\n");
} }
if (!(psta->state &_FW_LINKED)){ if (!(psta->state &_FW_LINKED)) {
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state); DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
} }

View file

@ -50,7 +50,7 @@ _ConfigNormalChipOutEP_8188E(
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
switch (NumOutPipe){ switch (NumOutPipe) {
case 3: case 3:
pHalData->OutEpQueueSel=TX_SELE_HQ| TX_SELE_LQ|TX_SELE_NQ; pHalData->OutEpQueueSel=TX_SELE_HQ| TX_SELE_LQ|TX_SELE_NQ;
pHalData->OutEpNumber=3; pHalData->OutEpNumber=3;
@ -83,14 +83,14 @@ static bool HalUsbSetQueuePipeMapping8188EUsb(
_ConfigNormalChipOutEP_8188E(pAdapter, NumOutPipe); _ConfigNormalChipOutEP_8188E(pAdapter, NumOutPipe);
/* Normal chip with one IN and one OUT doesn't have interrupt IN EP. */ /* Normal chip with one IN and one OUT doesn't have interrupt IN EP. */
if (1 == pHalData->OutEpNumber){ if (1 == pHalData->OutEpNumber) {
if (1 != NumInPipe){ if (1 != NumInPipe) {
return result; return result;
} }
} }
/* All config other than above support one Bulk IN and one Interrupt IN. */ /* All config other than above support one Bulk IN and one Interrupt IN. */
/* if (2 != NumInPipe){ */ /* if (2 != NumInPipe) { */
/* return result; */ /* return result; */
/* */ /* */
@ -285,7 +285,7 @@ _SetMacID(
) )
{ {
u32 i; u32 i;
for (i=0 ; i< MAC_ADDR_LEN ; i++){ for (i=0 ; i< MAC_ADDR_LEN ; i++) {
rtw_write32(Adapter, REG_MACID+i, MacID[i]); rtw_write32(Adapter, REG_MACID+i, MacID[i]);
} }
} }
@ -296,7 +296,7 @@ _SetBSSID(
) )
{ {
u32 i; u32 i;
for (i=0 ; i< MAC_ADDR_LEN ; i++){ for (i=0 ; i< MAC_ADDR_LEN ; i++) {
rtw_write32(Adapter, REG_BSSID+i, BSSID[i]); rtw_write32(Adapter, REG_BSSID+i, BSSID[i]);
} }
} }
@ -509,7 +509,7 @@ _InitNormalChipTwoOutEpPriority(
break; break;
} }
if (!pregistrypriv->wifi_spec ){ if (!pregistrypriv->wifi_spec ) {
beQ = valueLow; beQ = valueLow;
bkQ = valueLow; bkQ = valueLow;
viQ = valueHi; viQ = valueHi;
@ -538,7 +538,7 @@ _InitNormalChipThreeOutEpPriority(
struct registry_priv *pregistrypriv = &Adapter->registrypriv; struct registry_priv *pregistrypriv = &Adapter->registrypriv;
u16 beQ,bkQ,viQ,voQ,mgtQ,hiQ; u16 beQ,bkQ,viQ,voQ,mgtQ,hiQ;
if (!pregistrypriv->wifi_spec ){/* typical setting */ if (!pregistrypriv->wifi_spec ) {/* typical setting */
beQ = QUEUE_LOW; beQ = QUEUE_LOW;
bkQ = QUEUE_LOW; bkQ = QUEUE_LOW;
viQ = QUEUE_NORMAL; viQ = QUEUE_NORMAL;
@ -806,7 +806,7 @@ usb_AggSettingTxUpdate(
if (Adapter->registrypriv.wifi_spec) if (Adapter->registrypriv.wifi_spec)
pHalData->UsbTxAggMode = false; pHalData->UsbTxAggMode = false;
if (pHalData->UsbTxAggMode){ if (pHalData->UsbTxAggMode) {
value32 = rtw_read32(Adapter, REG_TDECTRL); value32 = rtw_read32(Adapter, REG_TDECTRL);
value32 = value32 & ~(BLK_DESC_NUM_MASK << BLK_DESC_NUM_SHIFT); value32 = value32 & ~(BLK_DESC_NUM_MASK << BLK_DESC_NUM_SHIFT);
value32 |= ((pHalData->UsbTxAggDescNum & BLK_DESC_NUM_MASK) << BLK_DESC_NUM_SHIFT); value32 |= ((pHalData->UsbTxAggDescNum & BLK_DESC_NUM_MASK) << BLK_DESC_NUM_SHIFT);
@ -1012,7 +1012,7 @@ _InitRFType(
pHalData->rf_chip = RF_6052; pHalData->rf_chip = RF_6052;
if (false == is92CU){ if (false == is92CU) {
pHalData->rf_type = RF_1T1R; pHalData->rf_type = RF_1T1R;
DBG_8192C("Set RF Chip ID to RF_6052 and RF type to 1T1R.\n"); DBG_8192C("Set RF Chip ID to RF_6052 and RF type to 1T1R.\n");
return; return;
@ -1242,7 +1242,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
{ {
_ps_open_RF(Adapter); _ps_open_RF(Adapter);
if (pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized){ if (pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized) {
PHY_IQCalibrate_8188E(Adapter,true); PHY_IQCalibrate_8188E(Adapter,true);
} }
else else
@ -1260,7 +1260,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_PW_ON); HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_PW_ON);
status = InitPowerOn_rtl8188eu(Adapter); status = InitPowerOn_rtl8188eu(Adapter);
if (status == _FAIL){ if (status == _FAIL) {
RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("Failed to init power on!\n")); RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("Failed to init power on!\n"));
goto exit; goto exit;
} }
@ -1269,7 +1269,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
pHalData->CurrentChannel = 6;/* default set to 6 */ pHalData->CurrentChannel = 6;/* default set to 6 */
if (pwrctrlpriv->reg_rfoff == true){ if (pwrctrlpriv->reg_rfoff == true) {
pwrctrlpriv->rf_pwrstate = rf_off; pwrctrlpriv->rf_pwrstate = rf_off;
} }
@ -1348,7 +1348,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_EFUSE_PATCH); HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_EFUSE_PATCH);
status = rtl8188e_iol_efuse_patch(Adapter); status = rtl8188e_iol_efuse_patch(Adapter);
if (status == _FAIL){ if (status == _FAIL) {
DBG_871X("%s rtl8188e_iol_efuse_patch failed\n",__FUNCTION__); DBG_871X("%s rtl8188e_iol_efuse_patch failed\n",__FUNCTION__);
goto exit; goto exit;
} }
@ -1357,7 +1357,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_LLTT); HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_LLTT);
status = InitLLTTable(Adapter, txpktbuf_bndy); status = InitLLTTable(Adapter, txpktbuf_bndy);
if (status == _FAIL){ if (status == _FAIL) {
RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("Failed to init LLT table\n")); RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("Failed to init LLT table\n"));
goto exit; goto exit;
} }
@ -1391,7 +1391,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
_InitHardwareDropIncorrectBulkOut(Adapter); _InitHardwareDropIncorrectBulkOut(Adapter);
if (pHalData->bRDGEnable){ if (pHalData->bRDGEnable) {
_InitRDGSetting(Adapter); _InitRDGSetting(Adapter);
} }
@ -1495,7 +1495,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
/* 2010/08/26 MH Merge from 8192CE. */ /* 2010/08/26 MH Merge from 8192CE. */
if (pwrctrlpriv->rf_pwrstate == rf_on) if (pwrctrlpriv->rf_pwrstate == rf_on)
{ {
if (pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized){ if (pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized) {
PHY_IQCalibrate_8188E(Adapter,true); PHY_IQCalibrate_8188E(Adapter,true);
} else { } else {
PHY_IQCalibrate_8188E(Adapter,false); PHY_IQCalibrate_8188E(Adapter,false);
@ -1640,7 +1640,7 @@ static u32 rtl8188eu_hal_deinit(struct adapter *Adapter)
if ((pwrctl->bHWPwrPindetect) && (pwrctl->bHWPowerdown)) if ((pwrctl->bHWPwrPindetect) && (pwrctl->bHWPowerdown))
rtl8188eu_hw_power_down(Adapter); rtl8188eu_hw_power_down(Adapter);
} else { } else {
if (Adapter->hw_init_completed == true){ if (Adapter->hw_init_completed == true) {
hal_poweroff_rtl8188eu(Adapter); hal_poweroff_rtl8188eu(Adapter);
if ((pwrctl->bHWPwrPindetect ) && (pwrctl->bHWPowerdown)) if ((pwrctl->bHWPwrPindetect ) && (pwrctl->bHWPowerdown))
@ -2524,7 +2524,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val)
/* ); */ /* ); */
break; break;
case HW_VAR_DM_FUNC_SET: case HW_VAR_DM_FUNC_SET:
if (*((u32 *)val) == DYNAMIC_ALL_FUNC_ENABLE){ if (*((u32 *)val) == DYNAMIC_ALL_FUNC_ENABLE) {
pdmpriv->DMFlag = pdmpriv->InitDMFlag; pdmpriv->DMFlag = pdmpriv->InitDMFlag;
podmpriv->SupportAbility = pdmpriv->InitODMFlag; podmpriv->SupportAbility = pdmpriv->InitODMFlag;
} }
@ -2647,7 +2647,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val)
break; break;
} }
if (MinSpacingToSet < SecMinSpace){ if (MinSpacingToSet < SecMinSpace) {
MinSpacingToSet = SecMinSpace; MinSpacingToSet = SecMinSpace;
} }
@ -2738,7 +2738,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val)
DIG_T *pDigTable = &podmpriv->DM_DigTable; DIG_T *pDigTable = &podmpriv->DM_DigTable;
u32 rx_gain = ((u32 *)(val))[0]; u32 rx_gain = ((u32 *)(val))[0];
if (rx_gain == 0xff){/* restore rx gain */ if (rx_gain == 0xff) {/* restore rx gain */
ODM_Write_DIG(podmpriv,pDigTable->BackupIGValue); ODM_Write_DIG(podmpriv,pDigTable->BackupIGValue);
} }
else{ else{
@ -3014,11 +3014,11 @@ static u8 GetHalDefVar8188EUsb(
if (rtw_linked_check(Adapter)) if (rtw_linked_check(Adapter))
bLinked = true; bLinked = true;
if (bLinked){ if (bLinked) {
DBG_871X("============ RA status check ===================\n"); DBG_871X("============ RA status check ===================\n");
if (Adapter->bRxRSSIDisplay >30) if (Adapter->bRxRSSIDisplay >30)
Adapter->bRxRSSIDisplay = 1; Adapter->bRxRSSIDisplay = 1;
for (i=0;i< Adapter->bRxRSSIDisplay;i++){ for (i=0;i< Adapter->bRxRSSIDisplay;i++) {
DBG_8192C("Mac_id:%d ,RSSI:%d,RateID = %d,RAUseRate = 0x%08x,RateSGI = %d, DecisionRate = 0x%02x ,PTStage = %d, RetryOver drop:%d, LifeTimeOver drop:%d\n", DBG_8192C("Mac_id:%d ,RSSI:%d,RateID = %d,RAUseRate = 0x%08x,RateSGI = %d, DecisionRate = 0x%02x ,PTStage = %d, RetryOver drop:%d, LifeTimeOver drop:%d\n",
i, i,
podmpriv->RAInfo[i].RssiStaRA, podmpriv->RAInfo[i].RssiStaRA,
@ -3074,24 +3074,24 @@ static u8 SetHalDefVar8188EUsb(
{ {
u8 dm_func = *(( u8*)pValue); u8 dm_func = *(( u8*)pValue);
if (dm_func == 0){ /* disable all dynamic func */ if (dm_func == 0) { /* disable all dynamic func */
podmpriv->SupportAbility = DYNAMIC_FUNC_DISABLE; podmpriv->SupportAbility = DYNAMIC_FUNC_DISABLE;
DBG_8192C("==> Disable all dynamic function...\n"); DBG_8192C("==> Disable all dynamic function...\n");
} }
else if (dm_func == 1){/* disable DIG */ else if (dm_func == 1) {/* disable DIG */
podmpriv->SupportAbility &= (~DYNAMIC_BB_DIG); podmpriv->SupportAbility &= (~DYNAMIC_BB_DIG);
DBG_8192C("==> Disable DIG...\n"); DBG_8192C("==> Disable DIG...\n");
} }
else if (dm_func == 2){/* disable High power */ else if (dm_func == 2) {/* disable High power */
podmpriv->SupportAbility &= (~DYNAMIC_BB_DYNAMIC_TXPWR); podmpriv->SupportAbility &= (~DYNAMIC_BB_DYNAMIC_TXPWR);
} }
else if (dm_func == 3){/* disable tx power tracking */ else if (dm_func == 3) {/* disable tx power tracking */
podmpriv->SupportAbility &= (~DYNAMIC_RF_CALIBRATION); podmpriv->SupportAbility &= (~DYNAMIC_RF_CALIBRATION);
DBG_8192C("==> Disable tx power tracking...\n"); DBG_8192C("==> Disable tx power tracking...\n");
} else if (dm_func == 5){/* disable antenna diversity */ } else if (dm_func == 5) {/* disable antenna diversity */
podmpriv->SupportAbility &= (~DYNAMIC_BB_ANT_DIV); podmpriv->SupportAbility &= (~DYNAMIC_BB_ANT_DIV);
} }
else if (dm_func == 6){/* turn on all dynamic func */ else if (dm_func == 6) {/* turn on all dynamic func */
if (!(podmpriv->SupportAbility & DYNAMIC_BB_DIG)) if (!(podmpriv->SupportAbility & DYNAMIC_BB_DIG))
{ {
DIG_T *pDigTable = &podmpriv->DM_DigTable; DIG_T *pDigTable = &podmpriv->DM_DigTable;
@ -3224,7 +3224,7 @@ static void UpdateHalRAMask8188EUsb(struct adapter *padapter, u32 mac_id, u8 rss
DBG_871X("update raid entry, mask=0x%x, arg=0x%x\n", mask, arg); DBG_871X("update raid entry, mask=0x%x, arg=0x%x\n", mask, arg);
psta->ra_mask=mask; psta->ra_mask=mask;
#ifdef CONFIG_INTEL_PROXIM #ifdef CONFIG_INTEL_PROXIM
if (padapter->proximity.proxim_on ==true){ if (padapter->proximity.proxim_on ==true) {
arg &= ~BIT(6); arg &= ~BIT(6);
} }
else { else {
@ -3350,7 +3350,7 @@ static void rtl8188eu_init_default_value(struct adapter * padapter)
static u8 rtl8188eu_ps_func(struct adapter *Adapter, enum HAL_INTF_PS_FUNC efunc_id, u8 *val) static u8 rtl8188eu_ps_func(struct adapter *Adapter, enum HAL_INTF_PS_FUNC efunc_id, u8 *val)
{ {
u8 bResult = true; u8 bResult = true;
switch (efunc_id){ switch (efunc_id) {
#if defined(CONFIG_AUTOSUSPEND) #if defined(CONFIG_AUTOSUSPEND)
case HAL_USB_SELECT_SUSPEND: case HAL_USB_SELECT_SUSPEND:
@ -3370,7 +3370,7 @@ void rtl8188eu_set_hal_ops(struct adapter * padapter)
padapter->HalData = rtw_zmalloc(sizeof(HAL_DATA_TYPE)); padapter->HalData = rtw_zmalloc(sizeof(HAL_DATA_TYPE));
if (padapter->HalData == NULL){ if (padapter->HalData == NULL) {
DBG_8192C("cant not alloc memory for HAL DATA\n"); DBG_8192C("cant not alloc memory for HAL DATA\n");
} }

View file

@ -40,13 +40,13 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u
u8 *pIo_buf; u8 *pIo_buf;
int vendorreq_times = 0; int vendorreq_times = 0;
if ((padapter->bSurpriseRemoved) ||(dvobj_to_pwrctl(pdvobjpriv)->pnp_bstop_trx)){ if ((padapter->bSurpriseRemoved) ||(dvobj_to_pwrctl(pdvobjpriv)->pnp_bstop_trx)) {
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usbctrl_vendorreq:(padapter->bSurpriseRemoved ||pwrctl->pnp_bstop_trx)!!!\n")); RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usbctrl_vendorreq:(padapter->bSurpriseRemoved ||pwrctl->pnp_bstop_trx)!!!\n"));
status = -EPERM; status = -EPERM;
goto exit; goto exit;
} }
if (len>MAX_VENDOR_REQ_CMD_SIZE){ if (len>MAX_VENDOR_REQ_CMD_SIZE) {
DBG_8192C( "[%s] Buffer len error ,vendor request failed\n", __FUNCTION__ ); DBG_8192C( "[%s] Buffer len error ,vendor request failed\n", __FUNCTION__ );
status = -EINVAL; status = -EINVAL;
goto exit; goto exit;
@ -112,7 +112,7 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u
} }
} }
if (rtw_inc_and_chk_continual_io_error(pdvobjpriv) == true ){ if (rtw_inc_and_chk_continual_io_error(pdvobjpriv) == true ) {
padapter->bSurpriseRemoved = true; padapter->bSurpriseRemoved = true;
break; break;
} }
@ -310,7 +310,7 @@ static void interrupt_handler_8188eu(struct adapter *padapter,u16 pkt_len,u8 *pb
DBG_871X("===> %s Receive FIFO Overflow\n",__FUNCTION__); DBG_871X("===> %s Receive FIFO Overflow\n",__FUNCTION__);
/* C2H Event */ /* C2H Event */
if (pbuf[0]!= 0){ if (pbuf[0]!= 0) {
memcpy(&(pHalData->C2hArray[0]), &(pbuf[USB_INTR_CONTENT_C2H_OFFSET]), 16); memcpy(&(pHalData->C2hArray[0]), &(pbuf[USB_INTR_CONTENT_C2H_OFFSET]), 16);
/* rtw_c2h_wk_cmd(padapter); to do.. */ /* rtw_c2h_wk_cmd(padapter); to do.. */
} }
@ -498,7 +498,7 @@ static int recvbuf2recvframe(struct adapter *padapter, struct sk_buff *pskb)
/* for first fragment packet, driver need allocate 1536+drvinfo_sz+RXDESC_SIZE to defrag packet. */ /* for first fragment packet, driver need allocate 1536+drvinfo_sz+RXDESC_SIZE to defrag packet. */
/* modify alloc_sz for recvive crc error packet by thomas 2011-06-02 */ /* modify alloc_sz for recvive crc error packet by thomas 2011-06-02 */
if ((pattrib->mfrag == 1)&&(pattrib->frag_num == 0)){ if ((pattrib->mfrag == 1)&&(pattrib->frag_num == 0)) {
if (skb_len <= 1650) if (skb_len <= 1650)
alloc_sz = 1664; alloc_sz = 1664;
else else
@ -576,12 +576,12 @@ static int recvbuf2recvframe(struct adapter *padapter, struct sk_buff *pskb)
} }
} else{ /* pkt_rpt_type == TX_REPORT1-CCX, TX_REPORT2-TX RTP,HIS_REPORT-USB HISR RTP */ } else{ /* pkt_rpt_type == TX_REPORT1-CCX, TX_REPORT2-TX RTP,HIS_REPORT-USB HISR RTP */
/* enqueue recvframe to txrtp queue */ /* enqueue recvframe to txrtp queue */
if (pattrib->pkt_rpt_type == TX_REPORT1){ if (pattrib->pkt_rpt_type == TX_REPORT1) {
/* DBG_8192C("rx CCX\n"); */ /* DBG_8192C("rx CCX\n"); */
/* CCX-TXRPT ack for xmit mgmt frames. */ /* CCX-TXRPT ack for xmit mgmt frames. */
handle_txrpt_ccx_88e(padapter, precvframe->u.hdr.rx_data); handle_txrpt_ccx_88e(padapter, precvframe->u.hdr.rx_data);
} }
else if (pattrib->pkt_rpt_type == TX_REPORT2){ else if (pattrib->pkt_rpt_type == TX_REPORT2) {
/* DBG_8192C("rx TX RPT\n"); */ /* DBG_8192C("rx TX RPT\n"); */
ODM_RA_TxRPT2Handle_8188E( ODM_RA_TxRPT2Handle_8188E(
&pHalData->odmpriv, &pHalData->odmpriv,
@ -703,7 +703,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
DBG_8192C("###=> usb_read_port_complete => urb status(%d)\n", purb->status); DBG_8192C("###=> usb_read_port_complete => urb status(%d)\n", purb->status);
if (rtw_inc_and_chk_continual_io_error(adapter_to_dvobj(padapter)) == true ){ if (rtw_inc_and_chk_continual_io_error(adapter_to_dvobj(padapter)) == true ) {
padapter->bSurpriseRemoved = true; padapter->bSurpriseRemoved = true;
} }

View file

@ -70,7 +70,7 @@
* if that's true, then detect them, and take measures. * if that's true, then detect them, and take measures.
* Anyway, the measure is: define only ___ntohl as a macro instead, * Anyway, the measure is: define only ___ntohl as a macro instead,
* and in a separate file, have * and in a separate file, have
* unsigned long inline ntohl(x){return ___ntohl(x);} * unsigned long inline ntohl(x) {return ___ntohl(x);}
* *
* The same for constant arguments * The same for constant arguments
* __constant_ntohl(__u32 x) * __constant_ntohl(__u32 x)

View file

@ -92,8 +92,8 @@ u16 rtw_recv_select_queue(struct sk_buff *skb,
void rtw_proc_init_one(struct net_device *dev); void rtw_proc_init_one(struct net_device *dev);
void rtw_proc_remove_one(struct net_device *dev); void rtw_proc_remove_one(struct net_device *dev);
#else /* CONFIG_PROC_DEBUG */ #else /* CONFIG_PROC_DEBUG */
static void rtw_proc_init_one(struct net_device *dev){} static void rtw_proc_init_one(struct net_device *dev) {}
static void rtw_proc_remove_one(struct net_device *dev){} static void rtw_proc_remove_one(struct net_device *dev) {}
#endif /* CONFIG_PROC_DEBUG */ #endif /* CONFIG_PROC_DEBUG */
void rtw_ips_dev_unload(struct adapter *padapter); void rtw_ips_dev_unload(struct adapter *padapter);

View file

@ -577,7 +577,7 @@ __inline static void set_fwstate(struct mlme_priv *pmlmepriv, sint state)
{ {
pmlmepriv->fw_state |= state; pmlmepriv->fw_state |= state;
/* FOR HW integration */ /* FOR HW integration */
if (_FW_UNDER_SURVEY==state){ if (_FW_UNDER_SURVEY==state) {
pmlmepriv->bScanInProcess = true; pmlmepriv->bScanInProcess = true;
} }
} }
@ -586,7 +586,7 @@ __inline static void _clr_fwstate_(struct mlme_priv *pmlmepriv, sint state)
{ {
pmlmepriv->fw_state &= ~state; pmlmepriv->fw_state &= ~state;
/* FOR HW integration */ /* FOR HW integration */
if (_FW_UNDER_SURVEY==state){ if (_FW_UNDER_SURVEY==state) {
pmlmepriv->bScanInProcess = false; pmlmepriv->bScanInProcess = false;
} }
} }

View file

@ -342,7 +342,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
/* DBG_8192C("%s\n", __func__); */ /* DBG_8192C("%s\n", __func__); */
bssinf_len = pnetwork->network.IELength+sizeof (struct rtw_ieee80211_hdr_3addr); bssinf_len = pnetwork->network.IELength+sizeof (struct rtw_ieee80211_hdr_3addr);
if (bssinf_len > MAX_BSSINFO_LEN){ if (bssinf_len > MAX_BSSINFO_LEN) {
DBG_871X("%s IE Length too long > %d byte\n",__FUNCTION__,MAX_BSSINFO_LEN); DBG_871X("%s IE Length too long > %d byte\n",__FUNCTION__,MAX_BSSINFO_LEN);
goto exit; goto exit;
} }
@ -754,13 +754,13 @@ static u8 set_pairwise_key(struct adapter *padapter, struct sta_info *psta)
u8 res=_SUCCESS; u8 res=_SUCCESS;
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if ( ph2c == NULL){ if ( ph2c == NULL) {
res= _FAIL; res= _FAIL;
goto exit; goto exit;
} }
psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm)); 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)); rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
res=_FAIL; res=_FAIL;
goto exit; goto exit;
@ -795,12 +795,12 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid)
DBG_8192C("%s\n", __FUNCTION__); DBG_8192C("%s\n", __FUNCTION__);
pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmd== NULL){ if (pcmd== NULL) {
res= _FAIL; res= _FAIL;
goto exit; goto exit;
} }
psetkeyparm=(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm)); psetkeyparm=(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm));
if (psetkeyparm== NULL){ if (psetkeyparm== NULL) {
rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj)); rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj));
res= _FAIL; res= _FAIL;
goto exit; goto exit;
@ -2046,7 +2046,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
goto check_need_indicate_scan_done; goto check_need_indicate_scan_done;
} }
if (rtw_is_scan_deny(padapter)){ if (rtw_is_scan_deny(padapter)) {
DBG_871X(FUNC_ADPT_FMT ": scan deny\n", FUNC_ADPT_ARG(padapter)); DBG_871X(FUNC_ADPT_FMT ": scan deny\n", FUNC_ADPT_ARG(padapter));
need_indicate_scan_done = true; need_indicate_scan_done = true;
goto check_need_indicate_scan_done; goto check_need_indicate_scan_done;
@ -2255,7 +2255,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel
} }
buf = rtw_zmalloc(ielen); buf = rtw_zmalloc(ielen);
if (buf == NULL){ if (buf == NULL) {
ret = -ENOMEM; ret = -ENOMEM;
goto exit; goto exit;
} }
@ -2271,7 +2271,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel
} }
pos = buf; pos = buf;
if (ielen < RSN_HEADER_LEN){ if (ielen < RSN_HEADER_LEN) {
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("Ie len too short %d\n", ielen)); RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("Ie len too short %d\n", ielen));
ret = -1; ret = -1;
goto exit; goto exit;
@ -2481,7 +2481,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
goto exit; goto exit;
} }
if (params->ssid_len > IW_ESSID_MAX_SIZE){ if (params->ssid_len > IW_ESSID_MAX_SIZE) {
ret= -E2BIG; ret= -E2BIG;
goto exit; goto exit;
@ -2567,7 +2567,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
goto exit; goto exit;
} }
if (sme->ssid_len > IW_ESSID_MAX_SIZE){ if (sme->ssid_len > IW_ESSID_MAX_SIZE) {
ret= -E2BIG; ret= -E2BIG;
goto exit; goto exit;
@ -2642,7 +2642,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
wep_key_len = wep_key_len <= 5 ? 5 : 13; wep_key_len = wep_key_len <= 5 ? 5 : 13;
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial); wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
pwep =(struct ndis_802_11_wep *) rtw_malloc(wep_total_len); pwep =(struct ndis_802_11_wep *) rtw_malloc(wep_total_len);
if (pwep == NULL){ if (pwep == NULL) {
DBG_871X(" wpa_set_encryption: pwep allocate fail !!!\n"); DBG_871X(" wpa_set_encryption: pwep allocate fail !!!\n");
ret = -ENOMEM; ret = -ENOMEM;
goto exit; goto exit;

View file

@ -389,7 +389,7 @@ static char *translate_scan(struct adapter *padapter,
cap = le16_to_cpu(le_cap); cap = le16_to_cpu(le_cap);
if (cap & (WLAN_CAPABILITY_IBSS |WLAN_CAPABILITY_BSS)){ if (cap & (WLAN_CAPABILITY_IBSS |WLAN_CAPABILITY_BSS)) {
if (cap & WLAN_CAPABILITY_BSS) if (cap & WLAN_CAPABILITY_BSS)
iwe.u.mode = IW_MODE_MASTER; iwe.u.mode = IW_MODE_MASTER;
else else
@ -684,7 +684,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
wep_key_len = wep_key_len <= 5 ? 5 : 13; wep_key_len = wep_key_len <= 5 ? 5 : 13;
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial); wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
pwep =(struct ndis_802_11_wep *) rtw_malloc(wep_total_len); pwep =(struct ndis_802_11_wep *) rtw_malloc(wep_total_len);
if (pwep == NULL){ if (pwep == NULL) {
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,(" wpa_set_encryption: pwep allocate fail !!!\n")); RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,(" wpa_set_encryption: pwep allocate fail !!!\n"));
goto exit; goto exit;
} }
@ -849,7 +849,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
struct wifidirect_info* pwdinfo = &padapter->wdinfo; struct wifidirect_info* pwdinfo = &padapter->wdinfo;
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
if ((ielen > MAX_WPA_IE_LEN) || (pie == NULL)){ if ((ielen > MAX_WPA_IE_LEN) || (pie == NULL)) {
_clr_fwstate_(&padapter->mlmepriv, WIFI_UNDER_WPS); _clr_fwstate_(&padapter->mlmepriv, WIFI_UNDER_WPS);
if (pie == NULL) if (pie == NULL)
return ret; return ret;
@ -859,7 +859,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
if (ielen) { if (ielen) {
buf = rtw_zmalloc(ielen); buf = rtw_zmalloc(ielen);
if (buf == NULL){ if (buf == NULL) {
ret = -ENOMEM; ret = -ENOMEM;
goto exit; goto exit;
} }
@ -875,7 +875,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
} }
pos = buf; pos = buf;
if (ielen < RSN_HEADER_LEN){ if (ielen < RSN_HEADER_LEN) {
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("Ie len too short %d\n", ielen)); RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("Ie len too short %d\n", ielen));
ret = -1; ret = -1;
goto exit; goto exit;
@ -1109,7 +1109,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
goto exit; goto exit;
} }
if (padapter->hw_init_completed==false){ if (padapter->hw_init_completed==false) {
ret = -EPERM; ret = -EPERM;
goto exit; goto exit;
} }
@ -1140,7 +1140,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
goto exit; goto exit;
} }
if (rtw_set_802_11_infrastructure_mode(padapter, networkType) ==false){ if (rtw_set_802_11_infrastructure_mode(padapter, networkType) ==false) {
ret = -EPERM; ret = -EPERM;
goto exit; goto exit;
@ -1394,13 +1394,13 @@ static int rtw_wx_set_wap(struct net_device *dev,
goto exit; goto exit;
} }
if (!padapter->bup){ if (!padapter->bup) {
ret = -1; ret = -1;
goto exit; goto exit;
} }
if (temp->sa_family != ARPHRD_ETHER){ if (temp->sa_family != ARPHRD_ETHER) {
ret = -EINVAL; ret = -EINVAL;
goto exit; goto exit;
} }
@ -1553,12 +1553,12 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
goto exit; goto exit;
} }
if (!padapter->bup){ if (!padapter->bup) {
ret = -1; ret = -1;
goto exit; goto exit;
} }
if (padapter->hw_init_completed==false){ if (padapter->hw_init_completed==false) {
ret = -1; ret = -1;
goto exit; goto exit;
} }
@ -1860,15 +1860,15 @@ static int rtw_wx_set_essid(struct net_device *dev,
goto exit; goto exit;
} }
if (!padapter->bup){ if (!padapter->bup) {
ret = -1; ret = -1;
goto exit; goto exit;
} }
#if WIRELESS_EXT <= 20 #if WIRELESS_EXT <= 20
if ((wrqu->essid.length-1) > IW_ESSID_MAX_SIZE){ if ((wrqu->essid.length-1) > IW_ESSID_MAX_SIZE) {
#else #else
if (wrqu->essid.length > IW_ESSID_MAX_SIZE){ if (wrqu->essid.length > IW_ESSID_MAX_SIZE) {
#endif #endif
ret= -E2BIG; ret= -E2BIG;
goto exit; goto exit;
@ -2026,13 +2026,13 @@ static int rtw_wx_set_rate(struct net_device *dev,
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,(" rtw_wx_set_rate\n")); RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,(" rtw_wx_set_rate\n"));
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_info_,("target_rate = %d, fixed = %d\n",target_rate,fixed)); RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_info_,("target_rate = %d, fixed = %d\n",target_rate,fixed));
if (target_rate == -1){ if (target_rate == -1) {
ratevalue = 11; ratevalue = 11;
goto set_rate; goto set_rate;
} }
target_rate = target_rate/100000; target_rate = target_rate/100000;
switch (target_rate){ switch (target_rate) {
case 10: case 10:
ratevalue = 0; ratevalue = 0;
break; break;
@ -2091,7 +2091,7 @@ set_rate:
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_info_,("datarate_inx=%d\n",datarates[i])); RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_info_,("datarate_inx=%d\n",datarates[i]));
} }
if ( rtw_setdatarate_cmd(padapter, datarates) !=_SUCCESS){ if ( rtw_setdatarate_cmd(padapter, datarates) !=_SUCCESS) {
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("rtw_wx_set_rate Fail!!!\n")); RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("rtw_wx_set_rate Fail!!!\n"));
ret = -1; ret = -1;
} }
@ -2473,7 +2473,7 @@ static int rtw_wx_set_auth(struct net_device *dev,
/* then it needn't reset it; */ /* then it needn't reset it; */
} }
if (param->value){ if (param->value) {
padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled; padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled;
padapter->securitypriv.dot11PrivacyAlgrthm=_NO_PRIVACY_; padapter->securitypriv.dot11PrivacyAlgrthm=_NO_PRIVACY_;
padapter->securitypriv.dot118021XGrpPrivacy=_NO_PRIVACY_; padapter->securitypriv.dot118021XGrpPrivacy=_NO_PRIVACY_;
@ -2818,7 +2818,7 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct iw_point *p = &wrqu->data; struct iw_point *p = &wrqu->data;
if ( (!p->length) || (!p->pointer)){ if ( (!p->length) || (!p->pointer)) {
ret = -EINVAL; ret = -EINVAL;
goto _rtw_drvext_hdl_exit; goto _rtw_drvext_hdl_exit;
} }
@ -2827,7 +2827,7 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
bset = (u8)(p->flags&0xFFFF); bset = (u8)(p->flags&0xFFFF);
len = p->length; len = p->length;
pparmbuf = (u8*)rtw_malloc(len); pparmbuf = (u8*)rtw_malloc(len);
if (pparmbuf == NULL){ if (pparmbuf == NULL) {
ret = -ENOMEM; ret = -ENOMEM;
goto _rtw_drvext_hdl_exit; goto _rtw_drvext_hdl_exit;
} }
@ -3030,7 +3030,7 @@ static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info
bset = (u8)(p->flags & 0xFFFF); bset = (u8)(p->flags & 0xFFFF);
len = p->length; len = p->length;
pparmbuf = (u8*)rtw_malloc(len); pparmbuf = (u8*)rtw_malloc(len);
if (pparmbuf == NULL){ if (pparmbuf == NULL) {
ret = -ENOMEM; ret = -ENOMEM;
goto _rtw_mp_ioctl_hdl_exit; goto _rtw_mp_ioctl_hdl_exit;
} }
@ -5625,7 +5625,7 @@ static int rtw_dbg_port(struct net_device *dev,
break; break;
} }
for (i=0;i<blink_num;i++){ for (i=0;i<blink_num;i++) {
rtw_IOL_append_WB_cmd(xmit_frame, reg, 0x00,0xff); rtw_IOL_append_WB_cmd(xmit_frame, reg, 0x00,0xff);
rtw_IOL_append_DELAY_MS_cmd(xmit_frame, blink_delay_ms); rtw_IOL_append_DELAY_MS_cmd(xmit_frame, blink_delay_ms);
rtw_IOL_append_WB_cmd(xmit_frame, reg, 0x08,0xff); rtw_IOL_append_WB_cmd(xmit_frame, reg, 0x08,0xff);
@ -5652,7 +5652,7 @@ static int rtw_dbg_port(struct net_device *dev,
break; break;
} }
for (i=0;i<write_num;i++){ for (i=0;i<write_num;i++) {
rtw_IOL_append_WB_cmd(xmit_frame, reg, i+start_value,0xFF); rtw_IOL_append_WB_cmd(xmit_frame, reg, i+start_value,0xFF);
} }
if (_SUCCESS != rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000,0)) if (_SUCCESS != rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000,0))
@ -5684,7 +5684,7 @@ static int rtw_dbg_port(struct net_device *dev,
break; break;
} }
for (i=0;i<write_num;i++){ for (i=0;i<write_num;i++) {
rtw_IOL_append_WW_cmd(xmit_frame, reg, i+start_value,0xFFFF); rtw_IOL_append_WW_cmd(xmit_frame, reg, i+start_value,0xFFFF);
} }
if (_SUCCESS !=rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000,0)) if (_SUCCESS !=rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000,0))
@ -5716,7 +5716,7 @@ static int rtw_dbg_port(struct net_device *dev,
break; break;
} }
for (i=0;i<write_num;i++){ for (i=0;i<write_num;i++) {
rtw_IOL_append_WD_cmd(xmit_frame, reg, i+start_value,0xFFFFFFFF); rtw_IOL_append_WD_cmd(xmit_frame, reg, i+start_value,0xFFFFFFFF);
} }
if (_SUCCESS !=rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000,0)) if (_SUCCESS !=rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000,0))
@ -5919,7 +5919,7 @@ static int rtw_dbg_port(struct net_device *dev,
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
if (arg == 0xff){ if (arg == 0xff) {
psta->rx_bk_cnt =0; psta->rx_bk_cnt =0;
psta->rx_be_cnt =0; psta->rx_be_cnt =0;
psta->rx_vo_cnt =0; psta->rx_vo_cnt =0;
@ -5954,12 +5954,12 @@ static int rtw_dbg_port(struct net_device *dev,
case 0x0c:/* dump rx/tx packet */ case 0x0c:/* dump rx/tx packet */
{ {
if (arg == 0){ if (arg == 0) {
DBG_871X("dump rx packet (%d)\n",extra_arg); DBG_871X("dump rx packet (%d)\n",extra_arg);
/* pHalData->bDumpRxPkt =extra_arg; */ /* pHalData->bDumpRxPkt =extra_arg; */
rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DUMP_RXPKT, &(extra_arg)); rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DUMP_RXPKT, &(extra_arg));
} }
else if (arg==1){ else if (arg==1) {
DBG_871X("dump tx packet (%d)\n",extra_arg); DBG_871X("dump tx packet (%d)\n",extra_arg);
rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(extra_arg)); rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(extra_arg));
} }
@ -5967,7 +5967,7 @@ static int rtw_dbg_port(struct net_device *dev,
break; break;
case 0x0f: case 0x0f:
{ {
if (extra_arg == 0){ if (extra_arg == 0) {
DBG_871X("###### silent reset test.......#####\n"); DBG_871X("###### silent reset test.......#####\n");
rtw_hal_sreset_reset(padapter); rtw_hal_sreset_reset(padapter);
} else { } else {
@ -6030,7 +6030,7 @@ static int rtw_dbg_port(struct net_device *dev,
break; break;
case 0x16: case 0x16:
{ {
if (arg == 0xff){ if (arg == 0xff) {
rtw_odm_dbg_comp_msg(padapter); rtw_odm_dbg_comp_msg(padapter);
} }
else{ else{
@ -6077,13 +6077,13 @@ static int rtw_dbg_port(struct net_device *dev,
break; break;
case 0xdd:/* registers dump , 0 for mac reg,1 for bb reg, 2 for rf reg */ case 0xdd:/* registers dump , 0 for mac reg,1 for bb reg, 2 for rf reg */
{ {
if (extra_arg== 0){ if (extra_arg== 0) {
mac_reg_dump(padapter); mac_reg_dump(padapter);
} }
else if (extra_arg==1){ else if (extra_arg==1) {
bb_reg_dump(padapter); bb_reg_dump(padapter);
} }
else if (extra_arg==2){ else if (extra_arg==2) {
rf_reg_dump(padapter); rf_reg_dump(padapter);
} }
@ -6094,7 +6094,7 @@ static int rtw_dbg_port(struct net_device *dev,
{ {
u32 odm_flag; u32 odm_flag;
if (0xf==extra_arg){ if (0xf==extra_arg) {
rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DM_FUNC,&odm_flag); rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DM_FUNC,&odm_flag);
DBG_871X(" === DMFlag(0x%08x) ===\n",odm_flag); DBG_871X(" === DMFlag(0x%08x) ===\n",odm_flag);
DBG_871X("extra_arg = 0 - disable all dynamic func\n"); DBG_871X("extra_arg = 0 - disable all dynamic func\n");
@ -6175,7 +6175,7 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value)
u32 flags; u32 flags;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
switch (name){ switch (name) {
case IEEE_PARAM_WPA_ENABLED: case IEEE_PARAM_WPA_ENABLED:
padapter->securitypriv.dot11AuthAlgrthm= dot11AuthAlgrthm_8021X; /* 802.1x */ padapter->securitypriv.dot11AuthAlgrthm= dot11AuthAlgrthm_8021X; /* 802.1x */
@ -6261,7 +6261,7 @@ static int wpa_supplicant_ioctl(struct net_device *dev, struct iw_point *p)
/* down(&ieee->wx_sem); */ /* down(&ieee->wx_sem); */
if (p->length < sizeof(struct ieee_param) || !p->pointer){ if (p->length < sizeof(struct ieee_param) || !p->pointer) {
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
@ -6328,13 +6328,13 @@ static u8 set_pairwise_key(struct adapter *padapter, struct sta_info *psta)
u8 res=_SUCCESS; u8 res=_SUCCESS;
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if ( ph2c == NULL){ if ( ph2c == NULL) {
res= _FAIL; res= _FAIL;
goto exit; goto exit;
} }
psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm)); 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)); rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
res=_FAIL; res=_FAIL;
goto exit; goto exit;
@ -6369,12 +6369,12 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid)
DBG_871X("%s\n", __FUNCTION__); DBG_871X("%s\n", __FUNCTION__);
pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmd== NULL){ if (pcmd== NULL) {
res= _FAIL; res= _FAIL;
goto exit; goto exit;
} }
psetkeyparm=(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm)); psetkeyparm=(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm));
if (psetkeyparm== NULL){ if (psetkeyparm== NULL) {
rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj)); rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj));
res= _FAIL; res= _FAIL;
goto exit; goto exit;
@ -6521,7 +6521,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
wep_key_len = wep_key_len <= 5 ? 5 : 13; wep_key_len = wep_key_len <= 5 ? 5 : 13;
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial); wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
pwep =(struct ndis_802_11_wep *)rtw_malloc(wep_total_len); pwep =(struct ndis_802_11_wep *)rtw_malloc(wep_total_len);
if (pwep == NULL){ if (pwep == NULL) {
DBG_871X(" r871x_set_encryption: pwep allocate fail !!!\n"); DBG_871X(" r871x_set_encryption: pwep allocate fail !!!\n");
goto exit; goto exit;
} }
@ -7277,14 +7277,14 @@ static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p)
* so, we just check hw_init_completed * so, we just check hw_init_completed
*/ */
if (padapter->hw_init_completed==false){ if (padapter->hw_init_completed==false) {
ret = -EPERM; ret = -EPERM;
goto out; goto out;
} }
/* if (p->length < sizeof(struct ieee_param) || !p->pointer){ */ /* if (p->length < sizeof(struct ieee_param) || !p->pointer) { */
if (!p->pointer){ if (!p->pointer) {
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
@ -7501,7 +7501,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
if ( len >= WEXT_CSCAN_HEADER_SIZE if ( len >= WEXT_CSCAN_HEADER_SIZE
&& _rtw_memcmp(ext, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == true && _rtw_memcmp(ext, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == true
){ ) {
ret = rtw_wx_set_scan(dev, info, awrq, ext); ret = rtw_wx_set_scan(dev, info, awrq, ext);
goto FREE_EXT; goto FREE_EXT;
} }
@ -7686,7 +7686,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
} }
padapter->registrypriv.fw_iol = 0;/* 0:Disable, 1:enable, 2:by usb speed */ padapter->registrypriv.fw_iol = 0;/* 0:Disable, 1:enable, 2:by usb speed */
if (strcmp(tmp[0], "status") == 0){ if (strcmp(tmp[0], "status") == 0) {
sprintf(extra, "Load File efuse=%s,Load File MAC=%s",(pEEPROM->bloadfile_fail_flag? "FAIL" : "OK"),(pEEPROM->bloadmac_fail_flag? "FAIL" : "OK")); sprintf(extra, "Load File efuse=%s,Load File MAC=%s",(pEEPROM->bloadfile_fail_flag? "FAIL" : "OK"),(pEEPROM->bloadmac_fail_flag? "FAIL" : "OK"));
goto exit; goto exit;
} }
@ -7797,7 +7797,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
if ((i & 0xF) == 0xF) { if ((i & 0xF) == 0xF) {
sprintf(extra, "%s\n", extra); sprintf(extra, "%s\n", extra);
} }
else if ((i & 0x7) == 0x7){ else if ((i & 0x7) == 0x7) {
sprintf(extra, "%s\t", extra); sprintf(extra, "%s\t", extra);
} else { } else {
sprintf(extra, "%s ", extra); sprintf(extra, "%s ", extra);

View file

@ -196,7 +196,7 @@ void rtw_report_sec_ie(struct adapter *adapter,u8 authmode,u8 *sec_ie)
len = sec_ie[1]+2; len = sec_ie[1]+2;
len = (len < IW_CUSTOM_MAX) ? len:IW_CUSTOM_MAX; len = (len < IW_CUSTOM_MAX) ? len:IW_CUSTOM_MAX;
for (i=0;i<len;i++){ for (i=0;i<len;i++) {
p+=sprintf(p,"%02x",sec_ie[i]); p+=sprintf(p,"%02x",sec_ie[i]);
} }

View file

@ -1086,7 +1086,7 @@ int _netdev_open(struct net_device *pnetdev)
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+871x_drv - dev_open\n")); RT_TRACE(_module_os_intfs_c_,_drv_info_,("+871x_drv - dev_open\n"));
DBG_871X("+871x_drv - drv_open, bup=%d\n", padapter->bup); DBG_871X("+871x_drv - drv_open, bup=%d\n", padapter->bup);
if (pwrctrlpriv->ps_flag == true){ if (pwrctrlpriv->ps_flag == true) {
padapter->net_closed = false; padapter->net_closed = false;
goto netdev_open_normal_process; goto netdev_open_normal_process;
} }
@ -1293,7 +1293,7 @@ static int netdev_close(struct net_device *pnetdev)
} }
padapter->net_closed = true; padapter->net_closed = true;
if (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_on){ if (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_on) {
DBG_871X("(2)871x_drv - drv_close, bup=%d, hw_init_completed=%d\n", padapter->bup, padapter->hw_init_completed); DBG_871X("(2)871x_drv - drv_close, bup=%d, hw_init_completed=%d\n", padapter->bup, padapter->hw_init_completed);
/* s1. */ /* s1. */
@ -1637,7 +1637,7 @@ static int rtw_suspend_free_assoc_resource(struct adapter *padapter)
DBG_871X("==> "FUNC_ADPT_FMT" entry....\n", FUNC_ADPT_ARG(padapter)); DBG_871X("==> "FUNC_ADPT_FMT" entry....\n", FUNC_ADPT_ARG(padapter));
rtw_cancel_all_timer(padapter); rtw_cancel_all_timer(padapter);
if (pnetdev){ if (pnetdev) {
netif_carrier_off(pnetdev); netif_carrier_off(pnetdev);
rtw_netif_stop_queue(pnetdev); rtw_netif_stop_queue(pnetdev);
} }
@ -1662,7 +1662,7 @@ static int rtw_suspend_free_assoc_resource(struct adapter *padapter)
rtw_sta_flush(padapter); rtw_sta_flush(padapter);
} }
#endif #endif
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) ){ if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) ) {
/* s2-2. indicate disconnect to os */ /* s2-2. indicate disconnect to os */
rtw_indicate_disconnect(padapter); rtw_indicate_disconnect(padapter);
} }

View file

@ -34,7 +34,7 @@
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE * Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
* @return: one of RTW_STATUS_CODE * @return: one of RTW_STATUS_CODE
*/ */
inline int RTW_STATUS_CODE(int error_code){ inline int RTW_STATUS_CODE(int error_code) {
if (error_code >=0) if (error_code >=0)
return _SUCCESS; return _SUCCESS;
@ -997,7 +997,7 @@ static int retriveFromFile(char *path, u8* buf, u32 sz)
struct file *fp; struct file *fp;
if (path && buf) { if (path && buf) {
if ( 0 == (ret=openFile(&fp,path, O_RDONLY, 0)) ){ if ( 0 == (ret=openFile(&fp,path, O_RDONLY, 0)) ) {
DBG_871X("%s openFile path:%s fp=%p\n",__FUNCTION__, path ,fp); DBG_871X("%s openFile path:%s fp=%p\n",__FUNCTION__, path ,fp);
oldfs = get_fs(); set_fs(get_ds()); oldfs = get_fs(); set_fs(get_ds());

View file

@ -79,7 +79,7 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, struct recv_buf *pre
precvbuf->irp_pending = false; precvbuf->irp_pending = false;
precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL); precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL);
if (precvbuf->purb == NULL){ if (precvbuf->purb == NULL) {
res = _FAIL; res = _FAIL;
} }

View file

@ -356,7 +356,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit; goto exit;
} }
if (!access_ok(VERIFY_READ, (const void __user *)priv_cmd.buf, priv_cmd.total_len)){ if (!access_ok(VERIFY_READ, (const void __user *)priv_cmd.buf, priv_cmd.total_len)) {
DBG_871X("%s: failed to access memory\n", __FUNCTION__); DBG_871X("%s: failed to access memory\n", __FUNCTION__);
ret = -EFAULT; ret = -EFAULT;
goto exit; goto exit;

View file

@ -627,7 +627,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
DBG_871X("==> %s (%s:%d)\n",__FUNCTION__, current->comm, current->pid); DBG_871X("==> %s (%s:%d)\n",__FUNCTION__, current->comm, current->pid);
if (!padapter->bup){ if (!padapter->bup) {
u8 bMacPwrCtrlOn = false; u8 bMacPwrCtrlOn = false;
rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
if (bMacPwrCtrlOn) if (bMacPwrCtrlOn)
@ -679,7 +679,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj); struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj);
int ret = 0; int ret = 0;
if (pwrpriv->bInternalAutoSuspend ){ if (pwrpriv->bInternalAutoSuspend ) {
ret = rtw_resume_process(padapter); ret = rtw_resume_process(padapter);
} else { } else {
if (rtw_is_earlysuspend_registered(pwrpriv)) { if (rtw_is_earlysuspend_registered(pwrpriv)) {
@ -725,7 +725,7 @@ int rtw_resume_process(struct adapter *padapter)
#endif #endif
DBG_871X("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume ); DBG_871X("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume );
if ( true == pwrpriv->bAutoResume ){ if ( true == pwrpriv->bAutoResume ) {
pwrpriv->bInternalAutoSuspend = false; pwrpriv->bInternalAutoSuspend = false;
pwrpriv->bAutoResume=false; pwrpriv->bAutoResume=false;
DBG_871X("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n",pwrpriv->bAutoResume,pwrpriv->bInternalAutoSuspend ); DBG_871X("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n",pwrpriv->bAutoResume,pwrpriv->bInternalAutoSuspend );
@ -754,7 +754,7 @@ int rtw_resume_process(struct adapter *padapter)
#endif #endif
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
DBG_871X("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume ); DBG_871X("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume );
if ( true == pwrpriv->bAutoResume ){ if ( true == pwrpriv->bAutoResume ) {
pwrpriv->bInternalAutoSuspend = false; pwrpriv->bInternalAutoSuspend = false;
pwrpriv->bAutoResume=false; pwrpriv->bAutoResume=false;
DBG_871X("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n",pwrpriv->bAutoResume,pwrpriv->bInternalAutoSuspend ); DBG_871X("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n",pwrpriv->bAutoResume,pwrpriv->bInternalAutoSuspend );
@ -810,7 +810,7 @@ void autosuspend_enter(struct adapter* padapter)
usb_autosuspend_device(dvobj->pusbdev, 1); usb_autosuspend_device(dvobj->pusbdev, 1);
#endif #endif
#else /* ifndef CONFIG_BT_COEXIST */ #else /* ifndef CONFIG_BT_COEXIST */
if (1==pwrpriv->autopm_cnt){ if (1==pwrpriv->autopm_cnt) {
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35)) #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))
usb_enable_autosuspend(dvobj->pusbdev); usb_enable_autosuspend(dvobj->pusbdev);
#else #else
@ -873,7 +873,7 @@ int autoresume_enter(struct adapter* padapter)
#endif #endif
#else /* ifndef CONFIG_BT_COEXIST */ #else /* ifndef CONFIG_BT_COEXIST */
pwrpriv->bAutoResume=true; pwrpriv->bAutoResume=true;
if (0==pwrpriv->autopm_cnt){ if (0==pwrpriv->autopm_cnt) {
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33)) #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33))
if (usb_autopm_get_interface(dvobj->pusbintf) < 0) if (usb_autopm_get_interface(dvobj->pusbintf) < 0)
{ {
@ -990,7 +990,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
#ifdef CONFIG_AUTOSUSPEND #ifdef CONFIG_AUTOSUSPEND
if ( padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE ) if ( padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE )
{ {
if (padapter->registrypriv.usbss_enable ){ /* autosuspend (2s delay) */ if (padapter->registrypriv.usbss_enable ) { /* autosuspend (2s delay) */
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,38)) #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,38))
dvobj->pusbdev->dev.power.autosuspend_delay = 0 * HZ;/* 15 * HZ; idle-delay time */ dvobj->pusbdev->dev.power.autosuspend_delay = 0 * HZ;/* 15 * HZ; idle-delay time */
#else #else
@ -1090,7 +1090,7 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
} }
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
if (1 == pwrctl->autopm_cnt){ if (1 == pwrctl->autopm_cnt) {
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33)) #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33))
usb_autopm_put_interface(adapter_to_dvobj(if1)->pusbintf); usb_autopm_put_interface(adapter_to_dvobj(if1)->pusbintf);
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,20)) #elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,20))