mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-22 21:34:37 +00:00
Adds definite sizes for MTUs
This commit is contained in:
parent
2fb4e08249
commit
a92167dc8b
@ -4655,6 +4655,10 @@ 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;
|
||||
mon_ndev->max_mtu = WLAN_DATA_MAXLEN;
|
||||
|
||||
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
||||
|
@ -1592,6 +1592,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;
|
||||
|
||||
|
@ -13,7 +13,6 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#define _OSDEP_SERVICE_C_
|
||||
|
||||
#include <drv_types.h>
|
||||
@ -27,7 +26,6 @@ atomic_t _malloc_size = ATOMIC_INIT(0);
|
||||
#endif
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
/*
|
||||
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
|
||||
@ -2390,6 +2388,11 @@ 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;
|
||||
@ -2411,6 +2414,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