aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Vefa Bicakci <m.v.b@runbox.com>2015-03-28 21:07:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-03 09:25:45 -0400
commit06641b2a38447c2c446af5e6b1a15b06f7535433 (patch)
tree590461b1923219864ea96dab0465f13274847bab
parent47b720a16cff11ba822000104bac7dcf6fa1cfbb (diff)
staging: rtl8723au: trailing statements should be on next line
Correct a number of checkpatch.pl errors in rtl8723au's rtw_security.c related to trailing statements: ERROR: trailing statements should be on next line Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8723au/core/rtw_security.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_security.c b/drivers/staging/rtl8723au/core/rtw_security.c
index e8efdcd06329..63591ddeb628 100644
--- a/drivers/staging/rtl8723au/core/rtw_security.c
+++ b/drivers/staging/rtl8723au/core/rtw_security.c
@@ -132,7 +132,8 @@ static u32 getcrc32(u8 *buf, int len)
132 u8 *p; 132 u8 *p;
133 u32 crc; 133 u32 crc;
134 134
135 if (bcrc32initialized == 0) crc32_init(); 135 if (bcrc32initialized == 0)
136 crc32_init();
136 137
137 crc = 0xffffffff; /* preload shift register, per CRC-32 spec */ 138 crc = 0xffffffff; /* preload shift register, per CRC-32 spec */
138 139
@@ -556,8 +557,10 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)
556 u16 PPK[6]; /* temporary key for mixing */ 557 u16 PPK[6]; /* temporary key for mixing */
557 558
558 /* Note: all adds in the PPK[] equations below are mod 2**16 */ 559 /* Note: all adds in the PPK[] equations below are mod 2**16 */
559 for (i = 0; i < 5; i++) PPK[i] = p1k[i]; /* first, copy P1K to PPK */ 560 for (i = 0; i < 5; i++)
560 PPK[5] = p1k[4] + iv16; /* next, add in IV16 */ 561 PPK[i] = p1k[i]; /* first, copy P1K to PPK */
562
563 PPK[5] = p1k[4] + iv16; /* next, add in IV16 */
561 564
562 /* Bijective non-linear mixing of the 96 bits of PPK[0..5] */ 565 /* Bijective non-linear mixing of the 96 bits of PPK[0..5] */
563 PPK[0] += _S_(PPK[5] ^ TK16(0)); /* Mix key in each "round" */ 566 PPK[0] += _S_(PPK[5] ^ TK16(0)); /* Mix key in each "round" */
@@ -977,7 +980,8 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
977 u8 intermediateb[16]; 980 u8 intermediateb[16];
978 u8 round_key[16]; 981 u8 round_key[16];
979 982
980 for (i = 0; i < 16; i++) round_key[i] = key[i]; 983 for (i = 0; i < 16; i++)
984 round_key[i] = key[i];
981 985
982 for (round = 0; round < 11; round++) { 986 for (round = 0; round < 11; round++) {
983 if (round == 0) { 987 if (round == 0) {
@@ -1061,7 +1065,8 @@ static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists,
1061{ 1065{
1062 int i; 1066 int i;
1063 1067
1064 for (i = 0; i < 16; i++) mic_header2[i] = 0x00; 1068 for (i = 0; i < 16; i++)
1069 mic_header2[i] = 0x00;
1065 1070
1066 mic_header2[0] = mpdu[16]; /* A3 */ 1071 mic_header2[0] = mpdu[16]; /* A3 */
1067 mic_header2[1] = mpdu[17]; 1072 mic_header2[1] = mpdu[17];
@@ -1074,7 +1079,8 @@ static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists,
1074 mic_header2[7] = 0x00; /* mpdu[23]; */ 1079 mic_header2[7] = 0x00; /* mpdu[23]; */
1075 1080
1076 if (!qc_exists && a4_exists) { 1081 if (!qc_exists && a4_exists) {
1077 for (i = 0; i < 6; i++) mic_header2[8+i] = mpdu[24+i]; /* A4 */ 1082 for (i = 0; i < 6; i++)
1083 mic_header2[8+i] = mpdu[24+i]; /* A4 */
1078 } 1084 }
1079 1085
1080 if (qc_exists && !a4_exists) { 1086 if (qc_exists && !a4_exists) {
@@ -1083,7 +1089,8 @@ static void construct_mic_header2(u8 *mic_header2, u8 *mpdu, int a4_exists,
1083 } 1089 }
1084 1090
1085 if (qc_exists && a4_exists) { 1091 if (qc_exists && a4_exists) {
1086 for (i = 0; i < 6; i++) mic_header2[8+i] = mpdu[24+i]; /* A4 */ 1092 for (i = 0; i < 6; i++)
1093 mic_header2[8+i] = mpdu[24+i]; /* A4 */
1087 1094
1088 mic_header2[14] = mpdu[30] & 0x0f; 1095 mic_header2[14] = mpdu[30] & 0x0f;
1089 mic_header2[15] = mpdu[31] & 0x00; 1096 mic_header2[15] = mpdu[31] & 0x00;
@@ -1101,7 +1108,9 @@ static void construct_ctr_preload(u8 *ctr_preload, int a4_exists, int qc_exists,
1101{ 1108{
1102 int i = 0; 1109 int i = 0;
1103 1110
1104 for (i = 0; i < 16; i++) ctr_preload[i] = 0x00; 1111 for (i = 0; i < 16; i++)
1112 ctr_preload[i] = 0x00;
1113
1105 i = 0; 1114 i = 0;
1106 1115
1107 ctr_preload[0] = 0x01; /* flag */ 1116 ctr_preload[0] = 0x01; /* flag */