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:
parent
32aad89694
commit
1c8945ba92
@ -1 +1 @@
|
||||
#define DRIVERVERSION "v5.2.20.2_28373.20180619"
|
||||
#define DRIVERVERSION "v5.2.20.2_28373.20190919"
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user