mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 16:44:20 +00:00
rtl8188eu: Remove double blank lines in core/*.h
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
51e6fae39e
commit
11ab93f073
21 changed files with 0 additions and 462 deletions
|
@ -25,7 +25,6 @@
|
|||
#include <wifi.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
|
||||
/* WEP related ===== */
|
||||
|
||||
#define CRC32_POLY 0x04c11db7
|
||||
|
@ -37,7 +36,6 @@ struct arc4context
|
|||
u8 state[256];
|
||||
};
|
||||
|
||||
|
||||
static void arcfour_init(struct arc4context *parc4ctx, u8 * key, u32 key_len)
|
||||
{
|
||||
u32 t, u;
|
||||
|
@ -85,7 +83,6 @@ static u32 arcfour_byte( struct arc4context *parc4ctx)
|
|||
return state[(sx + sy) & 0xff];
|
||||
}
|
||||
|
||||
|
||||
static void arcfour_encrypt( struct arc4context *parc4ctx,
|
||||
u8 * dest,
|
||||
u8 * src,
|
||||
|
@ -101,7 +98,6 @@ static void arcfour_encrypt( struct arc4context *parc4ctx,
|
|||
static sint bcrc32initialized = 0;
|
||||
static u32 crc32_table[256];
|
||||
|
||||
|
||||
static u8 crc32_reverseBit( u8 data)
|
||||
{
|
||||
return( (u8)((data<<7)&0x80) | ((data<<5)&0x40) | ((data<<3)&0x20) | ((data<<1)&0x10) | ((data>>1)&0x08) | ((data>>3)&0x04) | ((data>>5)&0x02) | ((data>>7)&0x01) );
|
||||
|
@ -156,7 +152,6 @@ static __le32 getcrc32(u8 *buf, sint len)
|
|||
return cpu_to_le32(~crc); /* transmit complement, per CRC-32 spec */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Need to consider the fragment situation
|
||||
*/
|
||||
|
@ -178,7 +173,6 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
;
|
||||
|
||||
|
||||
if (((struct xmit_frame*)pxmitframe)->buf_addr == NULL)
|
||||
return;
|
||||
|
||||
|
@ -406,15 +400,11 @@ void rtw_seccalctkipmic(u8 * key, u8 *header, u8 *data, u32 data_len, u8 *mic_co
|
|||
}
|
||||
rtw_secmicappend(&micdata, &priority[0], 4);
|
||||
|
||||
|
||||
rtw_secmicappend(&micdata, data, data_len);
|
||||
|
||||
rtw_secgetmic(&micdata, mic_code);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* macros for extraction/creation of unsigned char/unsigned short values */
|
||||
#define RotR1(v16) ((((v16) >> 1) & 0x7FFF) ^ (((v16) & 1) << 15))
|
||||
#define Lo8(v16) ((u8)( (v16) & 0x00FF))
|
||||
|
@ -436,7 +426,6 @@ void rtw_seccalctkipmic(u8 * key, u8 *header, u8 *data, u32 data_len, u8 *mic_co
|
|||
#define P1K_SIZE 10 /* 80-bit Phase1 key */
|
||||
#define RC4_KEY_SIZE 16 /* 128-bit RC4KEY (104 bits unknown) */
|
||||
|
||||
|
||||
/* 2-unsigned char by 2-unsigned char subset of the full AES S-box table */
|
||||
static const unsigned short Sbox1[2][256]= /* Sbox for hash (can be in ROM) */
|
||||
{ {
|
||||
|
@ -474,7 +463,6 @@ static const unsigned short Sbox1[2][256]= /* Sbox for hash (can be in ROM
|
|||
0x82C3, 0x29B0, 0x5A77, 0x1E11, 0x7BCB, 0xA8FC, 0x6DD6, 0x2C3A,
|
||||
},
|
||||
|
||||
|
||||
{ /* second half of table is unsigned char-reversed version of first! */
|
||||
0xA5C6, 0x84F8, 0x99EE, 0x8DF6, 0x0DFF, 0xBDD6, 0xB1DE, 0x5491,
|
||||
0x5060, 0x0302, 0xA9CE, 0x7D56, 0x19E7, 0x62B5, 0xE64D, 0x9AEC,
|
||||
|
@ -553,7 +541,6 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**********************************************************************
|
||||
* Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16
|
||||
|
@ -613,7 +600,6 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)
|
|||
rc4key[2] = Lo8(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++)
|
||||
{
|
||||
|
@ -623,7 +609,6 @@ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
/* The hlen isn't include the IV */
|
||||
u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
||||
{ /* exclude ICV */
|
||||
|
@ -722,7 +707,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo == NULL!!!\n"));
|
||||
|
@ -736,7 +720,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
}
|
||||
|
||||
|
||||
/* The hlen isn't include the IV */
|
||||
u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
|
||||
{ /* exclude ICV */
|
||||
|
@ -843,7 +826,6 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
|
|||
res =_FAIL;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo == NULL!!!\n"));
|
||||
|
@ -857,11 +839,8 @@ exit:
|
|||
|
||||
}
|
||||
|
||||
|
||||
/* 3 =====AES related ===== */
|
||||
|
||||
|
||||
|
||||
#define MAX_MSG_SIZE 2048
|
||||
/*****************************/
|
||||
/******** SBOX Table *********/
|
||||
|
@ -948,7 +927,6 @@ static void add_round_key( u8 *shiftrow_in,
|
|||
u8 *out);
|
||||
static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext);
|
||||
|
||||
|
||||
/****************************************/
|
||||
/* aes128k128d() */
|
||||
/* Performs a 128 bit AES encrypt with */
|
||||
|
@ -965,7 +943,6 @@ static void xor_128(u8 *a, u8 *b, u8 *out)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
static void xor_32(u8 *a, u8 *b, u8 *out)
|
||||
{
|
||||
sint i;
|
||||
|
@ -977,13 +954,11 @@ static void xor_32(u8 *a, u8 *b, u8 *out)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
static u8 sbox(u8 a)
|
||||
{
|
||||
return sbox_table[(sint)a];
|
||||
}
|
||||
|
||||
|
||||
static void next_key(u8 *key, sint round)
|
||||
{
|
||||
u8 rcon;
|
||||
|
@ -1010,7 +985,6 @@ static void next_key(u8 *key, sint round)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
static void byte_sub(u8 *in, u8 *out)
|
||||
{
|
||||
sint i;
|
||||
|
@ -1022,7 +996,6 @@ static void byte_sub(u8 *in, u8 *out)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
static void shift_row(u8 *in, u8 *out)
|
||||
{
|
||||
;
|
||||
|
@ -1045,7 +1018,6 @@ static void shift_row(u8 *in, u8 *out)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
static void mix_column(u8 *in, u8 *out)
|
||||
{
|
||||
sint i;
|
||||
|
@ -1108,7 +1080,6 @@ static void mix_column(u8 *in, u8 *out)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
|
||||
{
|
||||
sint round;
|
||||
|
@ -1147,7 +1118,6 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
/************************************************/
|
||||
/* construct_mic_iv() */
|
||||
/* Builds the MIC IV from header fields and PN */
|
||||
|
@ -1228,7 +1198,6 @@ static void construct_mic_header1(
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
/************************************************/
|
||||
/* construct_mic_header2() */
|
||||
/* Builds the last MIC header block from */
|
||||
|
@ -1255,7 +1224,6 @@ static void construct_mic_header2(
|
|||
mic_header2[6] = 0x00;
|
||||
mic_header2[7] = 0x00; /* mpdu[23]; */
|
||||
|
||||
|
||||
if (!qc_exists && a4_exists)
|
||||
{
|
||||
for (i =0;i<6;i++) mic_header2[8+i] = mpdu[24+i]; /* A4 */
|
||||
|
@ -1279,7 +1247,6 @@ static void construct_mic_header2(
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
/************************************************/
|
||||
/* construct_mic_header2() */
|
||||
/* Builds the last MIC header block from */
|
||||
|
@ -1326,7 +1293,6 @@ static void construct_ctr_preload(
|
|||
ctr_preload[15] = (unsigned char) (c % 256);
|
||||
}
|
||||
|
||||
|
||||
/************************************/
|
||||
/* bitwise_xor() */
|
||||
/* A 128 bit, bitwise exclusive or */
|
||||
|
@ -1342,7 +1308,6 @@ static void bitwise_xor(u8 *ina, u8 *inb, u8 *out)
|
|||
;
|
||||
}
|
||||
|
||||
|
||||
static sint aes_cipher(u8 *key, uint hdrlen,
|
||||
u8 *pframe, uint plen)
|
||||
{
|
||||
|
@ -1426,7 +1391,6 @@ static sint aes_cipher(u8 *key, uint hdrlen,
|
|||
qc_exists
|
||||
);
|
||||
|
||||
|
||||
payload_remainder = plen % 16;
|
||||
num_blocks = plen / 16;
|
||||
|
||||
|
@ -1528,7 +1492,6 @@ static sint aes_cipher(u8 *key, uint hdrlen,
|
|||
u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
||||
{ /* exclude ICV */
|
||||
|
||||
|
||||
/*static*/
|
||||
/* unsigned char message[MAX_MSG_SIZE]; */
|
||||
|
||||
|
@ -1596,8 +1559,6 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
;
|
||||
return res;
|
||||
}
|
||||
|
@ -1621,7 +1582,6 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
|||
u8 padded_buffer[16];
|
||||
u8 mic[8];
|
||||
|
||||
|
||||
uint frtype = GetFrameType(pframe);
|
||||
uint frsubtype = GetFrameSubType(pframe);
|
||||
|
||||
|
@ -1672,7 +1632,6 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
|||
} else
|
||||
qc_exists = 0;
|
||||
|
||||
|
||||
/* now, decrypt pframe with hdrlen offset and plen long */
|
||||
|
||||
payload_index = hdrlen + 8; /* 8 is for extiv */
|
||||
|
@ -1723,7 +1682,6 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
|||
if ((hdrlen +plen+8) <= MAX_MSG_SIZE)
|
||||
memcpy((void *)message, pframe, (hdrlen +plen+8)); /* 8 is for ext iv len */
|
||||
|
||||
|
||||
pn_vector[0]=pframe[hdrlen];
|
||||
pn_vector[1]=pframe[hdrlen+1];
|
||||
pn_vector[2]=pframe[hdrlen+4];
|
||||
|
@ -1753,7 +1711,6 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
|||
qc_exists
|
||||
);
|
||||
|
||||
|
||||
payload_remainder = (plen-8) % 16;
|
||||
num_blocks = (plen-8) / 16;
|
||||
|
||||
|
@ -2140,7 +2097,6 @@ static int sha256_process(struct sha256_state *md, unsigned char *in,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Terminate the hash to get the digest
|
||||
@param md The hash state
|
||||
|
@ -2640,7 +2596,6 @@ static void aes_128_encrypt(void *ctx, u8 *plain, u8 *crypt)
|
|||
rijndaelEncrypt(ctx, plain, crypt);
|
||||
}
|
||||
|
||||
|
||||
static void gf_mulx(u8 *pad)
|
||||
{
|
||||
int i, carry;
|
||||
|
@ -2659,7 +2614,6 @@ static void aes_encrypt_deinit(void *ctx)
|
|||
rtw_mfree(ctx, AES_PRIV_SIZE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* omac1_aes_128_vector - One-Key CBC MAC (OMAC1) hash with AES-128
|
||||
* @key: 128-bit key for the hash operation
|
||||
|
@ -2733,7 +2687,6 @@ static int omac1_aes_128_vector(u8 *key, size_t num_elem,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* omac1_aes_128 - One-Key CBC MAC (OMAC1) hash with AES-128 (aka AES-CMAC)
|
||||
* @key: 128-bit key for the hash operation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue