Linux 5.8 compat: sha256_state

This commit is contained in:
Rin Cat 2020-07-21 17:46:19 -04:00
parent 04dba1e736
commit 179b836abd
2 changed files with 6 additions and 6 deletions

View File

@ -2133,7 +2133,7 @@ BIP_exit:
#ifndef PLATFORM_FREEBSD
#if defined(CONFIG_TDLS)
/* compress 512-bits */
static int sha256_compress(struct sha256_state *md, unsigned char *buf)
static int sha256_compress(struct rtw_sha256_state *md, unsigned char *buf)
{
u32 S[8], W[64], t0, t1;
u32 t;
@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf)
}
/* Initialize the hash state */
static void sha256_init(struct sha256_state *md)
static void sha256_init(struct rtw_sha256_state *md)
{
md->curlen = 0;
md->length = 0;
@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md)
@param inlen The length of the data (octets)
@return CRYPT_OK if successful
*/
static int sha256_process(struct sha256_state *md, unsigned char *in,
static int sha256_process(struct rtw_sha256_state *md, unsigned char *in,
unsigned long inlen)
{
unsigned long n;
@ -2243,7 +2243,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in,
@param out [out] The destination of the hash (32 bytes)
@return CRYPT_OK if successful
*/
static int sha256_done(struct sha256_state *md, unsigned char *out)
static int sha256_done(struct rtw_sha256_state *md, unsigned char *out)
{
int i;
@ -2293,7 +2293,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out)
static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len,
u8 *mac)
{
struct sha256_state ctx;
struct rtw_sha256_state ctx;
size_t i;
sha256_init(&ctx);

View File

@ -251,7 +251,7 @@ struct security_priv {
#define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE
#endif
struct sha256_state {
struct rtw_sha256_state {
u64 length;
u32 state[8], curlen;
u8 buf[64];