diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 78e9bfa..33de527 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -1532,7 +1532,7 @@ static void update_bcn_wps_ie(struct adapter *padapter) pwps_ie = rtw_get_wps_ie(ie+_FIXED_IE_LENGTH_, ielen-_FIXED_IE_LENGTH_, NULL, &wps_ielen); - if (pwps_ie ==NULL || wps_ielen ==0) + if (pwps_ie == NULL || wps_ielen == 0) return; wps_offset = (uint)(pwps_ie-ie); diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c index 189f982..f8453e6 100644 --- a/core/rtw_br_ext.c +++ b/core/rtw_br_ext.c @@ -704,7 +704,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method) /* forward unknow IP packet to upper TCP/IP */ DEBUG_INFO("NAT25: Replace DA with BR's MAC\n"); if ( (*(u32 *)priv->br_mac) == 0 && (*(u16 *)(priv->br_mac+4)) == 0 ) { - printk("Re-init netdev_br_init() due to br_mac ==0!\n"); + printk("Re-init netdev_br_init() due to br_mac == 0!\n"); netdev_br_init(priv->pnetdev); } memcpy(skb->data, priv->br_mac, ETH_ALEN); diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index ed5e5be..37e71e1 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -482,7 +482,7 @@ post_process: /* free all cmd_obj resources */ do{ pcmd = rtw_dequeue_cmd(pcmdpriv); - if (pcmd ==NULL) { + if (pcmd == NULL) { break; } @@ -714,13 +714,13 @@ u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch) ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } psetphypara = (struct setphy_parm*)rtw_zmalloc(sizeof(struct setphy_parm)); - if (psetphypara ==NULL){ + if (psetphypara == NULL){ rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -747,13 +747,13 @@ u8 rtw_setbbreg_cmd(struct adapter*padapter, u8 offset, u8 val) u8 res =_SUCCESS; ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pwritebbparm = (struct writeBB_parm*)rtw_zmalloc(sizeof(struct writeBB_parm)); - if (pwritebbparm ==NULL){ + if (pwritebbparm == NULL){ rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -779,13 +779,13 @@ u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res =_FAIL; goto exit; } prdbbparm = (struct readBB_parm*)rtw_zmalloc(sizeof(struct readBB_parm)); - if (prdbbparm ==NULL){ + if (prdbbparm == NULL){ rtw_mfree((unsigned char *) ph2c, sizeof(struct cmd_obj)); return _FAIL; } @@ -813,13 +813,13 @@ u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val) u8 res =_SUCCESS; ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pwriterfparm = (struct writeRF_parm*)rtw_zmalloc(sizeof(struct writeRF_parm)); - if (pwriterfparm ==NULL){ + if (pwriterfparm == NULL){ rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -846,13 +846,13 @@ u8 rtw_getrfreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } prdrfparm = (struct readRF_parm*)rtw_zmalloc(sizeof(struct readRF_parm)); - if (prdrfparm ==NULL){ + if (prdrfparm == NULL){ rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -916,7 +916,7 @@ u8 rtw_createbss_cmd(struct adapter *padapter) } pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (pcmd ==NULL){ + if (pcmd == NULL){ res = _FAIL; goto exit; } @@ -948,7 +948,7 @@ u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss, unsigned ; pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (pcmd ==NULL){ + if (pcmd == NULL){ res = _FAIL; goto exit; } @@ -996,7 +996,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork) } pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (pcmd ==NULL){ + if (pcmd == NULL){ res =_FAIL; RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("rtw_joinbss_cmd: memory allocate for cmd_obj fail!!!\n")); goto exit; @@ -1027,14 +1027,14 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork) } psecnetwork =(struct wlan_bssid_ex *)&psecuritypriv->sec_bss; - if (psecnetwork ==NULL) + if (psecnetwork == NULL) { if (pcmd !=NULL) rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj)); res =_FAIL; - RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("rtw_joinbss_cmd :psecnetwork ==NULL!!!\n")); + RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("rtw_joinbss_cmd :psecnetwork == NULL!!!\n")); goto exit; } @@ -1180,7 +1180,7 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum NDIS_802_11_NETWORK_INFRAST ; psetop = (struct setopmode_parm*)rtw_zmalloc(sizeof(struct setopmode_parm)); - if (psetop ==NULL){ + if (psetop == NULL){ res =_FAIL; goto exit; } @@ -1188,7 +1188,7 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum NDIS_802_11_NETWORK_INFRAST if (enqueue){ ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ rtw_mfree((u8 *)psetop, sizeof(*psetop)); res = _FAIL; goto exit; @@ -1223,7 +1223,7 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key, bool en ; psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm)); - if (psetstakey_para ==NULL){ + if (psetstakey_para == NULL){ res =_FAIL; goto exit; } @@ -1305,7 +1305,7 @@ u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue) } psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm)); - if (psetstakey_para ==NULL){ + if (psetstakey_para == NULL){ rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); res =_FAIL; goto exit; @@ -1349,13 +1349,13 @@ u8 rtw_setrttbl_cmd(struct adapter *padapter, struct setratable_parm *prate_tab ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } psetrttblparm = (struct setratable_parm*)rtw_zmalloc(sizeof(struct setratable_parm)); - if (psetrttblparm ==NULL){ + if (psetrttblparm == NULL){ rtw_mfree((unsigned char *) ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -1381,13 +1381,13 @@ u8 rtw_getrttbl_cmd(struct adapter *padapter, struct getratable_rsp *pval) ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pgetrttblparm = (struct getratable_parm*)rtw_zmalloc(sizeof(struct getratable_parm)); - if (pgetrttblparm ==NULL){ + if (pgetrttblparm == NULL){ rtw_mfree((unsigned char *) ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -1423,20 +1423,20 @@ u8 rtw_setassocsta_cmd(struct adapter *padapter, u8 *mac_addr) ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } psetassocsta_para = (struct set_assocsta_parm*)rtw_zmalloc(sizeof(struct set_assocsta_parm)); - if (psetassocsta_para ==NULL){ + if (psetassocsta_para == NULL){ rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); res =_FAIL; goto exit; } psetassocsta_rsp = (struct set_stakey_rsp*)rtw_zmalloc(sizeof(struct set_assocsta_rsp)); - if (psetassocsta_rsp ==NULL){ + if (psetassocsta_rsp == NULL){ rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); rtw_mfree((u8 *) psetassocsta_para, sizeof(struct set_assocsta_parm)); return _FAIL; @@ -1468,13 +1468,13 @@ u8 rtw_addbareq_cmd(struct adapter*padapter, u8 tid, u8 *addr) ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } paddbareq_parm = (struct addBaReq_parm*)rtw_zmalloc(sizeof(struct addBaReq_parm)); - if (paddbareq_parm ==NULL){ + if (paddbareq_parm == NULL){ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -1507,13 +1507,13 @@ u8 rtw_reset_securitypriv_cmd(struct adapter*padapter) ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); - if (pdrvextra_cmd_parm ==NULL){ + if (pdrvextra_cmd_parm == NULL){ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -1547,13 +1547,13 @@ u8 rtw_free_assoc_resources_cmd(struct adapter*padapter) ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); - if (pdrvextra_cmd_parm ==NULL){ + if (pdrvextra_cmd_parm == NULL){ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -1585,13 +1585,13 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter*padapter) u8 res =_SUCCESS; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); - if (pdrvextra_cmd_parm ==NULL){ + if (pdrvextra_cmd_parm == NULL){ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -2039,13 +2039,13 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter*padapter, u8 lps_ctrl_type, u8 enqueue) if (enqueue) { ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); - if (pdrvextra_cmd_parm ==NULL){ + if (pdrvextra_cmd_parm == NULL){ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -2088,13 +2088,13 @@ u8 rtw_rpt_timer_cfg_cmd(struct adapter*padapter, u16 minRptTime) ; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); - if (pdrvextra_cmd_parm ==NULL){ + if (pdrvextra_cmd_parm == NULL){ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -2135,13 +2135,13 @@ u8 rtw_antenna_select_cmd(struct adapter*padapter, u8 antenna, u8 enqueue) if (true == enqueue) { ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); - if (pdrvextra_cmd_parm ==NULL){ + if (pdrvextra_cmd_parm == NULL){ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -2198,13 +2198,13 @@ u8 p2p_protocol_wk_cmd(struct adapter*padapter, int intCmdType ) } ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); - if (pdrvextra_cmd_parm ==NULL){ + if (pdrvextra_cmd_parm == NULL){ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -2236,13 +2236,13 @@ u8 rtw_ps_cmd(struct adapter*padapter) u8 res = _SUCCESS; ppscmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ppscmd ==NULL){ + if (ppscmd == NULL){ res = _FAIL; goto exit; } pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); - if (pdrvextra_cmd_parm ==NULL){ + if (pdrvextra_cmd_parm == NULL){ rtw_mfree((unsigned char *)ppscmd, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -2274,7 +2274,7 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter) if (!psta_bmc) return; - if (psta_bmc->sleepq_len ==0) + if (psta_bmc->sleepq_len == 0) { u8 val = 0; @@ -2319,13 +2319,13 @@ u8 rtw_chk_hi_queue_cmd(struct adapter*padapter) u8 res = _SUCCESS; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); - if (pdrvextra_cmd_parm ==NULL){ + if (pdrvextra_cmd_parm == NULL){ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -2698,7 +2698,7 @@ void rtw_setstaKey_cmdrsp_callback(struct adapter* padapter , struct cmd_obj *p ; - if (psta ==NULL) + if (psta == NULL) { RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nERROR: rtw_setstaKey_cmdrsp_callback => can't get sta_info\n\n")); goto exit; @@ -2719,7 +2719,7 @@ void rtw_setassocsta_cmdrsp_callback(struct adapter* padapter, struct cmd_obj * ; - if (psta ==NULL) + if (psta == NULL) { RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nERROR: setassocsta_cmdrsp_callbac => can't get sta_info\n\n")); goto exit; diff --git a/core/rtw_debug.c b/core/rtw_debug.c index 99442c4..b956767 100644 --- a/core/rtw_debug.c +++ b/core/rtw_debug.c @@ -119,7 +119,7 @@ int proc_get_read_reg(char *page, char **start, int len = 0; - if (proc_get_read_addr ==0xeeeeeeee) + if (proc_get_read_addr == 0xeeeeeeee) { *eof = 1; return len; @@ -520,7 +520,7 @@ int proc_get_rf_reg_dump1(char *page, char **start, value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff); if (j%4 ==1) len += snprintf(page + len, count - len, "0x%02x ", i); len += snprintf(page + len, count - len, " 0x%08x ", value); - if ((j++)%4 ==0) len += snprintf(page + len, count - len, "\n"); + if ((j++)%4 == 0) len += snprintf(page + len, count - len, "\n"); } *eof = 1; @@ -547,7 +547,7 @@ int proc_get_rf_reg_dump2(char *page, char **start, value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff); if (j%4 ==1) len += snprintf(page + len, count - len, "0x%02x ", i); len += snprintf(page + len, count - len, " 0x%08x ", value); - if ((j++)%4 ==0) len += snprintf(page + len, count - len, "\n"); + if ((j++)%4 == 0) len += snprintf(page + len, count - len, "\n"); } *eof = 1; return len; @@ -573,7 +573,7 @@ int proc_get_rf_reg_dump3(char *page, char **start, value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff); if (j%4 ==1) len += snprintf(page + len, count - len, "0x%02x ", i); len += snprintf(page + len, count - len, " 0x%08x ", value); - if ((j++)%4 ==0) len += snprintf(page + len, count - len, "\n"); + if ((j++)%4 == 0) len += snprintf(page + len, count - len, "\n"); } *eof = 1; @@ -600,7 +600,7 @@ int proc_get_rf_reg_dump4(char *page, char **start, value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff); if (j%4 ==1) len += snprintf(page + len, count - len, "0x%02x ", i); len += snprintf(page + len, count - len, " 0x%08x ", value); - if ((j++)%4 ==0) len += snprintf(page + len, count - len, "\n"); + if ((j++)%4 == 0) len += snprintf(page + len, count - len, "\n"); } *eof = 1; return len; @@ -650,7 +650,7 @@ int proc_set_rx_signal(struct file *file, const char __user *buffer, int num = sscanf(tmp, "%u %u", &is_signal_dbg, &signal_strength); - is_signal_dbg = is_signal_dbg ==0?0:1; + is_signal_dbg = is_signal_dbg == 0?0:1; if (is_signal_dbg && num!=2) return count; diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index c4459c4..2c7b997 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -1271,10 +1271,10 @@ void rtw_macaddr_cfg(u8 *mac_addr) memcpy(mac, mac_addr, ETH_ALEN); } - if (((mac[0]==0xff) &&(mac[1]==0xff) && (mac[2]==0xff) && - (mac[3]==0xff) && (mac[4]==0xff) &&(mac[5]==0xff)) || - ((mac[0]==0x0) && (mac[1]==0x0) && (mac[2]==0x0) && - (mac[3]==0x0) && (mac[4]==0x0) &&(mac[5]==0x0))) + if (((mac[0]== 0xff) &&(mac[1]== 0xff) && (mac[2]== 0xff) && + (mac[3]== 0xff) && (mac[4]== 0xff) &&(mac[5]== 0xff)) || + ((mac[0]== 0x0) && (mac[1]== 0x0) && (mac[2]== 0x0) && + (mac[3]== 0x0) && (mac[4]== 0x0) &&(mac[5]== 0x0))) { mac[0] = 0x00; mac[1] = 0xe0; diff --git a/core/rtw_ioctl_set.c b/core/rtw_ioctl_set.c index 0fbed6e..ab981ae 100644 --- a/core/rtw_ioctl_set.c +++ b/core/rtw_ioctl_set.c @@ -222,8 +222,8 @@ u8 rtw_set_802_11_bssid(struct adapter* padapter, u8 *bssid) DBG_871X_LEVEL(_drv_always_, "set bssid:%pM\n", bssid); - if ((bssid[0]==0x00 && bssid[1]==0x00 && bssid[2]==0x00 && bssid[3]==0x00 && bssid[4]==0x00 &&bssid[5]==0x00) || - (bssid[0]==0xFF && bssid[1]==0xFF && bssid[2]==0xFF && bssid[3]==0xFF && bssid[4]==0xFF &&bssid[5]==0xFF)) + if ((bssid[0]== 0x00 && bssid[1]== 0x00 && bssid[2]== 0x00 && bssid[3]== 0x00 && bssid[4]== 0x00 &&bssid[5]== 0x00) || + (bssid[0]== 0xFF && bssid[1]== 0xFF && bssid[2]== 0xFF && bssid[3]== 0xFF && bssid[4]== 0xFF &&bssid[5]== 0xFF)) { status = _FAIL; goto exit; @@ -807,7 +807,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key) encryptionalgo =stainfo->dot118021XPrivacy; } else{ - RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY: stainfo ==NULL)||(Adapter->securitypriv.dot11AuthAlgrthm!=dot11AuthAlgrthm_8021X)\n")); + RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY: stainfo == NULL)||(Adapter->securitypriv.dot11AuthAlgrthm!=dot11AuthAlgrthm_8021X)\n")); encryptionalgo =padapter->securitypriv.dot11PrivacyAlgrthm; } @@ -874,11 +874,11 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, struct ndis_802_11_key *key) RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("key Length: %d\n", key->KeyLength)); RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("------------------------------------------\n")); } else { - /* Group key - KeyIndex(BIT30 ==0) */ + /* Group key - KeyIndex(BIT30 == 0) */ RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("OID_802_11_ADD_KEY: +++++ Group key +++++\n")); /* when add wep key through add key and didn't assigned encryption type before */ - if ((padapter->securitypriv.ndisauthtype<=3)&&(padapter->securitypriv.dot118021XGrpPrivacy ==0)) + if ((padapter->securitypriv.ndisauthtype<=3)&&(padapter->securitypriv.dot118021XGrpPrivacy == 0)) { RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("keylen =%d( Adapter->securitypriv.dot11PrivacyAlgrthm =%x )padapter->securitypriv.dot118021XGrpPrivacy(%x)\n", key->KeyLength, padapter->securitypriv.dot11PrivacyAlgrthm, padapter->securitypriv.dot118021XGrpPrivacy)); diff --git a/core/rtw_iol.c b/core/rtw_iol.c index 0d7ccb9..fddac2e 100644 --- a/core/rtw_iol.c +++ b/core/rtw_iol.c @@ -239,7 +239,7 @@ void rtw_IOL_cmd_buf_dump(struct adapter *Adapter, int buf_len, u8 *pbuf) for (i =0;i< buf_len;i++){ printk("%02x-",*(pbuf+i)); - if (j%32 ==0) printk("\n");j++; + if (j%32 == 0) printk("\n");j++; } printk("\n"); printk("============= ioreg_cmd len = %d ===============\n", buf_len); diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index f87da35..b502255 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -795,7 +795,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t pnetwork = rtw_alloc_network(pmlmepriv); /* will update scan_time */ - if (pnetwork ==NULL){ + if (pnetwork == NULL){ RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n\n\nsomething wrong here\n\n\n")); goto exit; } @@ -1394,7 +1394,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str struct sta_priv *pstapriv = &padapter->stapriv; psta = rtw_get_stainfo(pstapriv, pnetwork->network.MacAddress); - if (psta ==NULL) { + if (psta == NULL) { psta = rtw_alloc_stainfo(pstapriv, pnetwork->network.MacAddress); } @@ -1638,7 +1638,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf) /* s3. find ptarget_sta & update ptarget_sta after update cur_network only for station mode */ if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork); - if (ptarget_sta ==NULL) { + if (ptarget_sta == NULL) { RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't update stainfo when joinbss_event callback\n")); spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); goto exit_unlock; @@ -1759,7 +1759,7 @@ void rtw_sta_media_status_rpt(struct adapter *adapter, struct sta_info *psta, u3 { u16 media_status_rpt; - if (psta ==NULL) return; + if (psta == NULL) return; #if (RATE_ADAPTIVE_SUPPORT ==1) /* for 88E RA */ { @@ -2100,7 +2100,7 @@ static void rtw_auto_scan_handler(struct adapter *padapter) if (pmlmepriv->scan_interval >0) { pmlmepriv->scan_interval--; - if (pmlmepriv->scan_interval ==0) + if (pmlmepriv->scan_interval == 0) { DBG_871X("%s\n", __FUNCTION__); @@ -2308,8 +2308,8 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv ) while (!rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) { pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned, struct wlan_network, list); - if (pnetwork ==NULL){ - RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s return _FAIL:(pnetwork ==NULL)\n", __FUNCTION__)); + if (pnetwork == NULL){ + RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s return _FAIL:(pnetwork == NULL)\n", __FUNCTION__)); ret = _FAIL; goto exit; } @@ -2371,13 +2371,13 @@ sint rtw_set_auth(struct adapter * adapter, struct security_priv *psecuritypriv) ; pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (pcmd ==NULL){ + if (pcmd == NULL){ res = _FAIL; /* try again */ goto exit; } psetauthparm =(struct setauth_parm*)rtw_zmalloc(sizeof(struct setauth_parm)); - if (psetauthparm ==NULL){ + if (psetauthparm == NULL){ rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj)); res = _FAIL; goto exit; @@ -2420,7 +2420,7 @@ sint rtw_set_key(struct adapter * adapter, struct security_priv *psecuritypriv, ; psetkeyparm =(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm)); - if (psetkeyparm ==NULL){ + if (psetkeyparm == NULL){ res = _FAIL; goto exit; } @@ -2473,7 +2473,7 @@ sint rtw_set_key(struct adapter * adapter, struct security_priv *psecuritypriv, if (enqueue){ pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (pcmd ==NULL){ + if (pcmd == NULL){ rtw_mfree((unsigned char *)psetkeyparm, sizeof(struct setkey_parm)); res = _FAIL; /* try again */ goto exit; @@ -3008,7 +3008,7 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra); } - if (psta ==NULL) + if (psta == NULL) { DBG_871X("%s, psta ==NUL\n", __func__); return; diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index dc287cb..24e1434 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -1130,7 +1130,7 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame) goto auth_fail; } - if (algorithm ==0 && (auth_mode == 0 || auth_mode == 2)) + if (algorithm == 0 && (auth_mode == 0 || auth_mode == 2)) { if (seq == 1) { @@ -1166,7 +1166,7 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame) p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + 4 + _AUTH_IE_OFFSET_ , _CHLGETXT_IE_, (int *)&ie_len, len - WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_ - 4); - if ((p ==NULL) || (ie_len<=0)) + if ((p == NULL) || (ie_len<=0)) { DBG_871X("auth rejected because challenge failure!(1)\n"); status = _STATS_CHALLENGE_FAIL_; @@ -2299,7 +2299,7 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra addr = GetAddr2Ptr(pframe); psta = rtw_get_stainfo(pstapriv, addr); - if (psta ==NULL) + if (psta == NULL) return _SUCCESS; frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); @@ -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 ((iampdu_amsdu ==0)/* disabled */ + if (pregpriv->ampdu_amsdu == 0)/* disabled */ le_tmp = cpu_to_le16(BA_para_set & ~BIT(0)); else if (pregpriv->ampdu_amsdu ==1)/* enabled */ le_tmp = cpu_to_le16(BA_para_set | BIT(0)); @@ -7766,7 +7766,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter) struct __queue *queue = &(pmlmepriv->scanned_queue); u8 InfoContent[16] = {0}; u8 ICS[8][15]; - if ((pmlmepriv->num_FortyMHzIntolerant ==0) || (pmlmepriv->num_sta_no_ht ==0)) + if ((pmlmepriv->num_FortyMHzIntolerant == 0) || (pmlmepriv->num_sta_no_ht == 0)) return; if (true == pmlmeinfo->bwmode_updated) @@ -7850,7 +7850,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter) pbss_network = (struct wlan_bssid_ex *)&pnetwork->network; p = rtw_get_ie(pbss_network->IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, pbss_network->IELength - _FIXED_IE_LENGTH_); - if ((p ==NULL) || (len ==0))/* non-HT */ + if ((p == NULL) || (len == 0))/* non-HT */ { if ((pbss_network->Configuration.DSConfig<=0) || (pbss_network->Configuration.DSConfig>14)) continue; @@ -7908,12 +7908,12 @@ unsigned int send_delba(struct adapter *padapter, u8 initiator, u8 *addr) return _SUCCESS; psta = rtw_get_stainfo(pstapriv, addr); - if (psta ==NULL) + if (psta == NULL) return _SUCCESS; - /* DBG_871X("%s:%s\n", __FUNCTION__, (initiator ==0)?"RX_DIR":"TX_DIR"); */ + /* DBG_871X("%s:%s\n", __FUNCTION__, (initiator == 0)?"RX_DIR":"TX_DIR"); */ - if (initiator ==0) /* recipient */ + if (initiator == 0) /* recipient */ { for (tid = 0;tidmlmepriv.scanned_queue.lock)); rtw_warn_on(1); return; diff --git a/core/rtw_p2p.c b/core/rtw_p2p.c index 395d555..51a7ea5 100644 --- a/core/rtw_p2p.c +++ b/core/rtw_p2p.c @@ -2322,7 +2322,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l num_of_secdev_type = *pattr_content; pattr_content += 1; - if (num_of_secdev_type ==0) + if (num_of_secdev_type == 0) { psta->num_of_secdev_type = 0; } @@ -4032,13 +4032,13 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue) if (enqueue) { ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (ph2c ==NULL){ + if (ph2c == NULL){ res = _FAIL; goto exit; } pdrvextra_cmd_parm = (struct drvextra_cmd_parm*)rtw_zmalloc(sizeof(struct drvextra_cmd_parm)); - if (pdrvextra_cmd_parm ==NULL){ + if (pdrvextra_cmd_parm == NULL){ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); res = _FAIL; goto exit; diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index aae1009..28ce69a 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -267,7 +267,7 @@ void rtw_ps_processor(struct adapter*padapter) if (rtw_pwr_unassociated_idle(padapter) == false) goto exit; - if ((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts%4) ==0)) + if ((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts%4) == 0)) { DBG_871X("==>%s .fw_state(%x)\n", __FUNCTION__, get_fwstate(pmlmepriv)); #if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND) @@ -1039,7 +1039,7 @@ int rtw_pm_set_ips(struct adapter *padapter, u8 mode) else if (mode ==IPS_NONE){ rtw_ips_mode_req(pwrctrlpriv, mode); DBG_871X("%s %s\n", __FUNCTION__, "IPS_NONE"); - if ((padapter->bSurpriseRemoved ==0)&&(_FAIL == rtw_pwr_wakeup(padapter)) ) + if ((padapter->bSurpriseRemoved == 0)&&(_FAIL == rtw_pwr_wakeup(padapter)) ) return -EFAULT; } else { diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 79e4327..735276c 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -82,7 +82,7 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) precvpriv->pallocated_frame_buf = rtw_zvmalloc(NR_RECVFRAME * sizeof(union recv_frame) + RXFRAME_ALIGN_SZ); - if (precvpriv->pallocated_frame_buf ==NULL){ + if (precvpriv->pallocated_frame_buf == NULL){ res = _FAIL; goto exit; } @@ -500,7 +500,7 @@ sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe){ } else { - RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("recvframe_chkmic: rtw_get_stainfo ==NULL!!!\n")); + RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("recvframe_chkmic: rtw_get_stainfo == NULL!!!\n")); } recvframe_pull_tail(precvframe, 8); @@ -547,7 +547,7 @@ static union recv_frame *decryptor(struct adapter *padapter, union recv_frame *p } } - if ((prxattrib->encrypt>0) && ((prxattrib->bdecrypted ==0) ||(psecuritypriv->sw_decrypt ==true))) + if ((prxattrib->encrypt>0) && ((prxattrib->bdecrypted == 0) ||(psecuritypriv->sw_decrypt ==true))) { psecuritypriv->hw_decrypted =false; @@ -658,7 +658,7 @@ static union recv_frame * portctrl(struct adapter *adapter, union recv_frame * p { /* allowed */ /* check decryption status, and decrypt the frame if needed */ - RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("########portctrl:psta->ieee8021x_blocked ==0\n")); + RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("########portctrl:psta->ieee8021x_blocked == 0\n")); RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("portctrl:precv_frame->hdr.attrib.privacy =%x\n", precv_frame->u.hdr.attrib.privacy)); if (pattrib->bdecrypted == 0) @@ -1246,7 +1246,7 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_ aid = GetAid(pframe); psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); - if ((psta ==NULL) || (psta->aid!=aid)) + if ((psta == NULL) || (psta->aid!=aid)) { return _FAIL; } @@ -1319,7 +1319,7 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_ rtw_hal_xmitframe_enqueue(padapter, pxmitframe); - if (psta->sleepq_len ==0) + if (psta->sleepq_len == 0) { pstapriv->tim_bitmap &= ~BIT(psta->aid); @@ -1340,7 +1340,7 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_ /* DBG_871X("no buffered packets to xmit\n"); */ if (pstapriv->tim_bitmap&BIT(psta->aid)) { - if (psta->sleepq_len ==0) + if (psta->sleepq_len == 0) { DBG_871X("no buffered packets to xmit\n"); @@ -1536,8 +1536,8 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f } - if (psta ==NULL){ - RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" after to_fr_ds_chk; psta ==NULL\n")); + if (psta == NULL){ + RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, (" after to_fr_ds_chk; psta == NULL\n")); #ifdef DBG_RX_DROP_FRAME DBG_871X("DBG_RX_DROP_FRAME %s psta == NULL\n", __func__); #endif @@ -2068,7 +2068,7 @@ union recv_frame* recvframe_chk_defrag(struct adapter *padapter, union recv_fram else pdefrag_q = &psta->sta_recvpriv.defrag_q; - if ((ismfrag ==0) && (fragnum ==0)) + if ((ismfrag == 0) && (fragnum == 0)) { prtnframe = precv_frame;/* isn't a fragment frame */ } @@ -2079,7 +2079,7 @@ union recv_frame* recvframe_chk_defrag(struct adapter *padapter, union recv_fram /* enqueue to defraf_g */ if (pdefrag_q != NULL) { - if (fragnum ==0) + if (fragnum == 0) { /* the first fragment */ if (_rtw_queue_empty(pdefrag_q) == false) @@ -2107,12 +2107,12 @@ union recv_frame* recvframe_chk_defrag(struct adapter *padapter, union recv_fram /* can't find this ta's defrag_queue, so free this recv_frame */ rtw_free_recvframe(precv_frame, pfree_recv_queue); prtnframe =NULL; - RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("Free because pdefrag_q ==NULL: ismfrag = %d, fragnum = %d\n", ismfrag, fragnum)); + RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("Free because pdefrag_q == NULL: ismfrag = %d, fragnum = %d\n", ismfrag, fragnum)); } } - if ((ismfrag ==0)&&(fragnum!=0)) + if ((ismfrag == 0)&&(fragnum!=0)) { /* the last fragment frame */ /* enqueue the last fragment */ @@ -2134,7 +2134,7 @@ union recv_frame* recvframe_chk_defrag(struct adapter *padapter, union recv_fram /* can't find this ta's defrag_queue, so free this recv_frame */ rtw_free_recvframe(precv_frame, pfree_recv_queue); prtnframe =NULL; - RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("Free because pdefrag_q ==NULL: ismfrag = %d, fragnum = %d\n", ismfrag, fragnum)); + RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("Free because pdefrag_q == NULL: ismfrag = %d, fragnum = %d\n", ismfrag, fragnum)); } } @@ -2784,7 +2784,7 @@ static int recv_func_posthandle(struct adapter *padapter, union recv_frame *prfr } prframe = recvframe_chk_defrag(padapter, prframe); - if (prframe ==NULL) { + if (prframe == NULL) { RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("recvframe_chk_defrag: drop pkt\n")); #ifdef DBG_RX_DROP_FRAME DBG_871X("DBG_RX_DROP_FRAME %s recvframe_chk_defrag: drop pkt\n", __FUNCTION__); diff --git a/core/rtw_security.c b/core/rtw_security.c index 3b1fec1..8133359 100644 --- a/core/rtw_security.c +++ b/core/rtw_security.c @@ -179,7 +179,7 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe) ; - if (((struct xmit_frame*)pxmitframe)->buf_addr ==NULL) + if (((struct xmit_frame*)pxmitframe)->buf_addr == NULL) return; hw_hdr_offset = TXDESC_SIZE + @@ -396,7 +396,7 @@ void rtw_seccalctkipmic(u8 * key, u8 *header, u8 *data, u32 data_len, u8 *mic_co rtw_secmicappend(&micdata, &header[24], 6); else rtw_secmicappend(&micdata, &header[10], 6); - } else{ /* ToDS ==0 */ + } else{ /* ToDS == 0 */ rtw_secmicappend(&micdata, &header[4], 6); /* DA */ if (header[1]&2) /* From Ds ==1 */ rtw_secmicappend(&micdata, &header[16], 6); @@ -646,7 +646,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe) u32 res =_SUCCESS; ; - if (((struct xmit_frame*)pxmitframe)->buf_addr ==NULL) + if (((struct xmit_frame*)pxmitframe)->buf_addr == NULL) return _FAIL; hw_hdr_offset = TXDESC_SIZE + @@ -725,7 +725,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe) } else{ - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo ==NULL!!!\n")); + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo == NULL!!!\n")); DBG_871X("%s, psta ==NUL\n", __func__); res =_FAIL; } @@ -846,7 +846,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) } else{ - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo ==NULL!!!\n")); + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo == NULL!!!\n")); res =_FAIL; } @@ -1543,7 +1543,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) struct xmit_priv *pxmitpriv =&padapter->xmitpriv; u32 res =_SUCCESS; - if (((struct xmit_frame*)pxmitframe)->buf_addr ==NULL) + if (((struct xmit_frame*)pxmitframe)->buf_addr == NULL) return _FAIL; hw_hdr_offset = TXDESC_SIZE + @@ -1589,7 +1589,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) } } } else{ - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_encrypt: stainfo ==NULL!!!\n")); + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_encrypt: stainfo == NULL!!!\n")); DBG_871X("%s, psta ==NUL\n", __func__); res =_FAIL; } @@ -1931,7 +1931,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe) res = aes_decipher(prwskey, prxattrib->hdrlen, pframe, length); } else { - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_encrypt: stainfo ==NULL!!!\n")); + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_encrypt: stainfo == NULL!!!\n")); res =_FAIL; } diff --git a/core/rtw_sreset.c b/core/rtw_sreset.c index a86863a..33756b6 100644 --- a/core/rtw_sreset.c +++ b/core/rtw_sreset.c @@ -55,7 +55,7 @@ u8 sreset_get_wifi_status(struct adapter *padapter) return status; } val32 =rtw_read32(padapter, REG_TXDMA_STATUS); - if (val32 ==0xeaeaeaea){ + if (val32 == 0xeaeaeaea){ psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST; } else if (val32!=0){ diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 68c4a2b..d303e88 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -553,7 +553,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) ; - if (hwaddr ==NULL) + if (hwaddr == NULL) return NULL; if (IS_MCAST(hwaddr)) @@ -606,7 +606,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter) psta = rtw_alloc_stainfo(pstapriv, bcast_addr); - if (psta ==NULL){ + if (psta == NULL){ res =_FAIL; RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail")); goto exit; diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 433c577..1cc26db 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -743,7 +743,7 @@ int WMM_param_handler(struct adapter *padapter, struct ndis_802_11_variable_ies struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - if (pmlmepriv->qospriv.qos_option ==0) + if (pmlmepriv->qospriv.qos_option == 0) { pmlmeinfo->WMM_enable = 0; return _FAIL; @@ -981,7 +981,7 @@ void HT_caps_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * struct ht_priv *phtpriv = &pmlmepriv->htpriv; struct registry_priv *pregistrypriv = &padapter->registrypriv; - if (pIE ==NULL) return; + if (pIE == NULL) return; if (phtpriv->ht_option == false) return; @@ -1044,7 +1044,7 @@ void HT_info_handler(struct adapter *padapter, struct ndis_802_11_variable_ies * struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv; - if (pIE ==NULL) return; + if (pIE == NULL) return; if (phtpriv->ht_option == false) return; diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 9040427..b49e63a 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -329,7 +329,7 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv) rtw_mfree_xmit_priv_lock(pxmitpriv); - if (pxmitpriv->pxmit_frame_buf ==NULL) + if (pxmitpriv->pxmit_frame_buf == NULL) goto out; for (i =0; istapriv ,&pattrib->ra[0] ); } - if (psta ==NULL) + if (psta == NULL) { DBG_871X("%s, psta ==NUL\n", __func__); return; @@ -851,7 +851,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr stainfo =rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0]); } - if (stainfo ==NULL) + if (stainfo == NULL) { DBG_871X("%s, psta ==NUL\n", __func__); return _FAIL; @@ -878,7 +878,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr if (bmcst) { if (_rtw_memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16) ==true){ - /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey ==0\n"); */ + /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey == 0\n"); */ /* rtw_msleep_os(10); */ return _FAIL; } @@ -888,7 +888,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr else { if (_rtw_memcmp(&stainfo->dot11tkiptxmickey.skey[0], null_key, 16) ==true){ - /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey ==0\n"); */ + /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey == 0\n"); */ /* rtw_msleep_os(10); */ return _FAIL; } @@ -902,7 +902,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr rtw_secmicappend(&micdata, &pframe[24], 6); else rtw_secmicappend(&micdata, &pframe[10], 6); - } else{ /* ToDS ==0 */ + } else{ /* ToDS == 0 */ rtw_secmicappend(&micdata, &pframe[4], 6); /* DA */ if (pframe[1]&2) /* From Ds ==1 */ rtw_secmicappend(&micdata, &pframe[16], 6); @@ -958,7 +958,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr *(payload+curfragnum+4),*(payload+curfragnum+5),*(payload+curfragnum+6),*(payload+curfragnum+7))); } else{ - RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("xmitframe_addmic: rtw_get_stainfo ==NULL!!!\n")); + RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("xmitframe_addmic: rtw_get_stainfo == NULL!!!\n")); } } @@ -1032,7 +1032,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat } } - if (psta ==NULL) + if (psta == NULL) { DBG_871X("%s, psta ==NUL\n", __func__); return _FAIL; @@ -1194,7 +1194,7 @@ s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, struct pkt_attrib *pat psta =rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0]); } - if (psta ==NULL) + if (psta == NULL) { DBG_871X("%s, psta ==NUL\n", __func__); return 0; @@ -1294,7 +1294,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra); } - if (psta ==NULL) + if (psta == NULL) { DBG_871X("%s, psta ==NUL\n", __func__); @@ -1309,7 +1309,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct } if (pxmitframe->buf_addr == NULL){ - DBG_8192C("==> %s buf_addr ==NULL\n", __FUNCTION__); + DBG_8192C("==> %s buf_addr == NULL\n", __FUNCTION__); return _FAIL; } @@ -1587,14 +1587,14 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra); } - if (psta ==NULL) + if (psta == NULL) { DBG_871X("%s, psta ==NUL\n", __func__); goto xmitframe_coalesce_fail; } - if (!(psta->state & _FW_LINKED) || pxmitframe->buf_addr ==NULL) + if (!(psta->state & _FW_LINKED) || pxmitframe->buf_addr == NULL) { DBG_871X("%s, not _FW_LINKED or addr null\n", __func__); goto xmitframe_coalesce_fail; @@ -1845,7 +1845,7 @@ s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf) struct __queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue; unsigned long flags; - if (pxmitbuf ==NULL) + if (pxmitbuf == NULL) return _FAIL; spin_lock_irqsave(&pfree_queue->lock, flags); @@ -1921,7 +1921,7 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf) struct __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue; unsigned long flags; - if (pxmitbuf ==NULL) + if (pxmitbuf == NULL) return _FAIL; if (pxmitbuf->sctx) { @@ -2093,7 +2093,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram ; if (pxmitframe == NULL) { - RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("======rtw_free_xmitframe():pxmitframe ==NULL!!!!!!!!!!\n")); + RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("======rtw_free_xmitframe():pxmitframe == NULL!!!!!!!!!!\n")); goto exit; } @@ -2770,7 +2770,7 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr psta =rtw_get_stainfo(pstapriv, pattrib->ra); } - if (psta ==NULL) + if (psta == NULL) { DBG_871X("%s, psta ==NUL\n", __func__); return false; @@ -3096,12 +3096,12 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) } - if (psta_bmc->sleepq_len ==0) + if (psta_bmc->sleepq_len == 0) { pstapriv->tim_bitmap &= ~BIT(0); pstapriv->sta_dz_bitmap &= ~BIT(0); - /* DBG_871X("wakeup to xmit, qlen ==0, update_BCNTIM, tim =%x\n", pstapriv->tim_bitmap); */ + /* DBG_871X("wakeup to xmit, qlen == 0, update_BCNTIM, tim =%x\n", pstapriv->tim_bitmap); */ /* upate BCN for TIM IE */ /* update_BCNTIM(padapter); */ update_mask |= BIT(1); @@ -3109,11 +3109,11 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) } - if (psta->sleepq_len ==0) + if (psta->sleepq_len == 0) { pstapriv->tim_bitmap &= ~BIT(psta->aid); - /* DBG_871X("wakeup to xmit, qlen ==0, update_BCNTIM, tim =%x\n", pstapriv->tim_bitmap); */ + /* DBG_871X("wakeup to xmit, qlen == 0, update_BCNTIM, tim =%x\n", pstapriv->tim_bitmap); */ /* upate BCN for TIM IE */ /* update_BCNTIM(padapter); */ update_mask = BIT(0); @@ -3205,7 +3205,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst rtw_hal_xmitframe_enqueue(padapter, pxmitframe); - if ((psta->sleepq_ac_len ==0) && (!psta->has_legacy_ac) && (wmmps_ac)) + if ((psta->sleepq_ac_len == 0) && (!psta->has_legacy_ac) && (wmmps_ac)) { pstapriv->tim_bitmap &= ~BIT(psta->aid); diff --git a/hal/Hal8188ERateAdaptive.c b/hal/Hal8188ERateAdaptive.c index 7695b3f..88cc53c 100644 --- a/hal/Hal8188ERateAdaptive.c +++ b/hal/Hal8188ERateAdaptive.c @@ -116,7 +116,7 @@ odm_SetTxRPTTiming_8188E( if (DynamicTxRPTTiming[idx] == pRaInfo->RptTime) break; - if (extend==0) /* back to default timing */ + if (extend== 0) /* back to default timing */ idx=0; /* 200ms */ else if (extend==1) {/* increase the timing */ idx+=1; @@ -186,7 +186,7 @@ RateDownFinish: pRaInfo->RAWaitingCounter+=1; pRaInfo->RAPendingCounter+=1; } - else if (pRaInfo->RAWaitingCounter==0){ + else if (pRaInfo->RAWaitingCounter== 0){ } else{ pRaInfo->RAWaitingCounter=0; @@ -513,7 +513,7 @@ odm_PTTryState_8188E( if ((pRaInfo->PTStopCount>=10)||(pRaInfo->PTPreRssi>pRaInfo->RssiStaRA+5) ||(pRaInfo->PTPreRssiRssiStaRA-5)||(pRaInfo->DecisionRate!=pRaInfo->PTPreRate)) { - if (pRaInfo->PTStage==0) + if (pRaInfo->PTStage== 0) pRaInfo->PTStage=1; else if (pRaInfo->PTStage==1) pRaInfo->PTStage=3; diff --git a/hal/HalPhyRf_8188e.c b/hal/HalPhyRf_8188e.c index aebb7d0..13c285b 100644 --- a/hal/HalPhyRf_8188e.c +++ b/hal/HalPhyRf_8188e.c @@ -1256,7 +1256,7 @@ else /* Note: IQ calibration must be performed after loading */ /* PHY_REG.txt , and radio_a, radio_b.txt */ - if (t==0) { + if (t== 0) { ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("IQ Calibration for %s for %d times\n", (is2T ? "2T2R" : "1T1R"), t)); /* Save ADDA parameters, turn Path A ADDA on */ @@ -1268,7 +1268,7 @@ else _PHY_PathADDAOn(pAdapter, ADDA_REG, true, is2T); - if (t==0) { + if (t== 0) { pDM_Odm->RFCalibrateInfo.bRfPiEnable = (u8)ODM_GetBBReg(pDM_Odm, rFPGA0_XA_HSSIParameter1, BIT(8)); } @@ -1973,7 +1973,7 @@ if (*(pDM_Odm->mp_mode) == 1) result[0][i] = 0; result[1][i] = 0; result[2][i] = 0; - if ((i==0) ||(i==2) || (i==4) || (i==6)) + if ((i== 0) ||(i==2) || (i==4) || (i==6)) result[3][i] = 0x100; else result[3][i] = 0; diff --git a/hal/odm.c b/hal/odm.c index c2f073a..fa4621a 100644 --- a/hal/odm.c +++ b/hal/odm.c @@ -3111,7 +3111,7 @@ odm_StaDefAntSel( ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("CCK_Ant1_Cnt:%d, CCK_Ant2_Cnt:%d\n",CCK_Ant1_Cnt,CCK_Ant2_Cnt)); - if (((OFDM_Ant1_Cnt+OFDM_Ant2_Cnt)==0)&&((CCK_Ant1_Cnt + CCK_Ant2_Cnt) <10)){ + if (((OFDM_Ant1_Cnt+OFDM_Ant2_Cnt)== 0)&&((CCK_Ant1_Cnt + CCK_Ant2_Cnt) <10)){ ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("odm_StaDefAntSelect Fail: No enough packet info!\n")); return false; } @@ -3162,7 +3162,7 @@ odm_SetRxIdleAnt( /* for path-B */ if (bDualPath){ - if (Ant==0) + if (Ant== 0) ODM_SetBBReg(pDM_Odm,ODM_REG_RX_DEFUALT_A_11N, 0xFFFF0000, 0x65a9); /* right-side antenna */ else ODM_SetBBReg(pDM_Odm,ODM_REG_RX_DEFUALT_A_11N, 0xFFFF0000, 0x569a); /* left-side antenna */ diff --git a/hal/rtl8188e_dm.c b/hal/rtl8188e_dm.c index c0b51f3..f57e8ed 100644 --- a/hal/rtl8188e_dm.c +++ b/hal/rtl8188e_dm.c @@ -378,7 +378,7 @@ u8 AntDivBeforeLink8188E(struct adapter *Adapter ) struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); /* Condition that does not need to use antenna diversity. */ - if (pHalData->AntDivCfg==0) + if (pHalData->AntDivCfg== 0) { /* DBG_8192C("odm_AntDivBeforeLink8192C(): No AntDiv Mechanism.\n"); */ return false; diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index cb5ab63..2845a36 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -650,7 +650,7 @@ _FillDummy( { u32 FwLen = *pFwLen; u8 remain = (u8)(FwLen%4); - remain = (remain==0)?0:(4-remain); + remain = (remain== 0)?0:(4-remain); while (remain>0) { @@ -1338,7 +1338,7 @@ exit: DBG_871X("%s compare first 0x130 byte fail\n", __FUNCTION__); for (i=0;i<512;i++) { - if (i%16==0) + if (i%16== 0) DBG_871X("0x%03x: ", i); DBG_871X("%02x ", logical_map[i]); if (i%16==15) @@ -1769,7 +1769,7 @@ hal_EfusePgPacketRead_8188e( EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION, (void *)&max_section, bPseudoTest); - if (data==NULL) + if (data== NULL) return false; if (offset>max_section) return false; @@ -1855,8 +1855,8 @@ hal_EfusePgPacketRead_8188e( } - if ( (data[0]==0xff) &&(data[1]==0xff) && (data[2]==0xff) && (data[3]==0xff) && - (data[4]==0xff) &&(data[5]==0xff) && (data[6]==0xff) && (data[7]==0xff)) + if ( (data[0]== 0xff) &&(data[1]== 0xff) && (data[2]== 0xff) && (data[3]== 0xff) && + (data[4]== 0xff) &&(data[5]== 0xff) && (data[6]== 0xff) && (data[7]== 0xff)) return false; else return true; @@ -2743,7 +2743,7 @@ void Read_LLT_Tab(struct adapter *padapter) for (addr=0;addr<176;addr++) { next_addr = _LLTRead(padapter,addr); printk("%d->",next_addr); - if (((addr+1) %8) ==0) + if (((addr+1) %8) == 0) printk("\n"); } printk("\n##################################\n"); @@ -2902,7 +2902,7 @@ Hal_ReadPowerValueFromPROM_8188E( } for (TxCount=0;TxCountBW20_Diff[rfPath][0] = EEPROM_DEFAULT_24G_HT20_DIFF; pwrInfo24G->OFDM_Diff[rfPath][0] = EEPROM_DEFAULT_24G_OFDM_DIFF; @@ -2947,7 +2947,7 @@ Hal_ReadPowerValueFromPROM_8188E( } for (TxCount=0;TxCountBW40_Diff[rfPath][TxCount] = 0; if (PROMContent[eeAddr] == 0xFF) diff --git a/hal/rtl8188e_rf6052.c b/hal/rtl8188e_rf6052.c index ff7fe67..1b39705 100644 --- a/hal/rtl8188e_rf6052.c +++ b/hal/rtl8188e_rf6052.c @@ -217,7 +217,7 @@ rtl8188e_PHY_RF6052SetCckTxPower( (pPowerlevel[idx1]<<16) | (pPowerlevel[idx1]<<24); } - if (pHalData->EEPROMRegulatory==0) + if (pHalData->EEPROMRegulatory== 0) { tmpval = (pHalData->MCSTxPowerLevelOriginalOffset[0][6]) + (pHalData->MCSTxPowerLevelOriginalOffset[0][7]<<8); @@ -295,7 +295,7 @@ static void getPowerBase88E( powerBase0 = (powerBase0<<24) | (powerBase0<<16) |(powerBase0<<8) |powerBase0; *(OfdmBase+i) = powerBase0; - /* DBG_871X(" [OFDM power base index rf(%c) = 0x%x]\n", ((i==0)?'A':'B'), *(OfdmBase+i)); */ + /* DBG_871X(" [OFDM power base index rf(%c) = 0x%x]\n", ((i== 0)?'A':'B'), *(OfdmBase+i)); */ } for (i=0; iNumTotalRFPath; i++) @@ -312,7 +312,7 @@ static void getPowerBase88E( powerBase1 = powerlevel[i]; powerBase1 = (powerBase1<<24) | (powerBase1<<16) |(powerBase1<<8) |powerBase1; *(MCSBase+i) = powerBase1; - /* DBG_871X(" [MCS power base index rf(%c) = 0x%x]\n", ((i==0)?'A':'B'), *(MCSBase+i)); */ + /* DBG_871X(" [MCS power base index rf(%c) = 0x%x]\n", ((i== 0)?'A':'B'), *(MCSBase+i)); */ } } @@ -345,7 +345,7 @@ static void getTxPowerWriteValByRegulatory88E( /* chnlGroup, index, pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf?8:0)])); */ writeVal = pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf?8:0)] + ((index<2)?powerBase0[rf]:powerBase1[rf]); - /* RTPRINT(FPHY, PHY_TXPWR, ("RTK better performance, writeVal(%c) = 0x%x\n", ((rf==0)?'A':'B'), writeVal)); */ + /* RTPRINT(FPHY, PHY_TXPWR, ("RTK better performance, writeVal(%c) = 0x%x\n", ((rf== 0)?'A':'B'), writeVal)); */ break; case 1: /* Realtek regulatory */ /* increase power diff defined by Realtek for regulatory */ @@ -407,15 +407,15 @@ static void getTxPowerWriteValByRegulatory88E( } customer_limit = (pwr_diff_limit[3]<<24) | (pwr_diff_limit[2]<<16) | (pwr_diff_limit[1]<<8) | (pwr_diff_limit[0]); - /* RTPRINT(FPHY, PHY_TXPWR, ("Customer's limit rf(%c) = 0x%x\n", ((rf==0)?'A':'B'), customer_limit)); */ + /* RTPRINT(FPHY, PHY_TXPWR, ("Customer's limit rf(%c) = 0x%x\n", ((rf== 0)?'A':'B'), customer_limit)); */ writeVal = customer_limit + ((index<2)?powerBase0[rf]:powerBase1[rf]); - /* RTPRINT(FPHY, PHY_TXPWR, ("Customer, writeVal rf(%c)= 0x%x\n", ((rf==0)?'A':'B'), writeVal)); */ + /* RTPRINT(FPHY, PHY_TXPWR, ("Customer, writeVal rf(%c)= 0x%x\n", ((rf== 0)?'A':'B'), writeVal)); */ break; default: chnlGroup = 0; writeVal = pHalData->MCSTxPowerLevelOriginalOffset[chnlGroup][index+(rf?8:0)] + ((index<2)?powerBase0[rf]:powerBase1[rf]); - /* RTPRINT(FPHY, PHY_TXPWR, ("RTK better performance, writeVal rf(%c) = 0x%x\n", ((rf==0)?'A':'B'), writeVal)); */ + /* RTPRINT(FPHY, PHY_TXPWR, ("RTK better performance, writeVal rf(%c) = 0x%x\n", ((rf== 0)?'A':'B'), writeVal)); */ break; } diff --git a/hal/rtl8188e_rxdesc.c b/hal/rtl8188e_rxdesc.c index 8c1d6b1..4b0c6e4 100644 --- a/hal/rtl8188e_rxdesc.c +++ b/hal/rtl8188e_rxdesc.c @@ -61,7 +61,7 @@ static void process_link_qual(struct adapter *padapter,union recv_frame *prframe struct rx_pkt_attrib *pattrib; struct signal_stat * signal_stat; - if (prframe == NULL || padapter==NULL){ + if (prframe == NULL || padapter== NULL){ return; } diff --git a/hal/rtl8188eu_recv.c b/hal/rtl8188eu_recv.c index 25105c5..8560cdc 100644 --- a/hal/rtl8188eu_recv.c +++ b/hal/rtl8188eu_recv.c @@ -81,7 +81,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) _rtw_init_queue(&precvpriv->free_recv_buf_queue); precvpriv->pallocated_recv_buf = rtw_zmalloc(NR_RECVBUFF *sizeof(struct recv_buf) + 4); - if (precvpriv->pallocated_recv_buf==NULL){ + if (precvpriv->pallocated_recv_buf== NULL){ res= _FAIL; RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("alloc recv_buf fail!\n")); goto exit; diff --git a/hal/rtl8188eu_xmit.c b/hal/rtl8188eu_xmit.c index 3d393c8..bec1777 100644 --- a/hal/rtl8188eu_xmit.c +++ b/hal/rtl8188eu_xmit.c @@ -47,7 +47,7 @@ static u8 urb_zero_packet_chk(struct adapter *padapter, int sz) { u8 blnSetTxDescOffset; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); - blnSetTxDescOffset = (((sz + TXDESC_SIZE) % pHalData->UsbBulkOutSize) ==0)?1:0; + blnSetTxDescOffset = (((sz + TXDESC_SIZE) % pHalData->UsbBulkOutSize) == 0)?1:0; return blnSetTxDescOffset; } @@ -221,7 +221,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag #endif /* CONFIG_P2P */ if (padapter->registrypriv.mp_mode == 0) { - if ((!bagg_pkt) &&(urb_zero_packet_chk(padapter, sz)==0)) { + if ((!bagg_pkt) &&(urb_zero_packet_chk(padapter, sz)== 0)) { ptxdesc = (struct tx_desc *)(pmem+PACKET_OFFSET_SZ); pull = 1; } diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index 840d941..9de9422 100644 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -1071,7 +1071,7 @@ _InitAntenna_Selection(struct adapter *Adapter) HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); - if (pHalData->AntDivCfg==0) + if (pHalData->AntDivCfg== 0) return; DBG_8192C("==> %s ....\n",__FUNCTION__); @@ -2810,7 +2810,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) if (!(rtw_read32(Adapter,REG_RXPKT_NUM)&RXDMA_IDLE)) break; }while (trycnt--); - if (trycnt ==0) + if (trycnt == 0) DBG_8192C("Stop RX DMA failed......\n"); /* RQPN Load 0 */ @@ -2907,7 +2907,7 @@ static void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) *val = pHalData->bMacPwrCtrlOn; break; case HW_VAR_CHK_HI_QUEUE_EMPTY: - *val = ((rtw_read32(Adapter, REG_HGQ_INFORMATION)&0x0000ff00)==0) ? true:false; + *val = ((rtw_read32(Adapter, REG_HGQ_INFORMATION)&0x0000ff00)== 0) ? true:false; break; case HW_VAR_READ_LLT_TAB: Read_LLT_Tab(Adapter); @@ -2958,7 +2958,7 @@ static u8 GetHalDefVar8188EUsb( } break; case HAL_DEF_IS_SUPPORT_ANT_DIV: - *((u8 *)pValue) = (pHalData->AntDivCfg==0)?false:true; + *((u8 *)pValue) = (pHalData->AntDivCfg== 0)?false:true; break; case HAL_DEF_CURRENT_ANTENNA: *(( u8*)pValue) = pHalData->CurAntenna; diff --git a/hal/usb_ops_linux.c b/hal/usb_ops_linux.c index 49957a7..11d76fc 100644 --- a/hal/usb_ops_linux.c +++ b/hal/usb_ops_linux.c @@ -331,7 +331,7 @@ static void usb_read_interrupt_complete(struct urb *purb, struct pt_regs *regs) return; } - if (purb->status==0)/* SUCCESS */ + if (purb->status== 0)/* SUCCESS */ { if (purb->actual_length > INTERRUPT_MSG_FORMAT_LEN) { @@ -444,9 +444,9 @@ static int recvbuf2recvframe(struct adapter *padapter, struct sk_buff *pskb) prxstat = (struct recv_stat *)pbuf; precvframe = rtw_alloc_recvframe(pfree_recv_queue); - if (precvframe==NULL) + if (precvframe== NULL) { - RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("recvbuf2recvframe: precvframe==NULL\n")); + RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("recvbuf2recvframe: precvframe== NULL\n")); DBG_8192C("%s()-%d: rtw_alloc_recvframe() failed! RX Drop!\n", __FUNCTION__, __LINE__); goto _exit_recvbuf2recvframe; } @@ -602,7 +602,7 @@ static int recvbuf2recvframe(struct adapter *padapter, struct sk_buff *pskb) precvframe = NULL; pkt_copy = NULL; - if (transfer_len>0 && pkt_cnt==0) + if (transfer_len>0 && pkt_cnt== 0) pkt_cnt = (le32_to_cpu(prxstat->rxdw2)>>16) & 0xff; }while ((transfer_len>0) && (pkt_cnt>0)); @@ -672,7 +672,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) goto exit; } - if (purb->status==0)/* SUCCESS */ + if (purb->status== 0)/* SUCCESS */ { if ((purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)) { diff --git a/include/ethernet.h b/include/ethernet.h index eb8926c..4bb6994 100644 --- a/include/ethernet.h +++ b/include/ethernet.h @@ -30,12 +30,12 @@ #define RT_ETH_IS_MULTICAST(_pAddr) ((((u8 *)(_pAddr))[0]&0x01)!=0) /* Is Multicast Address? */ #define RT_ETH_IS_BROADCAST(_pAddr) ( \ - ((u8 *)(_pAddr))[0]==0xff && \ - ((u8 *)(_pAddr))[1]==0xff && \ - ((u8 *)(_pAddr))[2]==0xff && \ - ((u8 *)(_pAddr))[3]==0xff && \ - ((u8 *)(_pAddr))[4]==0xff && \ - ((u8 *)(_pAddr))[5]==0xff ) /* Is Broadcast Address? */ + ((u8 *)(_pAddr))[0]== 0xff && \ + ((u8 *)(_pAddr))[1]== 0xff && \ + ((u8 *)(_pAddr))[2]== 0xff && \ + ((u8 *)(_pAddr))[3]== 0xff && \ + ((u8 *)(_pAddr))[4]== 0xff && \ + ((u8 *)(_pAddr))[5]== 0xff ) /* Is Broadcast Address? */ #endif /* #ifndef __INC_ETHERNET_H */ diff --git a/include/osdep_service.h b/include/osdep_service.h index 589b9e6..35c7b09 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -217,7 +217,7 @@ __inline static void _set_timer(struct timer_list *ptimer,u32 delay_time) __inline static void _cancel_timer(struct timer_list *ptimer,u8 *bcancelled) { del_timer_sync(ptimer); - *bcancelled= true;/* true ==1; false==0 */ + *bcancelled= true;/* true ==1; false== 0 */ } #define RTW_TIMER_HDL_ARGS void *FunctionContext diff --git a/include/rtw_recv.h b/include/rtw_recv.h index 24b1724..2afbeb6 100644 --- a/include/rtw_recv.h +++ b/include/rtw_recv.h @@ -352,7 +352,7 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext); __inline static u8 *get_rxmem(union recv_frame *precvframe) { /* always return rx_head... */ - if (precvframe==NULL) + if (precvframe== NULL) return NULL; return precvframe->u.hdr.rx_head; @@ -369,7 +369,7 @@ __inline static u8 *get_recvframe_data(union recv_frame *precvframe) { /* alwasy return rx_data */ - if (precvframe==NULL) + if (precvframe== NULL) return NULL; return precvframe->u.hdr.rx_data; @@ -386,7 +386,7 @@ __inline static u8 *recvframe_push(union recv_frame *precvframe, sint sz) * start. rx_data must be still larger than rx_head, after pushing. */ - if (precvframe==NULL) + if (precvframe== NULL) return NULL; @@ -411,7 +411,7 @@ __inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz) /* used for extract sz bytes from rx_data, update rx_data and return the updated rx_data to the caller */ - if (precvframe==NULL) + if (precvframe== NULL) return NULL; @@ -437,7 +437,7 @@ __inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz) /* after putting, rx_tail must be still larger than rx_end. */ unsigned char * prev_rx_tail; - if (precvframe==NULL) + if (precvframe== NULL) return NULL; prev_rx_tail = precvframe->u.hdr.rx_tail; @@ -465,7 +465,7 @@ __inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz) /* used for extract sz bytes from rx_end, update rx_end and return the updated rx_end to the caller */ /* after pulling, rx_end must be still larger than rx_data. */ - if (precvframe==NULL) + if (precvframe== NULL) return NULL; precvframe->u.hdr.rx_tail -= sz; @@ -488,7 +488,7 @@ __inline static unsigned char *get_rxbuf_desc(union recv_frame *precvframe) { unsigned char *buf_desc; - if (precvframe==NULL) + if (precvframe== NULL) return NULL; return buf_desc; } diff --git a/include/sta_info.h b/include/sta_info.h index 90aed3b..69c40a7 100644 --- a/include/sta_info.h +++ b/include/sta_info.h @@ -30,7 +30,7 @@ #define NUM_ACL 16 -/* if mode ==0, then the sta is allowed once the addr is hit. */ +/* if mode == 0, then the sta is allowed once the addr is hit. */ /* if mode ==1, then the sta is rejected once the addr is non-hit. */ struct rtw_wlan_acl_node { struct list_head list; diff --git a/include/wifi.h b/include/wifi.h index 618593b..257bbd8 100644 --- a/include/wifi.h +++ b/include/wifi.h @@ -1052,7 +1052,7 @@ enum P2P_PS_MODE { #define WFD_DEVINFO_PC_TDLS 0x0080 #define WFD_DEVINFO_HDCP_SUPPORT 0x0100 -#define IP_MCAST_MAC(mac) ((mac[0]==0x01)&&(mac[1]==0x00)&&(mac[2]==0x5e)) -#define ICMPV6_MCAST_MAC(mac) ((mac[0]==0x33)&&(mac[1]==0x33)&&(mac[2]!=0xff)) +#define IP_MCAST_MAC(mac) ((mac[0]== 0x01)&&(mac[1]== 0x00)&&(mac[2]== 0x5e)) +#define ICMPV6_MCAST_MAC(mac) ((mac[0]== 0x33)&&(mac[1]== 0x33)&&(mac[2]!=0xff)) #endif /* _WIFI_H_ */ diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index f5a9906..c0b0992 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -760,7 +760,7 @@ static u8 set_pairwise_key(struct adapter *padapter, struct sta_info *psta) } psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm)); - if (psetstakey_para==NULL){ + if (psetstakey_para== NULL){ rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); res=_FAIL; goto exit; @@ -795,12 +795,12 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid) DBG_8192C("%s\n", __FUNCTION__); pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (pcmd==NULL){ + if (pcmd== NULL){ res= _FAIL; goto exit; } psetkeyparm=(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm)); - if (psetkeyparm==NULL){ + if (psetkeyparm== NULL){ rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj)); res= _FAIL; goto exit; @@ -914,7 +914,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa } } - if (strcmp(param->u.crypt.alg, "none") == 0 && (psta==NULL)) + if (strcmp(param->u.crypt.alg, "none") == 0 && (psta== NULL)) { /* todo:clear default encryption keys */ @@ -924,7 +924,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa } - if (strcmp(param->u.crypt.alg, "WEP") == 0 && (psta==NULL)) + if (strcmp(param->u.crypt.alg, "WEP") == 0 && (psta== NULL)) { DBG_8192C("r871x_set_encryption, crypt.alg = WEP\n"); @@ -1336,7 +1336,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param } pbcmc_sta=rtw_get_bcmc_stainfo(padapter); - if (pbcmc_sta==NULL) + if (pbcmc_sta== NULL) { /* DEBUG_ERR( ("Set OID_802_11_ADD_KEY: bcmc stainfo is null\n")); */ } diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index e724f92..0b54322 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -812,7 +812,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, } pbcmc_sta=rtw_get_bcmc_stainfo(padapter); - if (pbcmc_sta==NULL) + if (pbcmc_sta== NULL) { /* DEBUG_ERR( ("Set OID_802_11_ADD_KEY: bcmc stainfo is null\n")); */ } @@ -1497,7 +1497,7 @@ static int rtw_wx_set_mlme(struct net_device *dev, struct iw_mlme *mlme = (struct iw_mlme *) extra; - if (mlme==NULL) + if (mlme== NULL) return -1; DBG_871X("%s\n", __FUNCTION__); @@ -2287,7 +2287,7 @@ static int rtw_wx_set_enc(struct net_device *dev, } else { wep.KeyLength = 0 ; - if (keyindex_provided == 1)/* set key_id only, no given KeyMaterial(erq->length==0). */ + if (keyindex_provided == 1)/* set key_id only, no given KeyMaterial(erq->length== 0). */ { padapter->securitypriv.dot11PrivacyKeyIndex = key; @@ -2883,7 +2883,7 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info, res = phandler->handler(&padapter->drvextpriv, bset, poidparam->data); - if (res==0) + if (res== 0) { ret = 0; @@ -3093,7 +3093,7 @@ static int rtw_get_ap_info(struct net_device *dev, DBG_871X("+rtw_get_aplist_info\n"); - if ((padapter->bDriverStopped) || (pdata==NULL)) + if ((padapter->bDriverStopped) || (pdata== NULL)) { ret= -EINVAL; goto exit; @@ -3195,7 +3195,7 @@ static int rtw_set_pid(struct net_device *dev, int *pdata = (int *)wrqu; int selector; - if ((padapter->bDriverStopped) || (pdata==NULL)) + if ((padapter->bDriverStopped) || (pdata== NULL)) { ret= -EINVAL; goto exit; @@ -3228,7 +3228,7 @@ static int rtw_wps_start(struct net_device *dev, uintRet = copy_from_user( ( void* ) &u32wps_start, pdata->pointer, 4 ); - if ((padapter->bDriverStopped) || (pdata==NULL)) + if ((padapter->bDriverStopped) || (pdata== NULL)) { ret= -EINVAL; goto exit; @@ -5496,7 +5496,7 @@ static void rf_reg_dump(struct adapter *padapter) value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff); if (j%4==1) printk("0x%02x ",i); printk(" 0x%08x ",value); - if ((j++)%4==0) printk("\n"); + if ((j++)%4== 0) printk("\n"); } } } @@ -6077,7 +6077,7 @@ static int rtw_dbg_port(struct net_device *dev, break; case 0xdd:/* registers dump , 0 for mac reg,1 for bb reg, 2 for rf reg */ { - if (extra_arg==0){ + if (extra_arg== 0){ mac_reg_dump(padapter); } else if (extra_arg==1){ @@ -6334,7 +6334,7 @@ static u8 set_pairwise_key(struct adapter *padapter, struct sta_info *psta) } psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm)); - if (psetstakey_para==NULL){ + if (psetstakey_para== NULL){ rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj)); res=_FAIL; goto exit; @@ -6369,12 +6369,12 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid) DBG_871X("%s\n", __FUNCTION__); pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); - if (pcmd==NULL){ + if (pcmd== NULL){ res= _FAIL; goto exit; } psetkeyparm=(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm)); - if (psetkeyparm==NULL){ + if (psetkeyparm== NULL){ rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj)); res= _FAIL; goto exit; @@ -6490,7 +6490,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, } } - if (strcmp(param->u.crypt.alg, "none") == 0 && (psta==NULL)) + if (strcmp(param->u.crypt.alg, "none") == 0 && (psta== NULL)) { /* todo:clear default encryption keys */ @@ -6500,7 +6500,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, } - if (strcmp(param->u.crypt.alg, "WEP") == 0 && (psta==NULL)) + if (strcmp(param->u.crypt.alg, "WEP") == 0 && (psta== NULL)) { DBG_871X("r871x_set_encryption, crypt.alg = WEP\n"); @@ -7738,7 +7738,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, } else if (strcmp(tmp[0], "rmap") == 0) { - if ((tmp[1]==NULL) || (tmp[2]==NULL)) + if ((tmp[1]== NULL) || (tmp[2]== NULL)) { DBG_871X("%s: rmap Fail!! Parameters error!\n", __FUNCTION__); err = -EINVAL; @@ -7910,7 +7910,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, } else if (strcmp(tmp[0],"btrmap") == 0) { - if ((tmp[1]==NULL) || (tmp[2]==NULL)) + if ((tmp[1]== NULL) || (tmp[2]== NULL)) { err = -EINVAL; goto exit; @@ -8030,7 +8030,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, /* DBG_871X("\n"); */ } else if (strcmp(tmp[0],"wlrfkrmap")== 0) { - if ((tmp[1]==NULL) || (tmp[2]==NULL)) { + if ((tmp[1]== NULL) || (tmp[2]== NULL)) { DBG_871X("%s: rmap Fail!! Parameters error!\n", __FUNCTION__); err = -EINVAL; goto exit; @@ -8053,7 +8053,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, sprintf(extra, "%s0x%02X ", extra, pEfuseHal->fakeEfuseModifiedMap[addr+i]); } } else if (strcmp(tmp[0],"btrfkrmap")== 0) { - if ((tmp[1]==NULL) || (tmp[2]==NULL)) { + if ((tmp[1]== NULL) || (tmp[2]== NULL)) { DBG_871X("%s: rmap Fail!! Parameters error!\n", __FUNCTION__); err = -EINVAL; goto exit; @@ -8166,7 +8166,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, /* wmap,addr,00e04c871200 */ if (strcmp(tmp[0], "wmap") == 0) { - if ((tmp[1]==NULL) || (tmp[2]==NULL)) + if ((tmp[1]== NULL) || (tmp[2]== NULL)) { err = -EINVAL; goto exit; @@ -8214,7 +8214,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, } else if (strcmp(tmp[0], "wraw") == 0) { - if ((tmp[1]==NULL) || (tmp[2]==NULL)) + if ((tmp[1]== NULL) || (tmp[2]== NULL)) { err = -EINVAL; goto exit; @@ -8254,7 +8254,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, } else if (strcmp(tmp[0], "mac") == 0) { - if (tmp[1]==NULL) + if (tmp[1]== NULL) { err = -EINVAL; goto exit; @@ -8307,7 +8307,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, } else if (strcmp(tmp[0], "vidpid") == 0) { - if (tmp[1]==NULL) + if (tmp[1]== NULL) { err = -EINVAL; goto exit; @@ -8360,7 +8360,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, } else if (strcmp(tmp[0], "btwmap") == 0) { - if ((tmp[1]==NULL) || (tmp[2]==NULL)) + if ((tmp[1]== NULL) || (tmp[2]== NULL)) { err = -EINVAL; goto exit; @@ -8408,7 +8408,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, } else if (strcmp(tmp[0], "btwfake") == 0) { - if ((tmp[1]==NULL) || (tmp[2]==NULL)) + if ((tmp[1]== NULL) || (tmp[2]== NULL)) { err = -EINVAL; goto exit; @@ -8484,7 +8484,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, } else if (strcmp(tmp[0], "wlwfake") == 0) { - if ((tmp[1]==NULL) || (tmp[2]==NULL)) + if ((tmp[1]== NULL) || (tmp[2]== NULL)) { err = -EINVAL; goto exit; diff --git a/os_dep/mlme_linux.c b/os_dep/mlme_linux.c index 494649e..34455cb 100644 --- a/os_dep/mlme_linux.c +++ b/os_dep/mlme_linux.c @@ -282,7 +282,7 @@ void rtw_indicate_sta_assoc_event(struct adapter *padapter, struct sta_info *pst union iwreq_data wrqu; struct sta_priv *pstapriv = &padapter->stapriv; - if (psta==NULL) + if (psta== NULL) return; if (psta->aid > NUM_STA) @@ -304,7 +304,7 @@ void rtw_indicate_sta_disassoc_event(struct adapter *padapter, struct sta_info * union iwreq_data wrqu; struct sta_priv *pstapriv = &padapter->stapriv; - if (psta==NULL) + if (psta== NULL) return; if (psta->aid > NUM_STA) diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index ddd58b5..ecbee03 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -54,7 +54,7 @@ u32 rtw_atoi(u8* s) 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) + else if (s[0] == '-' && i== 0) flag =1; else break; diff --git a/os_dep/recv_linux.c b/os_dep/recv_linux.c index 94aaabd..5ddd8a5 100644 --- a/os_dep/recv_linux.c +++ b/os_dep/recv_linux.c @@ -216,7 +216,7 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame skb = precv_frame->u.hdr.pkt; if (skb == NULL) { - RT_TRACE(_module_recv_osdep_c_,_drv_err_,("rtw_recv_indicatepkt():skb==NULL something wrong!!!!\n")); + RT_TRACE(_module_recv_osdep_c_,_drv_err_,("rtw_recv_indicatepkt():skb== NULL something wrong!!!!\n")); goto _recv_indicatepkt_drop; } diff --git a/os_dep/usb_ops_linux.c b/os_dep/usb_ops_linux.c index 0d9fe54..7571fa4 100644 --- a/os_dep/usb_ops_linux.c +++ b/os_dep/usb_ops_linux.c @@ -350,7 +350,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) } - if (purb->status==0) { + if (purb->status== 0) { } else { RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_write_port_complete : purb->status(%d) != 0\n", purb->status)); diff --git a/os_dep/xmit_linux.c b/os_dep/xmit_linux.c index c16d907..6f4fa69 100644 --- a/os_dep/xmit_linux.c +++ b/os_dep/xmit_linux.c @@ -90,7 +90,7 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitb 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"); + DBG_871X("pxmitbuf->pxmit_urb[i]== NULL"); return _FAIL; }