Add support Kernel 5.8.x

This commit is contained in:
darkalexpp 2020-08-17 13:20:12 -05:00
parent c569f9e932
commit 0f7096d9df
2 changed files with 22 additions and 0 deletions

View File

@ -249,11 +249,13 @@ struct security_priv {
#define SEC_IS_BIP_KEY_INSTALLED(sec) _FALSE
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
struct sha256_state {
u64 length;
u32 state[8], curlen;
u8 buf[64];
};
#endif
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)\
do {\

View File

@ -7094,11 +7094,22 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
#else
struct net_device *ndev,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
struct mgmt_frame_regs *upd)
#else
u16 frame_type, bool reg)
#endif
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
struct net_device *ndev = wdev_to_ndev(wdev);
#endif
/* hardcoded always true, to make it pass compilation */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
bool reg = true;
#endif
_adapter *adapter;
struct rtw_wdev_priv *pwdev_priv;
@ -7117,7 +7128,12 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
/* Wait QC Verify */
return;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
switch (upd->interface_stypes) {
#else
switch (frame_type) {
#endif
case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, reg);
break;
@ -9432,7 +9448,11 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
.mgmt_tx = cfg80211_rtw_mgmt_tx,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
.update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
#else
.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))
.action = cfg80211_rtw_mgmt_tx,
#endif