mirror of
https://github.com/brektrou/rtl8821CU.git
synced 2026-03-22 07:28:26 +08:00
Add support for Linux => 5.8.0
This commit is contained in:
@@ -7505,7 +7505,11 @@ 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);
|
||||
@@ -7520,11 +7524,16 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
||||
adapter = (_adapter *)rtw_netdev_priv(ndev);
|
||||
pwdev_priv = adapter_wdev_data(adapter);
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0))
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
RTW_INFO(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter),
|
||||
frame_type, reg);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
|
||||
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, upd->interface_stypes & BIT(IEEE80211_STYPE_PROBE_REQ >> 4));
|
||||
#else
|
||||
switch (frame_type) {
|
||||
case IEEE80211_STYPE_AUTH: /* 0x00B0 */
|
||||
if (reg > 0)
|
||||
@@ -7549,6 +7558,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
exit:
|
||||
return;
|
||||
@@ -9929,7 +9939,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
|
||||
|
||||
Reference in New Issue
Block a user