diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 383a557..72d08ed 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -7088,18 +7088,16 @@ exit: return ret; } -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) struct wireless_dev *wdev, #else struct net_device *ndev, #endif - u16 frame_type, bool reg) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) + struct mgmt_frame_regs *upd) #else -static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy, - struct wireless_dev *wdev, - struct mgmt_frame_regs *upd) + u16 frame_type, bool reg) #endif { @@ -7110,6 +7108,12 @@ static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy, #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; @@ -7132,8 +7136,13 @@ static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy, /* Wait QC Verify */ return; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) + +#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; @@ -9454,10 +9463,10 @@ 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)) - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)) + .update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register, #else - .update_mgmt_frame_registrations = cfg80211_rtw_update_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)) .action = cfg80211_rtw_mgmt_tx,