mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 16:44:20 +00:00
rtl8188eu: Change all "if(" to "if ("
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
aa89a39a09
commit
6ead3e77dc
61 changed files with 3500 additions and 3500 deletions
262
core/rtw_xmit.c
262
core/rtw_xmit.c
|
@ -174,7 +174,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
|||
pxmitbuf->ext_tag = false;
|
||||
|
||||
/* Tx buf allocation may fail sometimes, so sleep and retry. */
|
||||
if((res=rtw_os_xmit_resource_alloc(padapter, pxmitbuf,(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ))) == _FAIL) {
|
||||
if ((res=rtw_os_xmit_resource_alloc(padapter, pxmitbuf,(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ))) == _FAIL) {
|
||||
rtw_msleep_os(10);
|
||||
res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf,(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ));
|
||||
if (res == _FAIL) {
|
||||
|
@ -262,7 +262,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
|||
pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), 4);
|
||||
*/
|
||||
|
||||
if((res=rtw_os_xmit_resource_alloc(padapter, pxmitbuf,max_xmit_extbuf_size + XMITBUF_ALIGN_SZ)) == _FAIL) {
|
||||
if ((res=rtw_os_xmit_resource_alloc(padapter, pxmitbuf,max_xmit_extbuf_size + XMITBUF_ALIGN_SZ)) == _FAIL) {
|
||||
res= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
|
|||
|
||||
rtw_mfree_xmit_priv_lock(pxmitpriv);
|
||||
|
||||
if(pxmitpriv->pxmit_frame_buf==NULL)
|
||||
if (pxmitpriv->pxmit_frame_buf==NULL)
|
||||
goto out;
|
||||
|
||||
for(i=0; i<NR_XMITFRAME; i++)
|
||||
|
@ -343,18 +343,18 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
|
|||
{
|
||||
rtw_os_xmit_resource_free(padapter, pxmitbuf,(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ));
|
||||
|
||||
/* if(pxmitbuf->pallocated_buf) */
|
||||
/* if (pxmitbuf->pallocated_buf) */
|
||||
/* rtw_mfree(pxmitbuf->pallocated_buf, MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ); */
|
||||
|
||||
pxmitbuf++;
|
||||
}
|
||||
|
||||
if(pxmitpriv->pallocated_frame_buf) {
|
||||
if (pxmitpriv->pallocated_frame_buf) {
|
||||
rtw_vmfree(pxmitpriv->pallocated_frame_buf, NR_XMITFRAME * sizeof(struct xmit_frame) + 4);
|
||||
}
|
||||
|
||||
|
||||
if(pxmitpriv->pallocated_xmitbuf) {
|
||||
if (pxmitpriv->pallocated_xmitbuf) {
|
||||
rtw_vmfree(pxmitpriv->pallocated_xmitbuf, NR_XMITBUFF * sizeof(struct xmit_buf) + 4);
|
||||
}
|
||||
|
||||
|
@ -374,13 +374,13 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
|
|||
{
|
||||
rtw_os_xmit_resource_free(padapter, pxmitbuf,(max_xmit_extbuf_size + XMITBUF_ALIGN_SZ));
|
||||
|
||||
/* if(pxmitbuf->pallocated_buf) */
|
||||
/* if (pxmitbuf->pallocated_buf) */
|
||||
/* rtw_mfree(pxmitbuf->pallocated_buf, max_xmit_extbuf_size); */
|
||||
|
||||
pxmitbuf++;
|
||||
}
|
||||
|
||||
if(pxmitpriv->pallocated_xmit_extbuf) {
|
||||
if (pxmitpriv->pallocated_xmit_extbuf) {
|
||||
rtw_vmfree(pxmitpriv->pallocated_xmit_extbuf, num_xmit_extbuf * sizeof(struct xmit_buf) + 4);
|
||||
}
|
||||
|
||||
|
@ -402,7 +402,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
|
|||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
if(pattrib->psta)
|
||||
if (pattrib->psta)
|
||||
{
|
||||
psta = pattrib->psta;
|
||||
}
|
||||
|
@ -412,13 +412,13 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
|
|||
psta=rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0] );
|
||||
}
|
||||
|
||||
if(psta==NULL)
|
||||
if (psta==NULL)
|
||||
{
|
||||
DBG_871X("%s, psta==NUL\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(psta->state &_FW_LINKED))
|
||||
if (!(psta->state &_FW_LINKED))
|
||||
{
|
||||
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
|
||||
return;
|
||||
|
@ -437,17 +437,17 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
|
|||
/* (2) If there are more than one frag in this MSDU, only the first frag uses protection frame. */
|
||||
/* Other fragments are protected by previous fragment. */
|
||||
/* So we only need to check the length of first fragment. */
|
||||
if(pmlmeext->cur_wireless_mode < WIRELESS_11_24N || padapter->registrypriv.wifi_spec)
|
||||
if (pmlmeext->cur_wireless_mode < WIRELESS_11_24N || padapter->registrypriv.wifi_spec)
|
||||
{
|
||||
if(sz > padapter->registrypriv.rts_thresh)
|
||||
if (sz > padapter->registrypriv.rts_thresh)
|
||||
{
|
||||
pattrib->vcs_mode = RTS_CTS;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(psta->rtsen)
|
||||
if (psta->rtsen)
|
||||
pattrib->vcs_mode = RTS_CTS;
|
||||
else if(psta->cts2self)
|
||||
else if (psta->cts2self)
|
||||
pattrib->vcs_mode = CTS_TO_SELF;
|
||||
else
|
||||
pattrib->vcs_mode = NONE_VCS;
|
||||
|
@ -458,7 +458,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
|
|||
while (true)
|
||||
{
|
||||
/* IOT action */
|
||||
if((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en==true) &&
|
||||
if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en==true) &&
|
||||
(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_ ))
|
||||
{
|
||||
pattrib->vcs_mode = CTS_TO_SELF;
|
||||
|
@ -467,21 +467,21 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
|
|||
|
||||
|
||||
/* check ERP protection */
|
||||
if(psta->rtsen || psta->cts2self)
|
||||
if (psta->rtsen || psta->cts2self)
|
||||
{
|
||||
if(psta->rtsen)
|
||||
if (psta->rtsen)
|
||||
pattrib->vcs_mode = RTS_CTS;
|
||||
else if(psta->cts2self)
|
||||
else if (psta->cts2self)
|
||||
pattrib->vcs_mode = CTS_TO_SELF;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/* check HT op mode */
|
||||
if(pattrib->ht_en)
|
||||
if (pattrib->ht_en)
|
||||
{
|
||||
u8 HTOpMode = pmlmeinfo->HT_protection;
|
||||
if((pmlmeext->cur_bwmode && (HTOpMode == 2 || HTOpMode == 3)) ||
|
||||
if ((pmlmeext->cur_bwmode && (HTOpMode == 2 || HTOpMode == 3)) ||
|
||||
(!pmlmeext->cur_bwmode && HTOpMode == 3) )
|
||||
{
|
||||
pattrib->vcs_mode = RTS_CTS;
|
||||
|
@ -490,7 +490,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
|
|||
}
|
||||
|
||||
/* check rts */
|
||||
if(sz > padapter->registrypriv.rts_thresh)
|
||||
if (sz > padapter->registrypriv.rts_thresh)
|
||||
{
|
||||
pattrib->vcs_mode = RTS_CTS;
|
||||
break;
|
||||
|
@ -499,7 +499,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
|
|||
/* to do list: check MIMO power save condition. */
|
||||
|
||||
/* check AMPDU aggregation for TXOP */
|
||||
if(pattrib->ampdu_en==true)
|
||||
if (pattrib->ampdu_en==true)
|
||||
{
|
||||
pattrib->vcs_mode = RTS_CTS;
|
||||
break;
|
||||
|
@ -513,9 +513,9 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
|
|||
|
||||
static void update_attrib_phy_info(struct pkt_attrib *pattrib, struct sta_info *psta)
|
||||
{
|
||||
/*if(psta->rtsen)
|
||||
/*if (psta->rtsen)
|
||||
pattrib->vcs_mode = RTS_CTS;
|
||||
else if(psta->cts2self)
|
||||
else if (psta->cts2self)
|
||||
pattrib->vcs_mode = CTS_TO_SELF;
|
||||
else
|
||||
pattrib->vcs_mode = NONE_VCS;*/
|
||||
|
@ -544,7 +544,7 @@ u8 qos_acm(u8 acm_mask, u8 priority)
|
|||
{
|
||||
case 0:
|
||||
case 3:
|
||||
if(acm_mask & BIT(1))
|
||||
if (acm_mask & BIT(1))
|
||||
change_priority = 1;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -552,12 +552,12 @@ u8 qos_acm(u8 acm_mask, u8 priority)
|
|||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
if(acm_mask & BIT(2))
|
||||
if (acm_mask & BIT(2))
|
||||
change_priority = 0;
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
if(acm_mask & BIT(3))
|
||||
if (acm_mask & BIT(3))
|
||||
change_priority = 5;
|
||||
break;
|
||||
default:
|
||||
|
@ -684,7 +684,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
|
|||
res =_FAIL;
|
||||
goto exit;
|
||||
}
|
||||
else if((check_fwstate(pmlmepriv, WIFI_AP_STATE)==true)&&(!(psta->state & _FW_LINKED)))
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_AP_STATE)==true)&&(!(psta->state & _FW_LINKED)))
|
||||
{
|
||||
res =_FAIL;
|
||||
goto exit;
|
||||
|
@ -718,16 +718,16 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
|
|||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE|WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE))
|
||||
{
|
||||
if(psta->qos_option)
|
||||
if (psta->qos_option)
|
||||
set_qos(&pktfile, pattrib);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pqospriv->qos_option)
|
||||
if (pqospriv->qos_option)
|
||||
{
|
||||
set_qos(&pktfile, pattrib);
|
||||
|
||||
if(pmlmepriv->acm_mask != 0)
|
||||
if (pmlmepriv->acm_mask != 0)
|
||||
{
|
||||
pattrib->priority = qos_acm(pmlmepriv->acm_mask, pattrib->priority);
|
||||
}
|
||||
|
@ -738,7 +738,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
|
|||
|
||||
pattrib->encrypt = 0;
|
||||
|
||||
if((pattrib->ether_type != 0x888e) && (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false))
|
||||
if ((pattrib->ether_type != 0x888e) && (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("\npsta->ieee8021x_blocked == true, pattrib->ether_type(%.4x) != 0x888e\n",pattrib->ether_type));
|
||||
#ifdef DBG_TX_DROP_FRAME
|
||||
|
@ -760,7 +760,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
|
|||
pattrib->key_idx = (u8)psecuritypriv->dot11PrivacyKeyIndex;
|
||||
break;
|
||||
case dot11AuthAlgrthm_8021X:
|
||||
if(bmcast)
|
||||
if (bmcast)
|
||||
pattrib->key_idx = (u8)psecuritypriv->dot118021XGrpKeyid;
|
||||
else
|
||||
pattrib->key_idx = 0;
|
||||
|
@ -785,7 +785,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
|
|||
pattrib->iv_len = 8;
|
||||
pattrib->icv_len = 4;
|
||||
|
||||
if(padapter->securitypriv.busetkipkey==_FAIL)
|
||||
if (padapter->securitypriv.busetkipkey==_FAIL)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("\npadapter->securitypriv.busetkipkey(%d)==_FAIL drop packet\n", padapter->securitypriv.busetkipkey));
|
||||
#ifdef DBG_TX_DROP_FRAME
|
||||
|
@ -841,7 +841,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
u8 hw_hdr_offset = 0;
|
||||
sint bmcst = IS_MCAST(pattrib->ra);
|
||||
|
||||
if(pattrib->psta)
|
||||
if (pattrib->psta)
|
||||
{
|
||||
stainfo = pattrib->psta;
|
||||
}
|
||||
|
@ -851,13 +851,13 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
stainfo=rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0]);
|
||||
}
|
||||
|
||||
if(stainfo==NULL)
|
||||
if (stainfo==NULL)
|
||||
{
|
||||
DBG_871X("%s, psta==NUL\n", __func__);
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
if(!(stainfo->state &_FW_LINKED))
|
||||
if (!(stainfo->state &_FW_LINKED))
|
||||
{
|
||||
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, stainfo->state);
|
||||
return _FAIL;
|
||||
|
@ -867,17 +867,17 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
|
||||
hw_hdr_offset = TXDESC_SIZE + (pxmitframe->pkt_offset * PACKET_OFFSET_SZ);;
|
||||
|
||||
if(pattrib->encrypt ==_TKIP_)/* if(psecuritypriv->dot11PrivacyAlgrthm==_TKIP_PRIVACY_) */
|
||||
if (pattrib->encrypt ==_TKIP_)/* if (psecuritypriv->dot11PrivacyAlgrthm==_TKIP_PRIVACY_) */
|
||||
{
|
||||
/* encode mic code */
|
||||
if(stainfo!= NULL){
|
||||
if (stainfo!= NULL){
|
||||
u8 null_key[16]={0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
|
||||
|
||||
pframe = pxmitframe->buf_addr + hw_hdr_offset;
|
||||
|
||||
if(bmcst)
|
||||
if (bmcst)
|
||||
{
|
||||
if(_rtw_memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16)==true){
|
||||
if (_rtw_memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16)==true){
|
||||
/* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n"); */
|
||||
/* rtw_msleep_os(10); */
|
||||
return _FAIL;
|
||||
|
@ -887,7 +887,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
}
|
||||
else
|
||||
{
|
||||
if(_rtw_memcmp(&stainfo->dot11tkiptxmickey.skey[0],null_key, 16)==true){
|
||||
if (_rtw_memcmp(&stainfo->dot11tkiptxmickey.skey[0],null_key, 16)==true){
|
||||
/* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n"); */
|
||||
/* rtw_msleep_os(10); */
|
||||
return _FAIL;
|
||||
|
@ -896,23 +896,23 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
rtw_secmicsetkey(&micdata, &stainfo->dot11tkiptxmickey.skey[0]);
|
||||
}
|
||||
|
||||
if(pframe[1]&1){ /* ToDS==1 */
|
||||
if (pframe[1]&1){ /* ToDS==1 */
|
||||
rtw_secmicappend(&micdata, &pframe[16], 6); /* DA */
|
||||
if(pframe[1]&2) /* From Ds==1 */
|
||||
if (pframe[1]&2) /* From Ds==1 */
|
||||
rtw_secmicappend(&micdata, &pframe[24], 6);
|
||||
else
|
||||
rtw_secmicappend(&micdata, &pframe[10], 6);
|
||||
} else{ /* ToDS==0 */
|
||||
rtw_secmicappend(&micdata, &pframe[4], 6); /* DA */
|
||||
if(pframe[1]&2) /* From Ds==1 */
|
||||
if (pframe[1]&2) /* From Ds==1 */
|
||||
rtw_secmicappend(&micdata, &pframe[16], 6);
|
||||
else
|
||||
rtw_secmicappend(&micdata, &pframe[10], 6);
|
||||
|
||||
}
|
||||
|
||||
/* if(pqospriv->qos_option==1) */
|
||||
if(pattrib->qos_en)
|
||||
/* if (pqospriv->qos_option==1) */
|
||||
if (pattrib->qos_en)
|
||||
priority[0]=(u8)pxmitframe->attrib.priority;
|
||||
|
||||
|
||||
|
@ -927,7 +927,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
|
|||
|
||||
payload=payload+pattrib->hdrlen+pattrib->iv_len;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("curfragnum=%d pattrib->hdrlen=%d pattrib->iv_len=%d",curfragnum,pattrib->hdrlen,pattrib->iv_len));
|
||||
if((curfragnum+1)==pattrib->nr_frags){
|
||||
if ((curfragnum+1)==pattrib->nr_frags){
|
||||
length=pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len-( (pattrib->bswenc) ? pattrib->icv_len : 0);
|
||||
rtw_secmicappend(&micdata, payload,length);
|
||||
payload=payload+length;
|
||||
|
@ -974,8 +974,8 @@ static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmi
|
|||
|
||||
;
|
||||
|
||||
/* if((psecuritypriv->sw_encrypt)||(pattrib->bswenc)) */
|
||||
if(pattrib->bswenc)
|
||||
/* if ((psecuritypriv->sw_encrypt)||(pattrib->bswenc)) */
|
||||
if (pattrib->bswenc)
|
||||
{
|
||||
/* DBG_871X("start xmitframe_swencrypt\n"); */
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_alert_,("### xmitframe_swencrypt\n"));
|
||||
|
@ -1025,20 +1025,20 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
|
|||
psta = pattrib->psta;
|
||||
} else {
|
||||
DBG_871X("%s, call rtw_get_stainfo()\n", __func__);
|
||||
if(bmcst) {
|
||||
if (bmcst) {
|
||||
psta = rtw_get_bcmc_stainfo(padapter);
|
||||
} else {
|
||||
psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra);
|
||||
}
|
||||
}
|
||||
|
||||
if(psta==NULL)
|
||||
if (psta==NULL)
|
||||
{
|
||||
DBG_871X("%s, psta==NUL\n", __func__);
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
if(!(psta->state &_FW_LINKED))
|
||||
if (!(psta->state &_FW_LINKED))
|
||||
{
|
||||
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
|
||||
return _FAIL;
|
||||
|
@ -1069,7 +1069,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
|
|||
memcpy(pwlanhdr->addr2, get_bssid(pmlmepriv), ETH_ALEN);
|
||||
memcpy(pwlanhdr->addr3, pattrib->src, ETH_ALEN);
|
||||
|
||||
if(psta->qos_option)
|
||||
if (psta->qos_option)
|
||||
qos_option = true;
|
||||
}
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
|
||||
|
@ -1078,7 +1078,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
|
|||
memcpy(pwlanhdr->addr2, pattrib->src, ETH_ALEN);
|
||||
memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv), ETH_ALEN);
|
||||
|
||||
if(psta->qos_option)
|
||||
if (psta->qos_option)
|
||||
qos_option = true;
|
||||
}
|
||||
else {
|
||||
|
@ -1087,7 +1087,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if(pattrib->mdata)
|
||||
if (pattrib->mdata)
|
||||
SetMData(fctrl);
|
||||
|
||||
if (pattrib->encrypt)
|
||||
|
@ -1109,7 +1109,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
|
|||
|
||||
/* Update Seq Num will be handled by f/w */
|
||||
{
|
||||
if(psta){
|
||||
if (psta){
|
||||
|
||||
psta->sta_xmitpriv.txseq_tid[pattrib->priority]++;
|
||||
psta->sta_xmitpriv.txseq_tid[pattrib->priority] &= 0xFFF;
|
||||
|
@ -1119,26 +1119,26 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
|
|||
SetSeqNum(hdr, pattrib->seqnum);
|
||||
|
||||
/* check if enable ampdu */
|
||||
if(pattrib->ht_en && psta->htpriv.ampdu_enable)
|
||||
if (pattrib->ht_en && psta->htpriv.ampdu_enable)
|
||||
{
|
||||
if(psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority))
|
||||
if (psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority))
|
||||
pattrib->ampdu_en = true;
|
||||
}
|
||||
|
||||
/* re-check if enable ampdu by BA_starting_seqctrl */
|
||||
if(pattrib->ampdu_en == true)
|
||||
if (pattrib->ampdu_en == true)
|
||||
{
|
||||
u16 tx_seq;
|
||||
|
||||
tx_seq = psta->BA_starting_seqctrl[pattrib->priority & 0x0f];
|
||||
|
||||
/* check BA_starting_seqctrl */
|
||||
if(SN_LESS(pattrib->seqnum, tx_seq))
|
||||
if (SN_LESS(pattrib->seqnum, tx_seq))
|
||||
{
|
||||
/* DBG_871X("tx ampdu seqnum(%d) < tx_seq(%d)\n", pattrib->seqnum, tx_seq); */
|
||||
pattrib->ampdu_en = false;/* AGG BK */
|
||||
}
|
||||
else if(SN_EQUAL(pattrib->seqnum, tx_seq))
|
||||
else if (SN_EQUAL(pattrib->seqnum, tx_seq))
|
||||
{
|
||||
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
|
||||
|
||||
|
@ -1184,7 +1184,7 @@ s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, struct pkt_attrib *pat
|
|||
struct tx_servq *ptxservq;
|
||||
int priority = pattrib->priority;
|
||||
|
||||
if(pattrib->psta)
|
||||
if (pattrib->psta)
|
||||
{
|
||||
psta = pattrib->psta;
|
||||
}
|
||||
|
@ -1194,13 +1194,13 @@ s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, struct pkt_attrib *pat
|
|||
psta=rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0]);
|
||||
}
|
||||
|
||||
if(psta==NULL)
|
||||
if (psta==NULL)
|
||||
{
|
||||
DBG_871X("%s, psta==NUL\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!(psta->state &_FW_LINKED))
|
||||
if (!(psta->state &_FW_LINKED))
|
||||
{
|
||||
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
|
||||
return 0;
|
||||
|
@ -1294,7 +1294,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
|
|||
psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra);
|
||||
}
|
||||
|
||||
if(psta==NULL)
|
||||
if (psta==NULL)
|
||||
{
|
||||
|
||||
DBG_871X("%s, psta==NUL\n", __func__);
|
||||
|
@ -1302,7 +1302,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
|
|||
}
|
||||
|
||||
|
||||
if(!(psta->state &_FW_LINKED))
|
||||
if (!(psta->state &_FW_LINKED))
|
||||
{
|
||||
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
|
||||
return _FAIL;
|
||||
|
@ -1362,13 +1362,13 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
|
|||
WEP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx);
|
||||
break;
|
||||
case _TKIP_:
|
||||
if(bmcst)
|
||||
if (bmcst)
|
||||
TKIP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx);
|
||||
else
|
||||
TKIP_IV(pattrib->iv, psta->dot11txpn, 0);
|
||||
break;
|
||||
case _AES_:
|
||||
if(bmcst)
|
||||
if (bmcst)
|
||||
AES_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx);
|
||||
else
|
||||
AES_IV(pattrib->iv, psta->dot11txpn, 0);
|
||||
|
@ -1445,7 +1445,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
|
|||
|
||||
xmitframe_swencrypt(padapter, pxmitframe);
|
||||
|
||||
if(bmcst == false)
|
||||
if (bmcst == false)
|
||||
update_attrib_vcs_info(padapter, pxmitframe);
|
||||
else
|
||||
pattrib->vcs_mode = NONE_VCS;
|
||||
|
@ -1490,23 +1490,23 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
|
|||
tmp_buf = BIP_AAD = rtw_zmalloc(ori_len);
|
||||
subtype = GetFrameSubType(pframe); /* bit(7)~bit(2) */
|
||||
|
||||
if(BIP_AAD == NULL)
|
||||
if (BIP_AAD == NULL)
|
||||
return _FAIL;
|
||||
|
||||
spin_lock_bh(&padapter->security_key_mutex);
|
||||
|
||||
/* only support station mode */
|
||||
if(!check_fwstate(pmlmepriv, WIFI_STATION_STATE) || !check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE) || !check_fwstate(pmlmepriv, _FW_LINKED))
|
||||
goto xmitframe_coalesce_success;
|
||||
|
||||
/* IGTK key is not install, it may not support 802.11w */
|
||||
if(padapter->securitypriv.binstallBIPkey != true)
|
||||
if (padapter->securitypriv.binstallBIPkey != true)
|
||||
{
|
||||
DBG_871X("no instll BIP key\n");
|
||||
goto xmitframe_coalesce_success;
|
||||
}
|
||||
/* station mode doesn't need TX BIP, just ready the code */
|
||||
if(bmcst)
|
||||
if (bmcst)
|
||||
{
|
||||
int frame_body_len;
|
||||
u8 mic[16];
|
||||
|
@ -1514,7 +1514,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
|
|||
memset(MME, 0, 18);
|
||||
|
||||
/* other types doesn't need the BIP */
|
||||
if(GetFrameSubType(pframe) != WIFI_DEAUTH && GetFrameSubType(pframe) != WIFI_DISASSOC)
|
||||
if (GetFrameSubType(pframe) != WIFI_DEAUTH && GetFrameSubType(pframe) != WIFI_DISASSOC)
|
||||
goto xmitframe_coalesce_fail;
|
||||
|
||||
MGMT_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
|
@ -1551,7 +1551,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
|
|||
printk("\n");
|
||||
}*/
|
||||
/* calculate mic */
|
||||
if(omac1_aes_128(padapter->securitypriv.dot11wBIPKey[padapter->securitypriv.dot11wBIPKeyid].skey
|
||||
if (omac1_aes_128(padapter->securitypriv.dot11wBIPKey[padapter->securitypriv.dot11wBIPKeyid].skey
|
||||
, BIP_AAD, BIP_AAD_SIZE+frame_body_len, mic))
|
||||
goto xmitframe_coalesce_fail;
|
||||
|
||||
|
@ -1577,7 +1577,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
|
|||
else /* unicast mgmt frame TX */
|
||||
{
|
||||
/* start to encrypt mgmt frame */
|
||||
if(subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC ||
|
||||
if (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC ||
|
||||
subtype == WIFI_REASSOCREQ || subtype == WIFI_ACTION)
|
||||
{
|
||||
if (pattrib->psta)
|
||||
|
@ -1587,14 +1587,14 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
|
|||
psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra);
|
||||
}
|
||||
|
||||
if(psta==NULL)
|
||||
if (psta==NULL)
|
||||
{
|
||||
|
||||
DBG_871X("%s, psta==NUL\n", __func__);
|
||||
goto xmitframe_coalesce_fail;
|
||||
}
|
||||
|
||||
if(!(psta->state & _FW_LINKED) || pxmitframe->buf_addr==NULL)
|
||||
if (!(psta->state & _FW_LINKED) || pxmitframe->buf_addr==NULL)
|
||||
{
|
||||
DBG_871X("%s, not _FW_LINKED or addr null\n", __func__);
|
||||
goto xmitframe_coalesce_fail;
|
||||
|
@ -1602,7 +1602,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
|
|||
|
||||
/* DBG_871X("%s, action frame category=%d\n", __func__, pframe[WLAN_HDR_A3_LEN]); */
|
||||
/* according 802.11-2012 standard, these five types are not robust types */
|
||||
if(subtype == WIFI_ACTION &&
|
||||
if (subtype == WIFI_ACTION &&
|
||||
(pframe[WLAN_HDR_A3_LEN] == RTW_WLAN_CATEGORY_PUBLIC ||
|
||||
pframe[WLAN_HDR_A3_LEN] == RTW_WLAN_CATEGORY_HT ||
|
||||
pframe[WLAN_HDR_A3_LEN] == RTW_WLAN_CATEGORY_UNPROTECTED_WNM ||
|
||||
|
@ -1749,7 +1749,7 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len)
|
|||
case AUTO_VCS:
|
||||
default:
|
||||
perp = rtw_get_ie(ie, _ERPINFO_IE_, &erp_len, ie_len);
|
||||
if(perp == NULL)
|
||||
if (perp == NULL)
|
||||
{
|
||||
pxmitpriv->vcs = NONE_VCS;
|
||||
}
|
||||
|
@ -1758,7 +1758,7 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len)
|
|||
protection = (*(perp + 2)) & BIT(1);
|
||||
if (protection)
|
||||
{
|
||||
if(pregistrypriv->vcs_type == RTS_CTS)
|
||||
if (pregistrypriv->vcs_type == RTS_CTS)
|
||||
pxmitpriv->vcs = RTS_CTS;
|
||||
else
|
||||
pxmitpriv->vcs = CTS_TO_SELF;
|
||||
|
@ -1804,7 +1804,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
|
|||
|
||||
spin_lock_irqsave(&pfree_queue->lock, flags);
|
||||
|
||||
if(_rtw_queue_empty(pfree_queue) == true) {
|
||||
if (_rtw_queue_empty(pfree_queue) == true) {
|
||||
pxmitbuf = NULL;
|
||||
} else {
|
||||
|
||||
|
@ -1845,7 +1845,7 @@ s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
|||
struct __queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue;
|
||||
unsigned long flags;
|
||||
|
||||
if(pxmitbuf==NULL)
|
||||
if (pxmitbuf==NULL)
|
||||
return _FAIL;
|
||||
|
||||
spin_lock_irqsave(&pfree_queue->lock, flags);
|
||||
|
@ -1876,7 +1876,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
|
|||
|
||||
spin_lock_irqsave(&pfree_xmitbuf_queue->lock, flags);
|
||||
|
||||
if(_rtw_queue_empty(pfree_xmitbuf_queue) == true) {
|
||||
if (_rtw_queue_empty(pfree_xmitbuf_queue) == true) {
|
||||
pxmitbuf = NULL;
|
||||
} else {
|
||||
|
||||
|
@ -1921,7 +1921,7 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
|||
struct __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
|
||||
unsigned long flags;
|
||||
|
||||
if(pxmitbuf==NULL)
|
||||
if (pxmitbuf==NULL)
|
||||
return _FAIL;
|
||||
|
||||
if (pxmitbuf->sctx) {
|
||||
|
@ -1929,7 +1929,7 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
|||
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_FREE);
|
||||
}
|
||||
|
||||
if(pxmitbuf->ext_tag) {
|
||||
if (pxmitbuf->ext_tag) {
|
||||
rtw_free_xmitbuf_ext(pxmitpriv, pxmitbuf);
|
||||
} else {
|
||||
spin_lock_irqsave(&pfree_xmitbuf_queue->lock, flags);
|
||||
|
@ -2110,7 +2110,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
|
|||
|
||||
if (pxmitframe->ext_tag == 0)
|
||||
queue = &pxmitpriv->free_xmit_queue;
|
||||
else if(pxmitframe->ext_tag == 1)
|
||||
else if (pxmitframe->ext_tag == 1)
|
||||
queue = &pxmitpriv->free_xframe_ext_queue;
|
||||
else
|
||||
{}
|
||||
|
@ -2122,7 +2122,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
|
|||
if (pxmitframe->ext_tag == 0) {
|
||||
pxmitpriv->free_xmitframe_cnt++;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_debug_, ("rtw_free_xmitframe():free_xmitframe_cnt=%d\n", pxmitpriv->free_xmitframe_cnt));
|
||||
} else if(pxmitframe->ext_tag == 1) {
|
||||
} else if (pxmitframe->ext_tag == 1) {
|
||||
pxmitpriv->free_xframe_ext_cnt++;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_debug_, ("rtw_free_xmitframe():free_xframe_ext_cnt=%d\n", pxmitpriv->free_xframe_ext_cnt));
|
||||
} else {
|
||||
|
@ -2132,7 +2132,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
|
|||
|
||||
check_pkt_complete:
|
||||
|
||||
if(pndis_pkt)
|
||||
if (pndis_pkt)
|
||||
rtw_os_pkt_complete(padapter, pndis_pkt);
|
||||
|
||||
exit:
|
||||
|
@ -2220,7 +2220,7 @@ struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
|
|||
|
||||
inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3;
|
||||
|
||||
if(pregpriv->wifi_spec==1)
|
||||
if (pregpriv->wifi_spec==1)
|
||||
{
|
||||
int j, tmp, acirp_cnt[4];
|
||||
for(j=0; j<4; j++)
|
||||
|
@ -2245,11 +2245,11 @@ struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
|
|||
|
||||
pxmitframe = dequeue_one_xmitframe(pxmitpriv, phwxmit, ptxservq, pframe_queue);
|
||||
|
||||
if(pxmitframe) {
|
||||
if (pxmitframe) {
|
||||
phwxmit->accnt--;
|
||||
|
||||
/* Remove sta node when there is no pending packets. */
|
||||
if(_rtw_queue_empty(pframe_queue)) /* must be done after get_next and before break */
|
||||
if (_rtw_queue_empty(pframe_queue)) /* must be done after get_next and before break */
|
||||
rtw_list_delete(&ptxservq->tx_pending);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -2342,7 +2342,7 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if(!(psta->state &_FW_LINKED))
|
||||
if (!(psta->state &_FW_LINKED))
|
||||
{
|
||||
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
|
||||
return _FAIL;
|
||||
|
@ -2374,7 +2374,7 @@ void rtw_alloc_hwxmits(struct adapter *padapter)
|
|||
|
||||
hwxmits = pxmitpriv->hwxmits;
|
||||
|
||||
if(pxmitpriv->hwxmit_entry == 5)
|
||||
if (pxmitpriv->hwxmit_entry == 5)
|
||||
{
|
||||
/* pxmitpriv->bmc_txqueue.head = 0; */
|
||||
/* hwxmits[0] .phwtxqueue = &pxmitpriv->bmc_txqueue; */
|
||||
|
@ -2397,7 +2397,7 @@ void rtw_alloc_hwxmits(struct adapter *padapter)
|
|||
hwxmits[4] .sta_queue = &pxmitpriv->be_pending;
|
||||
|
||||
}
|
||||
else if(pxmitpriv->hwxmit_entry == 4)
|
||||
else if (pxmitpriv->hwxmit_entry == 4)
|
||||
{
|
||||
|
||||
/* pxmitpriv->vo_txqueue.head = 0; */
|
||||
|
@ -2431,7 +2431,7 @@ void rtw_free_hwxmits(struct adapter *padapter)
|
|||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
hwxmits = pxmitpriv->hwxmits;
|
||||
if(hwxmits)
|
||||
if (hwxmits)
|
||||
rtw_mfree((u8 *)hwxmits, (sizeof (struct hw_xmit) * pxmitpriv->hwxmit_entry));
|
||||
}
|
||||
|
||||
|
@ -2454,7 +2454,7 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
{
|
||||
struct sk_buff *skb = *pskb;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
/* if(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) */
|
||||
/* if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) */
|
||||
{
|
||||
int res, is_vlan_tag=0, i, do_nat25=1;
|
||||
unsigned short vlan_hdr=0;
|
||||
|
@ -2702,7 +2702,7 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
|
|||
rcu_read_unlock();
|
||||
#endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) */
|
||||
|
||||
if( br_port && check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true)
|
||||
if ( br_port && check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true)
|
||||
{
|
||||
res = rtw_br_client_tx(padapter, ppkt);
|
||||
if (res == -1)
|
||||
|
@ -2732,7 +2732,7 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
|
|||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
spin_lock_bh(&pxmitpriv->lock);
|
||||
if(xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe) == true)
|
||||
if (xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe) == true)
|
||||
{
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
return 1;
|
||||
|
@ -2760,7 +2760,7 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == false)
|
||||
return ret;
|
||||
|
||||
if(pattrib->psta)
|
||||
if (pattrib->psta)
|
||||
{
|
||||
psta = pattrib->psta;
|
||||
}
|
||||
|
@ -2770,25 +2770,25 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
psta=rtw_get_stainfo(pstapriv, pattrib->ra);
|
||||
}
|
||||
|
||||
if(psta==NULL)
|
||||
if (psta==NULL)
|
||||
{
|
||||
DBG_871X("%s, psta==NUL\n", __func__);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!(psta->state &_FW_LINKED))
|
||||
if (!(psta->state &_FW_LINKED))
|
||||
{
|
||||
DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(pattrib->triggered==1)
|
||||
if (pattrib->triggered==1)
|
||||
{
|
||||
/* DBG_871X("directly xmit pspoll_triggered packet\n"); */
|
||||
|
||||
/* pattrib->triggered=0; */
|
||||
|
||||
if(bmcst)
|
||||
if (bmcst)
|
||||
pattrib->qsel = 0x11;/* HIQ */
|
||||
|
||||
|
||||
|
@ -2796,11 +2796,11 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
}
|
||||
|
||||
|
||||
if(bmcst)
|
||||
if (bmcst)
|
||||
{
|
||||
spin_lock_bh(&psta->sleep_q.lock);
|
||||
|
||||
if(pstapriv->sta_dz_bitmap)/* if anyone sta is in ps mode */
|
||||
if (pstapriv->sta_dz_bitmap)/* if anyone sta is in ps mode */
|
||||
{
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
|
||||
|
@ -2824,11 +2824,11 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
|
||||
spin_lock_bh(&psta->sleep_q.lock);
|
||||
|
||||
if(psta->state&WIFI_SLEEP_STATE)
|
||||
if (psta->state&WIFI_SLEEP_STATE)
|
||||
{
|
||||
u8 wmmps_ac=0;
|
||||
|
||||
if(pstapriv->sta_dz_bitmap&BIT(psta->aid))
|
||||
if (pstapriv->sta_dz_bitmap&BIT(psta->aid))
|
||||
{
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
|
||||
|
@ -2859,16 +2859,16 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
break;
|
||||
}
|
||||
|
||||
if(wmmps_ac)
|
||||
if (wmmps_ac)
|
||||
psta->sleepq_ac_len++;
|
||||
|
||||
if(((psta->has_legacy_ac) && (!wmmps_ac)) ||((!psta->has_legacy_ac)&&(wmmps_ac)))
|
||||
if (((psta->has_legacy_ac) && (!wmmps_ac)) ||((!psta->has_legacy_ac)&&(wmmps_ac)))
|
||||
{
|
||||
pstapriv->tim_bitmap |= BIT(psta->aid);
|
||||
|
||||
/* DBG_871X("enqueue, sq_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
|
||||
|
||||
if(psta->sleepq_len==1)
|
||||
if (psta->sleepq_len==1)
|
||||
{
|
||||
/* DBG_871X("sleepq_len==1, update BCNTIM\n"); */
|
||||
/* upate BCN for TIM IE */
|
||||
|
@ -2878,7 +2878,7 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
|||
|
||||
/* spin_unlock_bh(&psta->sleep_q.lock); */
|
||||
|
||||
/* if(psta->sleepq_len > (NR_XMITFRAME>>3)) */
|
||||
/* if (psta->sleepq_len > (NR_XMITFRAME>>3)) */
|
||||
/* */
|
||||
/* wakeup_sta_to_xmit(padapter, psta); */
|
||||
/* */
|
||||
|
@ -2916,7 +2916,7 @@ static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struc
|
|||
|
||||
ret = xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe);
|
||||
|
||||
if(true == ret)
|
||||
if (true == ret)
|
||||
{
|
||||
pattrib = &pxmitframe->attrib;
|
||||
|
||||
|
@ -3023,15 +3023,15 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
}
|
||||
|
||||
psta->sleepq_len--;
|
||||
if(psta->sleepq_len>0)
|
||||
if (psta->sleepq_len>0)
|
||||
pxmitframe->attrib.mdata = 1;
|
||||
else
|
||||
pxmitframe->attrib.mdata = 0;
|
||||
|
||||
if(wmmps_ac)
|
||||
if (wmmps_ac)
|
||||
{
|
||||
psta->sleepq_ac_len--;
|
||||
if(psta->sleepq_ac_len>0)
|
||||
if (psta->sleepq_ac_len>0)
|
||||
{
|
||||
pxmitframe->attrib.mdata = 1;
|
||||
pxmitframe->attrib.eosp = 0;
|
||||
|
@ -3047,7 +3047,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
|
||||
/*
|
||||
spin_unlock_bh(&psta->sleep_q.lock);
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
|
@ -3059,10 +3059,10 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
}
|
||||
|
||||
/* for BC/MC Frames */
|
||||
if(!psta_bmc)
|
||||
if (!psta_bmc)
|
||||
goto _exit;
|
||||
|
||||
if((pstapriv->sta_dz_bitmap&0xfffe) == 0x0)/* no any sta in ps mode */
|
||||
if ((pstapriv->sta_dz_bitmap&0xfffe) == 0x0)/* no any sta in ps mode */
|
||||
{
|
||||
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
@ -3076,7 +3076,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
rtw_list_delete(&pxmitframe->list);
|
||||
|
||||
psta_bmc->sleepq_len--;
|
||||
if(psta_bmc->sleepq_len>0)
|
||||
if (psta_bmc->sleepq_len>0)
|
||||
pxmitframe->attrib.mdata = 1;
|
||||
else
|
||||
pxmitframe->attrib.mdata = 0;
|
||||
|
@ -3085,7 +3085,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
pxmitframe->attrib.triggered = 1;
|
||||
/*
|
||||
spin_unlock_bh(&psta_bmc->sleep_q.lock);
|
||||
if(rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == true)
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
|
@ -3096,7 +3096,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
|
||||
}
|
||||
|
||||
if(psta_bmc->sleepq_len==0)
|
||||
if (psta_bmc->sleepq_len==0)
|
||||
{
|
||||
pstapriv->tim_bitmap &= ~BIT(0);
|
||||
pstapriv->sta_dz_bitmap &= ~BIT(0);
|
||||
|
@ -3109,7 +3109,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
|
||||
}
|
||||
|
||||
if(psta->sleepq_len==0)
|
||||
if (psta->sleepq_len==0)
|
||||
{
|
||||
pstapriv->tim_bitmap &= ~BIT(psta->aid);
|
||||
|
||||
|
@ -3118,10 +3118,10 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
/* update_BCNTIM(padapter); */
|
||||
update_mask = BIT(0);
|
||||
|
||||
if(psta->state&WIFI_SLEEP_STATE)
|
||||
if (psta->state&WIFI_SLEEP_STATE)
|
||||
psta->state ^= WIFI_SLEEP_STATE;
|
||||
|
||||
if(psta->state & WIFI_STA_ALIVE_CHK_STATE)
|
||||
if (psta->state & WIFI_STA_ALIVE_CHK_STATE)
|
||||
{
|
||||
psta->expire_to = pstapriv->expire_to;
|
||||
psta->state ^= WIFI_STA_ALIVE_CHK_STATE;
|
||||
|
@ -3135,7 +3135,7 @@ _exit:
|
|||
/* spin_unlock_bh(&psta_bmc->sleep_q.lock); */
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
|
||||
if(update_mask)
|
||||
if (update_mask)
|
||||
{
|
||||
/* update_BCNTIM(padapter); */
|
||||
/* printk("%s => call update_beacon\n",__FUNCTION__); */
|
||||
|
@ -3185,7 +3185,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
|||
break;
|
||||
}
|
||||
|
||||
if(!wmmps_ac)
|
||||
if (!wmmps_ac)
|
||||
continue;
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
|
@ -3193,7 +3193,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
|||
psta->sleepq_len--;
|
||||
psta->sleepq_ac_len--;
|
||||
|
||||
if(psta->sleepq_ac_len>0) {
|
||||
if (psta->sleepq_ac_len>0) {
|
||||
pxmitframe->attrib.mdata = 1;
|
||||
pxmitframe->attrib.eosp = 0;
|
||||
} else {
|
||||
|
@ -3205,7 +3205,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
|||
|
||||
rtw_hal_xmitframe_enqueue(padapter, pxmitframe);
|
||||
|
||||
if((psta->sleepq_ac_len==0) && (!psta->has_legacy_ac) && (wmmps_ac))
|
||||
if ((psta->sleepq_ac_len==0) && (!psta->has_legacy_ac) && (wmmps_ac))
|
||||
{
|
||||
pstapriv->tim_bitmap &= ~BIT(psta->aid);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue