mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-25 14:44:09 +00:00
Merge pull request #453 from CGarces/fix_4_9
Fix compilation issue with kernel < 4.9
This commit is contained in:
commit
4d41ceafd6
52
.travis.yml
52
.travis.yml
@ -1,9 +1,9 @@
|
||||
language: c
|
||||
compiler: gcc
|
||||
sudo: required
|
||||
dist: xenial
|
||||
dist: bionic
|
||||
|
||||
before_install:
|
||||
install:
|
||||
- export ALL_DEB=$(wget --quiet -O - ${KERNEL_URL}v${KVER}/ | grep -o 'href=".*"' | grep -m1 all | cut -d '"' -f 2)
|
||||
- export KVER_BUILD=$(echo $ALL_DEB | cut -d '_' -f 1 | cut -c15-)
|
||||
- wget ${KERNEL_URL}v${KVER}/$(wget --quiet -O - ${KERNEL_URL}v${KVER}/ | grep -o 'href=".*"' | grep headers | grep generic | grep -m1 amd64 | cut -d '"' -f 2)
|
||||
@ -22,65 +22,39 @@ matrix:
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ondrej/nginx-mainline'
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libssl1.1
|
||||
env: COMPILER=gcc-5 KVER=5.3
|
||||
- gcc-5
|
||||
env: COMPILER=gcc-5 KVER=5.3.7
|
||||
- compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'ppa:ondrej/nginx-mainline'
|
||||
packages:
|
||||
- gcc-6
|
||||
- libssl1.1
|
||||
env: COMPILER=gcc-6 KVER=5.3
|
||||
env: COMPILER=gcc-6 KVER=5.3.7
|
||||
- compiler: gcc
|
||||
env: COMPILER=gcc-7 KVER=5.3.7
|
||||
- compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'ppa:ondrej/nginx-mainline'
|
||||
packages:
|
||||
- gcc-7
|
||||
- libssl1.1
|
||||
env: COMPILER=gcc-7 KVER=5.3
|
||||
- compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ondrej/nginx-mainline'
|
||||
packages:
|
||||
- libssl1.1
|
||||
env: COMPILER=gcc-5 KVER=4.19.45
|
||||
- gcc-5
|
||||
env: COMPILER=gcc-5 KVER=4.19.67
|
||||
- compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'ppa:ondrej/nginx-mainline'
|
||||
packages:
|
||||
- gcc-6
|
||||
- libssl1.1
|
||||
env: COMPILER=gcc-6 KVER=4.19.45
|
||||
env: COMPILER=gcc-6 KVER=4.19.67
|
||||
- compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'ppa:ondrej/nginx-mainline'
|
||||
packages:
|
||||
- gcc-7
|
||||
- libssl1.1
|
||||
env: COMPILER=gcc-7 KVER=4.19.67
|
||||
- compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'ppa:ondrej/nginx-mainline'
|
||||
packages:
|
||||
- gcc-7
|
||||
- libssl1.1
|
||||
env: COMPILER=gcc-7 KVER=4.15.18
|
||||
- compiler: gcc
|
||||
env: COMPILER=gcc-7 KVER=4.9.197
|
||||
|
@ -4165,9 +4165,11 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
|
||||
mon_ndev->min_mtu = WLAN_MIN_ETHFRM_LEN;
|
||||
mon_ndev->mtu = WLAN_DATA_MAXLEN;
|
||||
mon_ndev->max_mtu = WLAN_DATA_MAXLEN;
|
||||
#endif
|
||||
|
||||
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||
|
@ -1477,10 +1477,11 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter)
|
||||
if (!pnetdev)
|
||||
return NULL;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
|
||||
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
|
||||
pnetdev->mtu = WLAN_DATA_MAXLEN;
|
||||
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
|
||||
|
||||
#endif
|
||||
padapter = rtw_netdev_priv(pnetdev);
|
||||
padapter->pnetdev = pnetdev;
|
||||
|
||||
|
@ -2059,10 +2059,11 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_p
|
||||
if (!pnetdev)
|
||||
goto RETURN;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
|
||||
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
|
||||
pnetdev->mtu = WLAN_MAX_ETHFRM_LEN;
|
||||
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
|
||||
|
||||
#endif
|
||||
pnpi = netdev_priv(pnetdev);
|
||||
pnpi->priv = old_priv;
|
||||
pnpi->sizeof_priv = sizeof_priv;
|
||||
@ -2084,10 +2085,11 @@ struct net_device *rtw_alloc_etherdev(int sizeof_priv)
|
||||
if (!pnetdev)
|
||||
goto RETURN;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))
|
||||
pnetdev->min_mtu = WLAN_MIN_ETHFRM_LEN;
|
||||
pnetdev->mtu = WLAN_MAX_ETHFRM_LEN;
|
||||
pnetdev->max_mtu = WLAN_DATA_MAXLEN;
|
||||
|
||||
#endif
|
||||
pnpi = netdev_priv(pnetdev);
|
||||
|
||||
pnpi->priv = rtw_zvmalloc(sizeof_priv);
|
||||
|
Loading…
Reference in New Issue
Block a user