mirror of
https://github.com/drygdryg/rtl8188eus.git
synced 2025-04-29 02:37:16 +09:00
Fix a few incompatibilities with newer kernels
This commit is contained in:
parent
33a82d10db
commit
f71a963ad7
@ -7094,6 +7094,11 @@ exit:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
|
||||||
|
static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy,
|
||||||
|
struct wireless_dev *wdev,
|
||||||
|
struct mgmt_frame_regs *upd)
|
||||||
|
#else
|
||||||
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,
|
||||||
@ -7101,12 +7106,12 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
|||||||
struct net_device *ndev,
|
struct net_device *ndev,
|
||||||
#endif
|
#endif
|
||||||
u16 frame_type, bool reg)
|
u16 frame_type, bool reg)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
||||||
struct net_device *ndev = wdev_to_ndev(wdev);
|
struct net_device *ndev = wdev_to_ndev(wdev);
|
||||||
#endif
|
#endif
|
||||||
_adapter *adapter;
|
_adapter *adapter;
|
||||||
|
|
||||||
struct rtw_wdev_priv *pwdev_priv;
|
struct rtw_wdev_priv *pwdev_priv;
|
||||||
|
|
||||||
if (ndev == NULL)
|
if (ndev == NULL)
|
||||||
@ -7120,20 +7125,6 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
|||||||
frame_type, reg);
|
frame_type, reg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Wait QC Verify */
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (frame_type) {
|
|
||||||
case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */
|
|
||||||
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, reg);
|
|
||||||
break;
|
|
||||||
case IEEE80211_STYPE_ACTION: /* 0x00D0 */
|
|
||||||
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_ACTION, reg);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -9438,7 +9429,11 @@ 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))
|
||||||
|
.update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register,
|
||||||
|
#else
|
||||||
.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…
x
Reference in New Issue
Block a user