From 8e22f0d2e81b579f3439bd69eced27f7e8513405 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 15 Aug 2015 13:04:12 -0500 Subject: [PATCH] rtl8188eu: Change "while(" to "while (" Signed-off-by: Larry Finger --- core/rtw_br_ext.c | 4 ++-- core/rtw_cmd.c | 12 ++++++------ core/rtw_efuse.c | 12 ++++++------ core/rtw_ieee80211.c | 40 +++++++++++++++++++------------------- core/rtw_ioctl_set.c | 2 +- core/rtw_mlme.c | 12 ++++++------ core/rtw_mlme_ext.c | 16 +++++++-------- core/rtw_p2p.c | 6 +++--- core/rtw_recv.c | 14 ++++++------- core/rtw_security.c | 4 ++-- core/rtw_sta_mgt.c | 2 +- hal/Hal8188ERateAdaptive.c | 2 +- hal/HalHWImg8188E_BB.c | 8 ++++---- hal/HalHWImg8188E_MAC.c | 4 ++-- hal/HalHWImg8188E_RF.c | 4 ++-- hal/HalPhyRf_8188e.c | 6 +++--- hal/HalPwrSeqCmd.c | 2 +- hal/rtl8188e_cmd.c | 12 ++++++------ hal/rtl8188e_hal_init.c | 30 ++++++++++++++-------------- hal/rtl8188e_phycfg.c | 6 +++--- hal/rtl8188eu_xmit.c | 2 +- hal/usb_halinit.c | 8 ++++---- hal/usb_ops_linux.c | 6 +++--- include/HalPwrSeqCmd.h | 2 +- include/osdep_service.h | 4 ++-- include/rtw_cmd.h | 2 +- include/rtw_debug.h | 24 +++++++++++------------ include/rtw_led.h | 2 +- include/rtw_mlme_ext.h | 6 +++--- include/rtw_pwrctrl.h | 2 +- include/rtw_security.h | 6 +++--- include/rtw_xmit.h | 6 +++--- include/sta_info.h | 2 +- include/wifi.h | 2 +- os_dep/ioctl_cfg80211.c | 2 +- os_dep/ioctl_linux.c | 24 +++++++++++------------ os_dep/osdep_service.c | 4 ++-- 37 files changed, 151 insertions(+), 151 deletions(-) diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c index 1e5a266..48752ec 100644 --- a/core/rtw_br_ext.c +++ b/core/rtw_br_ext.c @@ -77,7 +77,7 @@ static __inline__ unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, un unsigned short tagLen, tagType; 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 */ tagType = (unsigned short)((cur_ptr[0] << 8) + cur_ptr[1]); 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 */ sum = ~(udph->check) & 0xffff; sum += dhcph->flags; - while(sum >> 16) + while (sum >> 16) sum = (sum & 0xffff) + (sum >> 16); udph->check = ~sum; } diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 4274af1..a8a41f9 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -116,7 +116,7 @@ void _rtw_free_evt_priv (struct evt_priv *pevtpriv) #ifdef CONFIG_C2H_WK _cancel_workitem_sync(&pevtpriv->c2h_wk); - while(pevtpriv->c2h_wk_alive) + while (pevtpriv->c2h_wk_alive) rtw_msleep_os(10); 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")); - while(1) + while (1) { 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)); @@ -489,7 +489,7 @@ post_process: /* DBG_871X("%s: leaving... drop cmdcode:%u\n", __FUNCTION__, pcmd->cmdcode); */ rtw_free_cmd_obj(pcmd); - }while(1); + }while (1); _rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema); @@ -2278,12 +2278,12 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter) { u8 val = 0; - /* while((rtw_read32(padapter, 0x414)&0x00ffff00)!=0) */ - /* while((rtw_read32(padapter, 0x414)&0x0000ff00)!=0) */ + /* while ((rtw_read32(padapter, 0x414)&0x00ffff00)!=0) */ + /* while ((rtw_read32(padapter, 0x414)&0x0000ff00)!=0) */ rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &val); - while(false == val) + while (false == val) { rtw_msleep_os(100); diff --git a/core/rtw_efuse.c b/core/rtw_efuse.c index f933789..c9cd80c 100644 --- a/core/rtw_efuse.c +++ b/core/rtw_efuse.c @@ -206,8 +206,8 @@ ReadEFuseByte( /* Check bit 32 read-ready */ retry = 0; value32 = rtw_read32(Adapter, EFUSE_CTRL); - /* while(!(((value32 >> 24) & 0xff) & 0x80) && (retry<10)) */ - while(!(((value32 >> 24) & 0xff) & 0x80) && (retry<10000)) + /* while (!(((value32 >> 24) & 0xff) & 0x80) && (retry<10)) */ + while (!(((value32 >> 24) & 0xff) & 0x80) && (retry<10000)) { value32 = rtw_read32(Adapter, EFUSE_CTRL); retry++; @@ -324,7 +324,7 @@ EFUSE_Read1Byte( /* Wait Write-ready (0x30[31]=1) */ Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3); - while(!(Bytetemp & 0x80)) + while (!(Bytetemp & 0x80)) { Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3); k++; @@ -398,7 +398,7 @@ EFUSE_Write1Byte( /* Wait Write-ready (0x30[31]=0) */ Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3); - while(Bytetemp & 0x80) + while (Bytetemp & 0x80) { Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3); k++; @@ -435,7 +435,7 @@ efuse_OneByteRead( 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++; } @@ -481,7 +481,7 @@ efuse_OneByteWrite( rtw_write8(pAdapter, EFUSE_CTRL+3, 0xF2);/* write cmd */ - while((0x80 & rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx<100) ){ + while ((0x80 & rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx<100) ){ tmpidx++; } diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index 078967b..ea9a1cf 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -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!! */ int i=0; - while(dot11_rate_table[i] != 0) { + while (dot11_rate_table[i] != 0) { if (dot11_rate_table[i] == val) return BIT(i); i++; @@ -84,7 +84,7 @@ uint rtw_is_cckrates_included(u8 *rate) { u32 i = 0; - while(rate[i]!=0) { + while (rate[i]!=0) { if ((((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) || (((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22) ) return true; @@ -228,7 +228,7 @@ u8 *rtw_get_ie(u8 *pbuf, sint index, sint *len, sint limit) p = pbuf; i = 0; *len = 0; - while(1) + while (1) { 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; - while(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) */ 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) */ 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; int index=0; - while(1) { + while (1) { target_attr=rtw_get_p2p_attr(ie, ielen, attr_id, NULL, &target_attr_len); if (target_attr && target_attr_len) { @@ -1683,7 +1683,7 @@ void dump_wfd_ie(u8 *ie, u32 ie_len) return; pos+=6; - while(pos-ie < ie_len){ + while (pos-ie < ie_len){ id = *pos; len = RTW_GET_BE16(pos+1); @@ -1707,7 +1707,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen) return match; } - while(cntSupportedRates[i]!=0) && (pcur_bss->SupportedRates[i]!=0xFF)) + while ( (pcur_bss->SupportedRates[i]!=0) && (pcur_bss->SupportedRates[i]!=0xFF)) { rate = pcur_bss->SupportedRates[i]&0x7F; if (rate>max_rate) diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index cd6f40d..0d056f0 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -595,7 +595,7 @@ struct wlan_network * rtw_get_oldest_wlan_network(struct __queue *scanned_queue plist = get_next(phead); - while(1) + while (1) { 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 */ #endif - while(1) + while (1) { if (rtw_end_of_queue_search(phead,plist)== true) break; @@ -2036,7 +2036,7 @@ void _rtw_join_timeout_handler (struct adapter *adapter) spin_lock_bh(&pmlmepriv->lock); if (rtw_to_roaming(adapter) > 0) { /* join timeout caused by roaming */ - while(1) { + while (1) { pmlmepriv->to_roaming--; if (rtw_to_roaming(adapter) != 0) { /* try another */ 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; i = 12; /* after the fixed IE */ - while(iassoc_by_bssid = false; - while(1) { + while (1) { if ( _SUCCESS==(do_join_r=rtw_do_join(padapter)) ) { break; } else { diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index cbb152e..6228f99 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -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) rtw_msleep_os(wait_ms); - }while((i 0 && ret==_FAIL) rtw_msleep_os(wait_ms); - }while((i 0 && ret==_FAIL) rtw_msleep_os(wait_ms); - }while((i 0 && ret==_FAIL) rtw_msleep_os(wait_ms); - }while((i 0 && ret==_FAIL) rtw_msleep_os(wait_ms); - }while((ibSurpriseRemoved && !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) { diff --git a/core/rtw_p2p.c b/core/rtw_p2p.c index 577dd80..1c7e2ec 100644 --- a/core/rtw_p2p.c +++ b/core/rtw_p2p.c @@ -2520,7 +2520,7 @@ static u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_conte ch_content += 3; ch_cnt -= 3; - while( ch_cnt > 0) + while ( ch_cnt > 0) { ch_content += 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); - while(p2p_ie) + while (p2p_ie) { find_p2p = true; /* 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 */ 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); */ pwdinfo->noa_count[noa_num] = noa_attr[noa_offset]; diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 64c565c..ed80a32 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -283,7 +283,7 @@ void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pf phead = get_list_head(pframequeue); 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); @@ -302,7 +302,7 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter) { u32 cnt = 0; 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); cnt++; } @@ -1982,7 +1982,7 @@ static union recv_frame * recvframe_defrag(struct adapter *adapter, struct __qu 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); 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; - while(a_len > ETH_HLEN) { + while (a_len > ETH_HLEN) { /* Offset 12 denote 2 mac address */ #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); 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); 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. */ /* 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); @@ -2837,7 +2837,7 @@ int recv_func(struct adapter *padapter, union recv_frame *rframe) union recv_frame *pending_frame; 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++; recv_func_posthandle(padapter, pending_frame); } diff --git a/core/rtw_security.c b/core/rtw_security.c index 44f6739..6b1c90e 100644 --- a/core/rtw_security.c +++ b/core/rtw_security.c @@ -354,7 +354,7 @@ void rtw_secmicappend(struct mic_data *pmicdata, u8 * src, u32 nbytes ) { ; /* This is simple */ - while( nbytes > 0 ) + while ( nbytes > 0 ) { rtw_secmicappendbyte(pmicdata, *src++ ); nbytes--; @@ -371,7 +371,7 @@ void rtw_secgetmic(struct mic_data *pmicdata, u8 * dst ) rtw_secmicappendbyte(pmicdata, 0 ); rtw_secmicappendbyte(pmicdata, 0 ); /* and then zeroes until the length is a multiple of 4 */ - while( pmicdata->nBytesInM != 0 ) + while ( pmicdata->nBytesInM != 0 ) rtw_secmicappendbyte(pmicdata, 0 ); /* The appendByte function has already computed the result. */ secmicputuint32( dst, pmicdata->L ); diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 231fafc..43d8122 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -434,7 +434,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta) phead = get_list_head(ppending_recvframe_queue); plist = get_next(phead); - while(!rtw_is_list_empty(phead)) + while (!rtw_is_list_empty(phead)) { prframe = LIST_CONTAINOR(plist, union recv_frame, u); diff --git a/hal/Hal8188ERateAdaptive.c b/hal/Hal8188ERateAdaptive.c index 88c909e..61ab05a 100644 --- a/hal/Hal8188ERateAdaptive.c +++ b/hal/Hal8188ERateAdaptive.c @@ -900,7 +900,7 @@ ODM_RA_TxRPT2Handle_8188E( pBuffer += TX_RPT2_ITEM_SIZE; MacId++; - }while(MacId < ItemNum); + }while (MacId < ItemNum); odm_RATxRPTTimerSetting(pDM_Odm,minRptTime); diff --git a/hal/HalHWImg8188E_BB.c b/hal/HalHWImg8188E_BB.c index 2c77cf5..029757b 100644 --- a/hal/HalHWImg8188E_BB.c +++ b/hal/HalHWImg8188E_BB.c @@ -328,7 +328,7 @@ ODM_ReadAndConfig_AGC_TAB_1T_8188E( 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 i = 0; @@ -535,7 +535,7 @@ ODM_ReadAndConfig_AGC_TAB_1T_ICUT_8188E( 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 i = 0; @@ -815,7 +815,7 @@ ODM_ReadAndConfig_PHY_REG_1T_8188E( 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 i = 0; @@ -1074,7 +1074,7 @@ ODM_ReadAndConfig_PHY_REG_1T_ICUT_8188E( 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 i = 0; diff --git a/hal/HalHWImg8188E_MAC.c b/hal/HalHWImg8188E_MAC.c index a2d8214..969b7e5 100644 --- a/hal/HalHWImg8188E_MAC.c +++ b/hal/HalHWImg8188E_MAC.c @@ -158,7 +158,7 @@ ODM_ReadAndConfig_MAC_REG_8188E( 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 i = 0; @@ -318,7 +318,7 @@ ODM_ReadAndConfig_MAC_REG_ICUT_8188E( 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 i = 0; diff --git a/hal/HalHWImg8188E_RF.c b/hal/HalHWImg8188E_RF.c index 899c204..5c19d56 100644 --- a/hal/HalHWImg8188E_RF.c +++ b/hal/HalHWImg8188E_RF.c @@ -177,7 +177,7 @@ ODM_ReadAndConfig_RadioA_1T_8188E( 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 i = 0; @@ -348,7 +348,7 @@ ODM_ReadAndConfig_RadioA_1T_ICUT_8188E( 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 i = 0; diff --git a/hal/HalPhyRf_8188e.c b/hal/HalPhyRf_8188e.c index 2cce34a..d674b66 100644 --- a/hal/HalPhyRf_8188e.c +++ b/hal/HalPhyRf_8188e.c @@ -40,7 +40,7 @@ } \ if (_offset >= _size)\ _offset = _size-1;\ - } while(0) + } while (0) /* 3============================================================ */ /* 3 Tx Power Tracking */ @@ -1833,7 +1833,7 @@ if ( *(pDM_Odm->mp_mode) == 1) i++; } - while(tmpReg > apkbound && i < 4); + while (tmpReg > apkbound && i < 4); APK_result[path][index] = tmpReg; } @@ -2130,7 +2130,7 @@ if (*(pDM_Odm->mp_mode) == 1) if (bSingleTone || bCarrierSuppression) return; - while(*(pDM_Odm->pbScanInProcess) && timecount < timeout) + while (*(pDM_Odm->pbScanInProcess) && timecount < timeout) { ODM_delay_ms(50); timecount += 50; diff --git a/hal/HalPwrSeqCmd.c b/hal/HalPwrSeqCmd.c index dbfc40a..cd0ee6c 100644 --- a/hal/HalPwrSeqCmd.c +++ b/hal/HalPwrSeqCmd.c @@ -140,7 +140,7 @@ u8 HalPwrSeqCmdParsing( } AryIdx++;/* Add Array Index */ - }while(1); + }while (1); return true; } diff --git a/hal/rtl8188e_cmd.c b/hal/rtl8188e_cmd.c index a01e03f..5883797 100644 --- a/hal/rtl8188e_cmd.c +++ b/hal/rtl8188e_cmd.c @@ -53,7 +53,7 @@ static u8 _is_fw_read_cmd_down(struct adapter* padapter, u8 msgbox_num) if (0 == valid ){ read_down = true; } - }while( (!read_down) && (retry_cnts--)); + }while ( (!read_down) && (retry_cnts--)); return read_down; @@ -150,7 +150,7 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 bcmd_down = true; pHalData->LastHMEBoxNum = (h2c_box_num+1) % RTL88E_MAX_H2C_BOX_NUMS; - }while((!bcmd_down) && (retry_cnts--)); + }while ((!bcmd_down) && (retry_cnts--)); ret = _SUCCESS; @@ -756,9 +756,9 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus) /* check rsvd page download OK. */ rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid)); 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")); */ if (padapter->bSurpriseRemoved || padapter->bDriverStopped) @@ -794,8 +794,8 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus) /* check rsvd page download OK. */ rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8*)(&bcn_valid)); poll++; - } while(!bcn_valid && (poll%10)!=0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); - }while(!bcn_valid && DLBcnCount<=100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); + } while (!bcn_valid && (poll%10)!=0 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); + }while (!bcn_valid && DLBcnCount<=100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); /* RT_ASSERT(bcn_valid, ("HalDownloadRSVDPage(): 2 Download RSVD page failed!\n")); */ if (padapter->bSurpriseRemoved || padapter->bDriverStopped) diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index 5d6fa3d..0fa912a 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -69,7 +69,7 @@ static s32 iol_execute(struct adapter *padapter, u8 control) rtw_write8(padapter, REG_HMEBOX_E0, reg_0x88|control); t1 = start = rtw_get_current_time(); - while( + while ( /* reg_1c7 = rtw_read8(padapter, 0x1c7) >1) && */ (reg_0x88=rtw_read8(padapter, REG_HMEBOX_E0)) & control && (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. */ /* */ - 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)); */ @@ -311,7 +311,7 @@ static void efuse_read_phymap_from_txpktbuf( dbg_addr = bcnhead*128/8; /* 8-bytes addressing */ - while(1) + while (1) { /* DBG_871X("%s dbg_addr:0x%x\n", __FUNCTION__, 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__); */ rtw_write8(adapter, REG_TXPKTBUF_DBG, 0); start = rtw_get_current_time(); - while(!(reg_0x143=rtw_read8(adapter, REG_TXPKTBUF_DBG))/* dbg */ - /* while(rtw_read8(adapter, REG_TXPKTBUF_DBG) & BIT0 */ + while (!(reg_0x143=rtw_read8(adapter, REG_TXPKTBUF_DBG))/* dbg */ + /* while (rtw_read8(adapter, REG_TXPKTBUF_DBG) & BIT0 */ && (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)); @@ -506,7 +506,7 @@ void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter,int data_len) } rtw_usleep_os(2); - }while( !rstatus && (loop++ <10)); + }while ( !rstatus && (loop++ <10)); } rtw_IOL_cmd_buf_dump(Adapter,data_len,pbuf); rtw_vmfree(pbuf, data_len+10); @@ -652,7 +652,7 @@ _FillDummy( u8 remain = (u8)(FwLen%4); remain = (remain==0)?0:(4-remain); - while(remain>0) + while (remain>0) { pFwBuf[FwLen] = 0; FwLen++; @@ -1026,7 +1026,7 @@ static bool efuse_read_phymap( /* */ /* Read physical efuse content. */ /* */ - while(addr < limit) + while (addr < limit) { ReadEFuseByte(Adapter, addr, pos, false); if (*pos != 0xFF) @@ -1117,7 +1117,7 @@ Hal_EfuseReadEFuse88E( /* */ /* 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)); */ @@ -1783,7 +1783,7 @@ hal_EfusePgPacketRead_8188e( /* Skip dummy parts to prevent unexpected data read from Efuse. */ /* By pass right now. 2009.02.19. */ /* */ - while(bContinual && AVAILABLE_EFUSE_ADDR(efuse_addr) ) + while (bContinual && AVAILABLE_EFUSE_ADDR(efuse_addr) ) { /* Header Read ------------- */ if (ReadState & PG_STATE_HEADER) @@ -1967,14 +1967,14 @@ hal_EfusePgPacketWrite2ByteHeader( /* RTPRINT(FEEPROM, EFUSE_PG, ("Wirte 2byte header\n")); */ 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; /* RTPRINT(FEEPROM, EFUSE_PG, ("pg_header = 0x%x\n", pg_header)); */ efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest); - while(tmp_header == 0xFF) + while (tmp_header == 0xFF) { if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { @@ -1996,7 +1996,7 @@ hal_EfusePgPacketWrite2ByteHeader( efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest); - while(tmp_header == 0xFF) + while (tmp_header == 0xFF) { if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { @@ -2067,7 +2067,7 @@ hal_EfusePgPacketWrite1ByteHeader( efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest); efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest); - while(tmp_header == 0xFF) + while (tmp_header == 0xFF) { if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) { @@ -2258,7 +2258,7 @@ hal_EfusePartialWriteCheck( } /* RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfusePartialWriteCheck(), startAddr=%d\n", startAddr)); */ - while(1) + while (1) { if (startAddr >= efuse_max_available_len) { diff --git a/hal/rtl8188e_phycfg.c b/hal/rtl8188e_phycfg.c index a488148..02e5621 100644 --- a/hal/rtl8188e_phycfg.c +++ b/hal/rtl8188e_phycfg.c @@ -87,7 +87,7 @@ sic_IsSICReady( u32 retryCnt=0; u8 sic_cmd=0xff; - while(1) + while (1) { 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)); */ retry = 4; - while(retry--){ + while (retry--){ rtw_udelay_os(50); /* PlatformStallExecution(50); */ } @@ -179,7 +179,7 @@ sic_Write4Byte( rtw_write8(Adapter, SIC_ADDR_REG+1, (u8)((offset&0xff00)>>8)); rtw_write32(Adapter, SIC_DATA_REG, (u32)data); rtw_write8(Adapter, SIC_CMD_REG, SIC_CMD_WRITE); - while(retry--){ + while (retry--){ rtw_udelay_os(50); } } diff --git a/hal/rtl8188eu_xmit.c b/hal/rtl8188eu_xmit.c index d571563..74c63ef 100644 --- a/hal/rtl8188eu_xmit.c +++ b/hal/rtl8188eu_xmit.c @@ -763,7 +763,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter, struct xmit_priv *pxm descCount = 0; 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) diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index c60c247..a90dfaa 100644 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -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(); #else - #define HAL_INIT_PROFILE_TAG(stage) do {} while(0) + #define HAL_INIT_PROFILE_TAG(stage) do {} while (0) #endif /* DBG_HAL_INIT_PROFILING */ 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); /* Set RTS initial rate */ - while(BrateCfg > 0x1) + while (BrateCfg > 0x1) { BrateCfg = (BrateCfg>> 1); RateIndex++; @@ -2809,7 +2809,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) do{ if (!(rtw_read32(Adapter,REG_RXPKT_NUM)&RXDMA_IDLE)) break; - }while(trycnt--); + }while (trycnt--); if (trycnt ==0) 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); /* Set RTS initial rate */ - while(mask > 0x1) + while (mask > 0x1) { mask = (mask>> 1); RateIndex++; diff --git a/hal/usb_ops_linux.c b/hal/usb_ops_linux.c index 3e9f710..9b374cd 100644 --- a/hal/usb_ops_linux.c +++ b/hal/usb_ops_linux.c @@ -63,7 +63,7 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u goto release_mutex; } - while(++vendorreq_times<= MAX_USBCTRL_VENDORREQ_TIMES) + while (++vendorreq_times<= MAX_USBCTRL_VENDORREQ_TIMES) { 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) 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: @@ -835,7 +835,7 @@ void rtl8188eu_xmit_tasklet(void *priv) if (check_fwstate(&padapter->mlmepriv, _FW_UNDER_SURVEY) == true) return; - while(1) { + while (1) { if (padapter->bDriverStopped || padapter->bSurpriseRemoved || padapter->bWritePortCancel) { diff --git a/include/HalPwrSeqCmd.h b/include/HalPwrSeqCmd.h index 55f17e5..ef22b1e 100644 --- a/include/HalPwrSeqCmd.h +++ b/include/HalPwrSeqCmd.h @@ -45,7 +45,7 @@ /* do{ */ /* if ( (Read(offset) & msk) == (value & msk) ) */ /* break; */ - /* } while(not timeout); */ + /* } while (not timeout); */ #define PWR_CMD_DELAY 0x03 /* offset: the value to delay */ diff --git a/include/osdep_service.h b/include/osdep_service.h index cf951ff..589b9e6 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -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__) #else /* DBG_MEM_ALLOC */ -#define rtw_mstat_update(flag, status, sz) do {} while(0) -#define rtw_mstat_dump() do {} while(0) +#define rtw_mstat_update(flag, status, sz) do {} while (0) +#define rtw_mstat_dump() do {} while (0) u8* _rtw_vmalloc(u32 sz); u8* _rtw_zvmalloc(u32 sz); void _rtw_vmfree(u8 *pbuf, u32 sz); diff --git a/include/rtw_cmd.h b/include/rtw_cmd.h index 218abfe..e042367 100644 --- a/include/rtw_cmd.h +++ b/include/rtw_cmd.h @@ -96,7 +96,7 @@ do {\ pcmd->cmdsz = sizeof (*pparm);\ pcmd->rsp = NULL;\ pcmd->rspsz = 0;\ -} while(0) +} while (0) struct c2h_evt_hdr { u8 id:4; diff --git a/include/rtw_debug.h b/include/rtw_debug.h index 5ac41e7..35ad1c4 100644 --- a/include/rtw_debug.h +++ b/include/rtw_debug.h @@ -155,15 +155,15 @@ extern void rtl871x_cedbg(const char *fmt, ...); #endif -#define RT_TRACE(_Comp, _Level, Fmt) do{}while(0) -#define _func_enter_ do{}while(0) -#define _func_exit_ do{}while(0) -#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) do{}while(0) +#define RT_TRACE(_Comp, _Level, Fmt) do{}while (0) +#define _func_enter_ do{}while (0) +#define _func_exit_ do{}while (0) +#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) do{}while (0) -#define DBG_871X(x, ...) do {} while(0) -#define MSG_8192C(x, ...) do {} while(0) -#define DBG_8192C(x,...) do {} while(0) -#define DBG_871X_LEVEL(x,...) do {} while(0) +#define DBG_871X(x, ...) do {} while (0) +#define MSG_8192C(x, ...) do {} while (0) +#define DBG_8192C(x,...) do {} while (0) +#define DBG_871X_LEVEL(x,...) do {} while (0) #undef _dbgdump #define _dbgdump printk @@ -181,7 +181,7 @@ extern u32 GlobalDebugLevel; else \ _dbgdump(DRIVER_PREFIX fmt, ##arg);\ }\ - }while(0) + }while (0) #endif #ifdef CONFIG_DEBUG @@ -189,17 +189,17 @@ extern u32 GlobalDebugLevel; #undef DBG_871X #define DBG_871X(...) do {\ _dbgdump(DRIVER_PREFIX __VA_ARGS__);\ - }while(0) + }while (0) #undef MSG_8192C #define MSG_8192C(...) do {\ _dbgdump(DRIVER_PREFIX __VA_ARGS__);\ - }while(0) + }while (0) #undef DBG_8192C #define DBG_8192C(...) do {\ _dbgdump(DRIVER_PREFIX __VA_ARGS__);\ - }while(0) + }while (0) #endif #endif /* CONFIG_DEBUG */ diff --git a/include/rtw_led.h b/include/rtw_led.h index 3c929e2..c029395 100644 --- a/include/rtw_led.h +++ b/include/rtw_led.h @@ -175,7 +175,7 @@ struct led_priv{ do { \ if ((adapter)->ledpriv.LedControlHandler) \ (adapter)->ledpriv.LedControlHandler((adapter), (LedAction)); \ - } while(0) + } while (0) void BlinkTimerCallback(void *data); void BlinkWorkItemCallback(struct work_struct *work); diff --git a/include/rtw_mlme_ext.h b/include/rtw_mlme_ext.h index a9e9aca..f4af583 100644 --- a/include/rtw_mlme_ext.h +++ b/include/rtw_mlme_ext.h @@ -673,18 +673,18 @@ void sa_query_timer_hdl(struct adapter *padapter); #define set_survey_timer(mlmeext, ms) \ do { \ _set_timer(&(mlmeext)->survey_timer, (ms)); \ - } while(0) + } while (0) #define set_link_timer(mlmeext, ms) \ do { \ _set_timer(&(mlmeext)->link_timer, (ms)); \ - } while(0) + } while (0) #ifdef CONFIG_IEEE80211W #define set_sa_query_timer(mlmeext, ms) \ do { \ DBG_871X("%s set_sa_query_timer(%p, %d)\n", __FUNCTION__, (mlmeext), (ms)); \ _set_timer(&(mlmeext)->sa_query_timer, (ms)); \ - } while(0) + } while (0) #endif /* CONFIG_IEEE80211W */ extern int cckrates_included(unsigned char *rate, int ratelen); extern int cckratesonly_included(unsigned char *rate, int ratelen); diff --git a/include/rtw_pwrctrl.h b/include/rtw_pwrctrl.h index 0ba0662..fe56c56 100644 --- a/include/rtw_pwrctrl.h +++ b/include/rtw_pwrctrl.h @@ -271,7 +271,7 @@ struct pwrctrl_priv #define _rtw_set_pwr_state_check_timer(pwrctl, ms) \ do { \ _set_timer(&(pwrctl)->pwr_state_check_timer, (ms)); \ - } while(0) + } while (0) #define rtw_set_pwr_state_check_timer(pwrctl) \ _rtw_set_pwr_state_check_timer((pwrctl), (pwrctl)->pwr_state_check_interval) diff --git a/include/rtw_security.h b/include/rtw_security.h index 3a0483f..999ffaa 100644 --- a/include/rtw_security.h +++ b/include/rtw_security.h @@ -218,7 +218,7 @@ do{\ encry_algo = (u8)psecuritypriv->dot11PrivacyAlgrthm;\ break;\ }\ -}while(0) +}while (0) #define SET_ICE_IV_LEN( iv_len, icv_len, encrypt)\ @@ -247,7 +247,7 @@ do{\ icv_len = 0;\ break;\ }\ -}while(0) +}while (0) #define GET_TKIP_PN(iv,dot11txpn)\ @@ -258,7 +258,7 @@ do{\ dot11txpn._byte_.TSC3=iv[5];\ dot11txpn._byte_.TSC4=iv[6];\ dot11txpn._byte_.TSC5=iv[7];\ -}while(0) +}while (0) #define ROL32( A, n ) ( ((A) << (n)) | ( ((A)>>(32-(n))) & ( (1UL << (n)) - 1 ) ) ) diff --git a/include/rtw_xmit.h b/include/rtw_xmit.h index 2c40d35..0d4a44f 100644 --- a/include/rtw_xmit.h +++ b/include/rtw_xmit.h @@ -63,7 +63,7 @@ do{\ pattrib_iv[2] = dot11txpn._byte_.TSC2;\ pattrib_iv[3] = ((keyidx & 0x3)<<6);\ dot11txpn.val = (dot11txpn.val == 0xffffff) ? 0: (dot11txpn.val+1);\ -}while(0) +}while (0) #define TKIP_IV(pattrib_iv, dot11txpn, keyidx)\ @@ -77,7 +77,7 @@ do{\ pattrib_iv[6] = dot11txpn._byte_.TSC4;\ pattrib_iv[7] = dot11txpn._byte_.TSC5;\ dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\ -}while(0) +}while (0) #define AES_IV(pattrib_iv, dot11txpn, keyidx)\ do{\ @@ -90,7 +90,7 @@ do{\ pattrib_iv[6] = dot11txpn._byte_.TSC4;\ pattrib_iv[7] = dot11txpn._byte_.TSC5;\ dot11txpn.val = dot11txpn.val == 0xffffffffffffULL ? 0: (dot11txpn.val+1);\ -}while(0) +}while (0) #define HWXMIT_ENTRY 4 diff --git a/include/sta_info.h b/include/sta_info.h index d340e57..90aed3b 100644 --- a/include/sta_info.h +++ b/include/sta_info.h @@ -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_ctrl_pkts = sta->sta_stats.rx_ctrl_pkts; \ sta->sta_stats.last_rx_data_pkts = sta->sta_stats.rx_data_pkts; \ - } while(0) + } while (0) #define STA_RX_PKTS_ARG(sta) \ sta->sta_stats.rx_mgnt_pkts \ diff --git a/include/wifi.h b/include/wifi.h index dac7bd1..618593b 100644 --- a/include/wifi.h +++ b/include/wifi.h @@ -582,7 +582,7 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe) #define SetOrderBit(pbuf) \ do { \ *(unsigned short *)(pbuf) |= cpu_to_le16(_ORDER_); \ - } while(0) + } while (0) #define GetOrderBit(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0) diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index a6ed974..0f2a8ae 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -1798,7 +1798,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter) phead = get_list_head(queue); plist = get_next(phead); - while(1) + while (1) { if (rtw_end_of_queue_search(phead,plist)== true) break; diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index c6a47d1..41f42ac 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -421,7 +421,7 @@ static char *translate_scan(struct adapter *padapter, max_rate = 0; p = custom; 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; if (rate > max_rate) max_rate = rate; @@ -518,7 +518,7 @@ static char *translate_scan(struct adapter *padapter, 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)) { @@ -957,7 +957,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie u16 cnt = 0; u8 eid, wps_oui[4]={0x0,0x50,0xf2,0x04}; - while( cnt < ielen ) + while ( cnt < ielen ) { 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; int ssid_index = 0; - while(len >= 1) { + while (len >= 1) { section = *(pos++); len-=1; 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); plist = get_next(phead); - while(1) + while (1) { if (rtw_end_of_queue_search(phead,plist)== true) break; @@ -3099,7 +3099,7 @@ static int rtw_get_ap_info(struct net_device *dev, 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); cnt++; @@ -3129,7 +3129,7 @@ static int rtw_get_ap_info(struct net_device *dev, phead = get_list_head(queue); plist = get_next(phead); - while(1) + while (1) { if (rtw_end_of_queue_search(phead,plist)== true) break; @@ -4197,7 +4197,7 @@ static int rtw_p2p_connect(struct net_device *dev, phead = get_list_head(queue); plist = get_next(phead); - while(1) + while (1) { if (rtw_end_of_queue_search(phead,plist)== true) break; @@ -4312,7 +4312,7 @@ static int rtw_p2p_invite_req(struct net_device *dev, phead = get_list_head(queue); plist = get_next(phead); - while(1) + while (1) { if (rtw_end_of_queue_search(phead,plist)== true) break; @@ -4604,7 +4604,7 @@ static int rtw_p2p_set_pc(struct net_device *dev, phead = get_list_head(queue); plist = get_next(phead); - while(1) + while (1) { if (rtw_end_of_queue_search(phead,plist)== true) break; @@ -4937,7 +4937,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev, phead = get_list_head(queue); plist = get_next(phead); - while(1) + while (1) { if (rtw_end_of_queue_search(phead,plist)== true) break; @@ -9606,7 +9606,7 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_ /* Search the correct ioctl */ 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 (k == num_priv_args) { diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 11b4d2c..19d0d30 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -920,7 +920,7 @@ static int readFile(struct file *fp,char *buf,int len) if (!fp->f_op || !fp->f_op->read) return -EPERM; - while(sumf_op->read(fp,(char __user *)buf+sum,len-sum, &fp->f_pos); if (rlen>0) sum+=rlen; @@ -941,7 +941,7 @@ static int writeFile(struct file *fp,char *buf,int len) if (!fp->f_op || !fp->f_op->write) return -EPERM; - while(sumf_op->write(fp,(char __user *)buf+sum,len-sum, &fp->f_pos); if (wlen>0) sum+=wlen;