[PATCH v3 11/15] staging: rtl8723au: Adjust whitespace in and around comments
As the subject indicates, adjust whitespace in and around comments in rtl8723au's rtw_security.c. Signed-off-by: M. Vefa Bicakci --- drivers/staging/rtl8723au/core/rtw_security.c | 114 +- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_security.c b/drivers/staging/rtl8723au/core/rtw_security.c index f8d0c0a63f..8591b49664 100644 --- a/drivers/staging/rtl8723au/core/rtw_security.c +++ b/drivers/staging/rtl8723au/core/rtw_security.c @@ -135,12 +135,12 @@ static u32 getcrc32(u8 *buf, int len) if (bcrc32initialized == 0) crc32_init(); - crc = 0x; /* preload shift register, per CRC-32 spec */ + crc = 0x; /* preload shift register, per CRC-32 spec */ for (p = buf; len > 0; ++p, --len) crc = crc32_table[(crc ^ *p) & 0xff] ^ (crc >> 8); - return ~crc;/* transmit complement, per CRC-32 spec */ + return ~crc; /* transmit complement, per CRC-32 spec */ } /* Need to consider the fragment situation */ @@ -152,7 +152,7 @@ void rtw_wep_encrypt23a(struct rtw_adapter *padapter, struct arc4context mycontext; int curfragnum, length, index; u32 keylength; - u8 *pframe, *payload, *iv;/* wepkey */ + u8 *pframe, *payload, *iv; /* wepkey */ u8 wepkey[16]; u8 hw_hdr_offset = 0; struct pkt_attrib *pattrib = >attrib; @@ -373,15 +373,15 @@ void rtw_seccalctkipmic23a(u8 *key, u8 *header, u8 *data, u32 data_len, priority[0] = pri; /* Michael MIC pseudo header: DA, SA, 3 x 0, Priority */ - if (header[1]&1) { /* ToDS == 1 */ - rtw_secmicappend23a(, [16], 6); /* DA */ - if (header[1]&2) /* From Ds == 1 */ + if (header[1]&1) { /* ToDS == 1 */ + rtw_secmicappend23a(, [16], 6); /* DA */ + if (header[1]&2) /* From Ds == 1 */ rtw_secmicappend23a(, [24], 6); else rtw_secmicappend23a(, [10], 6); - } else {/* ToDS == 0 */ - rtw_secmicappend23a(, [4], 6); /* DA */ - if (header[1]&2) /* From Ds == 1 */ + } else { /* ToDS == 0 */ + rtw_secmicappend23a(, [4], 6); /* DA */ + if (header[1]&2) /* From Ds == 1 */ rtw_secmicappend23a(, [16], 6); else rtw_secmicappend23a(, [10], 6); @@ -403,7 +403,7 @@ void rtw_seccalctkipmic23a(u8 *key, u8 *header, u8 *data, u32 data_len, #define Hi16(v32) ((u16)(((v32) >> 16) & 0x)) #define Mk16(hi, lo) ((lo) ^ (((u16)(hi)) << 8)) -/* select the Nth 16-bit word of the temporal key unsigned char array TK[] */ +/* select the Nth 16-bit word of the temporal key unsigned char array TK[] */ #define TK16(N) Mk16(tk[2*(N)+1], tk[2*(N)]) /* S-box lookup: 16 bits --> 16 bits */ @@ -510,7 +510,7 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) { int i; - /* Initialize the 80 bits of P1K[] from IV32 and TA[0..5] */ + /* Initialize the 80 bits of P1K[] from IV32 and TA[0..5] */ p1k[0] = Lo16(iv32); p1k[1] = Hi16(iv32); p1k[2] = Mk16(ta[1], ta[0]); /* use TA[] as little-endian */ @@ -526,7 +526,7 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) p1k[2] += _S_(p1k[1] ^ TK16((i & 1) + 4)); p1k[3] += _S_(p1k[2] ^ TK16((i & 1) + 6)); p1k[4] += _S_(p1k[3] ^ TK16((i & 1) + 0)); - p1k[4] += (unsigned short)i;/* avoid "slide attacks" */ + p1k[4] += (unsigned short) i; /* avoid "slide attacks" */ } } @@ -557,41 +557,41 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) { int i; - u16 PPK[6]; /* temporary key for mixing*/ + u16 PPK[6]; /* temporary key for mixing*/ - /* Note: all adds in the PPK[] equations below are mod 2**16 */ + /* Note: all adds in the PPK[] equations below are mod 2**16 */ for (i = 0; i < 5; i++) - PPK[i] = p1k[i];/* first, copy P1K to PPK */ + PPK[i] = p1k[i]; /* first, copy P1K to PPK */ - PPK[5] = p1k[4] + iv16; /* next, add in IV16 */ + PPK[5] = p1k[4] + iv16; /* next, add in IV16 */ - /* Bijective non-linear mixing of the 96 bits of PPK[0..5] */ - PPK[0] +=_S_(PPK[5] ^ TK16(0)); /* Mix key in each "round" */ - PPK[1] +=_S_(PPK[0] ^ TK16(1)); - PPK[2] +=_S_(PPK[1] ^ TK16(2)); - PPK[3] +=_S_(PPK[2] ^ TK16(3)); - PPK[4] +=_S_(PPK[3] ^ TK16(4)); - PPK[5] +=_S_(PPK[4] ^ TK16(5)); /* Total #
[PATCH v3 11/15] staging: rtl8723au: Adjust whitespace in and around comments
As the subject indicates, adjust whitespace in and around comments in rtl8723au's rtw_security.c. Signed-off-by: M. Vefa Bicakci m@runbox.com --- drivers/staging/rtl8723au/core/rtw_security.c | 114 +- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_security.c b/drivers/staging/rtl8723au/core/rtw_security.c index f8d0c0a63f..8591b49664 100644 --- a/drivers/staging/rtl8723au/core/rtw_security.c +++ b/drivers/staging/rtl8723au/core/rtw_security.c @@ -135,12 +135,12 @@ static u32 getcrc32(u8 *buf, int len) if (bcrc32initialized == 0) crc32_init(); - crc = 0x; /* preload shift register, per CRC-32 spec */ + crc = 0x; /* preload shift register, per CRC-32 spec */ for (p = buf; len 0; ++p, --len) crc = crc32_table[(crc ^ *p) 0xff] ^ (crc 8); - return ~crc;/* transmit complement, per CRC-32 spec */ + return ~crc; /* transmit complement, per CRC-32 spec */ } /* Need to consider the fragment situation */ @@ -152,7 +152,7 @@ void rtw_wep_encrypt23a(struct rtw_adapter *padapter, struct arc4context mycontext; int curfragnum, length, index; u32 keylength; - u8 *pframe, *payload, *iv;/* wepkey */ + u8 *pframe, *payload, *iv; /* wepkey */ u8 wepkey[16]; u8 hw_hdr_offset = 0; struct pkt_attrib *pattrib = pxmitframe-attrib; @@ -373,15 +373,15 @@ void rtw_seccalctkipmic23a(u8 *key, u8 *header, u8 *data, u32 data_len, priority[0] = pri; /* Michael MIC pseudo header: DA, SA, 3 x 0, Priority */ - if (header[1]1) { /* ToDS == 1 */ - rtw_secmicappend23a(micdata, header[16], 6); /* DA */ - if (header[1]2) /* From Ds == 1 */ + if (header[1]1) { /* ToDS == 1 */ + rtw_secmicappend23a(micdata, header[16], 6); /* DA */ + if (header[1]2) /* From Ds == 1 */ rtw_secmicappend23a(micdata, header[24], 6); else rtw_secmicappend23a(micdata, header[10], 6); - } else {/* ToDS == 0 */ - rtw_secmicappend23a(micdata, header[4], 6); /* DA */ - if (header[1]2) /* From Ds == 1 */ + } else { /* ToDS == 0 */ + rtw_secmicappend23a(micdata, header[4], 6); /* DA */ + if (header[1]2) /* From Ds == 1 */ rtw_secmicappend23a(micdata, header[16], 6); else rtw_secmicappend23a(micdata, header[10], 6); @@ -403,7 +403,7 @@ void rtw_seccalctkipmic23a(u8 *key, u8 *header, u8 *data, u32 data_len, #define Hi16(v32) ((u16)(((v32) 16) 0x)) #define Mk16(hi, lo) ((lo) ^ (((u16)(hi)) 8)) -/* select the Nth 16-bit word of the temporal key unsigned char array TK[] */ +/* select the Nth 16-bit word of the temporal key unsigned char array TK[] */ #define TK16(N) Mk16(tk[2*(N)+1], tk[2*(N)]) /* S-box lookup: 16 bits -- 16 bits */ @@ -510,7 +510,7 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) { int i; - /* Initialize the 80 bits of P1K[] from IV32 and TA[0..5] */ + /* Initialize the 80 bits of P1K[] from IV32 and TA[0..5] */ p1k[0] = Lo16(iv32); p1k[1] = Hi16(iv32); p1k[2] = Mk16(ta[1], ta[0]); /* use TA[] as little-endian */ @@ -526,7 +526,7 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) p1k[2] += _S_(p1k[1] ^ TK16((i 1) + 4)); p1k[3] += _S_(p1k[2] ^ TK16((i 1) + 6)); p1k[4] += _S_(p1k[3] ^ TK16((i 1) + 0)); - p1k[4] += (unsigned short)i;/* avoid slide attacks */ + p1k[4] += (unsigned short) i; /* avoid slide attacks */ } } @@ -557,41 +557,41 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) { int i; - u16 PPK[6]; /* temporary key for mixing*/ + u16 PPK[6]; /* temporary key for mixing*/ - /* Note: all adds in the PPK[] equations below are mod 2**16 */ + /* Note: all adds in the PPK[] equations below are mod 2**16 */ for (i = 0; i 5; i++) - PPK[i] = p1k[i];/* first, copy P1K to PPK */ + PPK[i] = p1k[i]; /* first, copy P1K to PPK */ - PPK[5] = p1k[4] + iv16; /* next, add in IV16 */ + PPK[5] = p1k[4] + iv16; /* next, add in IV16 */ - /* Bijective non-linear mixing of the 96 bits of PPK[0..5] */ - PPK[0] +=_S_(PPK[5] ^ TK16(0)); /* Mix key in each round */ - PPK[1] +=_S_(PPK[0] ^ TK16(1)); - PPK[2] +=_S_(PPK[1] ^ TK16(2)); - PPK[3] +=_S_(PPK[2] ^ TK16(3)); -