Commit 85922358 authored by Suryashankar Das's avatar Suryashankar Das Committed by Greg Kroah-Hartman

staging: rtl8188eu: Format comments

This patch fixes the checkpatch.pl warnings:
WARNING: Block comments use * on subsequent lines
WARNING: Block comments should align the * on each line
Signed-off-by: default avatarSuryashankar Das <suryashankardas.2002@gmail.com>
Link: https://lore.kernel.org/r/20210218182414.49107-1-suryashankardas.2002@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 72fd8d53
...@@ -126,9 +126,7 @@ static __le32 getcrc32(u8 *buf, int len) ...@@ -126,9 +126,7 @@ static __le32 getcrc32(u8 *buf, int len)
return cpu_to_le32(~crc); /* transmit complement, per CRC-32 spec */ return cpu_to_le32(~crc); /* transmit complement, per CRC-32 spec */
} }
/* /* Need to consider the fragment situation */
Need to consider the fragment situation
*/
void rtw_wep_encrypt(struct adapter *padapter, struct xmit_frame *pxmitframe) void rtw_wep_encrypt(struct adapter *padapter, struct xmit_frame *pxmitframe)
{ {
int curfragnum, length; int curfragnum, length;
...@@ -465,23 +463,17 @@ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in ROM) ...@@ -465,23 +463,17 @@ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in ROM)
} }
}; };
/* /**
********************************************************************** * phase1() - generate P1K, given TA, TK, IV32
* Routine: Phase 1 -- generate P1K, given TA, TK, IV32 * @tk[]: temporal key [128 bits]
* * @ta[]: transmitter's MAC address [ 48 bits]
* Inputs: * @iv32: upper 32 bits of IV [ 32 bits]
* tk[] = temporal key [128 bits] *
* ta[] = transmitter's MAC address [ 48 bits] * This function only needs to be called every 2**16 packets,
* iv32 = upper 32 bits of IV [ 32 bits] * although in theory it could be called every packet.
* Output: *
* p1k[] = Phase 1 key [ 80 bits] * Return: p1k[] - Phase 1 key [ 80 bits]
* */
* Note:
* This function only needs to be called every 2**16 packets,
* although in theory it could be called every packet.
*
**********************************************************************
*/
static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
{ {
int i; int i;
...@@ -504,29 +496,23 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) ...@@ -504,29 +496,23 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
} }
} }
/* /**
********************************************************************** * phase2() - generate RC4KEY, given TK, P1K, IV16
* Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16 * @tk[]: Temporal key [128 bits]
* * @p1k[]: Phase 1 output key [ 80 bits]
* Inputs: * @iv16: low 16 bits of IV counter [ 16 bits]
* tk[] = Temporal key [128 bits] *
* p1k[] = Phase 1 output key [ 80 bits] * The value {TA, IV32, IV16} for Phase1/Phase2 must be unique
* iv16 = low 16 bits of IV counter [ 16 bits] * across all packets using the same key TK value. Then, for a
* Output: * given value of TK[], this TKIP48 construction guarantees that
* rc4key[] = the key used to encrypt the packet [128 bits] * the final RC4KEY value is unique across all packets.
* *
* Note: * Suggested implementation optimization: if PPK[] is "overlaid"
* The value {TA, IV32, IV16} for Phase1/Phase2 must be unique * appropriately on RC4KEY[], there is no need for the final
* across all packets using the same key TK value. Then, for a * for loop below that copies the PPK[] result into RC4KEY[].
* given value of TK[], this TKIP48 construction guarantees that *
* the final RC4KEY value is unique across all packets. * Return: rc4key[] - the key used to encrypt the packet [128 bits]
* */
* Suggested implementation optimization: if PPK[] is "overlaid"
* appropriately on RC4KEY[], there is no need for the final
* for loop below that copies the PPK[] result into RC4KEY[].
*
**********************************************************************
*/
static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)
{ {
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment