Staging: rtl8723au: core: Dont have { on new line

This patch fixes the following checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'

Exceptions: { is left on a new line to itself when fixing
this error makes the line longer than 80 characters.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tina Ruchandani 2014-10-23 20:17:20 -07:00 committed by Greg Kroah-Hartman
parent f237216ebf
commit 5db8bee627
4 changed files with 39 additions and 82 deletions

View File

@ -681,8 +681,7 @@ void mgt_dispatcher23a(struct rtw_adapter *padapter,
}
#ifdef CONFIG_8723AU_AP_MODE
switch (stype)
{
switch (stype) {
case IEEE80211_STYPE_AUTH:
if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
ptable->func = &OnAuth23a;
@ -2337,8 +2336,7 @@ static int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode)
__func__, hidden_ssid_mode, ssid_ie, ssid_len_ori); */
if (ssid_ie && ssid_len_ori > 0) {
switch (hidden_ssid_mode)
{
switch (hidden_ssid_mode) {
case 1:
next_ie = ssid_ie + 2 + ssid_len_ori;
remain_len = 0;
@ -4363,9 +4361,7 @@ static void start_create_ibss(struct rtw_adapter *padapter)
report_join_res23a(padapter, 1);
pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS;
}
}
else
{
} else {
DBG_8723A("%s: invalid cap:%x\n", __func__, caps);
return;
}
@ -4423,9 +4419,7 @@ static void start_clnt_join(struct rtw_adapter *padapter)
pmlmeinfo->state = MSR_ADHOC;
report_join_res23a(padapter, 1);
}
else
{
} else {
/* DBG_8723A("marc: invalid cap:%x\n", caps); */
return;
}
@ -4489,16 +4483,12 @@ int receive_disconnect23a(struct rtw_adapter *padapter,
DBG_8723A("%s\n", __func__);
if ((pmlmeinfo->state&0x03) == MSR_INFRA)
{
if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)
{
if ((pmlmeinfo->state&0x03) == MSR_INFRA) {
if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) {
pmlmeinfo->state = MSR_NOLINK;
report_del_sta_event23a(padapter, MacAddr, reason);
}
else if (pmlmeinfo->state & WIFI_FW_LINKING_STATE)
{
} else if (pmlmeinfo->state & WIFI_FW_LINKING_STATE) {
pmlmeinfo->state = MSR_NOLINK;
report_join_res23a(padapter, -2);
}
@ -5004,8 +4994,7 @@ void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta)
VCS_update23a(padapter, psta);
/* HT */
if (pmlmepriv->htpriv.ht_option)
{
if (pmlmepriv->htpriv.ht_option) {
psta->htpriv.ht_option = true;
psta->htpriv.ampdu_enable = pmlmepriv->htpriv.ampdu_enable;
@ -5015,9 +5004,7 @@ void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta)
psta->qos_option = true;
}
else
{
} else {
psta->htpriv.ht_option = false;
psta->htpriv.ampdu_enable = false;
@ -5059,12 +5046,10 @@ void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter,
goto exit_mlmeext_joinbss_event_callback23a;
}
if ((pmlmeinfo->state&0x03) == MSR_ADHOC)
{
if ((pmlmeinfo->state&0x03) == MSR_ADHOC) {
/* for bc/mc */
psta_bmc = rtw_get_bcmc_stainfo23a(padapter);
if (psta_bmc)
{
if (psta_bmc) {
pmlmeinfo->FW_sta_info[psta_bmc->mac_id].psta = psta_bmc;
update_bmc_sta_support_rate23a(padapter, psta_bmc->mac_id);
Update_RA_Entry23a(padapter, psta_bmc);
@ -5095,8 +5080,7 @@ void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter,
set_channel_bwmode23a(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
psta = rtw_get_stainfo23a(pstapriv, cur_network->MacAddress);
if (psta) /* only for infra. mode */
{
if (psta) { /* only for infra. mode */
pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta;
/* DBG_8723A("set_sta_rate23a\n"); */
@ -5132,8 +5116,7 @@ void mlmeext_sta_add_event_callback23a(struct rtw_adapter *padapter,
if ((pmlmeinfo->state & 0x03) == MSR_ADHOC) {
/* adhoc master or sta_count>1 */
if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)
{
if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) {
/* nothing to do */
} else { /* adhoc client */
/* correcting TSF */

View File

@ -338,8 +338,7 @@ s32 LPS_RF_ON_check23a(struct rtw_adapter *padapter, u32 delay_ms)
start_time = jiffies;
end_time = start_time + msecs_to_jiffies(delay_ms);
while (1)
{
while (1) {
bAwake = rtl8723a_get_fwlps_rf_on(padapter);
if (bAwake == true)
break;

View File

@ -1410,8 +1410,7 @@ static int validate_recv_data_frame(struct rtw_adapter *adapter,
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
("\n pattrib->encrypt =%d\n", pattrib->encrypt));
switch (pattrib->encrypt)
{
switch (pattrib->encrypt) {
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
pattrib->iv_len = IEEE80211_WEP_IV_LEN;
@ -1510,8 +1509,7 @@ static int validate_recv_frame(struct rtw_adapter *adapter,
if (unlikely(bDumpRxPkt == 1))
dump_rx_pkt(skb, type, bDumpRxPkt);
switch (type)
{
switch (type) {
case IEEE80211_FTYPE_MGMT:
retval = validate_recv_mgnt_frame(adapter, precv_frame);
if (retval == _FAIL) {
@ -2182,8 +2180,7 @@ int process_recv_indicatepkts(struct rtw_adapter *padapter,
return retval;
}
}
} else /* B/G mode */
{
} else { /* B/G mode */
retval = wlanhdr_to_ethhdr(prframe);
if (retval != _SUCCESS) {
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,

View File

@ -44,8 +44,7 @@ static void arcfour_init(struct arc4context *parc4ctx, u8 *key, u32 key_len)
state[counter] = (u8)counter;
keyindex = 0;
stateindex = 0;
for (counter = 0; counter < 256; counter++)
{
for (counter = 0; counter < 256; counter++) {
t = state[counter];
stateindex = (stateindex + key[keyindex] + t) & 0xff;
u = state[stateindex];
@ -113,8 +112,7 @@ static void crc32_init(void)
c = 0x12340000;
for (i = 0; i < 256; ++i)
{
for (i = 0; i < 256; ++i) {
k = crc32_reverseBit((u8)i);
for (c = ((u32)k) << 24, j = 8; j > 0; --j) {
c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1);
@ -269,8 +267,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);
}
@ -282,8 +279,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;
}
@ -319,8 +315,7 @@ void rtw_secmicappend23abyte23a(struct mic_data *pmicdata, u8 b)
pmicdata->M |= ((unsigned long)b) << (8*pmicdata->nBytesInM);
pmicdata->nBytesInM++;
/* Process the word if it is full. */
if (pmicdata->nBytesInM >= 4)
{
if (pmicdata->nBytesInM >= 4) {
pmicdata->L ^= pmicdata->M;
pmicdata->R ^= ROL32(pmicdata->L, 17);
pmicdata->L += pmicdata->R;
@ -341,8 +336,7 @@ void rtw_secmicappend23a(struct mic_data *pmicdata, u8 *src, u32 nbytes)
{
/* This is simple */
while(nbytes > 0)
{
while(nbytes > 0) {
rtw_secmicappend23abyte23a(pmicdata, *src++);
nbytes--;
}
@ -359,8 +353,7 @@ void rtw_secgetmic23a(struct mic_data *pmicdata, u8 *dst)
rtw_secmicappend23abyte23a(pmicdata, 0);
rtw_secmicappend23abyte23a(pmicdata, 0);
/* and then zeroes until the length is a multiple of 4 */
while(pmicdata->nBytesInM != 0)
{
while(pmicdata->nBytesInM != 0) {
rtw_secmicappend23abyte23a(pmicdata, 0);
}
/* The appendByte function has already computed the result. */
@ -529,8 +522,8 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
/* Now compute an unbalanced Feistel cipher with 80-bit block */
/* size on the 80-bit block P1K[], using the 128-bit key TK[] */
for (i = 0; i < PHASE1_LOOP_CNT ;i++)
{ /* Each add operation here is mod 2**16 */
for (i = 0; i < PHASE1_LOOP_CNT ;i++) {
/* Each add operation here is mod 2**16 */
p1k[0] += _S_(p1k[4] ^ TK16((i&1)+0));
p1k[1] += _S_(p1k[0] ^ TK16((i&1)+2));
p1k[2] += _S_(p1k[1] ^ TK16((i&1)+4));
@ -600,8 +593,7 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)
rc4key[3] = Lo8((PPK[5] ^ TK16(0)) >> 1);
/* Copy 96 bits of PPK[0..5] to RC4KEY[4..15] (little-endian) */
for (i = 0;i<6;i++)
{
for (i = 0;i<6;i++) {
rc4key[4+2*i] = Lo8(PPK[i]);
rc4key[5+2*i] = Hi8(PPK[i]);
}
@ -647,8 +639,7 @@ int rtw_tkip_encrypt23a(struct rtw_adapter *padapter,
if (stainfo!= NULL) {
if (!(stainfo->state &_FW_LINKED))
{
if (!(stainfo->state &_FW_LINKED)) {
DBG_8723A("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, stainfo->state);
return _FAIL;
}
@ -885,8 +876,7 @@ static void byte_sub(u8 *in, u8 *out)
{
int i;
for (i = 0; i< 16; i++)
{
for (i = 0; i< 16; i++) {
out[i] = sbox(in[i]);
}
@ -926,8 +916,7 @@ static void mix_column(u8 *in, u8 *out)
u8 temp[4];
u8 tempb[4];
for (i = 0 ; i<4; i++)
{
for (i = 0 ; i<4; i++) {
if ((in[i] & 0x80) == 0x80)
add1b[i] = 0x1b;
else
@ -949,11 +938,9 @@ static void mix_column(u8 *in, u8 *out)
andf7[2] = in[2] & 0x7f;
andf7[3] = in[3] & 0x7f;
for (i = 3; i>0; i--) /* logical shift left 1 bit */
{
for (i = 3; i>0; i--) { /* logical shift left 1 bit */
andf7[i] = andf7[i] << 1;
if ((andf7[i-1] & 0x80) == 0x80)
{
if ((andf7[i-1] & 0x80) == 0x80) {
andf7[i] = (andf7[i] | 0x01);
}
}
@ -986,21 +973,15 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
for (i = 0; i<16; i++) round_key[i] = key[i];
for (round = 0; round < 11; round++)
{
if (round == 0)
{
for (round = 0; round < 11; round++) {
if (round == 0) {
xor_128(round_key, data, ciphertext);
next_key(round_key, round);
}
else if (round == 10)
{
} else if (round == 10) {
byte_sub(ciphertext, intermediatea);
shift_row(intermediatea, intermediateb);
xor_128(intermediateb, round_key, ciphertext);
}
else /* 1 - 9 */
{
} else { /* 1 - 9 */
byte_sub(ciphertext, intermediatea);
shift_row(intermediatea, intermediateb);
mix_column(&intermediateb[0], &intermediatea[0]);
@ -1086,20 +1067,17 @@ static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists,
mic_header2[6] = 0x00;
mic_header2[7] = 0x00; /* mpdu[23]; */
if (!qc_exists && a4_exists)
{
if (!qc_exists && a4_exists) {
for (i = 0;i<6;i++) mic_header2[8+i] = mpdu[24+i]; /* A4 */
}
if (qc_exists && !a4_exists)
{
if (qc_exists && !a4_exists) {
mic_header2[8] = mpdu[24] & 0x0f; /* mute bits 15 - 4 */
mic_header2[9] = mpdu[25] & 0x00;
}
if (qc_exists && a4_exists)
{
if (qc_exists && a4_exists) {
for (i = 0;i<6;i++) mic_header2[8+i] = mpdu[24+i]; /* A4 */
mic_header2[14] = mpdu[30] & 0x0f;