rtl8188eu: Change "while(" to "while ("

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-08-15 13:04:12 -05:00
parent 6ead3e77dc
commit 8e22f0d2e8
37 changed files with 151 additions and 151 deletions

View file

@ -77,7 +77,7 @@ static __inline__ unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, un
unsigned short tagLen, tagType; unsigned short tagLen, tagType;
start_ptr = cur_ptr = (unsigned char *)ph->tag; start_ptr = cur_ptr = (unsigned char *)ph->tag;
while((cur_ptr - start_ptr) < ntohs(ph->length)) { while ((cur_ptr - start_ptr) < ntohs(ph->length)) {
/* prevent un-alignment access */ /* prevent un-alignment access */
tagType = (unsigned short)((cur_ptr[0] << 8) + cur_ptr[1]); tagType = (unsigned short)((cur_ptr[0] << 8) + cur_ptr[1]);
tagLen = (unsigned short)((cur_ptr[2] << 8) + cur_ptr[3]); tagLen = (unsigned short)((cur_ptr[2] << 8) + cur_ptr[3]);
@ -1459,7 +1459,7 @@ void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb)
/* recalculate checksum */ /* recalculate checksum */
sum = ~(udph->check) & 0xffff; sum = ~(udph->check) & 0xffff;
sum += dhcph->flags; sum += dhcph->flags;
while(sum >> 16) while (sum >> 16)
sum = (sum & 0xffff) + (sum >> 16); sum = (sum & 0xffff) + (sum >> 16);
udph->check = ~sum; udph->check = ~sum;
} }

View file

