mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-26 15:14:02 +00:00
Merge pull request #485 from icjuego/icjuego-fix-compile-below-kernel-4.10
Fix compilation for kernels < 4.10
This commit is contained in:
commit
2e294ae369
@ -4761,9 +4761,11 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
mon_ndev->min_mtu = WLAN_MIN_ETHFRM_LEN;
|
|
||||||
mon_ndev->mtu = WLAN_DATA_MAXLEN;
|
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;
|
mon_ndev->max_mtu = WLAN_DATA_MAXLEN;
|
||||||
|
#endif
|
||||||
|
|
||||||
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||||
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||||
|
@ -1591,9 +1591,11 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter)
|
|||||||
if (!pnetdev)
|
if (!pnetdev)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
|
|
||||||
pnetdev->mtu = WLAN_DATA_MAXLEN;
|
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;
|
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
|
||||||
|
#endif
|
||||||
|
|
||||||
pnetdev->dev.type = &wlan_type;
|
pnetdev->dev.type = &wlan_type;
|
||||||
padapter = rtw_netdev_priv(pnetdev);
|
padapter = rtw_netdev_priv(pnetdev);
|
||||||
|
@ -2389,9 +2389,11 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_p
|
|||||||
goto RETURN;
|
goto RETURN;
|
||||||
|
|
||||||
|
|
||||||
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
|
|
||||||
pnetdev->mtu = WLAN_MAX_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;
|
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
|
||||||
|
#endif
|
||||||
|
|
||||||
pnpi = netdev_priv(pnetdev);
|
pnpi = netdev_priv(pnetdev);
|
||||||
pnpi->priv = old_priv;
|
pnpi->priv = old_priv;
|
||||||
@ -2414,9 +2416,11 @@ struct net_device *rtw_alloc_etherdev(int sizeof_priv)
|
|||||||
if (!pnetdev)
|
if (!pnetdev)
|
||||||
goto RETURN;
|
goto RETURN;
|
||||||
|
|
||||||
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
|
|
||||||
pnetdev->mtu = WLAN_MAX_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;
|
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
|
||||||
|
#endif
|
||||||
|
|
||||||
pnpi = netdev_priv(pnetdev);
|
pnpi = netdev_priv(pnetdev);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user