Merge pull request #139 from kimocoder/v5.2.20

Fix injected frames drop + platform fixes
This commit is contained in:
Christian B 2018-06-25 09:26:09 -07:00 committed by GitHub
commit 5bb1aacdc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 56 additions and 58 deletions

View File

@ -157,6 +157,7 @@ CONFIG_PLATFORM_HISILICON = n
CONFIG_PLATFORM_NV_TK1 = n CONFIG_PLATFORM_NV_TK1 = n
CONFIG_PLATFORM_RTL8197D = n CONFIG_PLATFORM_RTL8197D = n
CONFIG_PLATFORM_ARM_ODROIDC2 = n CONFIG_PLATFORM_ARM_ODROIDC2 = n
CONFIG_PLATFORM_PPC = n
############################################################### ###############################################################
CONFIG_DRVEXT_MODULE = n CONFIG_DRVEXT_MODULE = n
@ -1006,7 +1007,7 @@ EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04
ifeq ($(CONFIG_PLATFORM_I386_PC), y) ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/aarch64/arm64/ )
ARCH ?= $(SUBARCH) ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= CROSS_COMPILE ?=
KVER := $(shell uname -r) KVER := $(shell uname -r)
@ -1263,13 +1264,15 @@ endif
ifeq ($(CONFIG_PLATFORM_FS_MX61), y) ifeq ($(CONFIG_PLATFORM_FS_MX61), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
ARCH := arm ARCH := arm
CROSS_COMPILE := /home/share/CusEnv/FreeScale/arm-eabi-4.4.3/bin/arm-eabi- CROSS_COMPILE ?=
KSRC ?= /home/share/CusEnv/FreeScale/FS_kernel_env KVER ?= $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif endif
ifeq ($(CONFIG_PLATFORM_ACTIONS_ATJ227X), y) ifeq ($(CONFIG_PLATFORM_ACTIONS_ATJ227X), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATJ227X EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATJ227X
ARCH := mips ARCH := mips
@ -1512,6 +1515,17 @@ CROSS_COMPILE := /home/android_sdk/Allwinner/a20/kitkat-a20_v4.4/lichee/out/andr
KSRC := /home/android_sdk/Allwinner/a20/kitkat-a20_v4.4/lichee/linux-3.4 KSRC := /home/android_sdk/Allwinner/a20/kitkat-a20_v4.4/lichee/linux-3.4
endif endif
ifeq ($(CONFIG_PLATFORM_PPC), y)
EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
SUBARCH := $(shell uname -m | sed -e s/ppc/powerpc/)
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
KVER ?= $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif
ifeq ($(CONFIG_PLATFORM_ARM_SUN8I_W3P1), y) ifeq ($(CONFIG_PLATFORM_ARM_SUN8I_W3P1), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN8I EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN8I

View File

@ -4221,6 +4221,21 @@ int rtw_ieee80211_radiotap_iterator_init(
int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns); int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24))
static struct xmit_frame* monitor_alloc_mgtxmitframe(struct xmit_priv *pxmitpriv) {
int tries;
int delay = 300;
struct xmit_frame *pmgntframe = NULL;
for(tries = 3; tries >= 0; tries--) {
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if(pmgntframe != NULL)
return pmgntframe;
rtw_udelay_os(delay);
delay += delay/2;
}
return NULL;
}
s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev) s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
{ {
int ret = 0; int ret = 0;
@ -4264,6 +4279,11 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
if (unlikely(skb->len < rtap_len)) if (unlikely(skb->len < rtap_len))
goto fail; goto fail;
if ((pmgntframe = monitor_alloc_mgtxmitframe(pxmitpriv)) == NULL) {
DBG_COUNTER(padapter->tx_logs.core_tx_err_pxmitframe);
return NETDEV_TX_BUSY;
}
ret = rtw_ieee80211_radiotap_iterator_init(&iterator, rtap_hdr, skb->len, NULL); ret = rtw_ieee80211_radiotap_iterator_init(&iterator, rtap_hdr, skb->len, NULL);
while (!ret) { while (!ret) {
ret = rtw_ieee80211_radiotap_iterator_next(&iterator); ret = rtw_ieee80211_radiotap_iterator_next(&iterator);
@ -4345,10 +4365,6 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
// frame_ctl = le16_to_cpu(dot11_hdr->frame_control); // frame_ctl = le16_to_cpu(dot11_hdr->frame_control);
/* Check if the QoS bit is set */ /* Check if the QoS bit is set */
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) {
rtw_udelay_os(500);
goto fail;
}
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;
update_monitor_frame_attrib(padapter, pattrib); update_monitor_frame_attrib(padapter, pattrib);
@ -4377,10 +4393,11 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
pattrib->last_txcmdsz = pattrib->pktlen; pattrib->last_txcmdsz = pattrib->pktlen;
dump_mgntframe(padapter, pmgntframe); dump_mgntframe(padapter, pmgntframe);
DBG_COUNTER(padapter->tx_logs.core_tx);
fail: fail:
rtw_skb_free(skb); rtw_skb_free(skb);
return 0; return NETDEV_TX_OK;
} }
#endif #endif

View File

@ -1,5 +1,5 @@
PACKAGE_NAME="realtek-rtl8812au" PACKAGE_NAME="realtek-rtl8812au"
PACKAGE_VERSION="5.2.20~20180622" PACKAGE_VERSION="5.2.20~20180625"
BUILT_MODULE_NAME[0]="8812au" BUILT_MODULE_NAME[0]="8812au"
PROCS_NUM=`nproc` PROCS_NUM=`nproc`
[ $PROCS_NUM -gt 16 ] && PROCS_NUM=16 [ $PROCS_NUM -gt 16 ] && PROCS_NUM=16

View File

@ -3,12 +3,13 @@
---------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------
TODO: TODO:
- Add support for namespaces (NS)
- Fix count for frames in RadioTap header (add to stats)
- Enable TX queue in monitor mode - Enable TX queue in monitor mode
- Place signal quality and per antenna rssi into radiotap header - Place signal quality and per antenna rssi into radiotap header
- Calculate signal quality in the monitor mode - Calculate signal quality in the monitor mode
- Add channels 151 and 153 - Add channels 151 and 153
- Unmask all available channels - Unmask all available channels
- Disable power saving mode
- Switch channels to 80 MHz widt in monitor mode - Switch channels to 80 MHz widt in monitor mode
- Enable channel 14 and 80 MHz width in the regdom - Enable channel 14 and 80 MHz width in the regdom
- Switch channel in monitor mode - Switch channel in monitor mode
@ -22,8 +23,15 @@
+++ And propably alot more. We'll see. +++ And propably alot more. We'll see.
[2018.06.25]
- Fix injected frames drop
- Fixed compilation on some ARM platforms
- Added support for PPC platform
- Minor cleanups
[2018.06.23]
- Added more VID/PID's + moved 1 to correct place
- Moved changelogs into "docs/" folder
[2018.06.22] [2018.06.22]
- Enabled monitor mode - Enabled monitor mode

View File

@ -1,4 +0,0 @@
#DHCP client
DEVICE=wlan0
BOOTPROTO=dhcp
ONBOOT=yes

View File

@ -80,7 +80,7 @@
#ifdef CONFIG_SINGLE_XMIT_BUF #ifdef CONFIG_SINGLE_XMIT_BUF
#define NR_XMIT_EXTBUFF (1) #define NR_XMIT_EXTBUFF (1)
#else #else
#define NR_XMIT_EXTBUFF (32) #define NR_XMIT_EXTBUFF (64)
#endif #endif
#ifdef CONFIG_RTL8812A #ifdef CONFIG_RTL8812A

View File

@ -522,10 +522,9 @@ int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
if (pkt) { if (pkt) {
if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == _TRUE) { if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == _TRUE) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24))
rtw_monitor_xmit_entry((struct sk_buff *)pkt, pnetdev); ret = rtw_monitor_xmit_entry((struct sk_buff *)pkt, pnetdev);
#endif #endif
} } else {
else {
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, pkt->truesize); rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, pkt->truesize);
ret = _rtw_xmit_entry(pkt, pnetdev); ret = _rtw_xmit_entry(pkt, pnetdev);
} }

20
runwpa
View File

@ -1,20 +0,0 @@
#!/bin/bash
if [ "`which iwconfig`" = "" ] ; then
echo "WARNING:Wireless tool not exist!"
echo " Please install it!"
exit
else
if [ `uname -r | cut -d. -f2` -eq 4 ]; then
wpa_supplicant -D ipw -c wpa1.conf -i wlan0
else
if [ `iwconfig -v |awk '{print $4}' | head -n 1` -lt 18 ] ; then
wpa_supplicant -D ipw -c wpa1.conf -i wlan0
else
wpa_supplicant -D wext -c wpa1.conf -i wlan0
fi
fi
fi

View File

@ -1,16 +0,0 @@
#!/bin/bash
var0=`ps aux|awk '/dhclient wlan0/'|awk '$11!="awk"{print $2}'`
kill $var0
cp ifcfg-wlan0 /etc/sysconfig/network-scripts/
dhclient wlan0
var1=`ifconfig wlan0 |awk '/inet/{print $2}'|awk -F: '{print $2}'`
rm -f /etc/sysconfig/network-scripts/ifcfg-wlan0
echo "get ip: $var1"