@ -116,7 +116,7 @@ void _rtw_free_evt_priv (struct evt_priv *pevtpriv)
#ifdef CONFIG_C2H_WK #ifdef CONFIG_C2H_WK
_cancel_workitem_sync(&pevtpriv->c2h_wk); _cancel_workitem_sync(&pevtpriv->c2h_wk);
while(pevtpriv->c2h_wk_alive) while (pevtpriv->c2h_wk_alive)
rtw_msleep_os(10); rtw_msleep_os(10);
while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) { while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) {
@ -380,7 +380,7 @@ int rtw_cmd_thread(void * context)
RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("start r871x rtw_cmd_thread !!!!\n")); RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("start r871x rtw_cmd_thread !!!!\n"));
while(1) while (1)
{ {
if (_rtw_down_sema(&pcmdpriv->cmd_queue_sema) == _FAIL) { if (_rtw_down_sema(&pcmdpriv->cmd_queue_sema) == _FAIL) {
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" _rtw_down_sema(&pcmdpriv->cmd_queue_sema) return _FAIL, break\n", FUNC_ADPT_ARG(padapter)); DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" _rtw_down_sema(&pcmdpriv->cmd_queue_sema) return _FAIL, break\n", FUNC_ADPT_ARG(padapter));
@ -489,7 +489,7 @@ post_process:
/* DBG_871X("%s: leaving... drop cmdcode:%u\n", __FUNCTION__, pcmd->cmdcode); */ /* DBG_871X("%s: leaving... drop cmdcode:%u\n", __FUNCTION__, pcmd->cmdcode); */
rtw_free_cmd_obj(pcmd); rtw_free_cmd_obj(pcmd);
}while(1); }while (1);
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema); _rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
@ -2278,12 +2278,12 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
{ {
u8 val = 0; u8 val = 0;
/* while((rtw_read32(padapter, 0x414)&0x00ffff00)!=0) */ /* while ((rtw_read32(padapter, 0x414)&0x00ffff00)!=0) */
/* while((rtw_read32(padapter, 0x414)&0x0000ff00)!=0) */ /* while ((rtw_read32(padapter, 0x414)&0x0000ff00)!=0) */
rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &val); rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &val);
while(false == val) while (false == val)
{ {
rtw_msleep_os(100); rtw_msleep_os(100);

View file

@ -206,8 +206,8 @@ ReadEFuseByte(
/* Check bit 32 read-ready */ /* Check bit 32 read-ready */
retry = 0; retry = 0;
value32 = rtw_read32(Adapter, EFUSE_CTRL); value32 = rtw_read32(Adapter, EFUSE_CTRL);
/* while(!(((value32 >> 24) & 0xff) & 0x80) && (retry<10)) */ /* while (!(((value32 >> 24) & 0xff) & 0x80) && (retry<10)) */
while(!(((value32 >> 24) & 0xff) & 0x80) && (retry<10000)) while (!(((value32 >> 24) & 0xff) & 0x80) && (retry<10000))
{ {
value32 = rtw_read32(Adapter, EFUSE_CTRL); value32 = rtw_read32(Adapter, EFUSE_CTRL);
retry++; retry++;
@ -324,7 +324,7 @@ EFUSE_Read1Byte(
/* Wait Write-ready (0x30[31]=1) */ /* Wait Write-ready (0x30[31]=1) */
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3); Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
while(!(Bytetemp & 0x80)) while (!(Bytetemp & 0x80))
{ {
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3); Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
k++; k++;
@ -398,7 +398,7 @@ EFUSE_Write1Byte(
/* Wait Write-ready (0x30[31]=0) */ /* Wait Write-ready (0x30[31]=0) */
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3); Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
while(Bytetemp & 0x80) while (Bytetemp & 0x80)
{ {
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3); Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
k++; k++;
@ -435,7 +435,7 @@ efuse_OneByteRead(
rtw_write8(pAdapter, EFUSE_CTRL+3, 0x72);/* read cmd */ rtw_write8(pAdapter, EFUSE_CTRL+3, 0x72);/* read cmd */
while(!(0x80 &rtw_read8(pAdapter, EFUSE_CTRL+3))&&(tmpidx<100)) while (!(0x80 &rtw_read8(pAdapter, EFUSE_CTRL+3))&&(tmpidx<100))
{ {
tmpidx++; tmpidx++;
} }
@ -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++;
} }

View file

@ -72,7 +72,7 @@ int rtw_get_bit_value_from_ieee_value(u8 val)
unsigned char dot11_rate_table[]={2,4,11,22,12,18,24,36,48,72,96,108,0}; /* last element must be zero!! */ unsigned char dot11_rate_table[]={2,4,11,22,12,18,24,36,48,72,96,108,0}; /* last element must be zero!! */
int i=0; int i=0;
while(dot11_rate_table[i] != 0) { while (dot11_rate_table[i] != 0) {
if (dot11_rate_table[i] == val) if (dot11_rate_table[i] == val)
return BIT(i); return BIT(i);
i++; i++;
@ -84,7 +84,7 @@ uint rtw_is_cckrates_included(u8 *rate)
{ {
u32 i = 0; u32 i = 0;
while(rate[i]!=0) { while (rate[i]!=0) {
if ((((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) || if ((((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
(((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22) ) (((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22) )
return true; return true;
@ -228,7 +228,7 @@ u8 *rtw_get_ie(u8 *pbuf, sint index, sint *len, sint limit)
p = pbuf; p = pbuf;
i = 0; i = 0;
*len = 0; *len = 0;
while(1) while (1)
{ {
if (*p == index) if (*p == index)
{ {
@ -274,7 +274,7 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, u
cnt = 0; cnt = 0;
while(cnt<in_len) while (cnt<in_len)
{ {
if (eid == in_ie[cnt] if (eid == in_ie[cnt]
&& ( !oui || _rtw_memcmp(&in_ie[cnt+2], oui, oui_len) == true)) && ( !oui || _rtw_memcmp(&in_ie[cnt+2], oui, oui_len) == true))
@ -381,7 +381,7 @@ uint rtw_get_rateset_len(u8 *rateset)
{ {
uint i = 0; uint i = 0;
; ;
while(1) while (1)
{ {
if ((rateset[i]) == 0) if ((rateset[i]) == 0)
break; break;
@ -490,7 +490,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
u8 *pbuf = pie; u8 *pbuf = pie;
int limit_new = limit; int limit_new = limit;
while(1) while (1)
{ {
pbuf = rtw_get_ie(pbuf, _WPA_IE_ID_, &len, limit_new); pbuf = rtw_get_ie(pbuf, _WPA_IE_ID_, &len, limit_new);
@ -752,7 +752,7 @@ int rtw_get_sec_ie(u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16
sec_idx=0; sec_idx=0;
while(cnt<in_len) while (cnt<in_len)
{ {
authmode=in_ie[cnt]; authmode=in_ie[cnt];
@ -869,7 +869,7 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
cnt = 0; cnt = 0;
while(cnt<in_len) while (cnt<in_len)
{ {
eid = in_ie[cnt]; eid = in_ie[cnt];
@ -925,7 +925,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_att
/* 6 = 1(Element ID) + 1(Length) + 4(WPS OUI) */ /* 6 = 1(Element ID) + 1(Length) + 4(WPS OUI) */
attr_ptr = wps_ie + 6; /* goto first attr */ attr_ptr = wps_ie + 6; /* goto first attr */
while(attr_ptr - wps_ie < wps_ielen) while (attr_ptr - wps_ie < wps_ielen)
{ {
/* 4 = 2(Attribute ID) + 2(Length) */ /* 4 = 2(Attribute ID) + 2(Length) */
u16 attr_id = RTW_GET_BE16(attr_ptr); u16 attr_id = RTW_GET_BE16(attr_ptr);
@ -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);
@ -1350,7 +1350,7 @@ u32 rtw_get_p2p_merged_ies_len(u8 *in_ie, u32 in_len)
int i=0; int i=0;
int j=0, len=0; int j=0, len=0;
while( i < in_len) while ( i < in_len)
{ {
pIE = (struct ndis_802_11_variable_ies *)(in_ie+ i); pIE = (struct ndis_802_11_variable_ies *)(in_ie+ i);
@ -1386,7 +1386,7 @@ int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie)
memcpy(merge_ie, ELOUI, 6); memcpy(merge_ie, ELOUI, 6);
merge_ie += 6; merge_ie += 6;
while( i < in_len) while ( i < in_len)
{ {
pIE = (struct ndis_802_11_variable_ies *)(in_ie+ i); pIE = (struct ndis_802_11_variable_ies *)(in_ie+ i);
@ -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);
@ -1471,7 +1471,7 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
if ( p2p_ielen != NULL ) if ( p2p_ielen != NULL )
*p2p_ielen = 0; *p2p_ielen = 0;
while(cnt<in_len) while (cnt<in_len)
{ {
eid = in_ie[cnt]; eid = in_ie[cnt];
if ((in_len < 0) || (cnt > MAX_IE_SZ)) { if ((in_len < 0) || (cnt > MAX_IE_SZ)) {
@ -1535,7 +1535,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr
/* 6 = 1(Element ID) + 1(Length) + 3 (OUI) + 1(OUI Type) */ /* 6 = 1(Element ID) + 1(Length) + 3 (OUI) + 1(OUI Type) */
attr_ptr = p2p_ie + 6; /* goto first attr */ attr_ptr = p2p_ie + 6; /* goto first attr */
while(attr_ptr - p2p_ie < p2p_ielen) while (attr_ptr - p2p_ie < p2p_ielen)
{ {
/* 3 = 1(Attribute ID) + 2(Length) */ /* 3 = 1(Attribute ID) + 2(Length) */
u8 attr_id = *attr_ptr; u8 attr_id = *attr_ptr;
@ -1623,7 +1623,7 @@ static uint rtw_p2p_attr_remove(u8 *ie, uint ielen_ori, u8 attr_id)
uint ielen = ielen_ori; uint ielen = ielen_ori;
int index=0; int index=0;
while(1) { while (1) {
target_attr=rtw_get_p2p_attr(ie, ielen, attr_id, NULL, &target_attr_len); target_attr=rtw_get_p2p_attr(ie, ielen, attr_id, NULL, &target_attr_len);
if (target_attr && target_attr_len) if (target_attr && target_attr_len)
{ {
@ -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);
@ -1707,7 +1707,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
return match; return match;
} }
while(cnt<in_len) while (cnt<in_len)
{ {
eid = in_ie[cnt]; eid = in_ie[cnt];
@ -1795,7 +1795,7 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *
/* 1 ( WFD IE ) + 1 ( Length ) + 3 ( OUI ) + 1 ( OUI Type ) */ /* 1 ( WFD IE ) + 1 ( Length ) + 3 ( OUI ) + 1 ( OUI Type ) */
cnt = 6; cnt = 6;
while( cnt < wfd_ielen ) while ( cnt < wfd_ielen )
{ {
u16 attrlen = RTW_GET_BE16(wfd_ie + cnt + 1); u16 attrlen = RTW_GET_BE16(wfd_ie + cnt + 1);

View file

@ -1232,7 +1232,7 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
} }
else else
{ {
while( (pcur_bss->SupportedRates[i]!=0) && (pcur_bss->SupportedRates[i]!=0xFF)) while ( (pcur_bss->SupportedRates[i]!=0) && (pcur_bss->SupportedRates[i]!=0xFF))
{ {
rate = pcur_bss->SupportedRates[i]&0x7F; rate = pcur_bss->SupportedRates[i]&0x7F;
if (rate>max_rate) if (rate>max_rate)

View file

@ -595,7 +595,7 @@ struct wlan_network * rtw_get_oldest_wlan_network(struct __queue *scanned_queue
plist = get_next(phead); plist = get_next(phead);
while(1) while (1)
{ {
if (rtw_end_of_queue_search(phead,plist)== true) if (rtw_end_of_queue_search(phead,plist)== true)
@ -737,7 +737,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
feature = 1; /* p2p enable */ feature = 1; /* p2p enable */
#endif #endif
while(1) while (1)
{ {
if (rtw_end_of_queue_search(phead,plist)== true) if (rtw_end_of_queue_search(phead,plist)== true)
break; break;
@ -2036,7 +2036,7 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
spin_lock_bh(&pmlmepriv->lock); spin_lock_bh(&pmlmepriv->lock);
if (rtw_to_roaming(adapter) > 0) { /* join timeout caused by roaming */ if (rtw_to_roaming(adapter) > 0) { /* join timeout caused by roaming */
while(1) { while (1) {
pmlmepriv->to_roaming--; pmlmepriv->to_roaming--;
if (rtw_to_roaming(adapter) != 0) { /* try another */ if (rtw_to_roaming(adapter) != 0) { /* try another */
DBG_871X("%s try another roaming\n", __FUNCTION__); DBG_871X("%s try another roaming\n", __FUNCTION__);
@ -2509,7 +2509,7 @@ int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_
unsigned int i, j; unsigned int i, j;
i = 12; /* after the fixed IE */ i = 12; /* after the fixed IE */
while(i<in_len) while (i<in_len)
{ {
ielength = initial_out_len; ielength = initial_out_len;
@ -2565,7 +2565,7 @@ static int SecIsInPMKIDList(struct adapter *Adapter, u8 *bssid)
/* continue; */ /* continue; */
} }
}while(i<NUM_PMKID_CACHE); }while (i<NUM_PMKID_CACHE);
if ( i == NUM_PMKID_CACHE ) if ( i == NUM_PMKID_CACHE )
{ {
@ -3079,7 +3079,7 @@ void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
pmlmepriv->assoc_by_bssid = false; pmlmepriv->assoc_by_bssid = false;
while(1) { while (1) {
if ( _SUCCESS==(do_join_r=rtw_do_join(padapter)) ) { if ( _SUCCESS==(do_join_r=rtw_do_join(padapter)) ) {
break; break;
} else { } else {

View file

@ -4774,7 +4774,7 @@ int issue_probereq_p2p_ex(struct adapter *adapter, u8 *da, int try_cnt, int wait
if (i < try_cnt && wait_ms > 0 && ret==_FAIL) if (i < try_cnt && wait_ms > 0 && ret==_FAIL)
rtw_msleep_os(wait_ms); rtw_msleep_os(wait_ms);
}while((i<try_cnt) && ((ret==_FAIL)||(wait_ms==0))); }while ((i<try_cnt) && ((ret==_FAIL)||(wait_ms==0)));
if (ret != _FAIL) { if (ret != _FAIL) {
ret = _SUCCESS; ret = _SUCCESS;
@ -6327,7 +6327,7 @@ int issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid,
if (i < try_cnt && wait_ms > 0 && ret==_FAIL) if (i < try_cnt && wait_ms > 0 && ret==_FAIL)
rtw_msleep_os(wait_ms); rtw_msleep_os(wait_ms);
}while((i<try_cnt) && ((ret==_FAIL)||(wait_ms==0))); }while ((i<try_cnt) && ((ret==_FAIL)||(wait_ms==0)));
if (ret != _FAIL) { if (ret != _FAIL) {
ret = _SUCCESS; ret = _SUCCESS;
@ -7164,7 +7164,7 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow
if (i < try_cnt && wait_ms > 0 && ret==_FAIL) if (i < try_cnt && wait_ms > 0 && ret==_FAIL)
rtw_msleep_os(wait_ms); rtw_msleep_os(wait_ms);
}while((i<try_cnt) && ((ret==_FAIL)||(wait_ms==0))); }while ((i<try_cnt) && ((ret==_FAIL)||(wait_ms==0)));
if (ret != _FAIL) { if (ret != _FAIL) {
ret = _SUCCESS; ret = _SUCCESS;
@ -7299,7 +7299,7 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
if (i < try_cnt && wait_ms > 0 && ret==_FAIL) if (i < try_cnt && wait_ms > 0 && ret==_FAIL)
rtw_msleep_os(wait_ms); rtw_msleep_os(wait_ms);
}while((i<try_cnt) && ((ret==_FAIL)||(wait_ms==0))); }while ((i<try_cnt) && ((ret==_FAIL)||(wait_ms==0)));
if (ret != _FAIL) { if (ret != _FAIL) {
ret = _SUCCESS; ret = _SUCCESS;
@ -7422,7 +7422,7 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int
if (i < try_cnt && wait_ms > 0 && ret==_FAIL) if (i < try_cnt && wait_ms > 0 && ret==_FAIL)
rtw_msleep_os(wait_ms); rtw_msleep_os(wait_ms);
}while((i<try_cnt) && ((ret==_FAIL)||(wait_ms==0))); }while ((i<try_cnt) && ((ret==_FAIL)||(wait_ms==0)));
if (ret != _FAIL) { if (ret != _FAIL) {
ret = _SUCCESS; ret = _SUCCESS;
@ -7834,7 +7834,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while(1) while (1)
{ {
int len; int len;
u8 *p; u8 *p;
@ -7965,9 +7965,9 @@ unsigned int send_beacon(struct adapter *padapter)
rtw_yield_os(); rtw_yield_os();
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bxmitok)); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bxmitok));
poll++; poll++;
}while((poll%10)!=0 && false == bxmitok && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); }while ((poll%10)!=0 && false == bxmitok && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
}while(false == bxmitok && issue<100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); }while (false == bxmitok && issue<100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
if (padapter->bSurpriseRemoved || padapter->bDriverStopped) if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
{ {

View file

@ -2520,7 +2520,7 @@ static u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_conte
ch_content += 3; ch_content += 3;
ch_cnt -= 3; ch_cnt -= 3;
while( ch_cnt > 0) while ( ch_cnt > 0)
{ {
ch_content += 1; ch_content += 1;
ch_cnt -= 1; ch_cnt -= 1;
@ -3880,7 +3880,7 @@ void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
p2p_ie = rtw_get_p2p_ie( ies, ies_len, NULL, &p2p_ielen); p2p_ie = rtw_get_p2p_ie( ies, ies_len, NULL, &p2p_ielen);
while(p2p_ie) while (p2p_ie)
{ {
find_p2p = true; find_p2p = true;
/* Get Notice of Absence IE. */ /* Get Notice of Absence IE. */
@ -3901,7 +3901,7 @@ void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
/* NoA length should be n*(13) + 2 */ /* NoA length should be n*(13) + 2 */
if (attr_contentlen > 2) if (attr_contentlen > 2)
{ {
while(noa_offset < attr_contentlen) while (noa_offset < attr_contentlen)
{ {
/* memcpy(&wifidirect_info->noa_count[noa_num], &noa_attr[noa_offset], 1); */ /* memcpy(&wifidirect_info->noa_count[noa_num], &noa_attr[noa_offset], 1); */
pwdinfo->noa_count[noa_num] = noa_attr[noa_offset]; pwdinfo->noa_count[noa_num] = noa_attr[noa_offset];

View file

@ -283,7 +283,7 @@ void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pf
phead = get_list_head(pframequeue); phead = get_list_head(pframequeue);
plist = get_next(phead); plist = get_next(phead);
while(rtw_end_of_queue_search(phead, plist) == false) while (rtw_end_of_queue_search(phead, plist) == false)
{ {
precvframe = LIST_CONTAINOR(plist, union recv_frame, u); precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
@ -302,7 +302,7 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter)
{ {
u32 cnt = 0; u32 cnt = 0;
union recv_frame *pending_frame; union recv_frame *pending_frame;
while((pending_frame=rtw_alloc_recvframe(&adapter->recvpriv.uc_swdec_pending_queue))) { while ((pending_frame=rtw_alloc_recvframe(&adapter->recvpriv.uc_swdec_pending_queue))) {
rtw_free_recvframe(pending_frame, &adapter->recvpriv.free_recv_queue); rtw_free_recvframe(pending_frame, &adapter->recvpriv.free_recv_queue);
cnt++; cnt++;
} }
@ -1982,7 +1982,7 @@ static union recv_frame * recvframe_defrag(struct adapter *adapter, struct __qu
data=get_recvframe_data(prframe); data=get_recvframe_data(prframe);
while(rtw_end_of_queue_search(phead, plist) == false) while (rtw_end_of_queue_search(phead, plist) == false)
{ {
pnextrframe = LIST_CONTAINOR(plist, union recv_frame , u); pnextrframe = LIST_CONTAINOR(plist, union recv_frame , u);
pnfhdr=&pnextrframe->u.hdr; pnfhdr=&pnextrframe->u.hdr;
@ -2186,7 +2186,7 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
pdata = prframe->u.hdr.rx_data; pdata = prframe->u.hdr.rx_data;
while(a_len > ETH_HLEN) { while (a_len > ETH_HLEN) {
/* Offset 12 denote 2 mac address */ /* Offset 12 denote 2 mac address */
#ifdef ENDIAN_FREE #ifdef ENDIAN_FREE
@ -2407,7 +2407,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
phead = get_list_head(ppending_recvframe_queue); phead = get_list_head(ppending_recvframe_queue);
plist = get_next(phead); plist = get_next(phead);
while(rtw_end_of_queue_search(phead, plist) == false) while (rtw_end_of_queue_search(phead, plist) == false)
{ {
pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u); pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u);
pnextattrib = &pnextrframe->u.hdr.attrib; pnextattrib = &pnextrframe->u.hdr.attrib;
@ -2475,7 +2475,7 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
/* Prepare indication list and indication. */ /* Prepare indication list and indication. */
/* Check if there is any packet need indicate. */ /* Check if there is any packet need indicate. */
while(!rtw_is_list_empty(phead)) while (!rtw_is_list_empty(phead))
{ {
prframe = LIST_CONTAINOR(plist, union recv_frame, u); prframe = LIST_CONTAINOR(plist, union recv_frame, u);
@ -2837,7 +2837,7 @@ int recv_func(struct adapter *padapter, union recv_frame *rframe)
union recv_frame *pending_frame; union recv_frame *pending_frame;
int cnt = 0; int cnt = 0;
while((pending_frame=rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) { while ((pending_frame=rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) {
cnt++; cnt++;
recv_func_posthandle(padapter, pending_frame); recv_func_posthandle(padapter, pending_frame);
} }

View file

@ -354,7 +354,7 @@ void rtw_secmicappend(struct mic_data *pmicdata, u8 * src, u32 nbytes )
{ {
; ;
/* This is simple */ /* This is simple */
while( nbytes > 0 ) while ( nbytes > 0 )
{ {
rtw_secmicappendbyte(pmicdata, *src++ ); rtw_secmicappendbyte(pmicdata, *src++ );
nbytes--; nbytes--;
@ -371,7 +371,7 @@ void rtw_secgetmic(struct mic_data *pmicdata, u8 * dst )
rtw_secmicappendbyte(pmicdata, 0 ); rtw_secmicappendbyte(pmicdata, 0 );
rtw_secmicappendbyte(pmicdata, 0 ); rtw_secmicappendbyte(pmicdata, 0 );
/* and then zeroes until the length is a multiple of 4 */ /* and then zeroes until the length is a multiple of 4 */
while( pmicdata->nBytesInM != 0 ) while ( pmicdata->nBytesInM != 0 )
rtw_secmicappendbyte(pmicdata, 0 ); rtw_secmicappendbyte(pmicdata, 0 );
/* The appendByte function has already computed the result. */ /* The appendByte function has already computed the result. */
secmicputuint32( dst, pmicdata->L ); secmicputuint32( dst, pmicdata->L );

View file

@ -434,7 +434,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
phead = get_list_head(ppending_recvframe_queue); phead = get_list_head(ppending_recvframe_queue);
plist = get_next(phead); plist = get_next(phead);
while(!rtw_is_list_empty(phead)) while (!rtw_is_list_empty(phead))
{ {
prframe = LIST_CONTAINOR(plist, union recv_frame, u); prframe = LIST_CONTAINOR(plist, union recv_frame, u);

View file

@ -900,7 +900,7 @@ ODM_RA_TxRPT2Handle_8188E(
pBuffer += TX_RPT2_ITEM_SIZE; pBuffer += TX_RPT2_ITEM_SIZE;
MacId++; MacId++;
}while(MacId < ItemNum); }while (MacId < ItemNum);
odm_RATxRPTTimerSetting(pDM_Odm,minRptTime); odm_RATxRPTTimerSetting(pDM_Odm,minRptTime);

View file

@ -328,7 +328,7 @@ ODM_ReadAndConfig_AGC_TAB_1T_8188E(
PDM_ODM_T pDM_Odm PDM_ODM_T pDM_Odm
) )
{ {
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while(0) #define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
u32 hex = 0; u32 hex = 0;
u32 i = 0; u32 i = 0;
@ -535,7 +535,7 @@ ODM_ReadAndConfig_AGC_TAB_1T_ICUT_8188E(
PDM_ODM_T pDM_Odm PDM_ODM_T pDM_Odm
) )
{ {
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while(0) #define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
u32 hex = 0; u32 hex = 0;
u32 i = 0; u32 i = 0;
@ -815,7 +815,7 @@ ODM_ReadAndConfig_PHY_REG_1T_8188E(
PDM_ODM_T pDM_Odm PDM_ODM_T pDM_Odm
) )
{ {
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while(0) #define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
u32 hex = 0; u32 hex = 0;
u32 i = 0; u32 i = 0;
@ -1074,7 +1074,7 @@ ODM_ReadAndConfig_PHY_REG_1T_ICUT_8188E(
PDM_ODM_T pDM_Odm PDM_ODM_T pDM_Odm
) )
{ {
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while(0) #define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
u32 hex = 0; u32 hex = 0;
u32 i = 0; u32 i = 0;

View file

@ -158,7 +158,7 @@ ODM_ReadAndConfig_MAC_REG_8188E(
PDM_ODM_T pDM_Odm PDM_ODM_T pDM_Odm
) )
{ {
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while(0) #define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
u32 hex = 0; u32 hex = 0;
u32 i = 0; u32 i = 0;
@ -318,7 +318,7 @@ ODM_ReadAndConfig_MAC_REG_ICUT_8188E(
PDM_ODM_T pDM_Odm PDM_ODM_T pDM_Odm
) )
{ {
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while(0) #define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
u32 hex = 0; u32 hex = 0;
u32 i = 0; u32 i = 0;

View file

@ -177,7 +177,7 @@ ODM_ReadAndConfig_RadioA_1T_8188E(
PDM_ODM_T pDM_Odm PDM_ODM_T pDM_Odm
) )
{ {
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while(0) #define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
u32 hex = 0; u32 hex = 0;
u32 i = 0; u32 i = 0;
@ -348,7 +348,7 @@ ODM_ReadAndConfig_RadioA_1T_ICUT_8188E(
PDM_ODM_T pDM_Odm PDM_ODM_T pDM_Odm
) )
{ {
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while(0) #define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
u32 hex = 0; u32 hex = 0;
u32 i = 0; u32 i = 0;

View file

@ -40,7 +40,7 @@
} \ } \
if (_offset >= _size)\ if (_offset >= _size)\
_offset = _size-1;\ _offset = _size-1;\
} while(0) } while (0)
/* 3============================================================ */ /* 3============================================================ */
/* 3 Tx Power Tracking */ /* 3 Tx Power Tracking */
@ -1833,7 +1833,7 @@ if ( *(pDM_Odm->mp_mode) == 1)
i++; i++;
} }
while(tmpReg > apkbound && i < 4); while (tmpReg > apkbound && i < 4);
APK_result[path][index] = tmpReg; APK_result[path][index] = tmpReg;
} }
@ -2130,7 +2130,7 @@ if (*(pDM_Odm->mp_mode) == 1)
if (bSingleTone || bCarrierSuppression) if (bSingleTone || bCarrierSuppression)
return; return;
while(*(pDM_Odm->pbScanInProcess) && timecount < timeout) while (*(pDM_Odm->pbScanInProcess) && timecount < timeout)
{ {
ODM_delay_ms(50); ODM_delay_ms(50);
timecount += 50; timecount += 50;

View file

@ -140,7 +140,7 @@ u8 HalPwrSeqCmdParsing(
} }
AryIdx++;/* Add Array Index */ AryIdx++;/* Add Array Index */
}while(1); }while (1);
return true; return true;
} }

View file

@ -53,7 +53,7 @@ static u8 _is_fw_read_cmd_down(struct adapter* padapter, u8 msgbox_num)
if (0 == valid ){ if (0 == valid ){
read_down = true; read_down = true;
} }
}while( (!read_down) && (retry_cnts--)); }while ( (!read_down) && (retry_cnts--));
return read_down; return read_down;
@ -150,7 +150,7 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8
bcmd_down = true; bcmd_down = true;
pHalData->LastHMEBoxNum = (h2c_box_num+1) % RTL88E_MAX_H2C_BOX_NUMS; pHalData->LastHMEBoxNum = (h2c_box_num+1) % RTL88E_MAX_H2C_BOX_NUMS;
}while((!bcmd_down) && (retry_cnts--)); }while ((!bcmd_down) && (retry_cnts--));
ret = _SUCCESS; ret = _SUCCESS;
@ -756,9 +756,9 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
/* check rsvd page download OK. */ /* check rsvd page download OK. */
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid)); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid));
poll++; poll++;
} while(!bcn_valid && (poll%10)!=0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); } while (!bcn_valid && (poll%10)!=0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
}while(!bcn_valid && DLBcnCount<=100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); }while (!bcn_valid && DLBcnCount<=100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
/* RT_ASSERT(bcn_valid, ("HalDownloadRSVDPage88ES(): 1 Download RSVD page failed!\n")); */ /* RT_ASSERT(bcn_valid, ("HalDownloadRSVDPage88ES(): 1 Download RSVD page failed!\n")); */
if (padapter->bSurpriseRemoved || padapter->bDriverStopped) if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
@ -794,8 +794,8 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus)
/* check rsvd page download OK. */ /* check rsvd page download OK. */
rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid)); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid));
poll++; poll++;
} while(!bcn_valid && (poll%10)!=0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); } while (!bcn_valid && (poll%10)!=0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
}while(!bcn_valid && DLBcnCount<=100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); }while (!bcn_valid && DLBcnCount<=100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);
/* RT_ASSERT(bcn_valid, ("HalDownloadRSVDPage(): 2 Download RSVD page failed!\n")); */ /* RT_ASSERT(bcn_valid, ("HalDownloadRSVDPage(): 2 Download RSVD page failed!\n")); */
if (padapter->bSurpriseRemoved || padapter->bDriverStopped) if (padapter->bSurpriseRemoved || padapter->bDriverStopped)

View file

@ -69,7 +69,7 @@ static s32 iol_execute(struct adapter *padapter, u8 control)
rtw_write8(padapter, REG_HMEBOX_E0, reg_0x88|control); rtw_write8(padapter, REG_HMEBOX_E0, reg_0x88|control);
t1 = start = rtw_get_current_time(); t1 = start = rtw_get_current_time();
while( while (
/* reg_1c7 = rtw_read8(padapter, 0x1c7) >1) && */ /* reg_1c7 = rtw_read8(padapter, 0x1c7) >1) && */
(reg_0x88=rtw_read8(padapter, REG_HMEBOX_E0)) & control (reg_0x88=rtw_read8(padapter, REG_HMEBOX_E0)) & control
&& (passing_time=rtw_get_passing_time_ms(start))<1000 && (passing_time=rtw_get_passing_time_ms(start))<1000
@ -157,7 +157,7 @@ efuse_phymap_to_logical(u8 * phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
/* */ /* */
/* 2. Read real efuse content. Filter PG header and every section data. */ /* 2. Read real efuse content. Filter PG header and every section data. */
/* */ /* */
while((rtemp8 != 0xFF) && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E)) while ((rtemp8 != 0xFF) && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E))
{ {
/* RTPRINT(FEEPROM, EFUSE_READ_ALL, ("efuse_Addr-%d efuse_data=%x\n", eFuse_Addr-1, *rtemp8)); */ /* RTPRINT(FEEPROM, EFUSE_READ_ALL, ("efuse_Addr-%d efuse_data=%x\n", eFuse_Addr-1, *rtemp8)); */
@ -311,7 +311,7 @@ static void efuse_read_phymap_from_txpktbuf(
dbg_addr = bcnhead*128/8; /* 8-bytes addressing */ dbg_addr = bcnhead*128/8; /* 8-bytes addressing */
while(1) while (1)
{ {
/* DBG_871X("%s dbg_addr:0x%x\n", __FUNCTION__, dbg_addr+i); */ /* DBG_871X("%s dbg_addr:0x%x\n", __FUNCTION__, dbg_addr+i); */
rtw_write16(adapter, REG_PKTBUF_DBG_ADDR, dbg_addr+i); rtw_write16(adapter, REG_PKTBUF_DBG_ADDR, dbg_addr+i);
@ -319,8 +319,8 @@ static void efuse_read_phymap_from_txpktbuf(
/* DBG_871X("%s write reg_0x143:0x00\n", __FUNCTION__); */ /* DBG_871X("%s write reg_0x143:0x00\n", __FUNCTION__); */
rtw_write8(adapter, REG_TXPKTBUF_DBG, 0); rtw_write8(adapter, REG_TXPKTBUF_DBG, 0);
start = rtw_get_current_time(); start = rtw_get_current_time();
while(!(reg_0x143=rtw_read8(adapter, REG_TXPKTBUF_DBG))/* dbg */ while (!(reg_0x143=rtw_read8(adapter, REG_TXPKTBUF_DBG))/* dbg */
/* while(rtw_read8(adapter, REG_TXPKTBUF_DBG) & BIT0 */ /* while (rtw_read8(adapter, REG_TXPKTBUF_DBG) & BIT0 */
&& (passing_time=rtw_get_passing_time_ms(start))<1000 && (passing_time=rtw_get_passing_time_ms(start))<1000
) { ) {
DBG_871X("%s polling reg_0x143:0x%02x, reg_0x106:0x%02x\n", __FUNCTION__, reg_0x143, rtw_read8(adapter, 0x106)); DBG_871X("%s polling reg_0x143:0x%02x, reg_0x106:0x%02x\n", __FUNCTION__, reg_0x143, rtw_read8(adapter, 0x106));
@ -506,7 +506,7 @@ void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter,int data_len)
} }
rtw_usleep_os(2); rtw_usleep_os(2);
}while( !rstatus && (loop++ <10)); }while ( !rstatus && (loop++ <10));
} }
rtw_IOL_cmd_buf_dump(Adapter,data_len,pbuf); rtw_IOL_cmd_buf_dump(Adapter,data_len,pbuf);
rtw_vmfree(pbuf, data_len+10); rtw_vmfree(pbuf, data_len+10);
@ -652,7 +652,7 @@ _FillDummy(
u8 remain = (u8)(FwLen%4); u8 remain = (u8)(FwLen%4);
remain = (remain==0)?0:(4-remain); remain = (remain==0)?0:(4-remain);
while(remain>0) while (remain>0)
{ {
pFwBuf[FwLen] = 0; pFwBuf[FwLen] = 0;
FwLen++; FwLen++;
@ -1026,7 +1026,7 @@ static bool efuse_read_phymap(
/* */ /* */
/* Read physical efuse content. */ /* Read physical efuse content. */
/* */ /* */
while(addr < limit) while (addr < limit)
{ {
ReadEFuseByte(Adapter, addr, pos, false); ReadEFuseByte(Adapter, addr, pos, false);
if (*pos != 0xFF) if (*pos != 0xFF)
@ -1117,7 +1117,7 @@ Hal_EfuseReadEFuse88E(
/* */ /* */
/* 2. Read real efuse content. Filter PG header and every section data. */ /* 2. Read real efuse content. Filter PG header and every section data. */
/* */ /* */
while((*rtemp8 != 0xFF) && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E)) while ((*rtemp8 != 0xFF) && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E))
{ {
/* RTPRINT(FEEPROM, EFUSE_READ_ALL, ("efuse_Addr-%d efuse_data=%x\n", eFuse_Addr-1, *rtemp8)); */ /* RTPRINT(FEEPROM, EFUSE_READ_ALL, ("efuse_Addr-%d efuse_data=%x\n", eFuse_Addr-1, *rtemp8)); */
@ -1783,7 +1783,7 @@ hal_EfusePgPacketRead_8188e(
/* Skip dummy parts to prevent unexpected data read from Efuse. */ /* Skip dummy parts to prevent unexpected data read from Efuse. */
/* By pass right now. 2009.02.19. */ /* By pass right now. 2009.02.19. */
/* */ /* */
while(bContinual && AVAILABLE_EFUSE_ADDR(efuse_addr) ) while (bContinual && AVAILABLE_EFUSE_ADDR(efuse_addr) )
{ {
/* Header Read ------------- */ /* Header Read ------------- */
if (ReadState & PG_STATE_HEADER) if (ReadState & PG_STATE_HEADER)
@ -1967,14 +1967,14 @@ hal_EfusePgPacketWrite2ByteHeader(
/* RTPRINT(FEEPROM, EFUSE_PG, ("Wirte 2byte header\n")); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("Wirte 2byte header\n")); */
EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len, bPseudoTest); EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len, bPseudoTest);
while(efuse_addr < efuse_max_available_len) while (efuse_addr < efuse_max_available_len)
{ {
pg_header = ((pTargetPkt->offset & 0x07) << 5) | 0x0F; pg_header = ((pTargetPkt->offset & 0x07) << 5) | 0x0F;
/* RTPRINT(FEEPROM, EFUSE_PG, ("pg_header = 0x%x\n", pg_header)); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("pg_header = 0x%x\n", pg_header)); */
efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest); efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
while(tmp_header == 0xFF) while (tmp_header == 0xFF)
{ {
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
{ {
@ -1996,7 +1996,7 @@ hal_EfusePgPacketWrite2ByteHeader(
efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest); efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
while(tmp_header == 0xFF) while (tmp_header == 0xFF)
{ {
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
{ {
@ -2067,7 +2067,7 @@ hal_EfusePgPacketWrite1ByteHeader(
efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest); efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
while(tmp_header == 0xFF) while (tmp_header == 0xFF)
{ {
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
{ {
@ -2258,7 +2258,7 @@ hal_EfusePartialWriteCheck(
} }
/* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePartialWriteCheck(), startAddr=%d\n", startAddr)); */ /* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePartialWriteCheck(), startAddr=%d\n", startAddr)); */
while(1) while (1)
{ {
if (startAddr >= efuse_max_available_len) if (startAddr >= efuse_max_available_len)
{ {

View file

@ -87,7 +87,7 @@ sic_IsSICReady(
u32 retryCnt=0; u32 retryCnt=0;
u8 sic_cmd=0xff; u8 sic_cmd=0xff;
while(1) while (1)
{ {
if (retryCnt++ >= SIC_MAX_POLL_CNT) if (retryCnt++ >= SIC_MAX_POLL_CNT)
{ {
@ -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);
} }
} }

View file

@ -763,7 +763,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter, struct xmit_priv *pxm
descCount = 0; descCount = 0;
bulkPtr = ((pbuf / bulkSize) + 1) * bulkSize; bulkPtr = ((pbuf / bulkSize) + 1) * bulkSize;
} }
}/* end while( aggregate same priority and same DA(AP or STA) frames) */ }/* end while ( aggregate same priority and same DA(AP or STA) frames) */
if (_rtw_queue_empty(&ptxservq->sta_pending) == true) if (_rtw_queue_empty(&ptxservq->sta_pending) == true)

View file

@ -1233,7 +1233,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
#define HAL_INIT_PROFILE_TAG(stage) hal_init_stages_timestamp[(stage)]=rtw_get_current_time(); #define HAL_INIT_PROFILE_TAG(stage) hal_init_stages_timestamp[(stage)]=rtw_get_current_time();
#else #else
#define HAL_INIT_PROFILE_TAG(stage) do {} while(0) #define HAL_INIT_PROFILE_TAG(stage) do {} while (0)
#endif /* DBG_HAL_INIT_PROFILING */ #endif /* DBG_HAL_INIT_PROFILING */
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BEGIN); HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BEGIN);
@ -2262,7 +2262,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val)
rtw_write8(Adapter, REG_RRSR+2, rtw_read8(Adapter, REG_RRSR+2)&0xf0); rtw_write8(Adapter, REG_RRSR+2, rtw_read8(Adapter, REG_RRSR+2)&0xf0);
/* Set RTS initial rate */ /* Set RTS initial rate */
while(BrateCfg > 0x1) while (BrateCfg > 0x1)
{ {
BrateCfg = (BrateCfg>> 1); BrateCfg = (BrateCfg>> 1);
RateIndex++; RateIndex++;
@ -2809,7 +2809,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val)
do{ do{
if (!(rtw_read32(Adapter,REG_RXPKT_NUM)&RXDMA_IDLE)) if (!(rtw_read32(Adapter,REG_RXPKT_NUM)&RXDMA_IDLE))
break; break;
}while(trycnt--); }while (trycnt--);
if (trycnt ==0) if (trycnt ==0)
DBG_8192C("Stop RX DMA failed......\n"); DBG_8192C("Stop RX DMA failed......\n");
@ -3125,7 +3125,7 @@ static void _update_response_rate(struct adapter *padapter,unsigned int mask)
rtw_write8(padapter,REG_RRSR+1, (mask>>8)&0xff); rtw_write8(padapter,REG_RRSR+1, (mask>>8)&0xff);
/* Set RTS initial rate */ /* Set RTS initial rate */
while(mask > 0x1) while (mask > 0x1)
{ {
mask = (mask>> 1); mask = (mask>> 1);
RateIndex++; RateIndex++;

View file

@ -63,7 +63,7 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u
goto release_mutex; goto release_mutex;
} }
while(++vendorreq_times<= MAX_USBCTRL_VENDORREQ_TIMES) while (++vendorreq_times<= MAX_USBCTRL_VENDORREQ_TIMES)
{ {
memset(pIo_buf, 0, len); memset(pIo_buf, 0, len);
@ -605,7 +605,7 @@ static int recvbuf2recvframe(struct adapter *padapter, struct sk_buff *pskb)
if (transfer_len>0 && pkt_cnt==0) if (transfer_len>0 && pkt_cnt==0)
pkt_cnt = (le32_to_cpu(prxstat->rxdw2)>>16) & 0xff; pkt_cnt = (le32_to_cpu(prxstat->rxdw2)>>16) & 0xff;
}while((transfer_len>0) && (pkt_cnt>0)); }while ((transfer_len>0) && (pkt_cnt>0));
_exit_recvbuf2recvframe: _exit_recvbuf2recvframe:
@ -835,7 +835,7 @@ void rtl8188eu_xmit_tasklet(void *priv)
if (check_fwstate(&padapter->mlmepriv, _FW_UNDER_SURVEY) == true) if (check_fwstate(&padapter->mlmepriv, _FW_UNDER_SURVEY) == true)
return; return;
while(1) { while (1) {
if (padapter->bDriverStopped || if (padapter->bDriverStopped ||
padapter->bSurpriseRemoved || padapter->bSurpriseRemoved ||
padapter->bWritePortCancel) { padapter->bWritePortCancel) {

View file

@ -45,7 +45,7 @@
/* do{ */ /* do{ */
/* if ( (Read(offset) & msk) == (value & msk) ) */ /* if ( (Read(offset) & msk) == (value & msk) ) */
/* break; */ /* break; */
/* } while(not timeout); */ /* } while (not timeout); */
#define PWR_CMD_DELAY 0x03 #define PWR_CMD_DELAY 0x03
/* offset: the value to delay */ /* offset: the value to delay */

View file

@ -438,8 +438,8 @@ void dbg_rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dm
#define rtw_usb_buffer_free_f(dev, size, addr, dma, mstat_f) dbg_rtw_usb_buffer_free((dev), (size), (addr), (dma), ((mstat_f)&0xff00)|MSTAT_TYPE_USB, __FUNCTION__, __LINE__) #define rtw_usb_buffer_free_f(dev, size, addr, dma, mstat_f) dbg_rtw_usb_buffer_free((dev), (size), (addr), (dma), ((mstat_f)&0xff00)|MSTAT_TYPE_USB, __FUNCTION__, __LINE__)
#else /* DBG_MEM_ALLOC */ #else /* DBG_MEM_ALLOC */
#define rtw_mstat_update(flag, status, sz) do {} while(0) #define rtw_mstat_update(flag, status, sz) do {} while (0)
#define rtw_mstat_dump() do {} while(0) #define rtw_mstat_dump() do {} while (0)
u8* _rtw_vmalloc(u32 sz); u8* _rtw_vmalloc(u32 sz);
u8* _rtw_zvmalloc(u32 sz); u8* _rtw_zvmalloc(u32 sz);
void _rtw_vmfree(u8 *pbuf, u32 sz); void _rtw_vmfree(u8 *pbuf, u32 sz);

View file

@ -96,7 +96,7 @@ do {\
pcmd->cmdsz = sizeof (*pparm);\ pcmd->cmdsz = sizeof (*pparm);\
pcmd->rsp = NULL;\ pcmd->rsp = NULL;\
pcmd->rspsz = 0;\ pcmd->rspsz = 0;\
} while(0) } while (0)
struct c2h_evt_hdr { struct c2h_evt_hdr {
u8 id:4; u8 id:4;

View file

@ -155,15 +155,15 @@
extern void rtl871x_cedbg(const char *fmt, ...); extern void rtl871x_cedbg(const char *fmt, ...);
#endif #endif
#define RT_TRACE(_Comp, _Level, Fmt) do{}while(0) #define RT_TRACE(_Comp, _Level, Fmt) do{}while (0)
#define _func_enter_ do{}while(0) #define _func_enter_ do{}while (0)
#define _func_exit_ do{}while(0) #define _func_exit_ do{}while (0)
#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) do{}while(0) #define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) do{}while (0)
#define DBG_871X(x, ...) do {} while(0) #define DBG_871X(x, ...) do {} while (0)
#define MSG_8192C(x, ...) do {} while(0) #define MSG_8192C(x, ...) do {} while (0)
#define DBG_8192C(x,...) do {} while(0) #define DBG_8192C(x,...) do {} while (0)
#define DBG_871X_LEVEL(x,...) do {} while(0) #define DBG_871X_LEVEL(x,...) do {} while (0)
#undef _dbgdump #undef _dbgdump
#define _dbgdump printk #define _dbgdump printk
@ -181,7 +181,7 @@ extern u32 GlobalDebugLevel;
else \ else \
_dbgdump(DRIVER_PREFIX fmt, ##arg);\ _dbgdump(DRIVER_PREFIX fmt, ##arg);\
}\ }\
}while(0) }while (0)
#endif #endif
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
@ -189,17 +189,17 @@ extern u32 GlobalDebugLevel;
#undef DBG_871X #undef DBG_871X
#define DBG_871X(...) do {\ #define DBG_871X(...) do {\
_dbgdump(DRIVER_PREFIX __VA_ARGS__);\ _dbgdump(DRIVER_PREFIX __VA_ARGS__);\
}while(0) }while (0)
#undef MSG_8192C #undef MSG_8192C
#define MSG_8192C(...) do {\ #define MSG_8192C(...) do {\
_dbgdump(DRIVER_PREFIX __VA_ARGS__);\ _dbgdump(DRIVER_PREFIX __VA_ARGS__);\
}while(0) }while (0)
#undef DBG_8192C #undef DBG_8192C
#define DBG_8192C(...) do {\ #define DBG_8192C(...) do {\
_dbgdump(DRIVER_PREFIX __VA_ARGS__);\ _dbgdump(DRIVER_PREFIX __VA_ARGS__);\
}while(0) }while (0)
#endif #endif
#endif /* CONFIG_DEBUG */ #endif /* CONFIG_DEBUG */

View file

@ -175,7 +175,7 @@ struct led_priv{
do { \ do { \
if ((adapter)->ledpriv.LedControlHandler) \ if ((adapter)->ledpriv.LedControlHandler) \
(adapter)->ledpriv.LedControlHandler((adapter), (LedAction)); \ (adapter)->ledpriv.LedControlHandler((adapter), (LedAction)); \
} while(0) } while (0)
void BlinkTimerCallback(void *data); void BlinkTimerCallback(void *data);
void BlinkWorkItemCallback(struct work_struct *work); void BlinkWorkItemCallback(struct work_struct *work);

View file

@ -673,18 +673,18 @@ void sa_query_timer_hdl(struct adapter *padapter);
#define set_survey_timer(mlmeext, ms) \ #define set_survey_timer(mlmeext, ms) \
do { \ do { \
_set_timer(&(mlmeext)->survey_timer, (ms)); \ _set_timer(&(mlmeext)->survey_timer, (ms)); \
} while(0) } while (0)
#define set_link_timer(mlmeext, ms) \ #define set_link_timer(mlmeext, ms) \
do { \ do { \
_set_timer(&(mlmeext)->link_timer, (ms)); \ _set_timer(&(mlmeext)->link_timer, (ms)); \
} while(0) } while (0)
#ifdef CONFIG_IEEE80211W #ifdef CONFIG_IEEE80211W
#define set_sa_query_timer(mlmeext, ms) \ #define set_sa_query_timer(mlmeext, ms) \
do { \ do { \
DBG_871X("%s set_sa_query_timer(%p, %d)\n", __FUNCTION__, (mlmeext), (ms)); \ DBG_871X("%s set_sa_query_timer(%p, %d)\n", __FUNCTION__, (mlmeext), (ms)); \
_set_timer(&(mlmeext)->sa_query_timer, (ms)); \ _set_timer(&(mlmeext)->sa_query_timer, (ms)); \
} while(0) } while (0)
#endif /* CONFIG_IEEE80211W */ #endif /* CONFIG_IEEE80211W */
extern int cckrates_included(unsigned char *rate, int ratelen); extern int cckrates_included(unsigned char *rate, int ratelen);
extern int cckratesonly_included(unsigned char *rate, int ratelen); extern int cckratesonly_included(unsigned char *rate, int ratelen);

View file

@ -271,7 +271,7 @@ struct pwrctrl_priv
#define _rtw_set_pwr_state_check_timer(pwrctl, ms) \ #define _rtw_set_pwr_state_check_timer(pwrctl, ms) \
do { \ do { \
_set_timer(&(pwrctl)->pwr_state_check_timer, (ms)); \ _set_timer(&(pwrctl)->pwr_state_check_timer, (ms)); \
} while(0) } while (0)
#define rtw_set_pwr_state_check_timer(pwrctl) \ #define rtw_set_pwr_state_check_timer(pwrctl) \
_rtw_set_pwr_state_check_timer((pwrctl), (pwrctl)->pwr_state_check_interval) _rtw_set_pwr_state_check_timer((pwrctl), (pwrctl)->pwr_state_check_interval)

View file

@ -218,7 +218,7 @@ do{\
encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\ encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\
break;\ break;\
}\ }\
}while(0) }while (0)
#define SET_ICE_IV_LEN( iv_len, icv_len, encrypt)\ #define SET_ICE_IV_LEN( iv_len, icv_len, encrypt)\
@ -247,7 +247,7 @@ do{\
icv_len = 0;\ icv_len = 0;\
break;\ break;\
}\ }\
}while(0) }while (0)
#define GET_TKIP_PN(iv,dot11txpn)\ #define GET_TKIP_PN(iv,dot11txpn)\
@ -258,7 +258,7 @@ do{\
dot11txpn._byte_.TSC3=iv[5];\ dot11txpn._byte_.TSC3=iv[5];\
dot11txpn._byte_.TSC4=iv[6];\ dot11txpn._byte_.TSC4=iv[6];\
dot11txpn._byte_.TSC5=iv[7];\ dot11txpn._byte_.TSC5=iv[7];\
}while(0) }while (0)
#define ROL32( A, n ) ( ((A) << (n)) | ( ((A)>>(32-(n))) & ( (1UL << (n)) - 1 ) ) ) #define ROL32( A, n ) ( ((A) << (n)) | ( ((A)>>(32-(n))) & ( (1UL << (n)) - 1 ) ) )

View file

@ -63,7 +63,7 @@ do{\
pattrib_iv[2] = dot11txpn._byte_.TSC2;\ pattrib_iv[2] = dot11txpn._byte_.TSC2;\
pattrib_iv[3] = ((keyidx & 0x3)<<6);\ pattrib_iv[3] = ((keyidx & 0x3)<<6);\
dot11txpn.val = (dot11txpn.val == 0xffffff) ? 0: (dot11txpn.val+1);\ dot11txpn.val = (dot11txpn.val == 0xffffff) ? 0: (dot11txpn.val+1);\
}while(0) }while (0)
#define TKIP_IV(pattrib_iv, dot11txpn, keyidx)\ #define TKIP_IV(pattrib_iv, dot11txpn, keyidx)\
@ -77,7 +77,7 @@ do{\
pattrib_iv[6] = dot11txpn._byte_.TSC4;\ pattrib_iv[6] = dot11txpn._byte_.TSC4;\
pattrib_iv[7] = dot11txpn._byte_.TSC5;\ pattrib_iv[7] = dot11txpn._byte_.TSC5;\
dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\ dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\
}while(0) }while (0)
#define AES_IV(pattrib_iv, dot11txpn, keyidx)\ #define AES_IV(pattrib_iv, dot11txpn, keyidx)\
do{\ do{\
@ -90,7 +90,7 @@ do{\
pattrib_iv[6] = dot11txpn._byte_.TSC4;\ pattrib_iv[6] = dot11txpn._byte_.TSC4;\
pattrib_iv[7] = dot11txpn._byte_.TSC5;\ pattrib_iv[7] = dot11txpn._byte_.TSC5;\
dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\ dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\
}while(0) }while (0)
#define HWXMIT_ENTRY 4 #define HWXMIT_ENTRY 4

View file

@ -325,7 +325,7 @@ struct sta_info {
sta->sta_stats.last_rx_probersp_uo_pkts = sta->sta_stats.rx_probersp_uo_pkts; \ sta->sta_stats.last_rx_probersp_uo_pkts = sta->sta_stats.rx_probersp_uo_pkts; \
sta->sta_stats.last_rx_ctrl_pkts = sta->sta_stats.rx_ctrl_pkts; \ sta->sta_stats.last_rx_ctrl_pkts = sta->sta_stats.rx_ctrl_pkts; \
sta->sta_stats.last_rx_data_pkts = sta->sta_stats.rx_data_pkts; \ sta->sta_stats.last_rx_data_pkts = sta->sta_stats.rx_data_pkts; \
} while(0) } while (0)
#define STA_RX_PKTS_ARG(sta) \ #define STA_RX_PKTS_ARG(sta) \
sta->sta_stats.rx_mgnt_pkts \ sta->sta_stats.rx_mgnt_pkts \

View file

@ -582,7 +582,7 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
#define SetOrderBit(pbuf) \ #define SetOrderBit(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_ORDER_); \ *(unsigned short *)(pbuf) |= cpu_to_le16(_ORDER_); \
} while(0) } while (0)
#define GetOrderBit(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0) #define GetOrderBit(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)

View file

@ -1798,7 +1798,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while(1) while (1)
{ {
if (rtw_end_of_queue_search(phead,plist)== true) if (rtw_end_of_queue_search(phead,plist)== true)
break; break;

View file

@ -421,7 +421,7 @@ static char *translate_scan(struct adapter *padapter,
max_rate = 0; max_rate = 0;
p = custom; p = custom;
p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), " Rates (Mb/s): "); p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), " Rates (Mb/s): ");
while(pnetwork->network.SupportedRates[i]!=0) { while (pnetwork->network.SupportedRates[i]!=0) {
rate = pnetwork->network.SupportedRates[i]&0x7F; rate = pnetwork->network.SupportedRates[i]&0x7F;
if (rate > max_rate) if (rate > max_rate)
max_rate = rate; max_rate = rate;
@ -518,7 +518,7 @@ static char *translate_scan(struct adapter *padapter,
total_ielen = pnetwork->network.IELength - _FIXED_IE_LENGTH_; total_ielen = pnetwork->network.IELength - _FIXED_IE_LENGTH_;
} }
while(cnt < total_ielen) while (cnt < total_ielen)
{ {
if (rtw_is_wps_ie(&ie_ptr[cnt], &wps_ielen) && (wps_ielen>2)) if (rtw_is_wps_ie(&ie_ptr[cnt], &wps_ielen) && (wps_ielen>2))
{ {
@ -957,7 +957,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
u16 cnt = 0; u16 cnt = 0;
u8 eid, wps_oui[4]={0x0,0x50,0xf2,0x04}; u8 eid, wps_oui[4]={0x0,0x50,0xf2,0x04};
while( cnt < ielen ) while ( cnt < ielen )
{ {
eid = buf[cnt]; eid = buf[cnt];
@ -1651,7 +1651,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
char sec_len; char sec_len;
int ssid_index = 0; int ssid_index = 0;
while(len >= 1) { while (len >= 1) {
section = *(pos++); len-=1; section = *(pos++); len-=1;
switch(section) { switch(section) {
@ -1783,7 +1783,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while(1) while (1)
{ {
if (rtw_end_of_queue_search(phead,plist)== true) if (rtw_end_of_queue_search(phead,plist)== true)
break; break;
@ -3099,7 +3099,7 @@ static int rtw_get_ap_info(struct net_device *dev,
goto exit; goto exit;
} }
while((check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING))) == true) while ((check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING))) == true)
{ {
rtw_msleep_os(30); rtw_msleep_os(30);
cnt++; cnt++;
@ -3129,7 +3129,7 @@ static int rtw_get_ap_info(struct net_device *dev,
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while(1) while (1)
{ {
if (rtw_end_of_queue_search(phead,plist)== true) if (rtw_end_of_queue_search(phead,plist)== true)
break; break;
@ -4197,7 +4197,7 @@ static int rtw_p2p_connect(struct net_device *dev,
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while(1) while (1)
{ {
if (rtw_end_of_queue_search(phead,plist)== true) if (rtw_end_of_queue_search(phead,plist)== true)
break; break;
@ -4312,7 +4312,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while(1) while (1)
{ {
if (rtw_end_of_queue_search(phead,plist)== true) if (rtw_end_of_queue_search(phead,plist)== true)
break; break;
@ -4604,7 +4604,7 @@ static int rtw_p2p_set_pc(struct net_device *dev,
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while(1) while (1)
{ {
if (rtw_end_of_queue_search(phead,plist)== true) if (rtw_end_of_queue_search(phead,plist)== true)
break; break;
@ -4937,7 +4937,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while(1) while (1)
{ {
if (rtw_end_of_queue_search(phead,plist)== true) if (rtw_end_of_queue_search(phead,plist)== true)
break; break;
@ -9606,7 +9606,7 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
/* Search the correct ioctl */ /* Search the correct ioctl */
k = -1; k = -1;
while((++k < num_priv_args) && strcmp(priv_args[k].name, cmdname)); while ((++k < num_priv_args) && strcmp(priv_args[k].name, cmdname));
/* If not found... */ /* If not found... */
if (k == num_priv_args) { if (k == num_priv_args) {

View file

@ -920,7 +920,7 @@ static int readFile(struct file *fp,char *buf,int len)
if (!fp->f_op || !fp->f_op->read) if (!fp->f_op || !fp->f_op->read)
return -EPERM; return -EPERM;
while(sum<len) { while (sum<len) {
rlen=fp->f_op->read(fp,(char __user *)buf+sum,len-sum, &fp->f_pos); rlen=fp->f_op->read(fp,(char __user *)buf+sum,len-sum, &fp->f_pos);
if (rlen>0) if (rlen>0)
sum+=rlen; sum+=rlen;
@ -941,7 +941,7 @@ static int writeFile(struct file *fp,char *buf,int len)
if (!fp->f_op || !fp->f_op->write) if (!fp->f_op || !fp->f_op->write)
return -EPERM; return -EPERM;
while(sum<len) { while (sum<len) {
wlen=fp->f_op->write(fp,(char __user *)buf+sum,len-sum, &fp->f_pos); wlen=fp->f_op->write(fp,(char __user *)buf+sum,len-sum, &fp->f_pos);
if (wlen>0) if (wlen>0)
sum+=wlen; sum+=wlen;