mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-11-01 03:05:34 +00:00
Fix kernel 5.8 compilation
This commit is contained in:
parent
ee34be26ff
commit
f0a1b30419
@ -2133,7 +2133,7 @@ BIP_exit:
|
|||||||
#ifndef PLATFORM_FREEBSD
|
#ifndef PLATFORM_FREEBSD
|
||||||
#if defined(CONFIG_TDLS)
|
#if defined(CONFIG_TDLS)
|
||||||
/* compress 512-bits */
|
/* compress 512-bits */
|
||||||
static int sha256_compress(struct sha256_state *md, unsigned char *buf)
|
static int sha256_compress(struct sha256_state_rtk *md, unsigned char *buf)
|
||||||
{
|
{
|
||||||
u32 S[8], W[64], t0, t1;
|
u32 S[8], W[64], t0, t1;
|
||||||
u32 t;
|
u32 t;
|
||||||
@ -2181,7 +2181,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the hash state */
|
/* Initialize the hash state */
|
||||||
static void sha256_init(struct sha256_state *md)
|
static void sha256_init(struct sha256_state_rtk *md)
|
||||||
{
|
{
|
||||||
md->curlen = 0;
|
md->curlen = 0;
|
||||||
md->length = 0;
|
md->length = 0;
|
||||||
@ -2202,7 +2202,7 @@ static void sha256_init(struct sha256_state *md)
|
|||||||
@param inlen The length of the data (octets)
|
@param inlen The length of the data (octets)
|
||||||
@return CRYPT_OK if successful
|
@return CRYPT_OK if successful
|
||||||
*/
|
*/
|
||||||
static int sha256_process(struct sha256_state *md, unsigned char *in,
|
static int sha256_process(struct sha256_state_rtk *md, unsigned char *in,
|
||||||
unsigned long inlen)
|
unsigned long inlen)
|
||||||
{
|
{
|
||||||
unsigned long n;
|
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)
|
@param out [out] The destination of the hash (32 bytes)
|
||||||
@return CRYPT_OK if successful
|
@return CRYPT_OK if successful
|
||||||
*/
|
*/
|
||||||
static int sha256_done(struct sha256_state *md, unsigned char *out)
|
static int sha256_done(struct sha256_state_rtk *md, unsigned char *out)
|
||||||
{
|
{
|
||||||
int i;
|
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,
|
static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len,
|
||||||
u8 *mac)
|
u8 *mac)
|
||||||
{
|
{
|
||||||
struct sha256_state ctx;
|
struct sha256_state_rtk ctx;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
sha256_init(&ctx);
|
sha256_init(&ctx);
|
||||||
|
@ -252,7 +252,7 @@ struct security_priv {
|
|||||||
#define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE
|
#define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct sha256_state {
|
struct sha256_state_rtk {
|
||||||
u64 length;
|
u64 length;
|
||||||
u32 state[8], curlen;
|
u32 state[8], curlen;
|
||||||
u8 buf[64];
|
u8 buf[64];
|
||||||
|
@ -7470,6 +7470,7 @@ exit:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
|
||||||
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
||||||
struct wireless_dev *wdev,
|
struct wireless_dev *wdev,
|
||||||
@ -7524,6 +7525,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
|||||||
exit:
|
exit:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0))
|
#if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0))
|
||||||
static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
|
static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
|
||||||
@ -9903,7 +9905,9 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
|
|||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||||
.mgmt_tx = cfg80211_rtw_mgmt_tx,
|
.mgmt_tx = cfg80211_rtw_mgmt_tx,
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
|
||||||
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
|
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
|
||||||
|
#endif
|
||||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
||||||
.action = cfg80211_rtw_mgmt_tx,
|
.action = cfg80211_rtw_mgmt_tx,
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user