Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: rtl8188eu: rtw_mlme: Add space around operators

Add space around operators for improving the code
readability.
Reported by checkpatch.pl

git diff -w shows no difference.
diff of the .o files before and after the changes shows no difference.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/20200311131742.31068-1-shreeya.patel23498@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Shreeya Patel and committed by
Greg Kroah-Hartman
6e436169 038341dc

+20 -20
+20 -20
drivers/staging/rtl8188eu/core/rtw_mlme.c
··· 149 149 (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE))) 150 150 lifetime = 1; 151 151 if (!isfreeall) { 152 - delta_time = (curr_time - pnetwork->last_scanned)/HZ; 152 + delta_time = (curr_time - pnetwork->last_scanned) / HZ; 153 153 if (delta_time < lifetime)/* unit:sec */ 154 154 return; 155 155 } ··· 249 249 pibss[1] = 0x11; 250 250 pibss[2] = 0x87; 251 251 pibss[3] = (u8)(curtime & 0xff);/* p[0]; */ 252 - pibss[4] = (u8)((curtime>>8) & 0xff);/* p[1]; */ 253 - pibss[5] = (u8)((curtime>>16) & 0xff);/* p[2]; */ 252 + pibss[4] = (u8)((curtime >> 8) & 0xff);/* p[1]; */ 253 + pibss[5] = (u8)((curtime >> 16) & 0xff);/* p[2]; */ 254 254 } 255 255 256 256 u8 *rtw_get_capability_from_ie(u8 *ie) ··· 357 357 rssi_final = rssi_ori; 358 358 } else { 359 359 if (sq_smp != 101) { /* from the right channel */ 360 - ss_final = ((u32)(src->PhyInfo.SignalStrength)+(u32)(dst->PhyInfo.SignalStrength)*4)/5; 361 - sq_final = ((u32)(src->PhyInfo.SignalQuality)+(u32)(dst->PhyInfo.SignalQuality)*4)/5; 362 - rssi_final = (src->Rssi+dst->Rssi*4)/5; 360 + ss_final = ((u32)(src->PhyInfo.SignalStrength) + (u32)(dst->PhyInfo.SignalStrength) * 4) / 5; 361 + sq_final = ((u32)(src->PhyInfo.SignalQuality) + (u32)(dst->PhyInfo.SignalQuality) * 4) / 5; 362 + rssi_final = (src->Rssi + dst->Rssi * 4) / 5; 363 363 } else { 364 364 /* bss info not receiving from the right channel, use the original RX signal infos */ 365 365 ss_final = dst->PhyInfo.SignalStrength; ··· 510 510 privacy = pnetwork->network.Privacy; 511 511 512 512 if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) { 513 - if (rtw_get_wps_ie(pnetwork->network.ies+_FIXED_IE_LENGTH_, pnetwork->network.ie_length-_FIXED_IE_LENGTH_, NULL, &wps_ielen)) 513 + if (rtw_get_wps_ie(pnetwork->network.ies + _FIXED_IE_LENGTH_, pnetwork->network.ie_length - _FIXED_IE_LENGTH_, NULL, &wps_ielen)) 514 514 return true; 515 515 else 516 516 return false; ··· 925 925 switch (pnetwork->network.InfrastructureMode) { 926 926 case Ndis802_11Infrastructure: 927 927 if (pmlmepriv->fw_state & WIFI_UNDER_WPS) 928 - pmlmepriv->fw_state = WIFI_STATION_STATE|WIFI_UNDER_WPS; 928 + pmlmepriv->fw_state = WIFI_STATION_STATE | WIFI_UNDER_WPS; 929 929 else 930 930 pmlmepriv->fw_state = WIFI_STATION_STATE; 931 931 break; ··· 1097 1097 #if defined(CONFIG_88EU_AP_MODE) 1098 1098 if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { 1099 1099 for (aid = pstapriv->max_num_sta; aid > 0; aid--) { 1100 - if (pstapriv->sta_aid[aid-1]) 1100 + if (pstapriv->sta_aid[aid - 1]) 1101 1101 break; 1102 1102 } 1103 1103 mac_id = aid + 1; 1104 1104 } else 1105 1105 #endif 1106 1106 {/* adhoc id = 31~2 */ 1107 - for (mac_id = NUM_STA-1; mac_id >= IBSS_START_MAC_ID; mac_id--) { 1107 + for (mac_id = NUM_STA - 1; mac_id >= IBSS_START_MAC_ID; mac_id--) { 1108 1108 if (pmlmeinfo->FW_sta_info[mac_id].status == 1) 1109 1109 break; 1110 1110 } ··· 1123 1123 1124 1124 macid = search_max_mac_id(adapter); 1125 1125 rtw_hal_set_hwreg(adapter, HW_VAR_TX_RPT_MAX_MACID, (u8 *)&macid); 1126 - media_status = (psta->mac_id<<8)|1; /* MACID|OPMODE:1 connect */ 1126 + media_status = (psta->mac_id << 8) | 1; /* MACID|OPMODE:1 connect */ 1127 1127 rtw_hal_set_hwreg(adapter, HW_VAR_H2C_MEDIA_STATUS_RPT, (u8 *)&media_status); 1128 1128 } 1129 1129 ··· 1213 1213 if (mac_id >= 0) { 1214 1214 u16 media_status; 1215 1215 1216 - media_status = (mac_id<<8)|0; /* MACID|OPMODE:0 means disconnect */ 1216 + media_status = (mac_id << 8) | 0; /* MACID|OPMODE:0 means disconnect */ 1217 1217 /* for STA, AP, ADHOC mode, report disconnect stauts to FW */ 1218 1218 rtw_hal_set_hwreg(adapter, HW_VAR_H2C_MEDIA_STATUS_RPT, (u8 *)&media_status); 1219 1219 } ··· 1640 1640 for (i = 12; i < in_len; i += (in_ie[i + 1] + 2) /* to the next IE element */) { 1641 1641 ielength = initial_out_len; 1642 1642 1643 - if (in_ie[i] == 0xDD && in_ie[i+2] == 0x00 && in_ie[i+3] == 0x50 && in_ie[i+4] == 0xF2 && in_ie[i+5] == 0x02 && i+5 < in_len) { 1643 + if (in_ie[i] == 0xDD && in_ie[i + 2] == 0x00 && in_ie[i + 3] == 0x50 && in_ie[i + 4] == 0xF2 && in_ie[i + 5] == 0x02 && i + 5 < in_len) { 1644 1644 /* WMM element ID and OUI */ 1645 1645 /* Append WMM IE to the last index of out_ie */ 1646 1646 ··· 1734 1734 authmode = _WPA2_IE_ID_; 1735 1735 1736 1736 if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) { 1737 - memcpy(out_ie+ielength, psecuritypriv->wps_ie, psecuritypriv->wps_ie_len); 1737 + memcpy(out_ie + ielength, psecuritypriv->wps_ie, psecuritypriv->wps_ie_len); 1738 1738 1739 1739 ielength += psecuritypriv->wps_ie_len; 1740 1740 } else if ((authmode == _WPA_IE_ID_) || (authmode == _WPA2_IE_ID_)) { 1741 1741 /* copy RSN or SSN */ 1742 - memcpy(&out_ie[ielength], &psecuritypriv->supplicant_ie[0], psecuritypriv->supplicant_ie[1]+2); 1743 - ielength += psecuritypriv->supplicant_ie[1]+2; 1742 + memcpy(&out_ie[ielength], &psecuritypriv->supplicant_ie[0], psecuritypriv->supplicant_ie[1] + 2); 1743 + ielength += psecuritypriv->supplicant_ie[1] + 2; 1744 1744 rtw_report_sec_ie(adapter, authmode, psecuritypriv->supplicant_ie); 1745 1745 } 1746 1746 ··· 1865 1865 1866 1866 phtpriv->ht_option = false; 1867 1867 1868 - p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12); 1868 + p = rtw_get_ie(in_ie + 12, _HT_CAPABILITY_IE_, &ielen, in_len - 12); 1869 1869 1870 1870 if (p && ielen > 0) { 1871 1871 struct ieee80211_ht_cap ht_cap; ··· 1904 1904 else 1905 1905 ht_cap.ampdu_params_info |= IEEE80211_HT_CAP_AMPDU_DENSITY & 0x00; 1906 1906 1907 - rtw_set_ie(out_ie+out_len, _HT_CAPABILITY_IE_, 1907 + rtw_set_ie(out_ie + out_len, _HT_CAPABILITY_IE_, 1908 1908 sizeof(struct ieee80211_ht_cap), 1909 1909 (unsigned char *)&ht_cap, pout_len); 1910 1910 1911 1911 phtpriv->ht_option = true; 1912 1912 1913 - p = rtw_get_ie(in_ie+12, _HT_ADD_INFO_IE_, &ielen, in_len-12); 1913 + p = rtw_get_ie(in_ie + 12, _HT_ADD_INFO_IE_, &ielen, in_len - 12); 1914 1914 if (p && (ielen == sizeof(struct ieee80211_ht_addt_info))) { 1915 1915 out_len = *pout_len; 1916 - rtw_set_ie(out_ie+out_len, _HT_ADD_INFO_IE_, ielen, p+2, pout_len); 1916 + rtw_set_ie(out_ie + out_len, _HT_ADD_INFO_IE_, ielen, p + 2, pout_len); 1917 1917 } 1918 1918 } 1919 1919 return phtpriv->ht_option;