Merge pull request #88 from darkalexpp/v5.3.9

Fix kernel 5.8.11
This commit is contained in:
Christian Bremvåg 2020-10-10 23:48:25 +02:00 committed by GitHub
commit 96bf27859a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7088,18 +7088,16 @@ 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,
#else #else
struct net_device *ndev, struct net_device *ndev,
#endif #endif
u16 frame_type, bool reg) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
struct mgmt_frame_regs *upd)
#else #else
static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy, u16 frame_type, bool reg)
struct wireless_dev *wdev,
struct mgmt_frame_regs *upd)
#endif #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)) #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
/* hardcoded always true, to make it pass compilation */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
bool reg = true;
#endif
_adapter *adapter; _adapter *adapter;
struct rtw_wdev_priv *pwdev_priv; struct rtw_wdev_priv *pwdev_priv;
@ -7132,8 +7136,13 @@ static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy,
/* Wait QC Verify */ /* Wait QC Verify */
return; 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) { switch (frame_type) {
#endif
case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */ case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, reg); SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, reg);
break; 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) #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)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, .update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
#else #else
.update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register, .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
#endif #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,