1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-26 07:04:12 +00:00

Adds definite sizes for MTUs

This commit is contained in:
kimocoder 2019-11-11 01:08:21 +01:00
parent 2fb4e08249
commit a92167dc8b
3 changed files with 17 additions and 2 deletions

View File

@ -4655,6 +4655,10 @@ 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->max_mtu = WLAN_DATA_MAXLEN;
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP; mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
strncpy(mon_ndev->name, name, IFNAMSIZ); strncpy(mon_ndev->name, name, IFNAMSIZ);
mon_ndev->name[IFNAMSIZ - 1] = 0; mon_ndev->name[IFNAMSIZ - 1] = 0;

View File

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

View File

@ -13,7 +13,6 @@
* *
*****************************************************************************/ *****************************************************************************/
#define _OSDEP_SERVICE_C_ #define _OSDEP_SERVICE_C_
#include <drv_types.h> #include <drv_types.h>
@ -27,7 +26,6 @@ atomic_t _malloc_size = ATOMIC_INIT(0);
#endif #endif
#endif /* DBG_MEMORY_LEAK */ #endif /* DBG_MEMORY_LEAK */
#if defined(PLATFORM_LINUX) #if defined(PLATFORM_LINUX)
/* /*
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE * 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) if (!pnetdev)
goto RETURN; 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 = netdev_priv(pnetdev);
pnpi->priv = old_priv; pnpi->priv = old_priv;
pnpi->sizeof_priv = sizeof_priv; pnpi->sizeof_priv = sizeof_priv;
@ -2411,6 +2414,10 @@ 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->max_mtu = WLAN_DATA_MAXLEN;
pnpi = netdev_priv(pnetdev); pnpi = netdev_priv(pnetdev);
pnpi->priv = rtw_zvmalloc(sizeof_priv); pnpi->priv = rtw_zvmalloc(sizeof_priv);