From 9ee6ae40c328ae546c3278173164775015b2d2dd Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 15 Aug 2015 13:06:32 -0500 Subject: [PATCH] rtl8188eu: Change "for(" to "for (" Signed-off-by: Larry Finger --- core/rtw_ap.c | 6 +-- core/rtw_br_ext.c | 2 +- core/rtw_debug.c | 30 +++++++------- core/rtw_efuse.c | 6 +-- core/rtw_ieee80211.c | 6 +-- core/rtw_ioctl_set.c | 2 +- core/rtw_iol.c | 2 +- core/rtw_mlme.c | 8 ++-- core/rtw_mlme_ext.c | 28 ++++++------- core/rtw_p2p.c | 16 ++++---- core/rtw_recv.c | 18 ++++----- core/rtw_security.c | 22 +++++------ core/rtw_sta_mgt.c | 14 +++---- core/rtw_wlan_util.c | 18 ++++----- core/rtw_xmit.c | 32 +++++++-------- hal/Hal8188ERateAdaptive.c | 6 +-- hal/HalPhyRf.c | 4 +- hal/HalPhyRf_8188e.c | 80 +++++++++++++++++++------------------- hal/hal_com.c | 2 +- hal/odm.c | 18 ++++----- hal/odm_HWConfig.c | 6 +-- hal/odm_RTL8188E.c | 2 +- hal/odm_debug.h | 2 +- hal/rtl8188e_cmd.c | 6 +-- hal/rtl8188e_dm.c | 2 +- hal/rtl8188e_hal_init.c | 56 +++++++++++++------------- hal/rtl8188e_phycfg.c | 12 +++--- hal/rtl8188e_rf6052.c | 26 ++++++------- hal/rtl8188eu_recv.c | 6 +-- hal/rtl8188eu_xmit.c | 2 +- hal/usb_halinit.c | 24 ++++++------ os_dep/ioctl_cfg80211.c | 16 ++++---- os_dep/ioctl_linux.c | 46 +++++++++++----------- os_dep/mlme_linux.c | 2 +- os_dep/os_intfs.c | 4 +- os_dep/osdep_service.c | 12 +++--- os_dep/recv_linux.c | 2 +- os_dep/rtw_android.c | 4 +- os_dep/usb_intf.c | 2 +- os_dep/xmit_linux.c | 4 +- 40 files changed, 278 insertions(+), 278 deletions(-) diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 45a6520..5ce562d 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -1375,7 +1375,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) spin_lock_bh(&(pacl_node_q->lock)); - for(i=0; i< NUM_ACL; i++) + for (i=0; i< NUM_ACL; i++) { paclnode = &pacl_list->aclnode[i]; @@ -2300,7 +2300,7 @@ void start_ap_mode(struct adapter *padapter) pmlmepriv->ht_op_mode = 0; - for(i=0; ista_aid[i] = NULL; pmlmepriv->wps_beacon_ie = NULL; @@ -2315,7 +2315,7 @@ void start_ap_mode(struct adapter *padapter) _rtw_init_listhead(&(pacl_list->acl_node_q.queue)); pacl_list->num = 0; pacl_list->mode = 0; - for(i = 0; i < NUM_ACL; i++) + for (i = 0; i < NUM_ACL; i++) { _rtw_init_listhead(&pacl_list->aclnode[i].list); pacl_list->aclnode[i].valid = false; diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c index 637a5f5..2f58a42 100644 --- a/core/rtw_br_ext.c +++ b/core/rtw_br_ext.c @@ -540,7 +540,7 @@ void nat25_db_cleanup(struct adapter *priv) unsigned long irqL; spin_lock_bh(&priv->br_ext_lock); - for(i=0; inethash[i]; diff --git a/core/rtw_debug.c b/core/rtw_debug.c index f03d351..ae5c15a 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -305,7 +305,7 @@ int proc_get_ap_info(char *page, char **start, len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable); len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap); - for(i=0;i<16;i++) + for (i=0;i<16;i++) { preorder_ctrl = &psta->recvreorder_ctrl[i]; if (preorder_ctrl->enable) @@ -360,7 +360,7 @@ int proc_get_trx_info(char *page, char **start, pxmitpriv->free_xmit_extbuf_cnt, pxmitpriv->free_xframe_ext_cnt, precvpriv->free_recvframe_cnt); - for(i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { phwxmit = pxmitpriv->hwxmits + i; len += snprintf(page + len, count - len, "%d, hwq.accnt=%d\n", i, phwxmit->accnt); @@ -383,7 +383,7 @@ int proc_get_mac_reg_dump1(char *page, char **start, len += snprintf(page + len, count - len, "\n======= MAC REG =======\n"); - for(i=0x0;i<0x300;i+=4) + for (i=0x0;i<0x300;i+=4) { if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i); len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i)); @@ -406,7 +406,7 @@ int proc_get_mac_reg_dump2(char *page, char **start, len += snprintf(page + len, count - len, "\n======= MAC REG =======\n"); memset(page, 0, count); - for(i=0x300;i<0x600;i+=4) + for (i=0x300;i<0x600;i+=4) { if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i); len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i)); @@ -429,7 +429,7 @@ int proc_get_mac_reg_dump3(char *page, char **start, len += snprintf(page + len, count - len, "\n======= MAC REG =======\n"); - for(i=0x600;i<0x800;i+=4) + for (i=0x600;i<0x800;i+=4) { if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i); len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i)); @@ -451,7 +451,7 @@ int proc_get_bb_reg_dump1(char *page, char **start, int i,j=1; len += snprintf(page + len, count - len, "\n======= BB REG =======\n"); - for(i=0x800;i<0xB00;i+=4) + for (i=0x800;i<0xB00;i+=4) { if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i); len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i)); @@ -471,7 +471,7 @@ int proc_get_bb_reg_dump2(char *page, char **start, int i,j=1; len += snprintf(page + len, count - len, "\n======= BB REG =======\n"); - for(i=0xB00;i<0xE00;i+=4) + for (i=0xB00;i<0xE00;i+=4) { if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i); len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i)); @@ -491,7 +491,7 @@ int proc_get_bb_reg_dump3(char *page, char **start, int i,j=1; len += snprintf(page + len, count - len, "\n======= BB REG =======\n"); - for(i=0xE00;i<0x1000;i+=4) + for (i=0xE00;i<0x1000;i+=4) { if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i); len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i)); @@ -514,7 +514,7 @@ int proc_get_rf_reg_dump1(char *page, char **start, len += snprintf(page + len, count - len, "\n======= RF REG =======\n"); path = 1; len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path); - for(i=0;i<0xC0;i++) + for (i=0;i<0xC0;i++) { /* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord); */ value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff); @@ -541,7 +541,7 @@ int proc_get_rf_reg_dump2(char *page, char **start, len += snprintf(page + len, count - len, "\n======= RF REG =======\n"); path = 1; len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path); - for(i=0xC0;i<0x100;i++) + for (i=0xC0;i<0x100;i++) { /* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord); */ value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff); @@ -567,7 +567,7 @@ int proc_get_rf_reg_dump3(char *page, char **start, len += snprintf(page + len, count - len, "\n======= RF REG =======\n"); path = 2; len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path); - for(i=0;i<0xC0;i++) + for (i=0;i<0xC0;i++) { /* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord); */ value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff); @@ -594,7 +594,7 @@ int proc_get_rf_reg_dump4(char *page, char **start, len += snprintf(page + len, count - len, "\n======= RF REG =======\n"); path = 2; len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path); - for(i=0xC0;i<0x100;i++) + for (i=0xC0;i<0x100;i++) { /* value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord); */ value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff); @@ -951,7 +951,7 @@ int proc_get_all_sta_info(char *page, char **start, spin_lock_bh(&pstapriv->sta_hash_lock); - for(i=0; i< NUM_STA; i++) + for (i=0; i< NUM_STA; i++) { phead = &(pstapriv->sta_hash[i]); plist = get_next(phead); @@ -980,7 +980,7 @@ int proc_get_all_sta_info(char *page, char **start, len += snprintf(page + len, count - len, "qos_info=0x%x\n", psta->qos_info); len += snprintf(page + len, count - len, "dot118021XPrivacy=0x%x\n", psta->dot118021XPrivacy); - for(j=0;j<16;j++) + for (j=0;j<16;j++) { preorder_ctrl = &psta->recvreorder_ctrl[j]; if (preorder_ctrl->enable) @@ -1077,7 +1077,7 @@ int proc_set_best_channel(struct file *file, const char __user *buffer, if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) { int i; - for(i = 0; pmlmeext->channel_set[i].ChannelNum != 0; i++) + for (i = 0; pmlmeext->channel_set[i].ChannelNum != 0; i++) { pmlmeext->channel_set[i].rx_count = 0; } diff --git a/core/rtw_efuse.c b/core/rtw_efuse.c index c9cd80c..61aee28 100644 --- a/core/rtw_efuse.c +++ b/core/rtw_efuse.c @@ -772,7 +772,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) DBG_871X("offset=%x\n",offset); DBG_871X("word_en=%x\n",word_en); - for(i=0;iSsidLength; i++) + for (i = 0; i < ssid->SsidLength; i++) { /* wifi, printable ascii code must be supported */ if (!( (ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e) )){ diff --git a/core/rtw_iol.c b/core/rtw_iol.c index ba508fa..253637e 100644 --- a/core/rtw_iol.c +++ b/core/rtw_iol.c @@ -236,7 +236,7 @@ void rtw_IOL_cmd_buf_dump(struct adapter *Adapter,int buf_len,u8 *pbuf) int j=1; printk("###### %s ######\n",__FUNCTION__); - for(i=0;i< buf_len;i++){ + for (i=0;i< buf_len;i++){ printk("%02x-",*(pbuf+i)); if (j%32 ==0) printk("\n");j++; diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 217c3e0..bfc5385 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -77,7 +77,7 @@ sint _rtw_init_mlme_priv (struct adapter* padapter) pnetwork = (struct wlan_network *)pbuf; - for(i = 0; i < MAX_BSS_CNT; i++) + for (i = 0; i < MAX_BSS_CNT; i++) { _rtw_init_listhead(&(pnetwork->list)); @@ -1443,7 +1443,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str /* for A-MPDU Rx reordering buffer control for bmc_sta & sta_info */ /* if A-MPDU Rx is enabled, reseting rx_ordering_ctrl wstart_b(indicate_seq) to default value=0xffff */ /* todo: check if AP can send A-MPDU packets */ - for(i=0; i < 16 ; i++) + for (i=0; i < 16 ; i++) { /* preorder_ctrl = &precvpriv->recvreorder_ctrl[i]; */ preorder_ctrl = &psta->recvreorder_ctrl[i]; @@ -1461,7 +1461,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str bmc_sta = rtw_get_bcmc_stainfo(padapter); if (bmc_sta) { - for(i=0; i < 16 ; i++) + for (i=0; i < 16 ; i++) { /* preorder_ctrl = &precvpriv->recvreorder_ctrl[i]; */ preorder_ctrl = &bmc_sta->recvreorder_ctrl[i]; @@ -2648,7 +2648,7 @@ sint rtw_restruct_sec_ie(struct adapter *adapter,u8 *in_ie, u8 *out_ie, uint in_ { int jj; printk("supplicant_ie_length=%d &&&&&&&&&&&&&&&&&&&\n", psecuritypriv->supplicant_ie[1]+2); - for(jj=0; jj < psecuritypriv->supplicant_ie[1]+2; jj++) + for (jj=0; jj < psecuritypriv->supplicant_ie[1]+2; jj++) printk(" %02x ", psecuritypriv->supplicant_ie[jj]); printk("\n"); }*/ diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 81f35b9..5677b1b 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -222,7 +222,7 @@ static struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03,0x int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch) { int i; - for(i=0;ch_set[i].ChannelNum!=0;i++){ + for (i=0;ch_set[i].ChannelNum!=0;i++){ if (ch == ch_set[i].ChannelNum) break; } @@ -406,7 +406,7 @@ static u8 init_channel_set(struct adapter* padapter, u8 ChannelPlan, struct rt_c if (b2_4GBand) { - for(index=0;indexmax_chan_nums; i++ ) + for ( i = 0; i < pmlmeext->max_chan_nums; i++ ) { if ( pmlmeext->channel_set[ i ].ChannelNum <= 14 ) { @@ -4095,7 +4095,7 @@ static u8 is_matched_in_profilelist( u8* peermacaddr, struct profile_info* profi DBG_871X( "[%s] peermac = %.2X %.2X %.2X %.2X %.2X %.2X\n", __FUNCTION__, peermacaddr[0], peermacaddr[1],peermacaddr[2],peermacaddr[3],peermacaddr[4],peermacaddr[5]); - for( i = 0; i < P2P_MAX_PERSISTENT_GROUP_NUM; i++, profileinfo++ ) + for ( i = 0; i < P2P_MAX_PERSISTENT_GROUP_NUM; i++, profileinfo++ ) { DBG_871X( "[%s] profileinfo_mac = %.2X %.2X %.2X %.2X %.2X %.2X\n", __FUNCTION__, profileinfo->peermac[0], profileinfo->peermac[1],profileinfo->peermac[2],profileinfo->peermac[3],profileinfo->peermac[4],profileinfo->peermac[5]); @@ -5344,7 +5344,7 @@ unsigned int OnAction_sa_query(struct adapter *padapter, union recv_frame *precv { int pp; printk("pattrib->pktlen = %d =>", pattrib->pkt_len); - for(pp=0;pp< pattrib->pkt_len; pp++) + for (pp=0;pp< pattrib->pkt_len; pp++) printk(" %02x ", pframe[pp]); printk("\n"); } @@ -5435,7 +5435,7 @@ unsigned int OnAction(struct adapter *padapter, union recv_frame *precv_frame) category = frame_body[0]; - for(i = 0; i < sizeof(OnAction_tbl)/sizeof(struct action_handler); i++) + for (i = 0; i < sizeof(OnAction_tbl)/sizeof(struct action_handler); i++) { ptable = &OnAction_tbl[i]; @@ -7863,7 +7863,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter) spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); - for(i= 0;i<8;i++) + for (i= 0;i<8;i++) { if (ICS[i][0] == 1) { @@ -7873,7 +7873,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter) /* SET_BSS_INTOLERANT_ELE_REG_CLASS(InfoContent,i); */ k++; - for(j=1;j<=14;j++) + for (j=1;j<=14;j++) { if (ICS[i][j]==1) { @@ -7915,7 +7915,7 @@ unsigned int send_delba(struct adapter *padapter, u8 initiator, u8 *addr) if (initiator==0) /* recipient */ { - for(tid = 0;tidrecvreorder_ctrl[tid].enable == true) { @@ -7934,7 +7934,7 @@ unsigned int send_delba(struct adapter *padapter, u8 initiator, u8 *addr) else if (initiator == 1)/* originator */ { /* DBG_871X("tx agg_enable_bitmap(0x%08x)\n", psta->htpriv.agg_enable_bitmap); */ - for(tid = 0;tidhtpriv.agg_enable_bitmap & BIT(tid)) { @@ -8009,7 +8009,7 @@ bool IsLegal5GChannel( 60,62,64,100,102,104,106,108,110,112,114,116,118,120,122, 124,126,128,130,132,134,136,138,140,149,151,153,155,157,159, 161,163,165}; - for(i=0;isitesurvey_res.ssid[i].SsidLength) { /* todo: to issue two probe req??? */ issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL); @@ -10160,7 +10160,7 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf) pmlmeext->sitesurvey_res.bss_cnt = 0; pmlmeext->sitesurvey_res.channel_idx = 0; - for(i=0;issid[i].SsidLength) { memcpy(pmlmeext->sitesurvey_res.ssid[i].Ssid, pparm->ssid[i].Ssid, IW_ESSID_MAX_SIZE); pmlmeext->sitesurvey_res.ssid[i].SsidLength= pparm->ssid[i].SsidLength; diff --git a/core/rtw_p2p.c b/core/rtw_p2p.c index 90fdced..4484e58 100644 --- a/core/rtw_p2p.c +++ b/core/rtw_p2p.c @@ -29,7 +29,7 @@ static int rtw_p2p_is_channel_list_ok( u8 desired_ch, u8* ch_list, u8 ch_cnt ) { int found = 0, i = 0; - for( i = 0; i < ch_cnt; i++ ) + for ( i = 0; i < ch_cnt; i++ ) { if ( ch_list[ i ] == desired_ch ) { @@ -2174,7 +2174,7 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l { int i, g_rate =0; - for( i = 0; i < rate_cnt; i++ ) + for ( i = 0; i < rate_cnt; i++ ) { if ( ( ( *( p + 2 + i ) & 0xff ) != 0x02 ) && ( ( *( p + 2 + i ) & 0xff ) != 0x04 ) && @@ -2525,7 +2525,7 @@ static u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_conte ch_content += 1; ch_cnt -= 1; temp = *ch_content; - for( i = 0 ; i < temp ; i++, j++ ) + for ( i = 0 ; i < temp ; i++, j++ ) { peer_ch_list[j] = *( ch_content + 1 + i ); } @@ -2541,7 +2541,7 @@ static u8 rtw_p2p_check_peer_oper_ch(struct mlme_ext_priv *pmlmeext, u8 ch) { u8 i = 0; - for( i = 0; i < pmlmeext->max_chan_nums; i++ ) + for ( i = 0; i < pmlmeext->max_chan_nums; i++ ) { if ( pmlmeext->channel_set[ i ].ChannelNum == ch ) { @@ -2557,9 +2557,9 @@ static u8 rtw_p2p_ch_inclusion(struct mlme_ext_priv *pmlmeext, u8 *peer_ch_list, int i = 0, j = 0, temp = 0; u8 ch_no = 0; - for( i = 0; i < peer_ch_num; i++ ) + for ( i = 0; i < peer_ch_num; i++ ) { - for( j = temp; j < pmlmeext->max_chan_nums; j++ ) + for ( j = temp; j < pmlmeext->max_chan_nums; j++ ) { if ( *( peer_ch_list + i ) == pmlmeext->channel_set[ j ].ChannelNum ) { @@ -3311,7 +3311,7 @@ static void rtw_change_p2pie_ch_list(struct adapter *padapter, const u8 *frame_b while (attr_contentlen>0) { num_of_ch = *(pattr_temp+1); - for(i=0; i0) { num_of_ch = *(pattr_temp+1); - for(i=0; iprecv_frame_buf; - for(i=0; i < NR_RECVFRAME ; i++) + for (i=0; i < NR_RECVFRAME ; i++) { _rtw_init_listhead(&(precvframe->u.list)); @@ -436,7 +436,7 @@ sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe){ bmic_err=false; - for(i=0;i<8;i++){ + for (i=0;i<8;i++){ if (miccode[i] != *(pframemic+i)){ RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("recvframe_chkmic:miccode[%d](%02x) != *(pframemic+%d)(%02x) ",i,miccode[i],i,*(pframemic+i))); bmic_err=true; @@ -454,7 +454,7 @@ sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe){ { uint i; RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("\n ======demp packet (len=%d)======\n",precvframe->u.hdr.len)); - for(i=0;iu.hdr.len;i=i+8){ + for (i=0;iu.hdr.len;i=i+8){ RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x", *(precvframe->u.hdr.rx_data+i),*(precvframe->u.hdr.rx_data+i+1), *(precvframe->u.hdr.rx_data+i+2),*(precvframe->u.hdr.rx_data+i+3), @@ -1656,7 +1656,7 @@ static sint validate_80211w_mgmt(struct adapter *adapter, union recv_frame *prec { int pp; printk("pattrib->pktlen = %d =>", pattrib->pkt_len); - for(pp=0;pp< pattrib->pkt_len; pp++) + for (pp=0;pp< pattrib->pkt_len; pp++) printk(" %02x ", ptr[pp]); printk("\n"); }*/ @@ -1673,7 +1673,7 @@ static sint validate_80211w_mgmt(struct adapter *adapter, union recv_frame *prec { int pp; printk("after decryption pattrib->pktlen = %d @@=>", pattrib->pkt_len); - for(pp=0;pp< pattrib->pkt_len; pp++) + for (pp=0;pp< pattrib->pkt_len; pp++) printk(" %02x ", ptr[pp]); printk("\n"); }*/ @@ -1786,7 +1786,7 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame) int i; DBG_871X("#############################\n"); - for(i=0; i<64;i=i+8) + for (i=0; i<64;i=i+8) DBG_871X("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n", *(ptr+i), *(ptr+i+1), *(ptr+i+2) ,*(ptr+i+3) ,*(ptr+i+4),*(ptr+i+5), *(ptr+i+6), *(ptr+i+7)); DBG_871X("#############################\n"); @@ -1796,7 +1796,7 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame) int i; DBG_871X("#############################\n"); - for(i=0; i<64;i=i+8) + for (i=0; i<64;i=i+8) DBG_871X("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n", *(ptr+i), *(ptr+i+1), *(ptr+i+2) ,*(ptr+i+3) ,*(ptr+i+4),*(ptr+i+5), *(ptr+i+6), *(ptr+i+7)); DBG_871X("#############################\n"); @@ -1807,7 +1807,7 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame) int i; DBG_871X("#############################\n"); - for(i=0; i<64;i=i+8) + for (i=0; i<64;i=i+8) DBG_871X("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n", *(ptr+i), *(ptr+i+1), *(ptr+i+2) ,*(ptr+i+3) ,*(ptr+i+4),*(ptr+i+5), *(ptr+i+6), *(ptr+i+7)); DBG_871X("#############################\n"); @@ -2253,7 +2253,7 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe) } } - for(i=0; idot11DefKeylen[psecuritypriv->dot11PrivacyKeyIndex]; - for(curfragnum=0;curfragnumnr_frags;curfragnum++) + for (curfragnum=0;curfragnumnr_frags;curfragnum++) { iv=pframe+pattrib->hdrlen; memcpy(&wepkey[0], iv, 3); @@ -282,7 +282,7 @@ static u32 secmicgetuint32( u8 * p ) s32 i; u32 res = 0; ; - for( i=0; i<4; i++ ) + for ( i=0; i<4; i++ ) { res |= ((u32)(*p++)) << (8*i); } @@ -295,7 +295,7 @@ static void secmicputuint32( u8 * p, u32 val ) { long i; ; - for( i=0; i<4; i++ ) + for ( i=0; i<4; i++ ) { *p++ = (u8) (val & 0xff); val >>= 8; @@ -687,7 +687,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe) prwskeylen=16; - for(curfragnum=0;curfragnumnr_frags;curfragnum++){ + for (curfragnum=0;curfragnumnr_frags;curfragnum++){ iv=pframe+pattrib->hdrlen; payload=pframe+pattrib->iv_len+pattrib->hdrlen; @@ -1117,7 +1117,7 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext) u8 intermediateb[16]; u8 round_key[16]; ; - for(i=0; i<16; i++) round_key[i] = key[i]; + for (i=0; i<16; i++) round_key[i] = key[i]; for (round = 0; round < 11; round++) { @@ -1574,7 +1574,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) prwskey=&stainfo->dot118021x_UncstKey.skey[0]; prwskeylen=16; - for(curfragnum=0;curfragnumnr_frags;curfragnum++){ + for (curfragnum=0;curfragnumnr_frags;curfragnum++){ if ((curfragnum+1)==pattrib->nr_frags){ /* 4 the last fragment */ length=pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len- pattrib->icv_len; @@ -1848,7 +1848,7 @@ static sint aes_decipher(u8 *key, uint hdrlen, for (j=0; j<8;j++) message[payload_index++] = chain_buffer[j]; /* compare the mic */ - for(i=0;i<8;i++){ + for (i=0;i<8;i++){ if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) { RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("aes_decipher:mic check error mic[%d]: pframe(%x) != message(%x)\n", @@ -2008,17 +2008,17 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe) { int pp; DBG_871X("pkt: "); - for(pp=0;pp< pattrib->pkt_len; pp++) + for (pp=0;pp< pattrib->pkt_len; pp++) printk(" %02x ", pframe[pp]); DBG_871X("\n"); /* BIP AAD + management frame body + MME(MIC is zero) */ DBG_871X("AAD+PKT: "); - for(pp=0;pp< ori_len; pp++) + for (pp=0;pp< ori_len; pp++) DBG_871X(" %02x ", BIP_AAD[pp]); DBG_871X("\n"); /* show the MIC result */ DBG_871X("mic: "); - for(pp=0;pp<16; pp++) + for (pp=0;pp<16; pp++) DBG_871X(" %02x ", mic[pp]); DBG_871X("\n"); } @@ -2769,7 +2769,7 @@ void rtw_sec_restore_wep_key(struct adapter *adapter) sint keyid; if ((_WEP40_ == securitypriv->dot11PrivacyAlgrthm) ||(_WEP104_ == securitypriv->dot11PrivacyAlgrthm)) { - for(keyid=0;keyid<4;keyid++){ + for (keyid=0;keyid<4;keyid++){ if (securitypriv->key_mask & BIT(keyid)){ if (keyid == securitypriv->dot11PrivacyKeyIndex) rtw_set_key(adapter,securitypriv, keyid, 1, true); diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 43d8122..8382ae1 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -112,7 +112,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) psta = (struct sta_info *)(pstapriv->pstainfo_buf); - for(i = 0; i < NUM_STA; i++) { + for (i = 0; i < NUM_STA; i++) { _rtw_init_stainfo(psta); _rtw_init_listhead(&(pstapriv->sta_hash[i])); @@ -210,7 +210,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) if (pstapriv){ /* delete all reordering_ctrl_timer */ spin_lock_bh(&pstapriv->sta_hash_lock); - for(index = 0; index < NUM_STA; index++) + for (index = 0; index < NUM_STA; index++) { phead = &(pstapriv->sta_hash[index]); plist = get_next(phead); @@ -221,7 +221,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) psta = LIST_CONTAINOR(plist, struct sta_info ,hash_list); plist = get_next(plist); - for(i=0; i < 16 ; i++) + for (i=0; i < 16 ; i++) { preorder_ctrl = &psta->recvreorder_ctrl[i]; _cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer); @@ -294,7 +294,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) /* In this case, this packet will be dropped by recv_decache function if we use the 0x00 as the default value for tid_rxseq variable. */ /* So, we initialize the tid_rxseq variable as the 0xffff. */ - for( i = 0; i < 16; i++ ) + for ( i = 0; i < 16; i++ ) memcpy( &psta->sta_recvpriv.rxcache.tid_rxseq[ i ], &wRxSeqInitialValue, 2 ); RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_info_,("alloc number_%d stainfo with hwaddr = %x %x %x %x %x %x \n", @@ -303,7 +303,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) init_addba_retry_timer(pstapriv->padapter, psta); /* for A-MPDU Rx reordering buffer control */ - for(i=0; i < 16 ; i++) { + for (i=0; i < 16 ; i++) { preorder_ctrl = &psta->recvreorder_ctrl[i]; preorder_ctrl->padapter = pstapriv->padapter; @@ -414,7 +414,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta) _cancel_timer_ex(&psta->addba_retry_timer); /* for A-MPDU Rx reordering buffer control, cancel reordering_ctrl_timer */ - for(i=0; i < 16 ; i++) + for (i=0; i < 16 ; i++) { unsigned long irqL; struct list_head *phead, *plist; @@ -510,7 +510,7 @@ void rtw_free_all_stainfo(struct adapter *padapter) spin_lock_bh(&pstapriv->sta_hash_lock); - for(index=0; index< NUM_STA; index++) + for (index=0; index< NUM_STA; index++) { phead = &(pstapriv->sta_hash[index]); plist = get_next(phead); diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 20df010..ba7c2f0 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -73,7 +73,7 @@ int cckrates_included(unsigned char *rate, int ratelen) { int i; - for(i = 0; i < ratelen; i++) + for (i = 0; i < ratelen; i++) { if ( (((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) || (((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22) ) @@ -86,7 +86,7 @@ int cckratesonly_included(unsigned char *rate, int ratelen) { int i; - for(i = 0; i < ratelen; i++) + for (i = 0; i < ratelen; i++) { if ( (((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) && (((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22) ) @@ -240,7 +240,7 @@ int is_basicrate(struct adapter *padapter, unsigned char rate) unsigned char val; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - for(i = 0; i < NumRates; i++) + for (i = 0; i < NumRates; i++) { val = pmlmeext->basicrate[i]; @@ -310,7 +310,7 @@ void UpdateBrateTbl( u8 rate; /* 1M, 2M, 5.5M, 11M, 6M, 12M, 24M are mandatory. */ - for(i=0;ivo, 1->vi, 2->be, 3->bk. */ - for(i=0; i<4; i++) + for (i=0; i<4; i++) { - for(j=i+1; j<4; j++) + for (j=i+1; j<4; j++) { /* compare CW and AIFS */ if ((edca[j] & 0xFFFF) < (edca[i] & 0xFFFF)) @@ -867,7 +867,7 @@ void WMMOnAssocRsp(struct adapter *padapter) } } - for(i=0; i<4; i++) { + for (i=0; i<4; i++) { pxmitpriv->wmm_para_seq[i] = inx[i]; DBG_871X("wmm_para_seq(%d): %d\n", i, pxmitpriv->wmm_para_seq[i]); } @@ -1670,7 +1670,7 @@ unsigned char get_highest_rate_idx(u32 mask) int i; unsigned char rate_idx=0; - for(i=27; i>=0; i--) + for (i=27; i>=0; i--) { if (mask & BIT(i)) { diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index d6ac5ed..7295ff1 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -52,7 +52,7 @@ void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv) spin_lock_init(&psta_xmitpriv->lock); - /* for(i = 0 ; i < MAX_NUMBLKS; i++) */ + /* for (i = 0 ; i < MAX_NUMBLKS; i++) */ /* _init_txservq(&(psta_xmitpriv->blk_q[i])); */ _init_txservq(&psta_xmitpriv->be_q); @@ -91,7 +91,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitpriv->adapter = padapter; - /* for(i = 0 ; i < MAX_NUMBLKS; i++) */ + /* for (i = 0 ; i < MAX_NUMBLKS; i++) */ /* _rtw_init_queue(&pxmitpriv->blk_strms[i]); */ _rtw_init_queue(&pxmitpriv->be_pending); @@ -332,14 +332,14 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv) if (pxmitpriv->pxmit_frame_buf==NULL) goto out; - for(i=0; ipxmit_extbuf; - for(i=0; inr_frags;curfragnum++){ + for (curfragnum=0;curfragnumnr_frags;curfragnum++){ payload=(u8 *)RND4((SIZE_PTR)(payload)); RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("===curfragnum=%d, pframe= 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x,!!!\n", curfragnum,*payload, *(payload+1),*(payload+2),*(payload+3),*(payload+4),*(payload+5),*(payload+6),*(payload+7))); @@ -952,7 +952,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("\n ========last pkt========\n")); payload=payload-pattrib->last_txcmdsz+8; - for(curfragnum=0;curfragnumlast_txcmdsz;curfragnum=curfragnum+8) + for (curfragnum=0;curfragnumlast_txcmdsz;curfragnum=curfragnum+8) RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,(" %.2x, %.2x, %.2x, %.2x, %.2x, %.2x, %.2x, %.2x ", *(payload+curfragnum), *(payload+curfragnum+1), *(payload+curfragnum+2),*(payload+curfragnum+3), *(payload+curfragnum+4),*(payload+curfragnum+5),*(payload+curfragnum+6),*(payload+curfragnum+7))); @@ -1546,7 +1546,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s { int i; printk("Total packet: "); - for(i=0; i < BIP_AAD_SIZE+frame_body_len; i++) + for (i=0; i < BIP_AAD_SIZE+frame_body_len; i++) printk(" %02x ", BIP_AAD[i]); printk("\n"); }*/ @@ -1559,7 +1559,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s { int i; printk("Calculated mic result: "); - for(i=0; i<16; i++) + for (i=0; i<16; i++) printk(" %02x ", mic[i]); printk("\n"); }*/ @@ -1569,7 +1569,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s { int pp; printk("pattrib->pktlen = %d\n", pattrib->pktlen); - for(pp=0;pp< pattrib->pktlen; pp++) + for (pp=0;pp< pattrib->pktlen; pp++) printk(" %02x ", mem_start[pp]); printk("\n"); }*/ @@ -1613,7 +1613,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s { int i; printk("Management pkt: "); - for(i=0; ipktlen; i++) + for (i=0; ipktlen; i++) printk(" %02x ", pframe[i]); printk("=======\n"); }*/ @@ -1650,7 +1650,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s { int i; printk("Management pkt + IV: "); - /* for(i=0; ipktlen; i++) */ + /* for (i=0; ipktlen; i++) */ /* printk(" %02x ", mem_start[i]); */ printk("@@@@@@@@@@@@@\n"); }*/ @@ -1670,7 +1670,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s { int i; printk("prepare to enc Management pkt + IV: "); - for(i=0; ipktlen; i++) + for (i=0; ipktlen; i++) printk(" %02x ", mem_start[i]); printk("@@@@@@@@@@@@@\n"); }*/ @@ -2223,13 +2223,13 @@ struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi if (pregpriv->wifi_spec==1) { int j, tmp, acirp_cnt[4]; - for(j=0; j<4; j++) + for (j=0; j<4; j++) inx[j] = pxmitpriv->wmm_para_seq[j]; } spin_lock_bh(&pxmitpriv->lock); - for(i = 0; i < entry; i++) + for (i = 0; i < entry; i++) { phwxmit = phwxmit_i + inx[i]; @@ -2439,7 +2439,7 @@ void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry) { sint i; ; - for(i = 0; i < entry; i++, phwxmit++) + for (i = 0; i < entry; i++, phwxmit++) { /* spin_lock_init(&phwxmit->xmit_lock); */ /* _rtw_init_listhead(&phwxmit->pending); */ diff --git a/hal/Hal8188ERateAdaptive.c b/hal/Hal8188ERateAdaptive.c index fdd0fa7..7695b3f 100644 --- a/hal/Hal8188ERateAdaptive.c +++ b/hal/Hal8188ERateAdaptive.c @@ -112,7 +112,7 @@ odm_SetTxRPTTiming_8188E( { u8 idx = 0; - for(idx=0; idx<5; idx++) + for (idx=0; idx<5; idx++) if (DynamicTxRPTTiming[idx] == pRaInfo->RptTime) break; @@ -551,7 +551,7 @@ odm_PTDecision_8188E( stage_BUF=pRaInfo->PTStage; numsc = 0; num_total= pRaInfo->TOTAL* PT_PENALTY[5]; - for(j=0;j<=4;j++) + for (j=0;j<=4;j++) { numsc += pRaInfo->RTY[j] * PT_PENALTY[j]; if (numsc>num_total) @@ -689,7 +689,7 @@ ODM_RAInfo_Init_all( ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ("=====>\n")); pDM_Odm->CurrminRptTime = 0; - for(MacID=0; MacIDRFCalibrateInfo.IQKMatrixRegSetting)/sizeof(IQK_MATRIX_REGS_SETTING)), IQK_Matrix_Settings_NUM)); /* 0xe94, 0xe9c, 0xea4, 0xeac, 0xeb4, 0xebc, 0xec4, 0xecc */ - for(i = 0; i < IQK_Matrix_Settings_NUM; i++) + for (i = 0; i < IQK_Matrix_Settings_NUM; i++) { { pDM_Odm->RFCalibrateInfo.IQKMatrixRegSetting[i].Value[0][0] = @@ -65,7 +65,7 @@ u8 ODM_GetRightChnlPlaceforIQK(u8 chnl) if (chnl > 14) { - for(place = 14; placeRFCalibrateInfo.ThermalValue_AVG_index == AVG_THERMAL_NUM_88E) pDM_Odm->RFCalibrateInfo.ThermalValue_AVG_index = 0; - for(i = 0; i < AVG_THERMAL_NUM_88E; i++) + for (i = 0; i < AVG_THERMAL_NUM_88E; i++) { if (pDM_Odm->RFCalibrateInfo.ThermalValue_AVG[i]) { @@ -459,7 +459,7 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E( else pDM_Odm->RFCalibrateInfo.PowerIndexOffset = pDM_Odm->RFCalibrateInfo.DeltaPowerIndex - pDM_Odm->RFCalibrateInfo.DeltaPowerIndexLast; - for(i = 0; i < rf; i++) + for (i = 0; i < rf; i++) pDM_Odm->RFCalibrateInfo.OFDM_index[i] = pDM_Odm->BbSwingIdxOfdmBase + pDM_Odm->RFCalibrateInfo.PowerIndexOffset; pDM_Odm->RFCalibrateInfo.CCK_index = pDM_Odm->BbSwingIdxCckBase + pDM_Odm->RFCalibrateInfo.PowerIndexOffset; @@ -472,7 +472,7 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E( /* 4 7.1 Handle boundary conditions of index. */ - for(i = 0; i < rf; i++) { + for (i = 0; i < rf; i++) { if (pDM_Odm->RFCalibrateInfo.OFDM_index[i] > OFDM_TABLE_SIZE_92D-1) { pDM_Odm->RFCalibrateInfo.OFDM_index[i] = OFDM_TABLE_SIZE_92D-1; @@ -942,7 +942,7 @@ _PHY_SaveADDARegisters( if (ODM_CheckPowerStatus(pAdapter) == false) return; ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Save ADDA parameters.\n")); - for( i = 0 ; i < RegisterNum ; i++){ + for ( i = 0 ; i < RegisterNum ; i++){ ADDABackup[i] = ODM_GetBBReg(pDM_Odm, ADDAReg[i], bMaskDWord); } } @@ -960,7 +960,7 @@ _PHY_SaveMACRegisters( PDM_ODM_T pDM_Odm = &pHalData->odmpriv; ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Save MAC parameters.\n")); - for( i = 0 ; i < (IQK_MAC_REG_NUM - 1); i++){ + for ( i = 0 ; i < (IQK_MAC_REG_NUM - 1); i++){ MACBackup[i] = ODM_Read1Byte(pDM_Odm, MACReg[i]); } MACBackup[i] = ODM_Read4Byte(pDM_Odm, MACReg[i]); @@ -981,7 +981,7 @@ _PHY_ReloadADDARegisters( PDM_ODM_T pDM_Odm = &pHalData->odmpriv; ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Reload ADDA power saving parameters !\n")); - for(i = 0 ; i < RegiesterNum; i++) + for (i = 0 ; i < RegiesterNum; i++) { ODM_SetBBReg(pDM_Odm, ADDAReg[i], bMaskDWord, ADDABackup[i]); } @@ -999,7 +999,7 @@ _PHY_ReloadMACRegisters( PDM_ODM_T pDM_Odm = &pHalData->odmpriv; ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Reload MAC parameters !\n")); - for(i = 0 ; i < (IQK_MAC_REG_NUM - 1); i++){ + for (i = 0 ; i < (IQK_MAC_REG_NUM - 1); i++){ ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)MACBackup[i]); } ODM_Write4Byte(pDM_Odm, MACReg[i], MACBackup[i]); @@ -1030,7 +1030,7 @@ _PHY_PathADDAOn( ODM_SetBBReg(pDM_Odm,ADDAReg[0], bMaskDWord, pathOn); } - for( i = 1 ; i < IQK_ADDA_REG_NUM ; i++){ + for ( i = 1 ; i < IQK_ADDA_REG_NUM ; i++){ ODM_SetBBReg(pDM_Odm,ADDAReg[i], bMaskDWord, pathOn); } @@ -1051,7 +1051,7 @@ _PHY_MACSettingCalibration( ODM_Write1Byte(pDM_Odm, MACReg[i], 0x3F); - for(i = 1 ; i < (IQK_MAC_REG_NUM - 1); i++){ + for (i = 1 ; i < (IQK_MAC_REG_NUM - 1); i++){ ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)(MACBackup[i]&(~BIT3))); } ODM_Write1Byte(pDM_Odm, MACReg[i], (u8)(MACBackup[i]&(~BIT5))); @@ -1123,7 +1123,7 @@ phy_SimularityCompare_8188E( SimularityBitMap = 0; - for( i = 0; i < bound; i++ ) + for ( i = 0; i < bound; i++ ) { /* diff = (result[c1][i] > result[c2][i]) ? (result[c1][i] - result[c2][i]) : (result[c2][i] - result[c1][i]); */ if ((i==1) || (i==3) || (i==5) || (i==7)) @@ -1168,11 +1168,11 @@ phy_SimularityCompare_8188E( if ( SimularityBitMap == 0) { - for( i = 0; i < (bound/4); i++ ) + for ( i = 0; i < (bound/4); i++ ) { if (final_candidate[i] != 0xFF) { - for( j = i*4; j < (i+1)*4-2; j++) + for ( j = i*4; j < (i+1)*4-2; j++) result[3][j] = result[final_candidate[i]][j]; bResult = false; } @@ -1184,25 +1184,25 @@ phy_SimularityCompare_8188E( if (!(SimularityBitMap & 0x03)) /* path A TX OK */ { - for(i = 0; i < 2; i++) + for (i = 0; i < 2; i++) result[3][i] = result[c1][i]; } if (!(SimularityBitMap & 0x0c)) /* path A RX OK */ { - for(i = 2; i < 4; i++) + for (i = 2; i < 4; i++) result[3][i] = result[c1][i]; } if (!(SimularityBitMap & 0x30)) /* path B TX OK */ { - for(i = 4; i < 6; i++) + for (i = 4; i < 6; i++) result[3][i] = result[c1][i]; } if (!(SimularityBitMap & 0xc0)) /* path B RX OK */ { - for(i = 6; i < 8; i++) + for (i = 6; i < 8; i++) result[3][i] = result[c1][i]; } @@ -1314,7 +1314,7 @@ else ODM_SetBBReg(pDM_Odm, rTx_IQK, bMaskDWord, 0x01007c00); ODM_SetBBReg(pDM_Odm, rRx_IQK, bMaskDWord, 0x81004800); - for(i = 0 ; i < retryCount ; i++){ + for (i = 0 ; i < retryCount ; i++){ PathAOK = phy_PathA_IQK_8188E(pAdapter, is2T); if (PathAOK == 0x01){ ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path A Tx IQK Success!!\n")); @@ -1324,7 +1324,7 @@ else } } - for(i = 0 ; i < retryCount ; i++){ + for (i = 0 ; i < retryCount ; i++){ PathAOK = phy_PathA_RxIQK(pAdapter, is2T); if (PathAOK == 0x03){ ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path A Rx IQK Success!!\n")); @@ -1346,7 +1346,7 @@ else /* Turn Path B ADDA on */ _PHY_PathADDAOn(pAdapter, ADDA_REG, false, is2T); - for(i = 0 ; i < retryCount ; i++){ + for (i = 0 ; i < retryCount ; i++){ PathBOK = phy_PathB_IQK_8188E(pAdapter); if (PathBOK == 0x03){ ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Path B IQK Success!!\n")); @@ -1598,14 +1598,14 @@ if ( *(pDM_Odm->mp_mode) == 1) if (*(pDM_Odm->mp_mode) != 1) return; /* settings adjust for normal chip */ - for(index = 0; index < PATH_NUM; index ++) { + for (index = 0; index < PATH_NUM; index ++) { APK_offset[index] = APK_normal_offset[index]; APK_value[index] = APK_normal_value[index]; AFE_on_off[index] = 0x6fdb25a4; } - for(index = 0; index < APK_BB_REG_NUM; index ++) { - for(path = 0; path < pathbound; path++) { + for (index = 0; index < APK_BB_REG_NUM; index ++) { + for (path = 0; path < pathbound; path++) { APK_RF_init_value[path][index] = APK_normal_RF_init_value[path][index]; APK_RF_value_0[path][index] = APK_normal_RF_value_0[path][index]; } @@ -1615,7 +1615,7 @@ if ( *(pDM_Odm->mp_mode) == 1) apkbound = 6; /* save BB default value */ - for(index = 0; index < APK_BB_REG_NUM ; index++) { + for (index = 0; index < APK_BB_REG_NUM ; index++) { if (index == 0) /* skip */ continue; BB_backup[index] = ODM_GetBBReg(pDM_Odm, BB_REG[index], bMaskDWord); @@ -1627,7 +1627,7 @@ if ( *(pDM_Odm->mp_mode) == 1) /* save AFE default value */ _PHY_SaveADDARegisters(pAdapter, AFE_REG, AFE_backup, IQK_ADDA_REG_NUM); - for(path = 0; path < pathbound; path++) + for (path = 0; path < pathbound; path++) { @@ -1637,7 +1637,7 @@ if ( *(pDM_Odm->mp_mode) == 1) /* load APK setting */ /* path-A */ offset = rPdp_AntA; - for(index = 0; index < 11; index ++) + for (index = 0; index < 11; index ++) { ODM_SetBBReg(pDM_Odm, offset, bMaskDWord, APK_normal_setting_value_1[index]); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_APCalibrate_8188E() offset 0x%x value 0x%x\n", offset, ODM_GetBBReg(pDM_Odm, offset, bMaskDWord))); @@ -1648,7 +1648,7 @@ if ( *(pDM_Odm->mp_mode) == 1) ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntB, bMaskDWord, 0x12680000); offset = rConfig_AntA; - for(; index < 13; index ++) + for (; index < 13; index ++) { ODM_SetBBReg(pDM_Odm, offset, bMaskDWord, APK_normal_setting_value_1[index]); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_APCalibrate_8188E() offset 0x%x value 0x%x\n", offset, ODM_GetBBReg(pDM_Odm, offset, bMaskDWord))); @@ -1661,7 +1661,7 @@ if ( *(pDM_Odm->mp_mode) == 1) /* path A */ offset = rPdp_AntA; - for(index = 0; index < 16; index++) + for (index = 0; index < 16; index++) { ODM_SetBBReg(pDM_Odm, offset, bMaskDWord, APK_normal_setting_value_2[index]); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_APCalibrate_8188E() offset 0x%x value 0x%x\n", offset, ODM_GetBBReg(pDM_Odm, offset, bMaskDWord))); @@ -1676,7 +1676,7 @@ if ( *(pDM_Odm->mp_mode) == 1) /* load APK setting */ /* path-B */ offset = rPdp_AntB; - for(index = 0; index < 10; index ++) + for (index = 0; index < 10; index ++) { ODM_SetBBReg(pDM_Odm, offset, bMaskDWord, APK_normal_setting_value_1[index]); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_APCalibrate_8188E() offset 0x%x value 0x%x\n", offset, ODM_GetBBReg(pDM_Odm, offset, bMaskDWord))); @@ -1688,7 +1688,7 @@ if ( *(pDM_Odm->mp_mode) == 1) offset = rConfig_AntA; index = 11; - for(; index < 13; index ++) /* offset 0xb68, 0xb6c */ + for (; index < 13; index ++) /* offset 0xb68, 0xb6c */ { ODM_SetBBReg(pDM_Odm, offset, bMaskDWord, APK_normal_setting_value_1[index]); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_APCalibrate_8188E() offset 0x%x value 0x%x\n", offset, ODM_GetBBReg(pDM_Odm, offset, bMaskDWord))); @@ -1701,7 +1701,7 @@ if ( *(pDM_Odm->mp_mode) == 1) /* path B */ offset = 0xb60; - for(index = 0; index < 16; index++) + for (index = 0; index < 16; index++) { ODM_SetBBReg(pDM_Odm, offset, bMaskDWord, APK_normal_setting_value_2[index]); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_APCalibrate_8188E() offset 0x%x value 0x%x\n", offset, ODM_GetBBReg(pDM_Odm, offset, bMaskDWord))); @@ -1715,14 +1715,14 @@ if ( *(pDM_Odm->mp_mode) == 1) regD[path] = PHY_QueryRFReg(pAdapter, path, RF_TXBIAS_A, bMaskDWord); /* Path A AFE all on, path B AFE All off or vise versa */ - for(index = 0; index < IQK_ADDA_REG_NUM ; index++) + for (index = 0; index < IQK_ADDA_REG_NUM ; index++) ODM_SetBBReg(pDM_Odm, AFE_REG[index], bMaskDWord, AFE_on_off[path]); ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_APCalibrate_8188E() offset 0xe70 %x\n", ODM_GetBBReg(pDM_Odm, rRx_Wait_CCA, bMaskDWord))); /* BB to AP mode */ if (path == 0) { - for(index = 0; index < APK_BB_REG_NUM ; index++) + for (index = 0; index < APK_BB_REG_NUM ; index++) { if (index == 0) /* skip */ @@ -1768,7 +1768,7 @@ if ( *(pDM_Odm->mp_mode) == 1) delta_offset = 12; /* AP calibration */ - for(index = 0; index < APK_BB_REG_NUM; index++) + for (index = 0; index < APK_BB_REG_NUM; index++) { if (index != 1) /* only DO PA11+PAD01001, AP RF setting */ continue; @@ -1843,7 +1843,7 @@ if ( *(pDM_Odm->mp_mode) == 1) _PHY_ReloadMACRegisters(pAdapter, MAC_REG, MAC_backup); /* reload BB default value */ - for(index = 0; index < APK_BB_REG_NUM ; index++) + for (index = 0; index < APK_BB_REG_NUM ; index++) { if (index == 0) /* skip */ @@ -1855,7 +1855,7 @@ if ( *(pDM_Odm->mp_mode) == 1) _PHY_ReloadADDARegisters(pAdapter, AFE_REG, AFE_backup, IQK_ADDA_REG_NUM); /* reload RF path default value */ - for(path = 0; path < pathbound; path++) + for (path = 0; path < pathbound; path++) { ODM_SetRFReg(pDM_Odm, path, 0xd, bMaskDWord, regD[path]); if (path == RF_PATH_B) @@ -1873,7 +1873,7 @@ if ( *(pDM_Odm->mp_mode) == 1) ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("\n")); - for(path = 0; path < pathbound; path++) + for (path = 0; path < pathbound; path++) { ODM_SetRFReg(pDM_Odm, path, 0x3, bMaskDWord, ((APK_result[path][1] << 15) | (APK_result[path][1] << 10) | (APK_result[path][1] << 5) | APK_result[path][1])); @@ -1969,7 +1969,7 @@ if (*(pDM_Odm->mp_mode) == 1) } ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("IQK:Start!!!\n")); - for(i = 0; i < 8; i++) { + for (i = 0; i < 8; i++) { result[0][i] = 0; result[1][i] = 0; result[2][i] = 0; @@ -2018,7 +2018,7 @@ if (*(pDM_Odm->mp_mode) == 1) else { /* - for(i = 0; i < 8; i++) + for (i = 0; i < 8; i++) RegTmp += result[3][i]; if (RegTmp != 0) @@ -2079,7 +2079,7 @@ if (*(pDM_Odm->mp_mode) == 1) /* by sherry 20120321 */ if (final_candidate < 4) { - for(i = 0; i < IQK_Matrix_REG_NUM; i++) + for (i = 0; i < IQK_Matrix_REG_NUM; i++) pDM_Odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].Value[0][i] = result[final_candidate][i]; pDM_Odm->RFCalibrateInfo.IQKMatrixRegSetting[Indexforchannel].bIQKDone = true; } diff --git a/hal/hal_com.c b/hal/hal_com.c index a386766..62e68dd 100644 --- a/hal/hal_com.c +++ b/hal/hal_com.c @@ -146,7 +146,7 @@ void HalSetBrateCfg( { u8 i, is_brate, brate; - for(i=0;ipODM_StaInfo[i]; if (IS_STA_VALID(pstat) ) { if (IS_MCAST( pstat->hwaddr)) /* if (psta->mac_id ==1) */ @@ -2525,7 +2525,7 @@ odm_DynamicTxPowerSavePowerIndex( struct adapter *Adapter = pDM_Odm->Adapter; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; - for(index = 0; index< 6; index++) + for (index = 0; index< 6; index++) pdmpriv->PowerIndex_backup[index] = rtw_read8(Adapter, Power_Index_REG[index]); } @@ -2540,7 +2540,7 @@ odm_DynamicTxPowerRestorePowerIndex( HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); u32 Power_Index_REG[6] = {0xc90, 0xc91, 0xc92, 0xc98, 0xc99, 0xc9a}; struct dm_priv *pdmpriv = &pHalData->dmpriv; - for(index = 0; index< 6; index++) + for (index = 0; index< 6; index++) rtw_write8(Adapter, Power_Index_REG[index], pdmpriv->PowerIndex_backup[index]); } @@ -2553,7 +2553,7 @@ odm_DynamicTxPowerWritePowerIndex( u8 index; u32 Power_Index_REG[6] = {0xc90, 0xc91, 0xc92, 0xc98, 0xc99, 0xc9a}; - for(index = 0; index< 6; index++) + for (index = 0; index< 6; index++) /* PlatformEFIOWrite1Byte(Adapter, Power_Index_REG[index], Value); */ ODM_Write1Byte(pDM_Odm, Power_Index_REG[index], Value); @@ -2761,7 +2761,7 @@ odm_RSSIMonitorCheckCE( { struct sta_info *psta; - for(i=0; ipODM_StaInfo[i])) { if (IS_MCAST( psta->hwaddr)) /* if (psta->mac_id ==1) */ continue; @@ -2778,7 +2778,7 @@ odm_RSSIMonitorCheckCE( } } - for(i=0; i< sta_cnt; i++) + for (i=0; i< sta_cnt; i++) { if (PWDB_rssi[i] != (0)){ if (pHalData->fw_ractrl == true)/* Report every sta's RSSI to FW */ @@ -3059,7 +3059,7 @@ odm_InitHybridAntDiv_88C_92D( pDM_SWAT_Table->CurAntenna=0; /* choose left antenna as default antenna */ pDM_SWAT_Table->PreAntenna=0; - for(i=0; iCCK_Ant1_Cnt[i] = 0; pDM_SWAT_Table->CCK_Ant2_Cnt[i] = 0; @@ -3566,7 +3566,7 @@ odm_PHY_SaveAFERegisters( u32 i; /* RTPRINT(FINIT, INIT_IQK, ("Save ADDA parameters.\n")); */ - for( i = 0 ; i < RegisterNum ; i++){ + for ( i = 0 ; i < RegisterNum ; i++){ AFEBackup[i] = ODM_GetBBReg(pDM_Odm, AFEReg[i], bMaskDWord); } } @@ -3582,7 +3582,7 @@ odm_PHY_ReloadAFERegisters( u32 i; /* RTPRINT(FINIT, INIT_IQK, ("Reload ADDA power saving parameters !\n")); */ - for(i = 0 ; i < RegiesterNum; i++) + for (i = 0 ; i < RegiesterNum; i++) { ODM_SetBBReg(pDM_Odm, AFEReg[i], bMaskDWord, AFEBackup[i]); diff --git a/hal/odm_HWConfig.c b/hal/odm_HWConfig.c index c694acf..bb220f2 100644 --- a/hal/odm_HWConfig.c +++ b/hal/odm_HWConfig.c @@ -442,7 +442,7 @@ odm_RxPhyStatus92CSeries_Parsing( pDM_Odm->PhyDbgInfo.NumQryPhyStatusOFDM++; /* (1)Get RSSI for HT rate */ - for(i = ODM_RF_PATH_A; i < ODM_RF_PATH_MAX; i++) + for (i = ODM_RF_PATH_A; i < ODM_RF_PATH_MAX; i++) { /* 2008/01/30 MH we will judge RF RX path now. */ if (pDM_Odm->RFPathRxEnable & BIT(i)) @@ -513,7 +513,7 @@ odm_RxPhyStatus92CSeries_Parsing( else Max_spatial_stream = 1; /* only spatial stream 1 makes sense */ - for(i=0; i>= 1" because the compilor of free build environment */ /* fill most significant bit to "zero" when doing shifting operation which may change a negative */ /* value to positive one, then the dbm value (which is supposed to be negative) is not correct anymore. */ @@ -731,7 +731,7 @@ odm_Process_RSSIForDM( else pEntry->rssi_stat.ValidBit++; - for(i=0; irssi_stat.ValidBit; i++) + for (i=0; irssi_stat.ValidBit; i++) OFDM_pkt += (u8)(pEntry->rssi_stat.PacketMap>>i)&BIT0; if (pEntry->rssi_stat.ValidBit == 64) diff --git a/hal/odm_RTL8188E.c b/hal/odm_RTL8188E.c index 8280e7c..dfbe23d 100644 --- a/hal/odm_RTL8188E.c +++ b/hal/odm_RTL8188E.c @@ -151,7 +151,7 @@ odm_FastAntTrainingInit( } #endif - for(i=0; i<6; i++) { + for (i=0; i<6; i++) { pDM_FatTable->Bssid[i] = 0; pDM_FatTable->antSumRSSI[i] = 0; pDM_FatTable->antRSSIcnt[i] = 0; diff --git a/hal/odm_debug.h b/hal/odm_debug.h index aef1e26..f53d2ca 100644 --- a/hal/odm_debug.h +++ b/hal/odm_debug.h @@ -146,7 +146,7 @@ DbgPrint("[ODM] "); \ DbgPrint(title_str); \ DbgPrint(" "); \ - for( __i=0; __i<6; __i++ ) \ + for ( __i=0; __i<6; __i++ ) \ DbgPrint("%02X%s", __ptr[__i], (__i==5)?"":"-"); \ DbgPrint("\n"); \ } diff --git a/hal/rtl8188e_cmd.c b/hal/rtl8188e_cmd.c index 8209d1c..6ae6c22 100644 --- a/hal/rtl8188e_cmd.c +++ b/hal/rtl8188e_cmd.c @@ -128,7 +128,7 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 /* Write Ext command */ msgbox_ex_addr = REG_HMEBOX_EXT_0 + (h2c_box_num *RTL88E_EX_MESSAGE_BOX_SIZE); #ifdef CONFIG_H2C_EF - for(cmd_idx=0;cmd_idxnoa_num ; i++) + for ( i=0 ; inoa_num ; i++) { /* To control the register setting for which NOA */ rtw_write8(padapter, REG_NOA_DESC_SEL, (i << 4)); diff --git a/hal/rtl8188e_dm.c b/hal/rtl8188e_dm.c index b743ea5..c0b51f3 100644 --- a/hal/rtl8188e_dm.c +++ b/hal/rtl8188e_dm.c @@ -235,7 +235,7 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter) ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_POWER_SAVING,&(pwrctrlpriv->bpower_saving)); ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_RF_ANTENNA_TYPE, pHalData->TRxAntDivType); - for(i=0; i< NUM_STA; i++) + for (i=0; i< NUM_STA; i++) { /* pDM_Odm->pODM_StaInfo[i] = NULL; */ ODM_CmnInfoPtrArrayHook(pDM_Odm, ODM_CMNINFO_STA_STATUS,i,NULL); diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index 39ba75e..cb5ab63 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -202,7 +202,7 @@ efuse_phymap_to_logical(u8 * phymap, u16 _offset, u16 _size_byte, u8 *pbuf) /* Get word enable value from PG header */ /* RTPRINT(FEEPROM, EFUSE_READ_ALL, ("Offset-%d Worden=%x\n", offset, wren)); */ - for(i=0; i> 8) & 0xff); @@ -262,7 +262,7 @@ efuse_phymap_to_logical(u8 * phymap, u16 _offset, u16 _size_byte, u8 *pbuf) /* */ /* 4. Copy from Efuse map to output pointer memory!!! */ /* */ - for(i=0; i<_size_byte; i++) + for (i=0; i<_size_byte; i++) { pbuf[i] = efuseTbl[_offset+i]; } @@ -458,7 +458,7 @@ static int rtl8188e_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_fram t1= rtw_get_current_time(); iol_mode_enable(adapter, 1); - for(i=0;i addr:0x%02x\n",addr); */ rtw_write32(Adapter,0x140,addr); rtw_usleep_os(2); @@ -613,7 +613,7 @@ _BlockWrite( ("_BlockWrite: [P3] buffSize_p3(%d) blockSize_p3(%d) blockCount_p3(%d)\n", (buffSize-offset), blockSize_p3, blockCount_p3)); - for(i = 0 ; i < blockCount_p3 ; i++){ + for (i = 0 ; i < blockCount_p3 ; i++){ ret =rtw_write8(padapter, (FW_8188E_START_ADDRESS + offset + i), *(bufferPtr + offset + i)); if (ret == _FAIL) @@ -1162,7 +1162,7 @@ Hal_EfuseReadEFuse88E( /* Get word enable value from PG header */ /* RTPRINT(FEEPROM, EFUSE_READ_ALL, ("Offset-%d Worden=%x\n", offset, wren)); */ - for(i=0; i> 8) & 0xff); @@ -1222,7 +1222,7 @@ Hal_EfuseReadEFuse88E( /* */ /* 4. Copy from Efuse map to output pointer memory!!! */ /* */ - for(i=0; i<_size_byte; i++) + for (i=0; i<_size_byte; i++) { pbuf[i] = efuseTbl[_offset+i]; } @@ -1336,7 +1336,7 @@ exit: { int i; DBG_871X("%s compare first 0x130 byte fail\n", __FUNCTION__); - for(i=0;i<512;i++) + for (i=0;i<512;i++) { if (i%16==0) DBG_871X("0x%03x: ", i); @@ -1817,7 +1817,7 @@ hal_EfusePgPacketRead_8188e( if (hoffset==offset) { - for(tmpidx = 0;tmpidx< word_cnts*2 ;tmpidx++) + for (tmpidx = 0;tmpidx< word_cnts*2 ;tmpidx++) { if (efuse_OneByteRead(pAdapter, efuse_addr+1+tmpidx ,&efuse_data, bPseudoTest) ) { @@ -2206,7 +2206,7 @@ hal_EfuseCheckIfDatafollowed( bool bRet=false; u8 i, efuse_data; - for(i=0; i<(word_cnts*2) ; i++) + for (i=0; i<(word_cnts*2) ; i++) { if (efuse_OneByteRead(pAdapter, (startAddr+i) ,&efuse_data, bPseudoTest)&&(efuse_data != 0xFF)) bRet = true; @@ -2316,7 +2316,7 @@ hal_EfusePartialWriteCheck( } } /* partial write ok, update the target packet for later use */ - for(i=0; i<4; i++) + for (i=0; i<4; i++) { if ((matched_wden & (0x1<",next_addr); if (((addr+1) %8) ==0) @@ -2801,7 +2801,7 @@ Hal_InitPGData88E(struct adapter *padapter) if (is_boot_from_eeprom(padapter)) { /* Read all Content from EEPROM or EFUSE. */ - for(i = 0; i < HWSET_MAX_SIZE_88E; i += 2) + for (i = 0; i < HWSET_MAX_SIZE_88E; i += 2) { /* value16 = EF2Byte(ReadEEprom(pAdapter, (u16) (i>>1))); */ /* *((u16*)(&PROMContent[i])) = value16; */ @@ -2892,15 +2892,15 @@ Hal_ReadPowerValueFromPROM_8188E( if (AutoLoadFail) { - for(rfPath = 0 ; rfPath < pHalData->NumTotalRFPath ; rfPath++) + for (rfPath = 0 ; rfPath < pHalData->NumTotalRFPath ; rfPath++) { /* 2.4G default value */ - for(group = 0 ; group < MAX_CHNL_GROUP_24G; group++) + for (group = 0 ; group < MAX_CHNL_GROUP_24G; group++) { pwrInfo24G->IndexCCK_Base[rfPath][group] = EEPROM_DEFAULT_24G_INDEX; pwrInfo24G->IndexBW40_Base[rfPath][group] = EEPROM_DEFAULT_24G_INDEX; } - for(TxCount=0;TxCountNumTotalRFPath ; rfPath++) + for (rfPath = 0 ; rfPath < pHalData->NumTotalRFPath ; rfPath++) { /* 2.4G default value */ - for(group = 0 ; group < MAX_CHNL_GROUP_24G; group++) + for (group = 0 ; group < MAX_CHNL_GROUP_24G; group++) { /* printk(" IndexCCK_Base rfPath:%d group:%d,eeAddr:0x%02x ",rfPath,group,eeAddr); */ pwrInfo24G->IndexCCK_Base[rfPath][group] = PROMContent[eeAddr++]; @@ -2937,7 +2937,7 @@ Hal_ReadPowerValueFromPROM_8188E( /* pHalData->bNOPG = true; */ } } - for(group = 0 ; group < MAX_CHNL_GROUP_24G-1; group++) + for (group = 0 ; group < MAX_CHNL_GROUP_24G-1; group++) { /* printk(" IndexBW40_Base rfPath:%d group:%d,eeAddr:0x%02x ",rfPath,group,eeAddr); */ pwrInfo24G->IndexBW40_Base[rfPath][group] = PROMContent[eeAddr++]; @@ -2945,7 +2945,7 @@ Hal_ReadPowerValueFromPROM_8188E( if (pwrInfo24G->IndexBW40_Base[rfPath][group] == 0xFF) pwrInfo24G->IndexBW40_Base[rfPath][group] = EEPROM_DEFAULT_24G_INDEX; } - for(TxCount=0;TxCountbTXPowerDataReadFromEEPORM = true; - /* for(rfPath = 0 ; rfPath < MAX_RF_PATH ; rfPath++) */ - for(rfPath = 0 ; rfPath < pHalData->NumTotalRFPath ; rfPath++) + /* for (rfPath = 0 ; rfPath < MAX_RF_PATH ; rfPath++) */ + for (rfPath = 0 ; rfPath < pHalData->NumTotalRFPath ; rfPath++) { - for(ch = 0 ; ch < CHANNEL_MAX_NUMBER ; ch++) + for (ch = 0 ; ch < CHANNEL_MAX_NUMBER ; ch++) { bIn24G = Hal_GetChnlGroup88E(ch+1,&group); if (bIn24G) @@ -3182,7 +3182,7 @@ Hal_ReadTxPowerInfo88E( } } - for(TxCount=0;TxCountCCK_24G_Diff[rfPath][TxCount]=pwrInfo24G.CCK_Diff[rfPath][TxCount]; pHalData->OFDM_24G_Diff[rfPath][TxCount]=pwrInfo24G.OFDM_Diff[rfPath][TxCount]; diff --git a/hal/rtl8188e_phycfg.c b/hal/rtl8188e_phycfg.c index d30c376..16f3caa 100644 --- a/hal/rtl8188e_phycfg.c +++ b/hal/rtl8188e_phycfg.c @@ -68,7 +68,7 @@ phy_CalculateBitShift( { u32 i; - for(i=0; i<=31; i++) + for (i=0; i<=31; i++) { if ( ((BitMask>>i) & 0x1 ) == 1) break; @@ -1267,7 +1267,7 @@ PHY_CheckBBAndRFOK( WriteAddr[HW90_BLOCK_PHY1] = 0x800; WriteAddr[HW90_BLOCK_RF] = 0x3; - for(i=0 ; i < CheckTimes ; i++) + for (i=0 ; i < CheckTimes ; i++) { /* */ @@ -1512,7 +1512,7 @@ static void getTxPowerIndex88E( else path_nums = 2; - for(TxCount=0;TxCount< path_nums ;TxCount++) + for (TxCount=0;TxCount< path_nums ;TxCount++) { if (TxCount==RF_PATH_A) { @@ -1647,7 +1647,7 @@ PHY_UpdateTxPowerDbm8188E( /* RT_TRACE(COMP_TXAGC, DBG_LOUD, ("PHY_UpdateTxPowerDbm8192S(): %ld dBm , CckTxPwrIdx = %d, OfdmTxPwrIdx = %d\n", powerInDbm, CckTxPwrIdx, OfdmTxPwrIdx)); */ - for(idx = 0; idx < 14; idx++) + for (idx = 0; idx < 14; idx++) { for (rf_path = 0; rf_path < 2; rf_path++) { @@ -1881,7 +1881,7 @@ static void _PHY_SwChnl8192C(struct adapter *Adapter, u8 channel) /* s2. RF dependent command - CmdID_RF_WriteReg, param1=RF_CHNLBW, param2=channel */ param1 = RF_CHNLBW; param2 = channel; - for(eRFPath = 0; eRFPath NumTotalRFPath; eRFPath++) + for (eRFPath = 0; eRFPath NumTotalRFPath; eRFPath++) { pHalData->RfRegChnlVal[eRFPath] = ((pHalData->RfRegChnlVal[eRFPath] & 0xfffffc00) | param2); PHY_SetRFReg(Adapter, (RF_RADIO_PATH_E)eRFPath, param1, bRFRegOffsetMask, pHalData->RfRegChnlVal[eRFPath]); @@ -2220,7 +2220,7 @@ _PHY_DumpRFReg(struct adapter *pAdapter) /* RTPRINT(FINIT, INIT_RF, ("PHY_DumpRFReg()====>\n")); */ - for(rfRegOffset = 0x00;rfRegOffset<=0x30;rfRegOffset++){ + for (rfRegOffset = 0x00;rfRegOffset<=0x30;rfRegOffset++){ rfRegValue = PHY_QueryRFReg(pAdapter,RF_PATH_A, rfRegOffset, bMaskDWord); /* RTPRINT(FINIT, INIT_RF, (" 0x%02x = 0x%08x\n",rfRegOffset,rfRegValue)); */ } diff --git a/hal/rtl8188e_rf6052.c b/hal/rtl8188e_rf6052.c index 20a520e..ff7fe67 100644 --- a/hal/rtl8188e_rf6052.c +++ b/hal/rtl8188e_rf6052.c @@ -182,7 +182,7 @@ rtl8188e_PHY_RF6052SetCckTxPower( if (TurboScanOff) { - for(idx1=RF_PATH_A; idx1<=RF_PATH_B; idx1++) + for (idx1=RF_PATH_A; idx1<=RF_PATH_B; idx1++) { TxAGC[idx1] = pPowerlevel[idx1] | (pPowerlevel[idx1]<<8) | @@ -210,7 +210,7 @@ rtl8188e_PHY_RF6052SetCckTxPower( } else { - for(idx1=RF_PATH_A; idx1<=RF_PATH_B; idx1++) + for (idx1=RF_PATH_A; idx1<=RF_PATH_B; idx1++) { TxAGC[idx1] = pPowerlevel[idx1] | (pPowerlevel[idx1]<<8) | @@ -247,10 +247,10 @@ rtl8188e_PHY_RF6052SetCckTxPower( TxAGC[1] -= pwrtrac_value; } - for(idx1=RF_PATH_A; idx1<=RF_PATH_B; idx1++) + for (idx1=RF_PATH_A; idx1<=RF_PATH_B; idx1++) { ptr = (u8*)(&(TxAGC[idx1])); - for(idx2=0; idx2<4; idx2++) + for (idx2=0; idx2<4; idx2++) { if (*ptr > RF6052_MAX_TX_PWR) *ptr = RF6052_MAX_TX_PWR; @@ -289,7 +289,7 @@ static void getPowerBase88E( s8 HT20_pwrdiff=0; u8 i, powerlevel[2]; - for(i=0; i<2; i++) + for (i=0; i<2; i++) { powerBase0 = pPowerLevelOFDM[i]; @@ -298,7 +298,7 @@ static void getPowerBase88E( /* DBG_871X(" [OFDM power base index rf(%c) = 0x%x]\n", ((i==0)?'A':'B'), *(OfdmBase+i)); */ } - for(i=0; iNumTotalRFPath; i++) + for (i=0; iNumTotalRFPath; i++) { /* Check HT20 to HT40 diff */ if (pHalData->CurrentChannelBW == HT_CHANNEL_WIDTH_20) @@ -336,7 +336,7 @@ static void getTxPowerWriteValByRegulatory88E( /* */ /* Index 0 & 1= legacy OFDM, 2-5=HT_MCS rate */ /* */ - for(rf=0; rf<2; rf++) { + for (rf=0; rf<2; rf++) { switch (Regulatory) { case 0: /* Realtek better performance */ /* increase power diff defined by Realtek for large power */ @@ -461,10 +461,10 @@ static void writeOFDMPowerReg88E( u32 writeVal; u16 RegOffset; - for(rf=0; rf<2; rf++) + for (rf=0; rf<2; rf++) { writeVal = pValue[rf]; - for(i=0; i<4; i++) + for (i=0; i<4; i++) { pwr_val[i] = (u8)((writeVal & (0x7f<<(i*8)))>>(i*8)); if (pwr_val[i] > RF6052_MAX_TX_PWR) @@ -491,7 +491,7 @@ static void writeOFDMPowerReg88E( RegOffset = 0xc90; if (RegOffset == rTxAGC_B_Mcs15_Mcs12 || RegOffset == rTxAGC_B_Mcs07_Mcs04) RegOffset = 0xc98; - for(i=0; i<3; i++) + for (i=0; i<3; i++) { if (i!=2) writeVal = (writeVal>8)?(writeVal-8):0; @@ -551,7 +551,7 @@ rtl8188e_PHY_RF6052SetOFDMTxPower( /* */ ODM_TxPwrTrackAdjust88E(&pHalData->odmpriv, 0, &direction, &pwrtrac_value); - for(index=0; index<6; index++) + for (index=0; index<6; index++) { getTxPowerWriteValByRegulatory88E(Adapter, Channel, index, &powerBase0[0], &powerBase1[0], &writeVal[0]); @@ -610,8 +610,8 @@ phy_RF6052_Config_ParaFile( /* 3----------------------------------------------------------------- */ /* 3 <2> Initialize RF */ /* 3----------------------------------------------------------------- */ - /* for(eRFPath = RF_PATH_A; eRFPath NumTotalRFPath; eRFPath++) */ - for(eRFPath = 0; eRFPath NumTotalRFPath; eRFPath++) + /* for (eRFPath = RF_PATH_A; eRFPath NumTotalRFPath; eRFPath++) */ + for (eRFPath = 0; eRFPath NumTotalRFPath; eRFPath++) { pPhyReg = &pHalData->PHYRegDef[eRFPath]; diff --git a/hal/rtl8188eu_recv.c b/hal/rtl8188eu_recv.c index 34157dc..25105c5 100644 --- a/hal/rtl8188eu_recv.c +++ b/hal/rtl8188eu_recv.c @@ -92,7 +92,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) precvbuf = (struct recv_buf*)precvpriv->precv_buf; - for(i=0; i < NR_RECVBUFF ; i++) { + for (i=0; i < NR_RECVBUFF ; i++) { _rtw_init_listhead(&precvbuf->list); spin_lock_init(&precvbuf->recvbuf_lock); @@ -126,7 +126,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) skb_queue_head_init(&precvpriv->free_recv_skb_queue); - for(i=0; iprecv_buf; - for(i=0; i < NR_RECVBUFF ; i++) + for (i=0; i < NR_RECVBUFF ; i++) { rtw_os_recvbuf_resource_free(padapter, precvbuf); precvbuf++; diff --git a/hal/rtl8188eu_xmit.c b/hal/rtl8188eu_xmit.c index 5f99e67..3d393c8 100644 --- a/hal/rtl8188eu_xmit.c +++ b/hal/rtl8188eu_xmit.c @@ -62,7 +62,7 @@ static void rtl8188eu_cal_txdesc_chksum(struct tx_desc *ptxdesc) /* Clear first */ ptxdesc->txdw7 &= cpu_to_le32(0xffff0000); - for(index = 0 ; index < count ; index++){ + for (index = 0 ; index < count ; index++){ checksum = checksum ^ le16_to_cpu(*(__le16 *)(usPtr + index)); } diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index c2c8c86..840d941 100644 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -172,7 +172,7 @@ static void _dbg_dump_macreg(struct adapter *padapter) u32 offset = 0; u32 val32 = 0; u32 index =0 ; - for(index=0;index<64;index++) + for (index=0;index<64;index++) { offset = index*4; val32 = rtw_read32(padapter,offset); @@ -285,7 +285,7 @@ _SetMacID( ) { u32 i; - for(i=0 ; i< MAC_ADDR_LEN ; i++){ + for (i=0 ; i< MAC_ADDR_LEN ; i++){ rtw_write32(Adapter, REG_MACID+i, MacID[i]); } } @@ -296,7 +296,7 @@ _SetBSSID( ) { u32 i; - for(i=0 ; i< MAC_ADDR_LEN ; i++){ + for (i=0 ; i< MAC_ADDR_LEN ; i++){ rtw_write32(Adapter, REG_BSSID+i, BSSID[i]); } } @@ -1228,7 +1228,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter) int hal_init_profiling_i; u32 hal_init_stages_timestamp[HAL_INIT_STAGES_NUM]; /* used to record the time of each stage's starting point */ - for(hal_init_profiling_i=0;hal_init_profiling_iprecv_buf; - for(i=0; iff_hwaddr, 0, (unsigned char *)precvbuf) == false ) { @@ -2157,7 +2157,7 @@ static void hw_var_set_macaddr(struct adapter *Adapter, u8 variable, u8* val) reg_macid = REG_MACID; - for(idx = 0 ; idx < 6; idx++) + for (idx = 0 ; idx < 6; idx++) rtw_write8(Adapter, (reg_macid+idx), val[idx]); } @@ -2168,7 +2168,7 @@ static void hw_var_set_bssid(struct adapter *Adapter, u8 variable, u8* val) reg_bssid = REG_BSSID; - for(idx = 0 ; idx < 6; idx++) + for (idx = 0 ; idx < 6; idx++) rtw_write8(Adapter, (reg_bssid+idx), val[idx]); } @@ -2545,7 +2545,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) u32 ulContent=0; u32 ulEncAlgo=CAM_AES; - for(i=0;i0xf) FactorToSet = 0xf; - for(index=0; index<4; index++) + for (index=0; index<4; index++) { if ((pRegToSet[index] & 0xf0) > (FactorToSet<<4)) pRegToSet[index] = (pRegToSet[index] & 0x0f) | (FactorToSet<<4); @@ -3018,7 +3018,7 @@ static u8 GetHalDefVar8188EUsb( DBG_871X("============ RA status check ===================\n"); if (Adapter->bRxRSSIDisplay >30) Adapter->bRxRSSIDisplay = 1; - for(i=0;i< Adapter->bRxRSSIDisplay;i++){ + for (i=0;i< Adapter->bRxRSSIDisplay;i++){ DBG_8192C("Mac_id:%d ,RSSI:%d,RateID = %d,RAUseRate = 0x%08x,RateSGI = %d, DecisionRate = 0x%02x ,PTStage = %d, RetryOver drop:%d, LifeTimeOver drop:%d\n", i, podmpriv->RAInfo[i].RssiStaRA, @@ -3343,7 +3343,7 @@ static void rtl8188eu_init_default_value(struct adapter * padapter) pHalData->pwrGroupCnt = 0; pHalData->PGMaxGroup= 13; pHalData->odmpriv.RFCalibrateInfo.ThermalValue_HP_index = 0; - for(i = 0; i < HP_THERMAL_NUM; i++) + for (i = 0; i < HP_THERMAL_NUM; i++) pHalData->odmpriv.RFCalibrateInfo.ThermalValue_HP[i] = 0; } diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index 6675e21..f5a9906 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -1313,7 +1313,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param /* save the IGTK key, length 16 bytes */ memcpy(padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey, param->u.crypt.key,(param->u.crypt.key_len>16 ?16:param->u.crypt.key_len)); /*DBG_871X("IGTK key below:\n"); - for(no=0;no<16;no++) + for (no=0;no<16;no++) printk(" %02x ", padapter->securitypriv.dot11wBIPKey[param->u.crypt.idx].skey[no]); DBG_871X("\n");*/ padapter->securitypriv.dot11wBIPKeyid = param->u.crypt.idx; @@ -2089,12 +2089,12 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy spin_lock_bh(&pmlmepriv->lock); if (request->n_channels == 1) { - for(i=1;in_channels <= 4) { - for(j=request->n_channels-1;j>=0;j--) - for(i=0;in_channels-1;j>=0;j--) + for (i=0;in_channels); } else { @@ -2266,7 +2266,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel { int i; DBG_8192C("set wpa_ie(length:%zu):\n", ielen); - for(i=0;iPMKIDList[index].Bssid, (void *)pmksa->bssid, ETH_ALEN) ==true ) { /* BSSID is matched, the same AP => rewrite with new PMKID. */ @@ -2853,7 +2853,7 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy, DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(netdev)); - for(index=0 ; indexPMKIDList[index].Bssid, (void *)pmksa->bssid, ETH_ALEN) ==true ) { /* BSSID is matched, the same AP => Remove this PMKID information and reset it. */ @@ -3652,7 +3652,7 @@ static int cfg80211_rtw_change_bss(struct wiphy *wiphy, struct net_device *ndev, DBG_8192C("ap_isolate=%d\n", params->ap_isolate); DBG_8192C("basic_rates_len=%d\n", params->basic_rates_len); - for(i=0; ibasic_rates_len; i++) + for (i=0; ibasic_rates_len; i++) { DBG_8192C("basic_rates=%d\n", params->basic_rates[i]); diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index d7386fb..e724f92 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -870,7 +870,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie { int i; DBG_871X("\n wpa_ie(length:%d):\n", ielen); - for(i=0;iPMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) ==true ) { /* BSSID is matched, the same AP => rewrite with new PMKID. */ @@ -1230,7 +1230,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, } else if ( pPMK->cmd == IW_PMKSA_REMOVE ) { DBG_871X( "[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n" ); intReturn = true; - for(j=0 ; jPMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) ==true ) { /* BSSID is matched, the same AP => Remove this PMKID information and reset it. */ memset( psecuritypriv->PMKIDList[ j ].Bssid, 0x00, ETH_ALEN ); @@ -2076,7 +2076,7 @@ static int rtw_wx_set_rate(struct net_device *dev, set_rate: - for(i=0; iprofileinfo */ /* Ex: 1XX:XX:XX:XX:XX:XXYYSSID */ - for( jj = 0, kk = 1; jj < ETH_ALEN; jj++, kk += 3 ) + for ( jj = 0, kk = 1; jj < ETH_ALEN; jj++, kk += 3 ) { pwdinfo->profileinfo[ pwdinfo->profileindex ].peermac[ jj ] = key_2char2num(extra[ kk ], extra[ kk+ 1 ]); } @@ -4187,7 +4187,7 @@ static int rtw_p2p_connect(struct net_device *dev, return -1; } - for( jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3 ) + for ( jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3 ) { peerMAC[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] ); } @@ -4302,7 +4302,7 @@ static int rtw_p2p_invite_req(struct net_device *dev, pinvite_req_info->token = 3; } - for( jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3 ) + for ( jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3 ) { pinvite_req_info->peer_macaddr[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] ); } @@ -4396,7 +4396,7 @@ static int rtw_p2p_invite_req(struct net_device *dev, if ( uintPeerChannel ) { /* Store the GO's bssid */ - for( jj = 0, kk = 18; jj < ETH_ALEN; jj++, kk += 3 ) + for ( jj = 0, kk = 18; jj < ETH_ALEN; jj++, kk += 3 ) { pinvite_req_info->go_bssid[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] ); } @@ -4594,7 +4594,7 @@ static int rtw_p2p_set_pc(struct net_device *dev, return ret; } - for( jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3 ) + for ( jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3 ) { peerMAC[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] ); } @@ -4907,7 +4907,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev, pwdinfo->tx_prov_disc_info.benable = false; } - for( jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3 ) + for ( jj = 0, kk = 0; jj < ETH_ALEN; jj++, kk += 3 ) peerMAC[ jj ] = key_2char2num( extra[kk], extra[kk+ 1] ); if ( _rtw_memcmp( &extra[ 18 ], "display", 7 ) ) @@ -5447,13 +5447,13 @@ static void mac_reg_dump(struct adapter *padapter) { int i,j=1; printk("\n======= MAC REG =======\n"); - for(i=0x0;i<0x300;i+=4) + for (i=0x0;i<0x300;i+=4) { if (j%4==1) printk("0x%02x",i); printk(" 0x%08x ",rtw_read32(padapter,i)); if ((j++)%4 == 0) printk("\n"); } - for(i=0x400;i<0x800;i+=4) + for (i=0x400;i<0x800;i+=4) { if (j%4==1) printk("0x%02x",i); printk(" 0x%08x ",rtw_read32(padapter,i)); @@ -5465,7 +5465,7 @@ static void bb_reg_dump(struct adapter *padapter) { int i,j=1; printk("\n======= BB REG =======\n"); - for(i=0x800;i<0x1000;i+=4) + for (i=0x800;i<0x1000;i+=4) { if (j%4==1) printk("0x%02x",i); @@ -5487,10 +5487,10 @@ static void rf_reg_dump(struct adapter *padapter) else path_nums = 2; - for(path=0;pathhtpriv.ampdu_enable); DBG_871X("agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap); - for(i=0;i<16;i++) + for (i=0;i<16;i++) { preorder_ctrl = &psta->recvreorder_ctrl[i]; if (preorder_ctrl->enable) @@ -5850,7 +5850,7 @@ static int rtw_dbg_port(struct net_device *dev, #endif spin_lock_bh(&pstapriv->sta_hash_lock); - for(i=0; i< NUM_STA; i++) + for (i=0; i< NUM_STA; i++) { phead = &(pstapriv->sta_hash[i]); plist = get_next(phead); @@ -5883,7 +5883,7 @@ static int rtw_dbg_port(struct net_device *dev, - for(j=0;j<16;j++) + for (j=0;j<16;j++) { preorder_ctrl = &psta->recvreorder_ctrl[j]; if (preorder_ctrl->enable) @@ -5909,7 +5909,7 @@ static int rtw_dbg_port(struct net_device *dev, spin_lock_bh(&pstapriv->sta_hash_lock); - for(i=0; i< NUM_STA; i++) + for (i=0; i< NUM_STA; i++) { phead = &(pstapriv->sta_hash[i]); plist = get_next(phead); diff --git a/os_dep/mlme_linux.c b/os_dep/mlme_linux.c index 84eb038..494649e 100644 --- a/os_dep/mlme_linux.c +++ b/os_dep/mlme_linux.c @@ -196,7 +196,7 @@ void rtw_report_sec_ie(struct adapter *adapter,u8 authmode,u8 *sec_ie) len = sec_ie[1]+2; len = (len < IW_CUSTOM_MAX) ? len:IW_CUSTOM_MAX; - for(i=0;iiface_nums;i++) + for (i=0;iiface_nums;i++) { struct net_device *pnetdev = NULL; @@ -1052,7 +1052,7 @@ int rtw_drv_register_netdev(struct adapter *if1) if (dvobj->iface_nums < IFACE_ID_MAX) { - for(i=0; iiface_nums; i++) + for (i=0; iiface_nums; i++) { struct adapter *padapter = dvobj->padapters[i]; diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 679a04f..ddd58b5 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -51,7 +51,7 @@ u32 rtw_atoi(u8* s) int num=0,flag=0; int i; - for(i=0;i<=strlen(s);i++) { + for (i=0;i<=strlen(s);i++) { if (s[i] >= '0' && s[i] <= '9') num = num * 10 + s[i] -'0'; else if (s[0] == '-' && i==0) @@ -205,7 +205,7 @@ int _rtw_mstat_dump(char *buf, int len) int vir_alloc, vir_peak, vir_alloc_err, phy_alloc, phy_peak, phy_alloc_err; int tx_alloc, tx_peak, tx_alloc_err, rx_alloc, rx_peak, rx_alloc_err; - for(i=0;iprecv_frame_buf; - for(i=0; i < NR_RECVFRAME; i++) + for (i=0; i < NR_RECVFRAME; i++) { if (precvframe->u.hdr.pkt) { diff --git a/os_dep/rtw_android.c b/os_dep/rtw_android.c index a9ab9d6..a1a2092 100644 --- a/os_dep/rtw_android.c +++ b/os_dep/rtw_android.c @@ -226,7 +226,7 @@ exit_proc: int rtw_android_cmdstr_to_num(char *cmdstr) { int cmd_num; - for(cmd_num=0 ; cmd_num= KERNEL_VERSION(4, 0, 0)) if (!strncasecmp(cmdstr, android_wifi_cmd_str[cmd_num], strlen(android_wifi_cmd_str[cmd_num]))) @@ -312,7 +312,7 @@ static int get_int_from_command(char *pcmd) { int i = 0; - for( i = 0; i < strlen( pcmd ); i++ ) + for ( i = 0; i < strlen( pcmd ); i++ ) { if ( pcmd[ i ] == '=' ) { diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index cfc2f8b..d7c93b5 100644 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -484,7 +484,7 @@ static void process_spec_devid(const struct usb_device_id *pdid) int i; int num = sizeof(specific_device_id_tbl)/sizeof(struct specific_device_id); - for(i=0; ipbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), XMITBUF_ALIGN_SZ); pxmitbuf->dma_transfer_addr = 0; - for(i=0; i<8; i++) { + for (i=0; i<8; i++) { pxmitbuf->pxmit_urb[i] = usb_alloc_urb(0, GFP_KERNEL); if (pxmitbuf->pxmit_urb[i] == NULL) { DBG_871X("pxmitbuf->pxmit_urb[i]==NULL"); @@ -105,7 +105,7 @@ void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitb struct usb_device *pusbd = pdvobjpriv->pusbdev; - for(i=0; i<8; i++) + for (i=0; i<8; i++) { if (pxmitbuf->pxmit_urb[i]) {