1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-25 14:44:09 +00:00

Adds definite sizes for MTUs.

This will add minimum mtu size, default and maximum mtu sizes.
For monitor interface and netdevice default MTU will be set to
WLAN_DATA_MAXLEN.
For ethernet devices default MTU size will be WLAN_MAX_ETHFRM_LEN.
This commit is contained in:
Tuomo Untinen 2019-09-19 08:50:13 +03:00
parent 32aad89694
commit 1c8945ba92
4 changed files with 16 additions and 1 deletions

View File

@ -1 +1 @@
#define DRIVERVERSION "v5.2.20.2_28373.20180619"
#define DRIVERVERSION "v5.2.20.2_28373.20190919"

View File

@ -4165,6 +4165,9 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
ret = -ENOMEM;
goto out;
}
mon_ndev->min_mtu = WLAN_MIN_ETHFRM_LEN;
mon_ndev->mtu = WLAN_DATA_MAXLEN;
mon_ndev->max_mtu = WLAN_DATA_MAXLEN;
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
strncpy(mon_ndev->name, name, IFNAMSIZ);

View File

@ -1477,6 +1477,10 @@ 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;
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
padapter = rtw_netdev_priv(pnetdev);
padapter->pnetdev = pnetdev;

View File

@ -2059,6 +2059,10 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_p
if (!pnetdev)
goto RETURN;
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
pnetdev->mtu = WLAN_MAX_ETHFRM_LEN;
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
pnpi = netdev_priv(pnetdev);
pnpi->priv = old_priv;
pnpi->sizeof_priv = sizeof_priv;
@ -2080,6 +2084,10 @@ 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;
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
pnpi = netdev_priv(pnetdev);
pnpi->priv = rtw_zvmalloc(sizeof_priv);