1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-05 02:55:44 +00:00

Fix compilation for kernels < 4.10

This commit is contained in:
icjuego 2019-11-21 01:33:36 +00:00 committed by GitHub
parent 3b0b7b989d
commit ecf67b12c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -4761,9 +4761,11 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
goto out;
}
mon_ndev->min_mtu = WLAN_MIN_ETHFRM_LEN;
mon_ndev->mtu = WLAN_DATA_MAXLEN;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
mon_ndev->min_mtu = WLAN_MIN_ETHFRM_LEN;
mon_ndev->max_mtu = WLAN_DATA_MAXLEN;
#endif
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
strncpy(mon_ndev->name, name, IFNAMSIZ);

View File

@ -1591,9 +1591,11 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter)
if (!pnetdev)
return NULL;
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
pnetdev->mtu = WLAN_DATA_MAXLEN;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
#endif
pnetdev->dev.type = &wlan_type;
padapter = rtw_netdev_priv(pnetdev);

View File

@ -2389,9 +2389,11 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_p
goto RETURN;
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
pnetdev->mtu = WLAN_MAX_ETHFRM_LEN;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
#endif
pnpi = netdev_priv(pnetdev);
pnpi->priv = old_priv;
@ -2414,9 +2416,11 @@ struct net_device *rtw_alloc_etherdev(int sizeof_priv)
if (!pnetdev)
goto RETURN;
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
pnetdev->mtu = WLAN_MAX_ETHFRM_LEN;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
#endif
pnpi = netdev_priv(pnetdev);