Coder Social home page Coder Social logo

rtl8192du's People

Contributors

cgarces avatar chewitt avatar clementperon avatar dbadrian avatar graysky2 avatar heitbaum avatar lafred avatar lwfinger avatar milhousevh avatar pkgadd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtl8192du's Issues

Makefile does not honor an install prefix

For example, Arch Linux's package manager has /lib symlinked to usr/lib and will NOT install to the symlink. Therefore, it would be nice if the MAKE_INSTALL variable in the Makefile allowed users to specify a value of /usr but that doesn't work. Can you please fix?

Cannot build against 4.2.x series

% make INSTALL_PREFIX=/usr                                :(
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.2.1-1-custom/build M=/scratch/rtl8192du-git/src/rtl8192du  modules
make[1]: Entering directory '/usr/lib/modules/4.2.1-1-custom/build'
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_cmd.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_security.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_debug.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_io.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ioctl_set.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ieee80211.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme_ext.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_wlan_util.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_pwrctrl.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_rf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_recv.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_sta_mgt.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ap.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_p2p.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_sreset.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_efuse.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal_intf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal_com.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_hal_init.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_phycfg.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_rf6052.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_dm.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_rxdesc.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_cmd.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/usb_halinit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_led.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_recv.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal8192duhwimg.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/usb_ops_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/osdep_service.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/os_intfs.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/usb_intf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/usb_ops_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/xmit_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/mlme_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/recv_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.o
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_indicate_disconnect’:
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:494:4: error: too few arguments to function ‘cfg80211_disconnected’
    cfg80211_disconnected(padapter->pnetdev, 0, NULL,
    ^
In file included from /scratch/rtl8192du-git/src/rtl8192du/include/osdep_service.h:62:0,
                 from /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:19:
include/net/cfg80211.h:4584:6: note: declared here
 void cfg80211_disconnected(struct net_device *dev, u16 reason,
      ^
scripts/Makefile.build:258: recipe for target '/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.o' failed
make[2]: *** [/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.o] Error 1
Makefile:1386: recipe for target '_module_/scratch/rtl8192du-git/src/rtl8192du' failed
make[1]: *** [_module_/scratch/rtl8192du-git/src/rtl8192du] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.2.1-1-custom/build'
Makefile:149: recipe for target 'modules' failed
make: *** [modules] Error 2

ieee802.11n not supported?

The adapter will associate as a 802.11a device on the 5 GHz band and as a 802.11bg device on the 2.4 GHz band. How do I get activate 802.11n modulation?

Issues on openwrt on sun7i platform

I'm working on a sun7i (A20) device with a rtl8192du integrated usb dongle, 0bda:8193 Realtek Semiconductor Corp. RTL8192DU 802.11an WLAN Adapter.

The current working code uses kernel 3.18, where the rtl8192du works relatively well, with an older version of the driver in this repo.

On current openwrt master, with kernel 4.14.18, and mac80211 from backports-2017-11-01, first I need a few fixes in order to get it to compile. Once it builds and loads, the wlanX devices vanish whenever you try to down/up them. If you try to rmmod 8192du, you get an oops on net/core/dev.c:7197:

root@keezel:/# rmmod 8192du                                                                                                                                                                                                                                                                                                    
[  247.955428] ------------[ cut here ]------------                                                                                                                                                                                                                                                                            
[  247.960059] kernel BUG at net/core/dev.c:7197!                                                                                                                                                                                                                                                                              
[  247.964498] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM                                                                                                                                                                                                                                                              
[  247.970324] Modules linked in: ath9k_htc ath9k_common rtl8192cu rtl8192c_common rtl_usb rt2800usb rt2800lib rt2500usb pppoe ppp_async cdc_mbim carl9170 brcmfmac ath9k_hw ath6kl_usb ath6kl_core ath 8192du(-) zd1211rw usb8xxx sr9700 smsc95xx sierra_net rtlwifi rtl8xxxu rtl8187 rt73usb rt2x00usb rt2x00lib rndis_host q
mi_wwan pppox ppp_generic plusb p54usb p54common nf_conntrack_ipv6 mt7601u mcs7830 mac80211 libertas kalmia iptable_nat ipt_REJECT ipt_MASQUERADE huawei_cdc_ncm dm9601 cfg80211 cdc_subset cdc_ncm cdc_ether cdc_eem ax88179_178a asix xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark
 xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSIFY                                                                                                                                           
[  248.041602]  wireguard usbnet slhc rtl8150 r8712u r8152 pegasus nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache lib80211_crypt_wep lib80211_crypt_tkip lib80211_crypt_ccmp lib80211 kaweth iptable_mangle iptable_
filter ipt_ECN ipheth ip_tables hso crc_itu_t crc_ccitt compat cdc_wdm brcmutil sch_cake nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw sch_tbf sch_htb sch_hfsc sch_ingress cryptodev ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_table
s x_tables ifb ip6_udp_tunnel udp_tunnel tun eeprom_93cx6 authenc uas sd_mod gpio_button_hotplug button_hotplug                                                                                                                                                                                                                
[  248.106871] CPU: 0 PID: 3700 Comm: rmmod Not tainted 4.14.18 #0                                                                                                                                                                                                                                                             
[  248.112782] Hardware name: Allwinner sun7i (A20) Family                                                                                                                                                                                                                                                                     
[  248.118003] task: deb4ca80 task.stack: ddcb8000                                                                                                                                                                                                                                                                             
[  248.122539] PC is at rollback_registered_many+0xb0/0x3ec                                                                                                                                                                                                                                                                    
[  248.127845] LR is at rollback_registered_many+0x2c/0x3ec                                                                                                                                                                                                                                                                    
[  248.133151] pc : [<c0599f78>]    lr : [<c0599ef4>]    psr: 20000013                                                                                                                                                                                                                                                         
[  248.139408] sp : ddcb9e70  ip : 00000000  fp : 00000000                                                                                                                                                                                                                                                                     
[  248.144625] r10: 00000000  r9 : ddcb8000  r8 : 00000001                                                                                                                                                                                                                                                                     
[  248.149844] r7 : ddcb9e78  r6 : ddcb9e54  r5 : ddcb9e98  r4 : df6cb000                                                                                                                                                                                                                                                      
[  248.156363] r3 : 00000003  r2 : 00000000  r1 : 00000000  r0 : 00000001                                                                                                                                                                                                                                                      
[  248.162883] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user                                                                                                                                                                                                                                               
[  248.170009] Control: 30c5387d  Table: 5df63e40  DAC: fffffffd                                                                                                                                                                                                                                                               
[  248.175748] Process rmmod (pid: 3700, stack limit = 0xddcb8210)                                                                                                                                                                                                                                                             
[  248.181661] Stack: (0xddcb9e70 to 0xddcba000)                                                                                                                                                                                                                                                                               
[  248.186015] 9e60:                                     ddcb9e98 00000000 ddcb9e78 ddcb9e78                                                                                                                                                                                                                                   
[  248.194185] 9e80: df6cb000 00000000 def20800 def20800 bf5f78f4 c059a2d4 df6cb044 df6cb044                                                                                                                                                                                                                                   
[  248.202354] 9ea0: 00000000 c059b208 df6cb000 df6cb000 def20800 c059b264 e0d71000 bf5db744
[  248.210523] 9ec0: def20820 def2b470 def2b400 def20800 bf5f78f4 c04deed0 00000000 ffffffed
[  248.218692] 9ee0: 00000000 def20820 def2b470 bf5f78f4 def20854 def2b4a4 ddcb8000 00000000
[  248.226862] 9f00: 00000000 c0472c4c def20820 bf5f78f4 bf5f78e8 00000081 c0206fe4 c0472d60
[  248.235032] 9f20: bf5f78f4 bf5f78f4 bf5f78e8 c0471fe4 bf5f78c0 c04de408 bf5f8b40 c0c03c08
[  248.243202] 9f40: b6f27790 00000081 c0206fe4 bf5e7204 bf5f8b40 c027adf8 32393138 00007564
[  248.251371] 9f60: 00000000 ddfb5600 00000000 deb4ca80 ddfb5600 00000000 deb4ca80 deb4cef8
[  248.259541] 9f80: ddfb5600 c0232a38 c0206fe4 ddcb8000 00cb9fb0 01cafe86 00010034 1fbe3c7e
[  248.267710] 9fa0: 0002302c c0206e00 00010034 1fbe3c7e b6f27790 00000000 00000000 00000000
[  248.275878] 9fc0: 00010034 1fbe3c7e 0002302c 00000081 00000000 00000000 00000001 00000000
[  248.284047] 9fe0: beb96dc4 beb96da8 00010ec0 b6f58b20 a0000010 b6f27790 00000000 00000000
[  248.292232] [<c0599f78>] (rollback_registered_many) from [<c059a2d4>] (rollback_registered+0x20/0x34)
[  248.301446] [<c059a2d4>] (rollback_registered) from [<c059b208>] (unregister_netdevice_queue+0x68/0xac)
[  248.310834] [<c059b208>] (unregister_netdevice_queue) from [<c059b264>] (unregister_netdev+0x18/0x20)
[  248.320185] [<c059b264>] (unregister_netdev) from [<bf5db744>] (rtw_dev_remove+0xa0/0x138 [8192du])
[  248.329379] [<bf5db744>] (rtw_dev_remove [8192du]) from [<c04deed0>] (usb_unbind_interface+0x80/0x204)
[  248.338685] [<c04deed0>] (usb_unbind_interface) from [<c0472c4c>] (device_release_driver_internal+0x128/0x1d0)
[  248.348678] [<c0472c4c>] (device_release_driver_internal) from [<c0472d60>] (driver_detach+0x60/0x6c)
[  248.357888] [<c0472d60>] (driver_detach) from [<c0471fe4>] (bus_remove_driver+0x64/0x8c)
[  248.365973] [<c0471fe4>] (bus_remove_driver) from [<c04de408>] (usb_deregister+0x5c/0xb8)
[  248.374187] [<c04de408>] (usb_deregister) from [<bf5e7204>] (cleanup_module+0x58/0xe54 [8192du])
[  248.383039] [<bf5e7204>] (cleanup_module [8192du]) from [<c027adf8>] (SyS_delete_module+0x104/0x1d8)
[  248.392173] [<c027adf8>] (SyS_delete_module) from [<c0206e00>] (ret_fast_syscall+0x0/0x4c)
[  248.400432] Code: ea000003 e3530001 e5c48311 0a000000 (e7f001f2)
[  248.406530] ---[ end trace 3003e40c8aa5f8b9 ]---
[  248.411144] Kernel panic - not syncing: Fatal exception
[  248.416377] CPU1: stopping
[  248.419097] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.14.18 #0
[  248.426308] Hardware name: Allwinner sun7i (A20) Family
[  248.431546] [<c020d1b0>] (unwind_backtrace) from [<c0209e3c>] (show_stack+0x10/0x14)
[  248.439287] [<c0209e3c>] (show_stack) from [<c068257c>] (dump_stack+0x7c/0x9c)
[  248.446507] [<c068257c>] (dump_stack) from [<c020c0ac>] (handle_IPI+0xc8/0x170)
[  248.453810] [<c020c0ac>] (handle_IPI) from [<c0201404>] (gic_handle_irq+0x7c/0x98)
[  248.461375] [<c0201404>] (gic_handle_irq) from [<c020a8b8>] (__irq_svc+0x58/0x8c)
[  248.468847] Exception stack(0xdf481f88 to 0xdf481fd0)
[  248.473895] 1f80:                   00000000 0000e700 1f18a000 c0212ba0 df480000 c0c03c24
[  248.482064] 1fa0: c0c03c70 c0c5b208 40007000 410fc074 00000000 00000000 1f18a000 df481fd8
[  248.490230] 1fc0: c0207900 c0207904 60000013 ffffffff
[  248.495281] [<c020a8b8>] (__irq_svc) from [<c0207904>] (arch_cpu_idle+0x2c/0x38)
[  248.502677] [<c0207904>] (arch_cpu_idle) from [<c0249f3c>] (do_idle+0xa4/0x108)
[  248.509983] [<c0249f3c>] (do_idle) from [<c024a1fc>] (cpu_startup_entry+0x18/0x1c)
[  248.517547] [<c024a1fc>] (cpu_startup_entry) from [<402016cc>] (0x402016cc)
[  248.524504] Rebooting in 3 seconds..

You can see logs from a fresh boot on openwrt master with the rtl8192du with the fixes to make it build:
https://pastebin.com/6fnb1j1q

With concurrent mode enabled:
https://pastebin.com/s7zrJRax

With concurrent mode and dualmac mode enabled:
https://pastebin.com/Yur9jKZr
https://pastebin.com/5X3CH1Se

The changes I do in order to build it on openwrt are:

--- orig/Makefile       2017-12-07 19:14:51.000000000 +0100
+++ new/Makefile        2018-02-02 11:10:34.640372794 +0100
@@ -99,8 +102,8 @@ endif
 SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/)
 ARCH ?= $(SUBARCH)
 CROSS_COMPILE ?=
-KVER  := $(shell uname -r)
-KSRC := /lib/modules/$(KVER)/build
+KVER  ?= $(shell uname -r)
+KSRC ?= /lib/modules/$(KVER)/build
 MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
 INSTALL_PREFIX :=
 

--- ./core/rtw_pwrctrl.c-orig   2017-12-07 19:14:51.000000000 +0100
+++ ./core/rtw_pwrctrl.c        2018-02-12 11:53:01.921181311 +0100
@@ -200,7 +200,7 @@ static void pwr_state_check_handler(void
                from_timer(padapter, t,
                           pwrctrlpriv.pwr_state_check_timer);
 #else
-       struct rtw_adapter *padapter = (struct adapter *)FunctionContext;
+       struct rtw_adapter *padapter = (struct rtw_adapter *)FunctionContext;
 #endif
 
        rtw_ps_cmd(padapter);

If I want to enable concurrent mode, I also need:

+++ ./include/autoconf.h        2018-02-09 15:23:39.321570789 +0100
@@ -60,7 +60,7 @@
 /* define CONFIG_SET_SCAN_DENY_TIMER */
 #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable,*/
 
-//#define CONFIG_CONCURRENT_MODE 1
+#define CONFIG_CONCURRENT_MODE 1
 #ifdef CONFIG_CONCURRENT_MODE
        #define CONFIG_TSF_RESET_OFFLOAD 1                      /*  For 2 PORT TSF SYNC. */
 #endif /*  CONFIG_CONCURRENT_MODE */
+++ ./hal/rtl8192d_rf6052.c     2018-02-08 10:59:06.755296179 +0100
@@ -782,7 +782,7 @@ PHY_RF6052_Config8192D(
 #ifdef CONFIG_DUALMAC_CONCURRENT
        if (pHalData->bSlaveOfDMSP)
        {
-               DBG_871X(("PHY_RF6052_Config() skip configuration RF\n"));
+               DBG_8192D("PHY_RF6052_Config() skip configuration RF\n");
                return rtStatus;
        }
 #endif

Last, to build with concurrent and dual mac modes enabled:

+++ ./include/autoconf.h        2018-02-09 15:23:39.321570789 +0100
@@ -60,7 +60,8 @@
 /* define CONFIG_SET_SCAN_DENY_TIMER */
 #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable,*/
 
-//#define CONFIG_CONCURRENT_MODE 1
+#define CONFIG_CONCURRENT_MODE 1
+#define CONFIG_DUALMAC_CONCURRENT 1
 #ifdef CONFIG_CONCURRENT_MODE
        #define CONFIG_TSF_RESET_OFFLOAD 1                      /*  For 2 PORT TSF SYNC. */
 #endif /*  CONFIG_CONCURRENT_MODE */
+++ ./core/rtw_mlme_ext.c       2018-02-08 10:42:40.475567219 +0100
@@ -7198,7 +7198,7 @@ void dc_SetBWMode(struct rtw_adapter *ad
        _enter_critical_mutex(&
                              (adapter_to_dvobj(ptarget_adapter)->setbw_mutex));
 
-       rtw_hal_set_bwmode(ptarget_adapter, (HT_CHANNEL_WIDTH) bwmode,
+       rtw_hal_set_bwmode(ptarget_adapter, (enum HT_CHANNEL_WIDTH) bwmode,
                           channel_offset);
 
        _exit_critical_mutex(&(adapter_to_dvobj(ptarget_adapter)->setbw_mutex));
+++ ./hal/rtl8192d_dm.c 2018-02-08 11:29:04.755120908 +0100
@@ -877,7 +877,7 @@ static void dm_CCK_PacketDetectionThresh
                if (pdmpriv->bChangeCCKPDStateForAnotherMacOfDMSP)
                {
                        DBG_8192D("dm_CCK_PacketDetectionThresh_DMSP(): mac 0 set for mac1\n");
-                       if (pdmpriv->curcckpdstateForAnotherMacOfDMSP == CCK_PD_STAGE_LOWRSSI)
+                       if (pdmpriv->CurCCKPDStateForAnotherMacOfDMSP == CCK_PD_STAGE_LOWRSSI)
                        {
                                PHY_SetBBReg(adapter, rCCK0_CCA, maskbyte2, 0x83);
                        }
@@ -920,7 +920,7 @@ static void dm_CCK_PacketDetectionThresh
                        Buddydmpriv = &GET_HAL_DATA(Buddyadapter)->dmpriv;
                        DBG_8192D("dm_CCK_PacketDetectionThresh_DMSP(): bslave case\n");
                        Buddydmpriv->bChangeCCKPDStateForAnotherMacOfDMSP = true;
-                       Buddydmpriv->curcckpdstateForAnotherMacOfDMSP = dm_digtable->curcckpdstate;
+                       Buddydmpriv->CurCCKPDStateForAnotherMacOfDMSP = dm_digtable->curcckpdstate;
                }
                else
                {

For reference, this is the openwrt Makefile I'm using to build the module:

# Copyright (C) 2006-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=rtl8192du
PKG_VERSION:=2017-12-07
PKG_RELEASE:=$(PKG_SOURCE_VERSION)

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/lwfinger/rtl8192du
PKG_SOURCE_VERSION:=84d1edb3e738ec25dbab1c2ddcb931832e61e802
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MAINTAINER:=Javier Marcet <[email protected]>
PKG_LICENSE:=GPLv2

STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h

include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk

NOSTDINC_FLAGS = \
        -I$(PKG_BUILD_DIR)/include \
        -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
        -I$(STAGING_DIR)/usr/include/mac80211-backport \
        -I$(STAGING_DIR)/usr/include/mac80211/uapi \
        -I$(STAGING_DIR)/usr/include/mac80211 \
        -include backport/autoconf.h \
        -include backport/backport.h

define KernelPackage/rtl8192du
  SUBMENU:=Wireless Drivers
  TITLE:=Realtek RTL8192DU wireless USB 802.11n driver
  DEPENDS:=@USB_SUPPORT +kmod-cfg80211 +kmod-mac80211 +kmod-usb-core +wireless-tools
  FILES:= $(PKG_BUILD_DIR)/8192du.$(LINUX_KMOD_SUFFIX)
# AUTOLOAD:=$(call AutoProbe,8192du)
endef

define KernelPackage/rtl8192du/description
  Kernel modules for the Realtek 8192DU USB 802.11n wireless USB adapters
endef

define Build/Compile
        +$(MAKE) $(PKG_JOBS) -C $(LINUX_DIR) \
                $(KERNEL_MAKE_FLAGS) \
                SUBDIRS="$(PKG_BUILD_DIR)" \
                CONFIG_RTL8192DU=m \
                NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
                M="$(PKG_BUILD_DIR)" \
                src="$(PKG_BUILD_DIR)" \
                TopDIR="$(PKG_BUILD_DIR)" \
                modules
endef

define Build/Configure
endef

define KernelPackage/rtl8192du/install
        $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl8192dufw.bin $(1)/lib/firmware/rtlwifi/
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl8192dufw_wol.bin $(1)/lib/firmware/rtlwifi/
endef

$(eval $(call KernelPackage,rtl8192du))

Strange USB Behavior

I'm noticing that, within the past week, when I've installed this driver on a system I get very strange behavior. Prior to about a week ago, I had no issues with the driver on Xubuntu 13.10. I then did a reinstallation of Xubuntu 13.10 and grabbed the latest version of this code. When I attempted to use the wireless card (by connecting to my 5GHz network), it doesn't actually do anything in the way of prompting about security and, instead, seems to lock-up my system. From that point moving forward, many things on the system do not respond any longer and I also cannot actually shut the system down. If I try, it gets to the point where it tries to kill all processes and hangs eternally.

I noticed that one difference was that I had upgraded to kernel 3.11.0.17. I've tried going back to the originaly 3.11.0.12 kernel included in Ubuntu 13.10 (and recompiling for that level) and I still see the same behavior.

I swapped over to Arch to see what my results were there and I had the exactly same issues (lock-up and everything). On Arch, I used their current kernel (which is in the 3.13 line) along with a LTS kernel (3.10 line). Same results each time.

My assumption is that something within the past month has changed stuff in this driver. Is anyone else seeing this?

Unable to build for 3.10.108/3.14.29: "storage size of ‘kiocb’ isn’t known"

Since 9e9e5dd on 12 March 2018 this driver no longer builds for kernels 3.10.y and 3.14.y:

/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c: In function ‘new_sync_read’:
/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c:47:22: error: storage size of ‘kiocb’ isn’t known
         struct kiocb kiocb;
                      ^~~~~
/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c:53:9: error: implicit declaration of function ‘init_sync_kiocb’; did you mean ‘bus_sync_io’? [-Werror=implicit-function-declaration]
         init_sync_kiocb(&kiocb, filp);
         ^~~~~~~~~~~~~~~
         bus_sync_io
...
/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c:57:15: error: implicit declaration of function ‘call_read_iter’; did you mean ‘file_read_actor’? [-Werror=implicit-function-declaration]
         ret = call_read_iter(filp, &kiocb, &iter);
               ^~~~~~~~~~~~~~
               file_read_actor
/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c: In function ‘__vfs_read_alt’:
/home/neil/projects/LibreELEC.tv/build.LibreELEC-WeTek_Core.arm-9.0-devel-next/RTL8192DU-a9deaecccf/os_dep/osdep_service.c:68:30: error: ‘const struct file_operations’ has no member named ‘read_iter’; did you mean ‘readdir’?
         else if (file->f_op->read_iter)
                              ^~~~~~~~~
                              readdir

Full build log: http://ix.io/1d8c

PR #61 allows the build to succeed with current HEAD (a9deaec), but that PR is closed for some reason, so I'm not sure if the fix is correct (I don't have any hardware with which to test the driver). There's a possibly related issue: #60, which refers to kernel 4.9.

Question: no-cfg80211 / no_cfg80211

Sorry to bother you, but I couldn't help noticing that you recently abandoned a lot of commits on no_cfg80211 in favor of a new branch no-cfg80211 and reset master accordingly.
Is it possible to briefly explain the difference between these two?

Unable to Scan

I am now trying to use the 8192du module on a ppc embedded system. I was able to cross compile your code successfully. The insmod was successful. iwconfig shows:

wlan1 unassociated Nickname:"WIFI@REALTEK"
Mode:Auto Frequency=5.18 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

wlan0 unassociated Nickname:"WIFI@REALTEK"
Mode:Managed Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

However, when I try to scan it shows the following:

iwlist wlan0 scan
wlan0 No scan results

My laptop scan with the 8192du module in the same vicinity shows many APs present. I had no problem with the 8192cu either on the same embedded system.

I shall send you the kernel config for the embedded system separately. Please let me know if I have missed anything out.

Upstream?

Is there a target release for pushing this driver to the upstream mainline kernel?

5gHz connection issues

Hi

Connecting at 5gHz but will only connect at 54MB/s. Also drops the line fairly frequently.

Suse 12.3,
KDE 4.10.4
Networkmanager 0.9.8
Kernel 3.10.6-22 86_64

John F.

Can't compile against 4.7

Can you?

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.7.0-1-ARCH/build M=/scratch/rtl8192du-git/src/rtl8192du  modules
make[1]: Entering directory '/usr/lib/modules/4.7.0-1-ARCH/build'
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_cmd.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_security.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_debug.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_io.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ioctl_set.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ieee80211.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme_ext.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_wlan_util.o
/scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme.c: In function ‘rtw_stadel_event_callback’:
/scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme.c:1797:8: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   else if (rtw_to_roaming(adapter) == 0)
        ^~
/scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme.c:1801:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
    if (*((unsigned short *)(pstadel->rsvd)) !=
    ^~
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_pwrctrl.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_rf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_recv.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_sta_mgt.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ap.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_p2p.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_sreset.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_efuse.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal_intf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal_com.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_hal_init.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_phycfg.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_rf6052.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_dm.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_rxdesc.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_cmd.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/usb_halinit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_led.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_recv.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal8192duhwimg.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/usb_ops_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/osdep_service.o
/scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_led.c: In function ‘SwLedControlMode1’:
/scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_led.c:1439:29: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
                             else
                             ^~~~
/scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_led.c:1441:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
     _set_timer(&(pLed->BlinkTimer), LED_BLINK_FASTER_INTERVAL_ALPHA);
     ^~~~~~~~~~
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/os_intfs.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/usb_intf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/usb_ops_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/xmit_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/mlme_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/recv_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/rtw_android.o
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_indicate_scan_done’:
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:1421:9: error: variable ‘info’ has initializer but incomplete type
  struct cfg80211_scan_info info = {
         ^~~~~~~~~~~~~~~~~~
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:1422:3: error: unknown field ‘aborted’ specified in initializer
   .aborted = aborted
   ^
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:1422:14: warning: excess elements in struct initializer
   .aborted = aborted
              ^~~~~~~
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:1422:14: note: (near initialization for ‘info’)
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:1421:28: error: storage size of ‘info’ isn’t known
  struct cfg80211_scan_info info = {
                            ^~~~
make[2]: *** [scripts/Makefile.build:289: /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1457: _module_/scratch/rtl8192du-git/src/rtl8192du] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.7.0-1-ARCH/build'
make: *** [Makefile:149: modules] Error 2

scan results always empty

I have managed to compile the rtl8192du driver for kernel 3.0.8 running android 4.1.1
The wifi interfaces are visible, but the scan result is always empty. The older drivers like version 3.x.x was able to perform scan but of course it did not support P2P the way it is required for Android 4.x.x

Android console ifconfig:

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:216 errors:0 dropped:0 overruns:0 frame:0
TX packets:216 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22560 (22.0 KiB) TX bytes:22560 (22.0 KiB)

p2p0 Link encap:Ethernet HWaddr 02:D0:41:CC:XX:XX
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:D0:41:CC:XX:XX
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Logcat:

D/Tethering( 924): interfaceLinkStateChanged wlan0, false
D/Tethering( 924): interfaceStatusChanged wlan0, false
D/Modem3g ( 924): Interface1 wlan0 link down
D/wpa_supplicant( 1095): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
D/wpa_supplicant( 1095): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant( 1095): wpa_s 0x40301770 cmd AP_SCAN 1
I/wpa_supplicant( 1095): [CTRL_IFACE]wlan0: AP_SCAN 1
D/wpa_supplicant( 1095): wpa_s 0x40301770 cmd SCAN_RESULTS
I/wpa_supplicant( 1095): [CTRL_IFACE]wlan0: SCAN_RESULTS
D/wpa_supplicant( 1095): Scan requested (ret=0) - scan timeout 30 seconds
D/wpa_supplicant( 1095): nl80211: Event message available
D/wpa_supplicant( 1095): nl80211: Scan trigger
D/wpa_supplicant( 1095): nl80211: Event message available
D/wpa_supplicant( 1095): nl80211: New scan results available
D/wpa_supplicant( 1095): nl80211: Received scan results (0 BSSes)
D/wpa_supplicant( 1095): nl80211: Survey data missing

iwlist:

iwlist wlan0 scan
wlan0 No scan results

DESTDIR symbol is required for non-root installs/commit 242ffe198e is broken

This commit (242ffe1) breaks the install process since DESTDIR is required for non-root installs like those a for distro packages. For example, try this:

% make DESTDIR=foo install              
install -d /usr/lib/modules/3.18.2-1-custom/kernel/drivers/net/wireless/
install -m644 8192du.ko  /usr/lib/modules/3.18.2-1-custom/kernel/drivers/net/wireless/
install: cannot create regular file ‘/usr/lib/modules/3.18.2-1-custom/kernel/drivers/net/wireless/8192du.ko’: Permission denied
Makefile:155: recipe for target 'install' failed
make: *** [install] Error 1

Rather than directing the files to ./foo/... it tries to do it to the live filesystem.

Build failure on Arch kernel version 5.0.4

I'm getting the following errors when attempting to build against the 5.0.4 kernel on Arch Linux:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.0.4-1-minimum/build M=/scratch/rtl8192du-git/src/rtl8192du  modules
make[1]: Entering directory '/usr/lib/modules/5.0.4-1-minimum/build'
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_cmd.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_security.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_debug.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_io.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ioctl_query.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ioctl_set.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ieee80211.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme_ext.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_wlan_util.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_pwrctrl.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_rf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_recv.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_sta_mgt.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ap.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_p2p.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_tdls.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_br_ext.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_iol.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_sreset.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_efuse.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal_intf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal_com.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/dm.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/usb_ops_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_hal_init.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_phycfg.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_rf6052.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_dm.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_rxdesc.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_cmd.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/usb_halinit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_led.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_recv.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/Hal8192DUHWImg.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/osdep_service.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/os_intfs.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/usb_intf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/usb_ops_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/xmit_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/mlme_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/recv_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/wifi_regd.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/rtw_android.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/platform_ops.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/rtw_proc.o
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12590:3: error: ‘struct iw_handler_def’ has no member named ‘private’
  .private = rtw_private_handler,
   ^~~~~~~
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12590:13: error: initialization of ‘struct iw_statistics * (*)(struct net_device *)’ from incompatible pointer type ‘int (**)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)’ [-Werror=incompatible-pointer-types]
  .private = rtw_private_handler,
             ^~~~~~~~~~~~~~~~~~~
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12590:13: note: (near initialization for ‘rtw_handlers_def.get_wireless_stats’)
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12591:3: error: ‘struct iw_handler_def’ has no member named ‘private_args’
  .private_args = (struct iw_priv_args *)rtw_private_args,
   ^~~~~~~~~~~~
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12591:18: warning: excess elements in struct initializer
  .private_args = (struct iw_priv_args *)rtw_private_args,
                  ^
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12591:18: note: (near initialization for ‘rtw_handlers_def’)
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12592:3: error: ‘struct iw_handler_def’ has no member named ‘num_private’
  .num_private = sizeof(rtw_private_handler) / sizeof(iw_handler),
   ^~~~~~~~~~~
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12592:17: warning: excess elements in struct initializer
  .num_private = sizeof(rtw_private_handler) / sizeof(iw_handler),
                 ^~~~~~
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12592:17: note: (near initialization for ‘rtw_handlers_def’)
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12593:3: error: ‘struct iw_handler_def’ has no member named ‘num_private_args’
  .num_private_args = sizeof(rtw_private_args) / sizeof(struct iw_priv_args),
   ^~~~~~~~~~~~~~~~
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12593:22: warning: excess elements in struct initializer
  .num_private_args = sizeof(rtw_private_args) / sizeof(struct iw_priv_args),
                      ^~~~~~
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.c:12593:22: note: (near initialization for ‘rtw_handlers_def’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1553: _module_/scratch/rtl8192du-git/src/rtl8192du] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.0.4-1-minimum/build'
make: *** [Makefile:609: modules] Error 2

kernel message at first scan

Hello,
for your information:

at first wifi scan I get a kernel message. After that scanning seems to work fine. Branch 'kernel-version' is used with 3.14.0-rc6 kernel.

# iw dev wlan0 scan | grep -i "SSID"
[   66.557497] r8192du: MacPhyMode: SINGLEMAC_SINGLEPHY
[   67.976505] pdmpriv->TxPowerTrackControl = 1
[   68.008416] 
[   68.010015] =================================
[   68.014566] [ INFO: inconsistent lock state ]
[   68.019124] 3.14.0-rc6 #1 Tainted: G           O
[   68.023945] ---------------------------------
[   68.028495] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
[   68.034771] RTW_CMD_THREAD/170 [HC1[1]:SC0[0]:HE0:SE1] takes:
[   68.040772]  (&(&(pqueue->lock))->rlock){?.-...}, at: [<bf07d5d4>] rtw_free_xmitbuf_ext+0x1c/0x74 [8192du]
[   68.051187] {HARDIRQ-ON-W} state was registered at:
[   68.056280]   [<c006a340>] __lock_acquire+0x568/0xae4
[   68.061580]   [<c006b060>] lock_acquire+0x68/0x7c
[   68.066505]   [<c0522d58>] _raw_spin_lock_bh+0x3c/0x4c
[   68.071893]   [<bf07918c>] rtw_alloc_stainfo+0x24/0x23c [8192du]
[   68.078282]   [<bf07988c>] rtw_init_bcmc_stainfo+0x2c/0x8c [8192du]
[   68.084927]   [<bf09eac0>] rtw_init_drv_sw+0x218/0x284 [8192du]
[   68.091282]   [<bf09fe58>] rtw_usb_if1_init+0x140/0x2f0 [8192du]
[   68.097694]   [<bf0a0078>] rtw_drv_init+0x70/0x94 [8192du]
[   68.103555]   [<c0364c70>] usb_probe_interface+0x180/0x22c
[   68.109298]   [<c02ecb38>] driver_probe_device+0x114/0x234
[   68.115045]   [<c02ecd30>] __driver_attach+0x94/0x98
[   68.120242]   [<c02eb124>] bus_for_each_dev+0x60/0x94
[   68.125527]   [<c02ec2f8>] bus_add_driver+0x148/0x1f0
[   68.130812]   [<c02ed328>] driver_register+0x78/0xf8
[   68.136007]   [<c0363970>] usb_register_driver+0x84/0x148
[   68.141667]   [<bf0c7020>] 0xbf0c7020
[   68.145508]   [<c00088dc>] do_one_initcall+0xf8/0x148
[   68.150795]   [<c008d654>] load_module+0x1760/0x1874
[   68.155995]   [<c008d810>] SyS_init_module+0xa8/0xec
[   68.161191]   [<c000e340>] ret_fast_syscall+0x0/0x48
[   68.166394] irq event stamp: 12644
[   68.169945] hardirqs last  enabled at (12643): [<c0523004>] _raw_spin_unlock_irqrestore+0x6c/0x74
[   68.179223] hardirqs last disabled at (12644): [<c00120b4>] __irq_svc+0x34/0x78
[   68.186873] softirqs last  enabled at (12632): [<bf07d744>] rtw_alloc_xmitframe+0x118/0x120 [8192du]
[   68.196526] softirqs last disabled at (12630): [<bf07d640>] rtw_alloc_xmitframe+0x14/0x120 [8192du]
[   68.206078] 
[   68.206078] other info that might help us debug this:
[   68.212895]  Possible unsafe locking scenario:
[   68.212895] 
[   68.219078]        CPU0
[   68.221631]        ----
[   68.224182]   lock(&(&(pqueue->lock))->rlock);
[   68.228836]   <Interrupt>
[   68.231570]     lock(&(&(pqueue->lock))->rlock);
[   68.236404] 
[   68.236404]  *** DEADLOCK ***
[   68.236404] 
[   68.242592] no locks held by RTW_CMD_THREAD/170.
[   68.247411] 
[   68.247411] stack backtrace:
[   68.251972] CPU: 0 PID: 170 Comm: RTW_CMD_THREAD Tainted: G           O 3.14.0-rc6 #1
[   68.260176] [<c00137b8>] (unwind_backtrace) from [<c00115bc>] (show_stack+0x10/0x14)
[   68.268296] [<c00115bc>] (show_stack) from [<c051ac28>] (print_usage_bug.part.34+0x2a8/0x2b4)
[   68.277215] [<c051ac28>] (print_usage_bug.part.34) from [<c00692d8>] (mark_lock+0x23c/0x774)
[   68.286036] [<c00692d8>] (mark_lock) from [<c006a450>] (__lock_acquire+0x678/0xae4)
[   68.294043] [<c006a450>] (__lock_acquire) from [<c006b060>] (lock_acquire+0x68/0x7c)
[   68.302139] [<c006b060>] (lock_acquire) from [<c0522e4c>] (_raw_spin_lock_irqsave+0x48/0x5c)
[   68.311061] [<c0522e4c>] (_raw_spin_lock_irqsave) from [<bf07d5d4>] (rtw_free_xmitbuf_ext+0x1c/0x74 [8192du])
[   68.321618] [<bf07d5d4>] (rtw_free_xmitbuf_ext [8192du]) from [<bf07ef60>] (rtw_free_xmitbuf+0x40/0xac [8192du])
[   68.332476] [<bf07ef60>] (rtw_free_xmitbuf [8192du]) from [<bf0a0448>] (usb_write_port_complete+0x13c/0x184 [8192du])
[   68.343695] [<bf0a0448>] (usb_write_port_complete [8192du]) from [<c035e308>] (__usb_hcd_giveback_urb+0x60/0xf0)
[   68.354335] [<c035e308>] (__usb_hcd_giveback_urb) from [<c03744a4>] (musb_giveback+0x34/0x40)
[   68.363249] [<c03744a4>] (musb_giveback) from [<c0375160>] (musb_advance_schedule+0xa0/0x210)
[   68.372165] [<c0375160>] (musb_advance_schedule) from [<c037a30c>] (cppi41_trans_done+0x11c/0x138)
[   68.381532] [<c037a30c>] (cppi41_trans_done) from [<c037a4e0>] (cppi41_dma_callback+0x1b8/0x218)
[   68.390722] [<c037a4e0>] (cppi41_dma_callback) from [<c02b9988>] (cppi41_irq+0xe4/0x180)
[   68.399181] [<c02b9988>] (cppi41_irq) from [<c007386c>] (handle_irq_event_percpu+0x38/0x198)
[   68.408002] [<c007386c>] (handle_irq_event_percpu) from [<c0073a08>] (handle_irq_event+0x3c/0x5c)
[   68.417280] [<c0073a08>] (handle_irq_event) from [<c0075bc8>] (handle_level_irq+0x90/0xf4)
[   68.425918] [<c0075bc8>] (handle_level_irq) from [<c00730cc>] (generic_handle_irq+0x2c/0x3c)
[   68.434737] [<c00730cc>] (generic_handle_irq) from [<c000ec44>] (handle_IRQ+0x38/0x84)
[   68.443013] [<c000ec44>] (handle_IRQ) from [<c0008638>] (omap3_intc_handle_irq+0x68/0x74)
[   68.451565] [<c0008638>] (omap3_intc_handle_irq) from [<c00120c4>] (__irq_svc+0x44/0x78)
[   68.460014] Exception stack(0xcd815d78 to 0xcd815dc0)
[   68.465295] 5d60:                                                       00000001 00000001
[   68.473843] 5d80: 00000000 000034a6 d0c89000 d09fd000 d0c8a6d0 00000000 00000005 0000004a
[   68.482391] 5da0: cee17400 d0cad000 cd814000 cd815dc0 c0522fd4 bf0a0718 60000013 ffffffff
[   68.491077] [<c00120c4>] (__irq_svc) from [<bf0a0718>] (usb_write_port+0x1b0/0x1b8 [8192du])
[   68.500098] [<bf0a0718>] (usb_write_port [8192du]) from [<bf064d4c>] (_rtw_write_port+0x18/0x1c [8192du])
[   68.510274] [<bf064d4c>] (_rtw_write_port [8192du]) from [<bf0921b0>] (rtw_dump_xframe+0x1d0/0x27c [8192du])
[   68.520756] [<bf0921b0>] (rtw_dump_xframe [8192du]) from [<bf09281c>] (rtl8192du_mgnt_xmit+0x8/0xc [8192du])
[   68.531227] [<bf09281c>] (rtl8192du_mgnt_xmit [8192du]) from [<bf07fa20>] (rtw_hal_mgnt_xmit+0x18/0x24 [8192du])
[   68.542032] [<bf07fa20>] (rtw_hal_mgnt_xmit [8192du]) from [<bf06b064>] (dump_mgntframe+0x28/0x2c [8192du])
[   68.552366] [<bf06b064>] (dump_mgntframe [8192du]) from [<bf06b6ec>] (_issue_probereq+0x290/0x2a0 [8192du])
[   68.562704] [<bf06b6ec>] (_issue_probereq [8192du]) from [<bf06eba4>] (site_survey+0xdc/0x240 [8192du])
[   68.572683] [<bf06eba4>] (site_survey [8192du]) from [<bf0710d8>] (sitesurvey_cmd_hdl+0x1f0/0x1fc [8192du])
[   68.583008] [<bf0710d8>] (sitesurvey_cmd_hdl [8192du]) from [<bf06049c>] (rtw_cmd_thread+0x1b0/0x298 [8192du])
[   68.593527] [<bf06049c>] (rtw_cmd_thread [8192du]) from [<c0052c08>] (kthread+0xd4/0xe8)
[   68.601987] [<c0052c08>] (kthread) from [<c000e408>] (ret_from_fork+0x14/0x2c)

Possible Kernel Mainline inclusion?

I understand this driver is in the kernel 'Staging' category. I was wondering what the process is to try for inclusion in the main Linux kernel source tree?

Cannot build against linux 4.0

Are you able to build against linux 4.0?

% make -j9 INSTALL_PREFIX=/usr
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.0.1-1-custom/build M=/scratch/rtl8192du-git/src/rtl8192du  modules
make[1]: Entering directory '/usr/lib/modules/4.0.1-1-custom/build'
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_cmd.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_security.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_debug.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_io.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ioctl_set.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ieee80211.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_mlme_ext.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_wlan_util.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_pwrctrl.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_rf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_recv.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_sta_mgt.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_ap.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_p2p.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_sreset.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/core/rtw_efuse.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal_intf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal_com.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_hal_init.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_phycfg.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_rf6052.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_dm.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_rxdesc.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_cmd.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/usb_halinit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_led.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192du_recv.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/hal8192duhwimg.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/rtl8192d_xmit.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/hal/usb_ops_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/osdep_service.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/os_intfs.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/usb_intf.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/usb_ops_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/xmit_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/mlme_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/recv_linux.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.o
  CC [M]  /scratch/rtl8192du-git/src/rtl8192du/os_dep/rtw_android.o
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c: In function ‘cfg80211_rtw_get_station’:
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:1279:20: error: ‘STATION_INFO_SIGNAL’ undeclared (first use in this function)
   sinfo->filled |= STATION_INFO_SIGNAL;
                    ^
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:1279:20: note: each undeclared identifier is reported only once for each function it appears in
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:1282:20: error: ‘STATION_INFO_TX_BITRATE’ undeclared (first use in this function)
   sinfo->filled |= STATION_INFO_TX_BITRATE;
                    ^
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:1285:20: error: ‘STATION_INFO_RX_PACKETS’ undeclared (first use in this function)
   sinfo->filled |= STATION_INFO_RX_PACKETS;
                    ^
/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:1288:20: error: ‘STATION_INFO_TX_PACKETS’ undeclared (first use in this function)
   sinfo->filled |= STATION_INFO_TX_PACKETS;
                    ^
scripts/Makefile.build:258: recipe for target '/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.o' failed
make[2]: *** [/scratch/rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:1390: recipe for target '_module_/scratch/rtl8192du-git/src/rtl8192du' failed
make[1]: *** [_module_/scratch/rtl8192du-git/src/rtl8192du] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.0.1-1-custom/build'
Makefile:149: recipe for target 'modules' failed
make: *** [modules] Error 2
make -j9 INSTALL_PREFIX=/usr  17.55s user 1.24s system 656% cpu 2.860 total

Possible to compile on aarch64?

I am trying to build against the 3.14.x-lts kernel on an aarch64 machine (ODROID-C2). Currently, the build fails. Any suggestions?

% sed -i -e "/^KSRC/ s,\$(KVER),3.14.65-19-ARCH," -i -e '/depmod/d' Makefile
% make -j5 PREFIX=/usr ARCH=arm64
make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/3.14.65-19-ARCH/build M=/scratch/rtl8192du-git/tit/rtl8192du  modules
make[1]: Entering directory '/usr/lib/modules/3.14.65-19-ARCH/build'
  CC [M]  /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_cmd.o
  CC [M]  /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_security.o
  CC [M]  /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_debug.o
  CC [M]  /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_io.o
  CC [M]  /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_ioctl_set.o
In file included from /usr/lib/modules/3.14.65-19-ARCH/build/arch/arm64/include/asm/dma-mapping.h:27:0,
                 from include/linux/dma-mapping.h:76,
                 from include/linux/skbuff.h:33,
                 from include/linux/if_ether.h:23,
                 from include/uapi/linux/ethtool.h:17,
                 from include/linux/ethtool.h:16,
                 from include/linux/netdevice.h:42,
                 from /scratch/rtl8192du-git/tit/rtl8192du/include/osdep_service.h:37,
                 from /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_cmd.c:19:
/usr/lib/modules/3.14.65-19-ARCH/build/arch/arm64/include/asm/xen/hypervisor.h:1:50: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
 #include <../../arm/include/asm/xen/hypervisor.h>
                                                  ^
compilation terminated.
make[2]: *** [scripts/Makefile.build:308: /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_cmd.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/lib/modules/3.14.65-19-ARCH/build/arch/arm64/include/asm/dma-mapping.h:27:0,
                 from include/linux/dma-mapping.h:76,
                 from include/linux/skbuff.h:33,
                 from include/linux/if_ether.h:23,
                 from include/uapi/linux/ethtool.h:17,
                 from include/linux/ethtool.h:16,
                 from include/linux/netdevice.h:42,
                 from /scratch/rtl8192du-git/tit/rtl8192du/include/osdep_service.h:37,
                 from /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_security.c:19:
/usr/lib/modules/3.14.65-19-ARCH/build/arch/arm64/include/asm/xen/hypervisor.h:1:50: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
 #include <../../arm/include/asm/xen/hypervisor.h>
                                                  ^
compilation terminated.
make[2]: *** [scripts/Makefile.build:308: /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_security.o] Error 1
In file included from /usr/lib/modules/3.14.65-19-ARCH/build/arch/arm64/include/asm/dma-mapping.h:27:0,
                 from include/linux/dma-mapping.h:76,
                 from include/linux/skbuff.h:33,
                 from include/linux/if_ether.h:23,
                 from include/uapi/linux/ethtool.h:17,
                 from include/linux/ethtool.h:16,
                 from include/linux/netdevice.h:42,
                 from /scratch/rtl8192du-git/tit/rtl8192du/include/osdep_service.h:37,
                 from /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_ioctl_set.c:19:
/usr/lib/modules/3.14.65-19-ARCH/build/arch/arm64/include/asm/xen/hypervisor.h:1:50: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
 #include <../../arm/include/asm/xen/hypervisor.h>
                                                  ^
compilation terminated.
make[2]: *** [scripts/Makefile.build:308: /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_ioctl_set.o] Error 1
In file included from /usr/lib/modules/3.14.65-19-ARCH/build/arch/arm64/include/asm/dma-mapping.h:27:0,
                 from include/linux/dma-mapping.h:76,
                 from include/linux/skbuff.h:33,
                 from include/linux/if_ether.h:23,
                 from include/uapi/linux/ethtool.h:17,
                 from include/linux/ethtool.h:16,
                 from include/linux/netdevice.h:42,
                 from /scratch/rtl8192du-git/tit/rtl8192du/include/osdep_service.h:37,
                 from /scratch/rtl8192du-git/tit/rtl8192du/include/rtw_debug.h:20,
                 from /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_debug.c:18:
/usr/lib/modules/3.14.65-19-ARCH/build/arch/arm64/include/asm/xen/hypervisor.h:1:50: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
 #include <../../arm/include/asm/xen/hypervisor.h>
                                                  ^
compilation terminated.
make[2]: *** [scripts/Makefile.build:308: /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_debug.o] Error 1
In file included from /usr/lib/modules/3.14.65-19-ARCH/build/arch/arm64/include/asm/dma-mapping.h:27:0,
                 from include/linux/dma-mapping.h:76,
                 from include/linux/skbuff.h:33,
                 from include/linux/if_ether.h:23,
                 from include/uapi/linux/ethtool.h:17,
                 from include/linux/ethtool.h:16,
                 from include/linux/netdevice.h:42,
                 from /scratch/rtl8192du-git/tit/rtl8192du/include/osdep_service.h:37,
                 from /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_io.c:39:
/usr/lib/modules/3.14.65-19-ARCH/build/arch/arm64/include/asm/xen/hypervisor.h:1:50: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
 #include <../../arm/include/asm/xen/hypervisor.h>
                                                  ^
compilation terminated.
make[2]: *** [scripts/Makefile.build:308: /scratch/rtl8192du-git/tit/rtl8192du/core/rtw_io.o] Error 1
make[1]: *** [Makefile:1278: _module_/scratch/rtl8192du-git/tit/rtl8192du] Error 2
make[1]: Leaving directory '/usr/lib/modules/3.14.65-19-ARCH/build'
make: *** [Makefile:149: modules] Error 2

Can't build for kernel 4.9

@lwfinger Is there a fix to allow a build on 4.9 ?

The call_read_iter is not defined for kernel 4.9

../rtl8192du-custom/os_dep/osdep_service.c: In function ‘new_sync_read’:
../rtl8192du-custom/os_dep/osdep_service.c:58:15: error: implicit declaration of function ‘call_read_iter’ [-Werror=implicit-function-declaration]
ret = call_read_iter(filp, &kiocb, &iter);
^~~~~~~~~~~~~~

ret = call_read_iter(filp, &kiocb, &iter);

power save mode

is this driver support power saving mode? if does, how to enable or disable that? thanks

Unable to connect 8192du often when specific message is shown in dmesg

Hello, I am trying to make a Wifi usb dongle with rtl8192du driver on a device.
I have done the cross compiling process, insert the module on the device and set the specific AP.
I have tried wpa_supplicant and dhclient commands to enable wifi.
And sometimes (actually most of the times) warning message shown below shows in dmesg.

WARNING: at net/wireless/sme.c:504 __cfg80211_connect_result+0x378/0x37c cfg80211
Modules linked in: 8192du(O) cfg80211 pptp gre ppp_async crc_ccitt ppp_synctty pppoe pppox ppp_deflate bsd_comp ppp_generic slhc cdc_acm
CPU: 0 PID: 33 Comm: kworker/u8:1 Tainted: GW O 3.10.17-1.0.2_ga+yocto+g4ed13da #1
Workqueue: cfg80211 cfg80211_event_work [cfg80211]
Backtrace:
from
r6:bf062134 r5:00000009 r4:00000000 r3:00000000
from
from
from
r8:d2b66c28 r7:d2b66c0c r6:00000000 r5:d2a2e800 r4:d23efe00
r3:00000009
from [](__cfg80211_connect_result+0x378/0x37c [cfg80211])
[](__cfg80211_connect_result+0x0/0x37c [cfg80211]) from [](cfg80211_process_wdev_events+0x178/0x19c [cfg80211])
[](cfg80211_process_wdev_events+0x0/0x19c [cfg80211]) from [](cfg80211_process_rdev_events+0x40/0x7c [cfg80211])
[](cfg80211_process_rdev_events+0x0/0x7c [cfg80211]) from [](cfg80211_event_work+0x2c/0x60 [cfg80211])
r6:d2b66e00 r5:d2c4500c r4:d2c45000 r3:bf044020
[](cfg80211_event_work+0x0/0x60 [cfg80211]) from
r5:d2c45104 r4:d219a500
from
from
from
r7:00000000 r6:00000000 r5:c004782c r4:d2083e68
---[ end trace a6bf11a5cd06dfa8 ]---

since the message actually mentions cfg80211, I don't really think 8192du module is the actual issue, but I want to know how to find the root cause of this warning message.

What really causes the trouble is that whenever this message is shown, dhclient would not provide me ipv4 address and wireless is not enabled on my device.

If you need any more specific information, I will provide you as much as possible.
Thank you.

Unable to create AP

I am using Ubuntu kernel 3.8.0-35-generic.I am trying to use hostapd to create AP with my 8192du dongle. However, I get the following error:
nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'

I also tried using driver=rtl871xdrv in the hostapd.conf file but got the following error:
invalid/unknown driver rtl871xdrv

My hostapd.conf file contains:

interface=wlan0
ssid=rtwap
channel=6
hw_mode=g

Please suggest how to create AP mode with the 8192du.

Kernel crashes when inserting dongle

Hello,

I am using Ubuntu kernel 3.8.0-35-generic. The compile was successful. However, when I inserted the dongle, the kernel crashed with the following log:

[ 15.747824] r8192du: MacPhyMode: DUALMAC_DUALPHY
[ 15.801719] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 15.801914] IP: [] FirmwareDownload92D+0x122/0x610 [8192du]
[ 15.802112] *pdpt = 00000000312e5001 *pde = 0000000000000000
[ 15.802275] Oops: 0000 [#1] SMP
[ 15.802379] Modules linked in: rfcomm bnep bluetooth vesafb(F) snd_hda_codec_hdmi snd_hda_codec_idt joydev(F) coretemp kvm_intel(F) kvm(F) aesni_intel(F) aes_i586(F) xts(F) lrw(F) gf128mul(F) ablk_helper(F) cryptd(F) dell_wmi sparse_keymap ppdev(F) dell_laptop dcdbas sierra_net usbnet 8192du(OF) microcode(F) sierra usbserial uvcvideo videobuf2_vmalloc snd_hda_intel videobuf2_memops pcmcia videobuf2_core snd_hda_codec videodev snd_hwdep(F) snd_pcm(F) parport_pc(F) i915 snd_page_alloc(F) wmi snd_seq_midi(F) snd_seq_midi_event(F) snd_rawmidi(F) snd_seq(F) mac_hid video(F) snd_seq_device(F) drm_kms_helper snd_timer(F) drm snd(F) yenta_socket pcmcia_rsrc psmouse(F) i2c_algo_bit pcmcia_core serio_raw(F) lpc_ich soundcore(F) lp(F) parport(F) usb_storage(F) hid_generic usbhid hid firewire_ohci firewire_core sdhci_pci crc_itu_t(F) sdhci ahci(F) libahci(F) e1000e(F)
[ 15.804881] Pid: 995, comm: NetworkManager Tainted: GF O 3.8.0-35-generic #50-Ubuntu Dell Inc. Latitude E6510/02K3Y4
[ 15.805130] EIP: 0060:[] EFLAGS: 00010282 CPU: 2
[ 15.805305] EIP is at FirmwareDownload92D+0x122/0x610 [8192du]
[ 15.805436] EAX: 00000000 EBX: f8ac4000 ECX: fffffffe EDX: 00000605
[ 15.805578] ESI: 0000007f EDI: f6ac6000 EBP: f0e4da08 ESP: f0e4d9d4
[ 15.805734] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[ 15.805862] CR0: 8005003b CR2: 00000000 CR3: 2ff65000 CR4: 000007f0
[ 15.806016] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 15.806157] DR6: ffff0ff0 DR7: 00000400
[ 15.806253] Process NetworkManager (pid: 995, ti=f0e4c000 task=f3028cd0 task.ti=f0e4c000)
[ 15.806439] Stack:
[ 15.806497] f8ff76da 00000004 f6ac6000 f0e4d9f0 f8ff756a 00007f00 f8ac4000 0000007f
[ 15.806757] f0e4d9fc 00000000 f8ac4000 0000007f f6ac6000 f0e4da44 f8ff2e49 c1547dc0
[ 15.807015] c1303092 00000028 f31b6800 c18fefc0 f6ac6000 f6ac6000 fffeea53 0000007f
[ 15.807279] Call Trace:
[ 15.807383] [] ? usb_read32+0xa0/0xad [8192du]
[ 15.807543] [] ? usb_write32+0x23/0x25 [8192du]
[ 15.807714] [] rtl8192du_hal_init+0x412/0x140d [8192du]
[ 15.807867] [] ? fib_rules_event+0x20/0x180
[ 15.807992] [] ? __nla_reserve+0x42/0x60
[ 15.808152] [] rtw_hal_init+0x32/0xe9 [8192du]
[ 15.808284] [] ? __raw_notifier_call_chain+0x1e/0x30
[ 15.808453] [] _netdev_open+0x98/0x38b [8192du]
[ 15.808583] [] ? raw_notifier_call_chain+0x1f/0x30
[ 15.808729] [] ? mutex_lock+0x18/0x40
[ 15.808869] [] netdev_open+0x2b/0x44 [8192du]
[ 15.809000] [] __dev_open+0x83/0xf0
[ 15.809115] [] ? _raw_spin_unlock_bh+0x16/0x20
[ 15.809244] [] ? dev_set_rx_mode+0x2e/0x40
[ 15.809358] [] __dev_change_flags+0x81/0x160
[ 15.809483] [] dev_change_flags+0x21/0x60
[ 15.809606] [] do_setlink+0x2d1/0x8b0
[ 15.809716] [] ? nla_parse+0x22/0xa0
[ 15.809830] [] rtnl_newlink+0x36e/0x560
[ 15.809944] [] ? rtnl_dump_ifinfo+0x123/0x1c0
[ 15.810085] [] ? apparmor_capable+0x23/0x80
[ 15.810218] [] ? security_capable+0x1c/0x30
[ 15.810347] [] ? rtnl_configure_link+0xa0/0xa0
[ 15.810455] [] rtnetlink_rcv_msg+0x124/0x280
[ 15.810551] [] ? __kmalloc_track_caller+0x4a/0x150
[ 15.810651] [] ? __alloc_skb+0x6d/0x250
[ 15.810741] [] ? __rtnl_unlock+0x20/0x20
[ 15.810868] [] netlink_rcv_skb+0x86/0xa0
[ 15.810978] [] rtnetlink_rcv+0x1c/0x30
[ 15.811091] [] netlink_unicast+0x167/0x1e0
[ 15.811204] [] netlink_sendmsg+0x229/0x3a0
[ 15.811330] [] sock_sendmsg+0x9c/0xd0
[ 15.816243] [] ___sys_sendmsg.part.13+0x28a/0x2a0
[ 15.820882] [] ? ___sys_recvmsg.part.7+0x1c0/0x1c0
[ 15.825498] [] ? sys_sendto+0x115/0x140
[ 15.830625] [] ? handle_mm_fault+0x1f5/0x2c0
[ 15.835112] [] ? _copy_from_user+0x41/0x60
[ 15.839330] [] __sys_sendmsg+0x4a/0x80
[ 15.843367] [] sys_socketcall+0x268/0x2b0
[ 15.847192] [] ? sys_time+0x1c/0x50
[ 15.850844] [] sysenter_do_call+0x12/0x28
[ 15.854392] Code: 24 08 c7 44 24 04 0d c7 00 f9 c7 04 24 08 fb 00 f9 e8 90 7f 62 c8 8b 45 f0 e8 6b ca 40 c8 c7 03 00 00 00 00 e9 82 03 00 00 8b 03 <8b> 10 89 55 e8 8b 40 04 89 45 e4 0f b7 42 04 66 89 47 18 0f b6
[ 15.863271] EIP: [] FirmwareDownload92D+0x122/0x610 [8192du] SS:ESP 0068:f0e4d9d4
[ 15.867375] CR2: 0000000000000000
[ 15.871531] ---[ end trace 4dee06cdf79f8446 ]---

Please let me know if you need additional info.

make clean not working after kernel update =/

First i tired to use "make clean" then "make" but i keep getting the same error.
I had the driver installed and working but dunno how to fix it now. =p
------TERMINAL COPY----------:
root@panduh420:/rtl8192du# cd
root@panduh420:
# cd rtl8192du
root@panduh420:/rtl8192du# make clean
rm -fr .mod.c _.mod *.o ..cmd .ko *

rm .tmp_versions -fr ; rm Module.symvers -fr
rm -fr Module.markers ; rm -fr modules.order
cd core ; rm -fr *.mod.c *.mod *.o ..cmd .ko
cd hal ; rm -fr *.mod.c *.mod *.o ..cmd .ko
cd os_dep ; rm -fr *.mod.c *.mod *.o ..cmd .ko
root@panduh420:/rtl8192du# make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/3.13.0-32-generic/build M=/root/rtl8192du modules
make[1]: Entering directory /usr/src/linux-headers-3.13.0-32-generic' CC [M] /root/rtl8192du/core/rtw_cmd.o CC [M] /root/rtl8192du/core/rtw_security.o CC [M] /root/rtl8192du/core/rtw_debug.o CC [M] /root/rtl8192du/core/rtw_io.o CC [M] /root/rtl8192du/core/rtw_ioctl_set.o CC [M] /root/rtl8192du/core/rtw_ieee80211.o CC [M] /root/rtl8192du/core/rtw_mlme.o CC [M] /root/rtl8192du/core/rtw_mlme_ext.o CC [M] /root/rtl8192du/core/rtw_wlan_util.o CC [M] /root/rtl8192du/core/rtw_pwrctrl.o CC [M] /root/rtl8192du/core/rtw_rf.o CC [M] /root/rtl8192du/core/rtw_recv.o CC [M] /root/rtl8192du/core/rtw_sta_mgt.o CC [M] /root/rtl8192du/core/rtw_ap.o CC [M] /root/rtl8192du/core/rtw_xmit.o CC [M] /root/rtl8192du/core/rtw_p2p.o CC [M] /root/rtl8192du/core/rtw_sreset.o CC [M] /root/rtl8192du/core/rtw_efuse.o CC [M] /root/rtl8192du/hal/hal_intf.o CC [M] /root/rtl8192du/hal/hal_com.o CC [M] /root/rtl8192du/hal/rtl8192d_hal_init.o CC [M] /root/rtl8192du/hal/rtl8192d_phycfg.o CC [M] /root/rtl8192du/hal/rtl8192d_rf6052.o CC [M] /root/rtl8192du/hal/rtl8192d_dm.o CC [M] /root/rtl8192du/hal/rtl8192d_rxdesc.o CC [M] /root/rtl8192du/hal/rtl8192d_cmd.o CC [M] /root/rtl8192du/hal/usb_halinit.o CC [M] /root/rtl8192du/hal/rtl8192du_led.o CC [M] /root/rtl8192du/hal/rtl8192du_xmit.o CC [M] /root/rtl8192du/hal/rtl8192du_recv.o CC [M] /root/rtl8192du/hal/Hal8192DUHWImg.o CC [M] /root/rtl8192du/hal/usb_ops_linux.o CC [M] /root/rtl8192du/hal/rtl8192d_xmit.o CC [M] /root/rtl8192du/os_dep/osdep_service.o CC [M] /root/rtl8192du/os_dep/os_intfs.o /root/rtl8192du/os_dep/os_intfs.c:874:2: warning: initialization from incompatible pointer type [enabled by default] .ndo_select_queue = rtw_select_queue, ^ /root/rtl8192du/os_dep/os_intfs.c:874:2: warning: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’) [enabled by default] CC [M] /root/rtl8192du/os_dep/usb_intf.o CC [M] /root/rtl8192du/os_dep/usb_ops_linux.o CC [M] /root/rtl8192du/os_dep/ioctl_linux.o CC [M] /root/rtl8192du/os_dep/xmit_linux.o CC [M] /root/rtl8192du/os_dep/mlme_linux.o CC [M] /root/rtl8192du/os_dep/recv_linux.o CC [M] /root/rtl8192du/os_dep/ioctl_cfg80211.o /root/rtl8192du/os_dep/ioctl_cfg80211.c:3556:5: warning: ‘struct cfg80211_mgmt_tx_params’ declared inside parameter list [enabled by default] u64 cookie) ^ /root/rtl8192du/os_dep/ioctl_cfg80211.c:3556:5: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] /root/rtl8192du/os_dep/ioctl_cfg80211.c: In function ‘cfg80211_rtw_mgmt_tx’: /root/rtl8192du/os_dep/ioctl_cfg80211.c:3567:21: error: dereferencing pointer to incomplete type size_t len = params->len; ^ /root/rtl8192du/os_dep/ioctl_cfg80211.c:3568:41: error: dereferencing pointer to incomplete type struct ieee80211_channel *chan = params->chan; ^ /root/rtl8192du/os_dep/ioctl_cfg80211.c:3569:24: error: dereferencing pointer to incomplete type const u8 *buf = params->buf; ^ /root/rtl8192du/os_dep/ioctl_cfg80211.c: At top level: /root/rtl8192du/os_dep/ioctl_cfg80211.c:3650:2: warning: initialization from incompatible pointer type [enabled by default] .mgmt_tx = cfg80211_rtw_mgmt_tx, ^ /root/rtl8192du/os_dep/ioctl_cfg80211.c:3650:2: warning: (near initialization for ‘rtw_cfg80211_ops.mgmt_tx’) [enabled by default] make[2]: \* [/root/rtl8192du/os_dep/ioctl_cfg80211.o] Error 1 make[1]: *_\* [module/root/rtl8192du] Error 2 make[1]: Leaving directory /usr/src/linux-headers-3.13.0-32-generic'
make: *** [modules] Error 2
root@panduh420:
/rtl8192du#

iw commands cannot "see" my rtl8192du device

I installed the driver and firmware, last night. For the first time, I got a working 802.11n connection, although my speeds are still no better than the "g" connection I had with another device. So, thank you very much for these modules.

The problem is that, even though the connection is working very well, the iw management commands do not see it, at all. "iw dev" returns nothing. "iw dev wlan1 link" returns "Not connected." "iw wlan1 connect " returns "command failed: No such device (-19)".

The ip commands work as intended, e.g., "ip addr show" returns "3: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000", etc. Also, when I was using a Ralink onboard PCI wireless adapter, the iw commands worked perfectly well.

My OS is Siduction Linux, my kernel is 3.14.1, and my wireless adapter is a Belkin F9L1108-TG.

kernel crash on ARM after ifconfig up

Hi, I've tried to get a RTL8192Du running on a ARM platform, kernel 3.14.0-rc6. The same with 3.12.0. Any idea where to start searching?

insmod /lib/modules/3.14.0-rc6/kernel/drivers/net/wireless/8192du.ko
[ 1507.776697] r8192du: EEPROM type is E-FUSE, E-CUT chip
[ 1508.023634] r8192du: MacPhyMode: SINGLEMAC_SINGLEPHY
[ 1508.055153] usbcore: registered new interface driver rtl8192du

ifconfig wlan1 up

[ 1517.392721] 
[ 1517.394324] =============================================
[ 1517.399964] [ INFO: possible recursive locking detected ]
[ 1517.405609] 3.14.0-rc6 #1 Tainted: G           O
[ 1517.410427] ---------------------------------------------
[ 1517.416065] ifconfig/184 is trying to acquire lock:
[ 1517.421159]  (pmutex){+.+...}, at: [<bf0a9ec8>] usbctrl_vendorreq+0xac/0x208 [8192du]
[ 1517.429727] 
[ 1517.429727] but task is already holding lock:
[ 1517.435824]  (pmutex){+.+...}, at: [<bf0ac6dc>] netdev_open+0x1c/0x3c [8192du]
[ 1517.443565] 
[ 1517.443565] other info that might help us debug this:
[ 1517.450384]  Possible unsafe locking scenario:
[ 1517.450384] 
[ 1517.456564]        CPU0
[ 1517.459117]        ----
[ 1517.461669]   lock(pmutex);
[ 1517.464600]   lock(pmutex);
[ 1517.467531] 
[ 1517.467531]  *** DEADLOCK ***
[ 1517.467531] 
[ 1517.473716]  May be due to missing lock nesting notation
[ 1517.473716] 
[ 1517.480807] 2 locks held by ifconfig/184:
[ 1517.484991]  #0:  (rtnl_mutex){+.+.+.}, at: [<c045cb58>] devinet_ioctl+0xd0/0x764
[ 1517.492867]  #1:  (pmutex){+.+...}, at: [<bf0ac6dc>] netdev_open+0x1c/0x3c [8192du]
[ 1517.501043] 
[ 1517.501043] stack backtrace:
[ 1517.505606] CPU: 0 PID: 184 Comm: ifconfig Tainted: G           O 3.14.0-rc6 #1
[ 1517.513279] [<c00137b8>] (unwind_backtrace) from [<c00115bc>] (show_stack+0x10/0x14)
[ 1517.521386] [<c00115bc>] (show_stack) from [<c0068bb8>] (validate_chain.isra.33+0xd6c/0x1178)
[ 1517.530302] [<c0068bb8>] (validate_chain.isra.33) from [<c006a1a4>] (__lock_acquire+0x3cc/0xae4)
[ 1517.539485] [<c006a1a4>] (__lock_acquire) from [<c006b060>] (lock_acquire+0x68/0x7c)
[ 1517.547589] [<c006b060>] (lock_acquire) from [<c051fd6c>] (mutex_lock_nested+0x54/0x3a0)
[ 1517.556189] [<c051fd6c>] (mutex_lock_nested) from [<bf0a9ec8>] (usbctrl_vendorreq+0xac/0x208 [8192du])
[ 1517.566158] [<bf0a9ec8>] (usbctrl_vendorreq [8192du]) from [<bf0aa08c>] (usb_write_reg+0x68/0x70 [8192du])
[ 1517.576486] [<bf0aa08c>] (usb_write_reg [8192du]) from [<bf0aa15c>] (usb_write8+0x20/0x28 [8192du])
[ 1517.586134] [<bf0aa15c>] (usb_write8 [8192du]) from [<bf06c708>] (_rtw_write8+0x1c/0x24 [8192du])
[ 1517.595597] [<bf06c708>] (_rtw_write8 [8192du]) from [<bf0a4bfc>] (rtl8192du_hal_init+0x164/0xb38 [8192du])
[ 1517.605995] [<bf0a4bfc>] (rtl8192du_hal_init [8192du]) from [<bf0922c8>] (rtw_hal_init+0x30/0x114 [8192du])
[ 1517.616396] [<bf0922c8>] (rtw_hal_init [8192du]) from [<bf0ac330>] (_netdev_open+0x98/0x428 [8192du])
[ 1517.626266] [<bf0ac330>] (_netdev_open [8192du]) from [<bf0ac6e4>] (netdev_open+0x24/0x3c [8192du])
[ 1517.635853] [<bf0ac6e4>] (netdev_open [8192du]) from [<c0407008>] (__dev_open+0xb8/0x11c)
[ 1517.644409] [<c0407008>] (__dev_open) from [<c0407290>] (__dev_change_flags+0x94/0x168)
[ 1517.652780] [<c0407290>] (__dev_change_flags) from [<c040737c>] (dev_change_flags+0x18/0x48)
[ 1517.661602] [<c040737c>] (dev_change_flags) from [<c045d11c>] (devinet_ioctl+0x694/0x764)
[ 1517.670169] [<c045d11c>] (devinet_ioctl) from [<c03ee2cc>] (sock_ioctl+0x1d8/0x2a8)
[ 1517.678181] [<c03ee2cc>] (sock_ioctl) from [<c00e9c68>] (do_vfs_ioctl+0x3fc/0x5f0)
[ 1517.686093] [<c00e9c68>] (do_vfs_ioctl) from [<c00e9ec8>] (SyS_ioctl+0x6c/0x7c)
[ 1517.693736] [<c00e9ec8>] (SyS_ioctl) from [<c000e340>] (ret_fast_syscall+0x0/0x48)
[ 1517.708668] r8192du: MacPhyMode: SINGLEMAC_SINGLEPHY
[ 1517.771356] r8192du: Loaded firmware file rtlwifi/rtl8192dufw.bin of 32302 bytes
[ 1519.031042] pdmpriv->TxPowerTrackControl = 1
[ 1519.049144] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready

3.2.0 build

After sifting through dozens of of problems with 0bda:8171 on many forums, it seems that this is the solution, but it won't build against 3.2.0 (Ubuntu 12.04 machine).

/core/rtw_xmit.c:441:2: error: implicit declaration of function ‘ether_addr_copy'

It seems this appeared in linux/etherdevice.h in 3.14 (and is actually just an inline) but, is there any hope to build this against 3.2.0? older version from git? (I'm not that familiar with how to pull old versions from git). The source file above was modified to use this function on Aug 11 2014.

(also it seems that a function cfg80211_rx_mgmt gained an extra parameter 'sig_dbm' at 3.4, which is not allowed for in the ifdefs where that function is called).

Workaround for openSUSE kernel 3.12

This driver works with openSUSE kernels 3.11 and 3.15, but would not build with openSUSE 3.12. Larry Finger pointed out that this is because of openSUSE's backporting features from newer kernels into older ones. He identified the fix as changing the statement in file include/osdep_service.h that says

if (LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0))

from "3,14,0" to "3,12,0".
On my system, the driver then builds and works.

Issue with 11n operation in AP mode

I used the hostapd in kernel-version to create 11g AP mode with the rtl8192du. I was able to connect to the AP and ping it. Throughput was about 23 Mbps. However, when 11n was enabled I was only able to associate with the AP but unable to ping it. The following configuration parameters were used:

interface=wlan0
ssid=rtwap
driver=rtl871xdrv
channel=6
hw_mode=g
ieee80211n=1
ht_capab=[HT20][SHORT-GI-20]
wme_enabled=1

The station also disconnected and connected to the AP frequently. Any idea why this could be happening? Shall send the hostapd -ddd logs separately.

Can't compile on Fedora 27 with kernel 4.15

When trying to compile on my Fedora 27 system with Kernel 4.15 I get the following...

make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.3-300.fc27.x86_64/build M=/home/david/Downloads/rtl8192du  modules
make[1]: *** /lib/modules/4.15.3-300.fc27.x86_64/build: No such file or directory.  Stop.
make: *** [Makefile:149: modules] Error 2

Is this because it is not compatible with my Kernel? Any help would be appreciated.

Thanks :)

KRACK

Does this implement the WPA2 handshake and may thus be affected by the KRACK replay attack?

not able to compile

i can't get it compiled on my ubuntu 14.04.1 amd64
i tried it on my normal system and to be sure it is not something i made with my system, i tried it on a Live DVD environment... unfortunately with the same behaviour.

what i did:

sudo apt-get install build-essential linux-headers-generic git
git clone https://github.com/lwfinger/rtl8192du.git
cd rtl8192du
make

what i got:

ubuntu@ubuntu:~/dev/rtl8192du$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/3.13.0-37-generic/build M=/home/ubuntu/dev/rtl8192du  modules
make[1]: Entering directory `/usr/src/linux-headers-3.13.0-37-generic'
  CC [M]  /home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.o
/home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.c:3556:5: warning: ‘struct cfg80211_mgmt_tx_params’ declared inside parameter list [enabled by default]
     u64 *cookie)
     ^
/home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.c:3556:5: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
/home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.c: In function ‘cfg80211_rtw_mgmt_tx’:
/home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.c:3567:21: error: dereferencing pointer to incomplete type
  size_t len = params->len;
                     ^
/home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.c:3568:41: error: dereferencing pointer to incomplete type
  struct ieee80211_channel *chan = params->chan;
                                         ^
/home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.c:3569:24: error: dereferencing pointer to incomplete type
  const u8 *buf = params->buf;
                        ^
/home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.c: At top level:
/home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.c:3650:2: warning: initialization from incompatible pointer type [enabled by default]
  .mgmt_tx = cfg80211_rtw_mgmt_tx,
  ^
/home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.c:3650:2: warning: (near initialization for ‘rtw_cfg80211_ops.mgmt_tx’) [enabled by default]
make[2]: *** [/home/ubuntu/dev/rtl8192du/os_dep/ioctl_cfg80211.o] Error 1
make[1]: *** [_module_/home/ubuntu/dev/rtl8192du] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-37-generic'
make: *** [modules] Error 2
ubuntu@ubuntu:~/dev/rtl8192du$

environment:
ubuntu 14.04.1 amd64 (Live DVD)
and
ubuntu 14.04.1 amd64

(hostapd) can not connect when wpa=1/2/3

Hello,
I used the hostapd to create 11g AP mode with the rtl8192du. I was able to connect to the AP when wpa=0. However, when wpa=1/2/3 I was not able to connect to the AP.

Following hostapd configuration is used:

ctrl_interface=/var/run/hostapd
macaddr_acl=0
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_passphrase=aaaaaaaa
driver=nl80211
interface=wlp0s29f7u1
hw_mode=g
channel=4
ssid=rtl8192du

Any idea why this could be happening?

Two interfaces but one USB device

Hello to all,

I am happy to successfully compiling and running this kernel driver for my RTL8192DU device, which is an no name USB device, on my Manjaro Linux system.

The only thing that bothers me is that I have two wireless interfaces in my network manager, which is somewhat annoying -_-

grafik

Also $(iwconfig) provides the following output with two wireless interfaces.

lo        no wireless extensions.

eno1      no wireless extensions.

wlp0s20u4  IEEE 802.11gn  ESSID:"wiesbaden.freifunk.net"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 7A:12:B6:76:4A:68   
          Bit Rate:144.4 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=100/100  Signal level=98/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wlan0     IEEE 802.11gn  ESSID:"wiesbaden.freifunk.net"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 7A:12:B6:76:4A:68   
          Bit Rate:144.4 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=100/100  Signal level=98/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Why is that? Hopefully someone can provide the answer and also a fix.

Thanks in advance and best regards!

Cant compile for Concurrent Mode

I was able to compile the driver as is, but when I un-comment #define CONFIG_COMCURRENT_MODE
in include/autoconf.h

I get the following error:

make[1]: Entering directory '/usr/src/linux-headers-4.1.7+' CC [M] /downloads/rtl8192du-master/core/rtw_mlme_ext.o /downloads/rtl8192du-master/core/rtw_mlme_ext.c: In function ‘site_survey’: /downloads/rtl8192du-master/core/rtw_mlme_ext.c:4555:34: error: ‘padapter’ undeclared (first use in this function) /downloads/rtl8192du-master/core/rtw_mlme_ext.c:4555:34: note: each undeclared identifier is reported only once for each function it appears in scripts/Makefile.build:258: recipe for target '/downloads/rtl8192du-master/core/rtw_mlme_ext.o' failed make[2]: *** [/downloads/rtl8192du-master/core/rtw_mlme_ext.o] Error 1 Makefile:1384: recipe for target '_module_/downloads/rtl8192du-master' failed make[1]: *** [_module_/downloads/rtl8192du-master] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.1.7+' Makefile:149: recipe for target 'modules' failed make: *** [modules] Error 2

I was successfully able to enable concurrent mode on a 8192CU driver, using the official firmware.

Connection Problem to AP

Hello,

using 3.14.0-rc8 and 'kernel-version' branch I can't connect to an AP (also on an open one). wpa_supplicant gives this output. I hope I got the right part:

wlan1: 20: 02:1a:11:f0:34:7f ssid='kissme' wpa_ie_len=0 rsn_ie_len=0 caps=0x501 level=-60
wlan1:    allow in non-WPA/WPA2
wlan1:    selected BSS 02:1a:11:f0:34:7f ssid='kissme'
wlan1: Request association: reassociate: 0  selected: 02:1a:11:f0:34:7f  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING
wlan1: Trying to associate with 02:1a:11:f0:34:7f (SSID='kissme' freq=2437 MHz)
FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
wlan1: Cancelling scan request
wlan1: WPA: clearing own WPA/RSN IE
wlan1: Automatic auth_alg selection: 0x1
wlan1: WPA: clearing AP WPA IE
wlan1: WPA: clearing AP RSN IE
wlan1: WPA: clearing own WPA/RSN IE
wlan1: No keys have been configured - skip key clearing
wlan1: State: SCANNING -> ASSOCIATING
wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
Limit connection to BSSID 02:1a:11:f0:34:7f freq=2437 MHz based on scan results (bssid_set=0)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0xace20 (mode change)
nl80211: Subscribe to mgmt frames with non-AP handle 0xace20
nl80211: Register frame type=0xd0 nl_handle=0xace20
nl80211: Register frame match - hexdump(len=2): 04 0a
nl80211: Register frame command failed (type=208): ret=-95 (Operation not supported)
nl80211: Register frame match - hexdump(len=2): 04 0a
nl80211: Failed to register Action frame processing - ignore for now
nl80211: Connect (ifindex=5)
  * bssid=02:1a:11:f0:34:7f
  * freq=2437
  * SSID - hexdump_ascii(len=6):
     6b 69 73 73 6d 65                                 kissme          
  * IEs - hexdump(len=0):
  * Auth Type 0
nl80211: Connect request send successfully
wlan1: Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=ForceAuthorized
EAPOL: Supplicant port status: Unauthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan1' added
nl80211: if_removed already cleared - ignore event
nl80211: Event message available
nl80211: Disconnect event
wlan1[  122.940466] cfg80211: Calling CRDA to update world regulatory domain
: Event DEAUTH (12) received
wlan1: Deauthentication notification
wlan1:  * reason 0
Deauthentication frame IE(s) - hexdump(len=0): [NULL]
wlan1: CTRL-EVENT-DISCONNECTED bssid=02:1a:11:f0:34:7f reason=0
wlan1: Auto connect enabled: try to reconnect (wps=0 wpa_state=5)
wlan1: Setting scan request: 0 sec 100000 usec
Added BSSID 02:1a:11:f0:34:7f into blacklist
wlan1: Blacklist count 1 --> request scan in 100 ms
wlan1: Setting scan request: 0 sec 100000 usec
wlan1: State: ASSOCIATING -> DISCONNECTED

type-o - build broken

rtw_core/mlme.c

--- core/rtw_mlme.c.back        2013-08-16 17:53:21.921595285 -0400
+++ core/rtw_mlme.c     2013-08-16 17:53:47.380595118 -0400
@@ -2286,9 +2286,9 @@
 #endif /*  (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)) */

 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
-       if (adapter->pnetdev->br_port)
+       if ((adapter->pnetdev->br_port)
 #else /*  (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) */
-       if (rcu_dereference(adapter->pnetdev->rx_handler_data)
+       if ((rcu_dereference(adapter->pnetdev->rx_handler_data)
 #endif /*  (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) */
            && (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE)
                == true)) {

Build fails on arch 4.11.9-1

Compilation fails with error:
.../rtl8192du-git/src/rtl8192du/os_dep/ioctl_cfg80211.c:2745:12: error: ‘struct net_device’ has no member named ‘destructor’;

Can't compile in 4.6.4-201.fc23.x86_64 (Fedora 23)

...
make[2]: Entering directory '/home/user/media_build_experimental/linux'
Patches for 4.6.4-201.fc23.x86_64 already applied.
make[2]: Leaving directory '/home/user/media_build_experimental/linux'
make -C /lib/modules/4.6.4-201.fc23.x86_64/build SUBDIRS=/home/user/media_build_experimental/v4l modules
make[2]: Entering directory '/usr/src/kernels/4.6.4-201.fc23.x86_64'
CC [M] /home/user/media_build_experimental/v4l/msp3400-driver.o
In file included from :0:0:
/home/user/media_build_experimental/v4l/compat.h:1463:1: error: redefinition of 'pci_zalloc_consistent'
pci_zalloc_consistent(struct pci_dev *hwdev, size_t size,
^
In file included from include/linux/pci.h:2022:0,
from /home/user/media_build_experimental/v4l/compat.h:1459,
from :0:
include/linux/pci-dma-compat.h:23:1: note: previous definition of 'pci_zalloc_consistent' was here
pci_zalloc_consistent(struct pci_dev *hwdev, size_t size,
^
scripts/Makefile.build:291: recipe for target '/home/user/media_build_experimental/v4l/msp3400-driver.o' failed
make[3]: *** [/home/user/media_build_experimental/v4l/msp3400-driver.o] Error 1
Makefile:1433: recipe for target 'module/home/user/media_build_experimental/v4l' failed
make[2]: *** [module/home/user/media_build_experimental/v4l] Error 2
make[2]: Leaving directory '/usr/src/kernels/4.6.4-201.fc23.x86_64'
Makefile:51: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/home/user/media_build_experimental/v4l'
Makefile:28: recipe for target 'all' failed
make: *** [all] Error 2
make -C /home/user/media_build_experimental/v4l install
make[1]: Entering directory '/home/user/media_build_experimental/v4l'
removed directory: '/lib/modules/4.6.4-201.fc23.x86_64/updates/media'
/sbin/depmod -a 4.6.4-201.fc23.x86_64
make -C firmware install
make[2]: Entering directory '/home/user/media_build_experimental/v4l/firmware'
Installing firmwares at /lib/firmware: vicam/firmware.fw ttusb-budget/dspbootcode.bin cpia2/stv0672_vp4.bin av7110/bootcode.bin
make[2]: Leaving directory '/home/user/media_build_experimental/v4l/firmware'
install -d -v /lib/modules/4.6.4-201.fc23.x86_64/updates/media
install: creating directory '/lib/modules/4.6.4-201.fc23.x86_64/updates/media'
install .ko -> /lib/modules/4.6.4-201.fc23.x86_64/updates/media/
install: cannot stat '
.ko': No such file or directory
Makefile:205: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/home/user/media_build_experimental/v4l'
Makefile:17: recipe for target 'install' failed
make: *** [install] Error 2

dkms broken on Fedora 25

I don't know yet whether the root cause is in the 'dkms.conf' file or Fedora's latest dkms update, but the module (8192du.ko) is no longer built correctly (much smaller than the make built module) and so when booting into the newly installed kernel I have no wifi driver for my modem.

make + make install works once booted into the new kernel.

Issue during pinging.

I am using rtl8192du Wi-Fi Driver for Android Lollipop. All the basic Wi-Fi operations are working fine. But I am facing a ping issue in the following scenario. I connected my Freescale board with the driver to an AP . And connected my PC to the same AP . Pinged PC and the board. Pinging is happening without any issue until I give a scan command from my board side. The pinging with the PC and the board hangs and then restarts with a huge pinging time like below

64 bytes from 192.168.0.16: icmp_seq=15 ttl=64 time=1.36 ms
64 bytes from 192.168.0.16: icmp_seq=16 ttl=64 time=1.32 ms
64 bytes from 192.168.0.16: icmp_seq=17 ttl=64 time=1.35 ms
64 bytes from 192.168.0.16: icmp_seq=18 ttl=64 time=1.34 ms
64 bytes from 192.168.0.16: icmp_seq=19 ttl=64 time=1.64 ms
64 bytes from 192.168.0.16: icmp_seq=20 ttl=64 time=1.32 ms

64 bytes from 192.168.0.16: icmp_seq=23 ttl=64 time=7209 ms
64 bytes from 192.168.0.16: icmp_seq=24 ttl=64 time=6208 ms
64 bytes from 192.168.0.16: icmp_seq=25 ttl=64 time=5207 ms
64 bytes from 192.168.0.16: icmp_seq=26 ttl=64 time=4207 ms
64 bytes from 192.168.0.16: icmp_seq=27 ttl=64 time=3205 ms

64 bytes from 192.168.0.16: icmp_seq=31 ttl=64 time=48.4 ms
64 bytes from 192.168.0.16: icmp_seq=32 ttl=64 time=1.28 ms
64 bytes from 192.168.0.16: icmp_seq=33 ttl=64 time=1.39 ms
64 bytes from 192.168.0.16: icmp_seq=34 ttl=64 time=1.37 ms
64 bytes from 192.168.0.16: icmp_seq=35 ttl=64 time=3.67 ms
64 bytes from 192.168.0.16: icmp_seq=36 ttl=64 time=1.14 ms
64 bytes from 192.168.0.16: icmp_seq=37 ttl=64 time=1.39 ms
64 bytes from 192.168.0.16: icmp_seq=38 ttl=64 time=1.42 ms

This occurs every time when I issue an "iwlsit wlan0 scan" command. Anything can be done for these so that a smooth ping operation occurs.

8192du disconnect and show error message

Unable to handle kernel NULL pointer dereference at virtual address 000000b0
pgd = 80004000
[000000b0] *pgd=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in: 8192du(O)
CPU: 0 PID: 812 Comm: RTW_CMD_THREAD Tainted: G O 3.10.31-gb7de00a-dirty #71
task: a818cb40 ti: a8c0a000 task.ti: a8c0a000
PC is at _rtw_open_pktfile+0x4/0x24 [8192du]
LR is at rtw_xmitframe_coalesce+0x98/0xc14 [8192du]
pc : [<7f0422e0>] lr : [<7f01d794>] psr: 20000013
sp : a8c0be48 ip : c0cf9520 fp : 7f04f048
r10: 00000001 r9 : c0eb4de8 r8 : 00000001
r7 : 00000000 r6 : c0eb4d04 r5 : a89e0020 r4 : c0e9ed60
r3 : 00000000 r2 : 00000000 r1 : a8c0be98 r0 : 00000000
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c53c7d Table: 387b004a DAC: 00000015
Process RTW_CMD_THREAD (pid: 812, stack limit = 0xa8c0a238)
Stack: (0xa8c0be48 to 0xa8c0c000)
be40: 0000001a 7f0364a0 0000020a 00000000 00000006 00000028
be60: a8a08060 a89e0000 c0cf9520 c09cd120 c0cf8000 c0cf9520 80d21444 c0e9cad4
be80: c0cf9520 a8c61f00 c0cf9594 c0cf8000 7f04f048 c0cf8000 00000000 7f01e640
bea0: c0e9cad4 a89d8190 00000001 00000168 00000001 7f0313e4 00000001 c09cd120
bec0: 00000011 806b1674 00000011 c0e9ed60 c0cf8000 c09cd1b0 c0eb4d04 c0cf9520
bee0: c0eb4de8 00000001 00000011 7f031b8c c0e9ed60 c0cf8000 c0e9cad4 c0eb4d04
bf00: c0eb4df0 7f021060 a8c0a000 7f0136d0 7f0135f4 a8a6a100 c0cf9460 c0cf8000
bf20: a8c0a000 7f042f04 7f04f048 a8372a00 c0cf9470 7f002ff8 00000000 c0cf8000
bf40: 7f002ee0 a8a27e10 00000000 c0cf8000 7f002ee0 00000000 00000000 00000000
bf60: 00000000 80047674 f8fcebf5 00000000 9f570d5f c0cf8000 00000000 00000000
bf80: a8c0bf80 a8c0bf80 00000000 00000000 a8c0bf90 a8c0bf90 a8c0bfac a8a27e10
bfa0: 800475d0 00000000 00000000 8000e358 00000000 00000000 00000000 00000000
bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ccfdff17 c72fc46f
[<7f0422e0>](_rtw_open_pktfile+0x4/0x24 [8192du]) from [<7f01d794>](rtw_xmitframe_coalesce+0x98/0xc14 [8192du])
[<7f01d794>](rtw_xmitframe_coalesce+0x98/0xc14 [8192du]) from [<7f031b8c>](rtl8192du_hal_xmit+0xe8/0x160 [8192du])
[<7f031b8c>](rtl8192du_hal_xmit+0xe8/0x160 [8192du]) from [<7f021060>](rtw_hal_xmit+0x18/0x24 [8192du])
[<7f021060>](rtw_hal_xmit+0x18/0x24 [8192du]) from [<7f0136d0>](tx_beacon_hdl+0xdc/0x100 [8192du])
[<7f0136d0>](tx_beacon_hdl+0xdc/0x100 [8192du]) from [<7f002ff8>](rtw_cmd_thread+0x118/0x274 [8192du])
[<7f002ff8>](rtw_cmd_thread+0x118/0x274 [8192du]) from <80047674>
<80047674> from <8000e358>
Code: e0810002 e0630000 e12fff1e e5810000 (e59030b0)
---[ end trace 4cea76d4097c890a ]---

Switch to AP 2 times failed

Switching to AP Mode failed the second times :

$> wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
wlan0: Trying to associate with e4:aa:5d:5e:aa:cc (SSID='Opera' freq=5280 MHz)
wlan0: Associated with e4:aa:5d:5e:aa:cc
wlan0: CTRL-EVENT-CONNECTED - Connection to e4:aa:5d:5e:aa:cc
completed [id=0 id_str=]
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=FR
^C
wlan0: CTRL-EVENT-DISCONNECTED bssid=e4:aa:5d:5e:aa:cc reason=3
locally_generated=1
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: CTRL-EVENT-TERMINATING
$> wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
wlan0: Trying to associate with e4:aa:5d:5e:aa:cc (SSID='Opera' freq=5280 MHz)
wlan0: Association request to the driver failed
wlan0: Trying to associate with e4:aa:5d:5e:aa:cc (SSID='Opera' freq=5280 MHz)
wlan0: Association request to the driver failed

[Question] Wifi direct(p2p) supported with this driver code?

Hello.

I am using usb dongle with rtl8192du built-in.
I am wondering whether this driver code supports wifi-direct function or not.
When I run "iw list" command, it shows as below and I could not find "P2P Client" and "P2P Go".


Supported interface modes:
* IBSS
* managed
* AP
* monitor

Can I use wifi-direct function with this driver code?

Thanks.

Missing frame types?

We can't get hostapd working using latest hostapd 2.2 or even the latest one on git tree.
Seems like hostapd can not add the needed frame management frame types due to missing
features on the driver.

We are using kernel version 3.16.0 on an ARM machine. The USB WLAN device is a GW-USDual300
from PLANEX COMMUNICATIONS INC. (idVendor=2019, idProduct=ab2c).

Following hostapd configuration is used:

interface=wlan0
driver=nl80211
ssid=publicserver
channel=1

We also used a configuration which uses wpa2 but this doesn't change the behaviour.
As soon as we start hostapd with debugging enabled (Option -dd) we can see that it
recognizes the interface and stops on waiting for authentication requests from clients:

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd_test.conf
rfkill: initial event: idx=4 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=5 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Using driver-based off-channel TX
nl80211: interface wlan0 in phy phy4
nl80211: Set mode ifindex 8 iftype 3 (AP)
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=1
nl80211: Enable Probe Request reporting nl_preq=0x9e9a0
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x9e9a0 match=
nl80211: Add own interface ifindex 8
nl80211: if_indices[16]: 8
phy: phy4
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 160 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Completing interface initialization
Mode: IEEE 802.11b  Channel: 1  Frequency: 2412 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2412 (ht_enabled=0, vht_enabled=0, bandwidth=20 MHz, cf1=2412 MHz, cf2=0 MHz)
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x0
RATE[3] rate=110 flags=0x0
hostapd_setup_bss(hapd=0x9dec8 (wlan0), first=1)
wlan0: Flushing old station entries
nl80211: flush -> DEL_STATION wlan0 (all)
wlan0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION wlan0 ff:ff:ff:ff:ff:ff --> -22 (Invalid argument)
wpa_driver_nl80211_set_key: ifindex=8 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=8 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=8 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=8 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 00:22:cf:94:96:0a and ssid "publicserver"
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=59): 80 00 00 00 ff ff ff ff ff ff 00 22 cf 94 96 0a 00 22 cf 94 96 0a 00 00 00 00 00 00 00 00 00 00 64 00 01 00 00 0c 70 75 62 6c 69 63 73 65 72 76 65 72 01 04 82 84 0b 16 03 01 01
nl80211: Beacon tail - hexdump(len=0):
nl80211: ifindex=8
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=12):
     70 75 62 6c 69 63 73 65 72 76 65 72               publicserver    
nl80211: hidden SSID not in use
nl80211: privacy=0
nl80211: auth_algs=0x3
nl80211: wpa_version=0x0
nl80211: key_mgmt_suites=0x2
nl80211: pairwise_ciphers=0x1
nl80211: group_cipher=0x1
nl80211: Set wlan0 operstate 0->1 (UP)
netlink: Operstate: ifindex=8 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
Failed to set TX queue parameters for queue 0.
Failed to set TX queue parameters for queue 1.
Failed to set TX queue parameters for queue 2.
Failed to set TX queue parameters for queue 3.
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED 
wlan0: Setup of interface done.
ctrl_iface not configured!
random: Got 17/20 bytes from /dev/random
RTM_NEWLINK: ifi_index=8 ifname=wlan0 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK: ifi_index=8 ifname=wlan0 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
random: Got 3/3 bytes from /dev/random

Also iw tells us it was registered as AP:

# iw wlan0 info
Interface wlan0
        ifindex 8
        wdev 0x400000001
        addr 00:22:cf:94:96:0a
        ssid publicserver
        type AP
        wiphy 4

If we try to connect with a client now, hostapd doesn't recognize any activity.
Further debugging on hostapd and kernel shows that the 8192du driver signalizes
some managment frame types 0x00 and 0xC0 (WLAN_FC_STYPE_ASSOC_REQ and WLAN_FC_STYPE_AUTH).
But the only frame type hostapd has registered is 0x40 (WLAN_FC_STYPE_PROBE_REQ).
This seems because of missing wiphy->features flag NL80211_FEATURE_SK_TX_STATUS
and/or probe_client() routine on drivers cfg80211_ops - hostapd uses these to set
its internal variables 'use_monitor' and 'device_ap_sme'.

As soon as we manually register at least the WLAN_FC_STYPE_ASSOC_REQ frame type,
hostapd tries to continue with the authorization but fails on a frame command:

nl80211: Event message available
nl80211: BSS Event 59 (NL80211_CMD_FRAME) received for wlan0
nl80211: MLME event 59 (NL80211_CMD_FRAME) on wlan0(00:22:cf:94:96:0a) A1=00:22:cf:94:96:0a A2=1c:99:4c:65:79:6d
nl80211: MLME event frame - hexdump(len=70): 00 00 3a 01 00 22 cf 94 96 0a 1c 99 4c 65 79 6d 00 22 cf 94 96 0a 30 00 21 00 0a 00 00 0f 73 65 63 72 65 74 4e 53 41 73 65 72 76 65 72 01 04 82 84 0b 16 21 02 09 14 24 02 01 0d dd 09 00 10 18 02 00 00 00 00 00
nl80211: Frame event
nl80211: RX frame sa=1c:99:4c:65:79:6d freq=2412 ssi_signal=0 stype=0 (WLAN_FC_STYPE_ASSOC_REQ) len=70
wlan0: Event RX_MGMT (20) received
mgmt::assoc_req
association request: STA=1c:99:4c:65:79:6d capab_info=0x21 listen_interval=10
wlan0: STA 1c:99:4c:65:79:6d IEEE 802.11: Station tried to associate before authentication (aid=-1 flags=0x0)
nl80211: send_mlme - da= 1c:99:4c:65:79:6d noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3
nl80211: Use bss->freq=2412
nl80211: CMD_FRAME freq=2412 wait=0 no_cck=0 no_ack=0 offchanok=0
CMD_FRAME - hexdump(len=26): c0 00 00 00 1c 99 4c 65 79 6d 00 22 cf 94 96 0a 00 22 cf 94 96 0a 00 00 06 00
nl80211: Frame command failed: ret=-22 (Invalid argument) (freq=2412 wait=0)
Failed to send deauth: Resource temporarily unavailable

include/autoconf is set as follows:

#define AUTOCONF_INCLUDED
#define DRV_NAME "r8192du"
#define DRIVERVERSION   "v4.2.1_7122.20130408"

#define CONFIG_SET_SCAN_DENY_TIMER

/*
 * Internal  General Config
 */
/* define CONFIG_PWRCTRL        1 */
/* define CONFIG_H2CLBK 1 */

#define CONFIG_EMBEDDED_FWIMG   1
/* define CONFIG_FILE_FWIMG */

#ifdef CONFIG_WAKE_ON_WLAN
#define CONFIG_WOWLAN 1
#endif /* CONFIG_WAKE_ON_WLAN */
#define CONFIG_R871X_TEST       1

#define CONFIG_ACTIVE_KEEP_ALIVE_CHECK

#define CONFIG_80211N_HT        1

#define CONFIG_RECV_REORDERING_CTRL     1

#define CONFIG_IPS      1
//#define CONFIG_LPS    1

#define CONFIG_92D_AP_MODE 1
#define CONFIG_NATIVEAP_MLME 1
#ifndef CONFIG_NATIVEAP_MLME
        #define CONFIG_HOSTAPD_MLME     1
#endif
#define CONFIG_FIND_BEST_CHANNEL        1

#define CONFIG_DFS      1

#define CONFIG_LAYER2_ROAMING
#define CONFIG_LAYER2_ROAMING_RESUME
/* define CONFIG_SET_SCAN_DENY_TIMER */
#define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable,*/

//#define CONFIG_CONCURRENT_MODE 1
#ifdef CONFIG_CONCURRENT_MODE
        #define CONFIG_TSF_RESET_OFFLOAD 1                      /*  For 2 PORT TSF SYNC. */
#endif  /*  CONFIG_CONCURRENT_MODE */

#define CONFIG_80211D

/* Interface  Related Config */

#define CONFIG_PREALLOC_RECV_SKB        1

/*
 * USB VENDOR REQ BUFFER ALLOCATION METHOD
 * if not set we'll use function local variable (stack memory)
 */

/* HAL  Related Config */

#define RTL8192C_RX_PACKET_NO_INCLUDE_CRC       1

#define CONFIG_ONLY_ONE_OUT_EP_TO_LOW   0

#define CONFIG_OUT_EP_WIFI_MODE 0

#define RTL8192CU_ASIC_VERIFICATION     0       /*  For ASIC verification. */

#define RTL8192CU_ADHOC_WORKAROUND_SETTING 1

#define DISABLE_BB_RF   0

#define RTL8191C_FPGA_NETWORKTYPE_ADHOC 0

#define ANTENNA_SELECTION_STATIC_SETTING 0

#define TX_POWER_FOR_5G_BAND                            1       /* For 5G band TX Power */

#define RTL8192D_EASY_SMART_CONCURRENT  0

#define RTL8192D_DUAL_MAC_MODE_SWITCH   0

#define SWLCK   1

#define FW_PROCESS_VENDOR_CMD 1

#define MP_DRIVER 0

#define DBG 0

#define CONFIG_DEBUG_RTL819X

#define CONFIG_PROC_DEBUG 1

Maybe we miss something here. Any hints, tips or suggestions would be very welcome.

OpenSUSE Tumbleweed (kernel 4.9.0-2): compat.h again...

`make[2]: Entering directory '/usr/src/linux-4.9.0-2-obj/x86_64/default'
CC [M] /home/me/media_build_experimental/v4l/msp3400-driver.o
In file included from :0:0:
/home/me/media_build_experimental/v4l/compat.h:1463:1: error: redefinition of 'pci_zalloc_consistent'
pci_zalloc_consistent(struct pci_dev *hwdev, size_t size,
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-4.9.0-2/include/linux/pci.h:2153:0,
from /home/me/media_build_experimental/v4l/compat.h:1459,
from :0:
/usr/src/linux-4.9.0-2/include/linux/pci-dma-compat.h:23:1: note: previous definition of 'pci_zalloc_consistent' was here
pci_zalloc_consistent(struct pci_dev *hwdev, size_t size,
^~~~~~~~~~~~~~~~~~~~~
In file included from :0:0:
/home/me/media_build_experimental/v4l/compat.h:1552:0: warning: "DMA_ATTR_SKIP_CPU_SYNC" redefined
#define DMA_ATTR_SKIP_CPU_SYNC 0

In file included from /usr/src/linux-4.9.0-2/include/linux/pci-dma-compat.h:7:0,
from /usr/src/linux-4.9.0-2/include/linux/pci.h:2153,
from /home/me/media_build_experimental/v4l/compat.h:1459,
from :0:
/usr/src/linux-4.9.0-2/include/linux/dma-mapping.h:47:0: note: this is the location of the previous definition
#define DMA_ATTR_SKIP_CPU_SYNC (1UL << 5)

`

cross compile error with kernel 2.6.35

After solving this error by searching the Internet
core/rtw_mlme.c:63: error: implicit declaration of function 'vzalloc'

It come out these error
CC [M] /opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.o
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c: In function 'rtw_cfg80211_indicate_sta_assoc':
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c:2478: error: implicit declaration of function 'cfg80211_rx_mgmt'
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c: In function 'cfg80211_rtw_mgmt_tx':
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c:3611: error: implicit declaration of function 'cfg80211_mgmt_tx_status'
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c: At top level:
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c:3678: error: unknown field 'mgmt_tx' specified in initializer
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c:3678: warning: initialization from incompatible pointer type
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c:3679: error: unknown field 'mgmt_frame_register' specified in initializer
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c:3679: warning: initialization from incompatible pointer type
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c: In function 'rtw_cfg80211_preinit_wiphy':
/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.c:3788: error: 'struct wiphy' has no member named 'software_iftypes'
scripts/Makefile.build:230: recipe for target '/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.o' failed
make[2]: *** [/opt/kaifaban/i.mx28x/tools/rtl8192du/os_dep/ioctl_cfg80211.o] Error 1
Makefile:1300: recipe for target 'module/opt/kaifaban/i.mx28x/tools/rtl8192du' failed
make[1]: *** [module/opt/kaifaban/i.mx28x/tools/rtl8192du] Error 2Makefile:149: recipe for target 'modules' failed
After searching the kerel 2.6.35, I can't find cfg80211_rx_mgmt, I doubt:
does this driver support this kernel version?

Thanks

Build fails on kernel 4.19.2-300.fc29.x86_64

Numerous warning about redefinition of variables followed by a fatal error defining u16 type variables in 'rtw_select_queue'. Make log is below:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.19.2-300.fc29.x86_64/build M=/usr/src/8192du-1.0 modules
make[1]: Entering directory '/usr/src/kernels/4.19.2-300.fc29.x86_64'
CC [M] /usr/src/8192du-1.0/core/rtw_cmd.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_cmd.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_cmd.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_security.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_security.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_security.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_debug.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/include/rtw_debug.h:25,
from /usr/src/8192du-1.0/core/rtw_debug.c:23:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/include/rtw_debug.h:24,
from /usr/src/8192du-1.0/core/rtw_debug.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_io.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_io.c:53:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_io.c:52:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_ioctl_query.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_ioctl_query.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_ioctl_query.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_ioctl_set.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_ioctl_set.c:25:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_ioctl_set.c:24:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_ieee80211.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_ieee80211.c:22:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/include/drv_types.h:31,
from /usr/src/8192du-1.0/core/rtw_ieee80211.c:22:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_mlme.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_mlme.c:25:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_mlme.c:24:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_mlme_ext.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_mlme_ext.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_mlme_ext.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_wlan_util.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_wlan_util.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_wlan_util.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_pwrctrl.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_pwrctrl.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_pwrctrl.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_rf.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_rf.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_rf.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_recv.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_recv.c:23:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_recv.c:22:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_sta_mgt.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_sta_mgt.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_sta_mgt.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_ap.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_ap.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_ap.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_xmit.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_xmit.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_xmit.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_p2p.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_p2p.c:22:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/include/drv_types.h:31,
from /usr/src/8192du-1.0/core/rtw_p2p.c:22:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_tdls.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_tdls.c:22:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/include/drv_types.h:31,
from /usr/src/8192du-1.0/core/rtw_tdls.c:22:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_br_ext.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_br_ext.c:33:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/include/drv_types.h:31,
from /usr/src/8192du-1.0/core/rtw_br_ext.c:33:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_iol.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/include/rtw_iol.h:25,
from /usr/src/8192du-1.0/core/rtw_iol.c:21:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/include/rtw_iol.h:24,
from /usr/src/8192du-1.0/core/rtw_iol.c:21:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_sreset.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/include/rtw_sreset.h:25,
from /usr/src/8192du-1.0/core/rtw_sreset.c:21:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/include/rtw_sreset.h:24,
from /usr/src/8192du-1.0/core/rtw_sreset.c:21:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/core/rtw_efuse.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/core/rtw_efuse.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/core/rtw_efuse.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/hal_intf.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/hal_intf.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/hal_intf.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/hal_com.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/hal_com.c:22:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/hal_com.c:21:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/dm.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/dm.c:23:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/dm.c:22:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/usb_ops_linux.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/usb_ops_linux.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/usb_ops_linux.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/rtl8192d_hal_init.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/rtl8192d_hal_init.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/rtl8192d_hal_init.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/rtl8192d_phycfg.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/rtl8192d_phycfg.c:56:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/rtl8192d_phycfg.c:55:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

/usr/src/8192du-1.0/hal/rtl8192d_phycfg.c: In function ‘phy_IQCalibrate_5G’:
/usr/src/8192du-1.0/hal/rtl8192d_phycfg.c:5428:55: warning: bitwise comparison always evaluates to true [-Wtautological-compare]
if(((REG0xeac&BIT(31)) == 0) && ((REG0xeb4&0x3FF0000)!=0x142))
^~
CC [M] /usr/src/8192du-1.0/hal/rtl8192d_rf6052.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/rtl8192d_rf6052.c:46:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/rtl8192d_rf6052.c:45:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/rtl8192d_dm.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/rtl8192d_dm.c:33:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/rtl8192d_dm.c:32:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/rtl8192d_rxdesc.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/rtl8192d_rxdesc.c:23:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/rtl8192d_rxdesc.c:22:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/rtl8192d_cmd.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/rtl8192d_cmd.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/rtl8192d_cmd.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/usb_halinit.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/usb_halinit.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/usb_halinit.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/rtl8192du_led.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/rtl8192du_led.c:21:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/include/drv_types.h:31,
from /usr/src/8192du-1.0/hal/rtl8192du_led.c:21:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/rtl8192du_xmit.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/rtl8192du_xmit.c:23:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/rtl8192du_xmit.c:22:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/rtl8192du_recv.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/rtl8192du_recv.c:23:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/rtl8192du_recv.c:22:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/rtl8192d_xmit.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/hal/rtl8192d_xmit.c:24:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/hal/rtl8192d_xmit.c:23:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/hal/Hal8192DUHWImg.o
CC [M] /usr/src/8192du-1.0/os_dep/osdep_service.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/os_dep/osdep_service.c:26:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/os_dep/osdep_service.c:25:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

CC [M] /usr/src/8192du-1.0/os_dep/os_intfs.o
In file included from /usr/src/8192du-1.0/include/rtw_ht.h:25,
from /usr/src/8192du-1.0/include/drv_types.h:52,
from /usr/src/8192du-1.0/os_dep/os_intfs.c:25:
/usr/src/8192du-1.0/include/wifi.h:815: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40

In file included from ./include/net/cfg80211.h:24,
from /usr/src/8192du-1.0/include/osdep_service.h:84,
from /usr/src/8192du-1.0/os_dep/os_intfs.c:24:
./include/linux/ieee80211.h:1442: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100

/usr/src/8192du-1.0/os_dep/os_intfs.c:583:22: error: initialization of ‘u16 (*)(struct net_device *, struct sk_buff *, struct net_device , u16 ()(struct net_device *, struct sk_buff *, struct net_device ))’ {aka ‘short unsigned int ()(struct net_device *, struct sk_buff *, struct net_device , short unsigned int ()(struct net_device *, struct sk_buff *, struct net_device ))’} from incompatible pointer type ‘u16 ()(struct net_device *, struct sk_buff *, void , u16 ()(struct net_device *, struct sk_buff *, struct net_device ))’ {aka ‘short unsigned int ()(struct net_device *, struct sk_buff *, void , short unsigned int ()(struct net_device *, struct sk_buff *, struct net_device ))’} [-Werror=incompatible-pointer-types]
.ndo_select_queue = rtw_select_queue,
^~~~~~~~~~~~~~~~
/usr/src/8192du-1.0/os_dep/os_intfs.c:583:22: note: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’)
/usr/src/8192du-1.0/os_dep/os_intfs.c:1733:22: error: initialization of ‘u16 (
)(struct net_device *, struct sk_buff *, struct net_device , u16 ()(struct net_device *, struct sk_buff *, struct net_device ))’ {aka ‘short unsigned int ()(struct net_device *, struct sk_buff *, struct net_device , short unsigned int ()(struct net_device *, struct sk_buff *, struct net_device ))’} from incompatible pointer type ‘u16 ()(struct net_device *, struct sk_buff *, void , u16 ()(struct net_device *, struct sk_buff *, struct net_device ))’ {aka ‘short unsigned int ()(struct net_device *, struct sk_buff *, void , short unsigned int ()(struct net_device *, struct sk_buff *, struct net_device *))’} [-Werror=incompatible-pointer-types]
.ndo_select_queue = rtw_select_queue,
^~~~~~~~~~~~~~~~
/usr/src/8192du-1.0/os_dep/os_intfs.c:1733:22: note: (near initialization for ‘rtw_netdev_if2_ops.ndo_select_queue’)
cc1: some warnings being treated as errors
distcc[3865] ERROR: compile /usr/src/8192du-1.0/os_dep/os_intfs.c on localhost failed
make[2]: *** [scripts/Makefile.build:306: /usr/src/8192du-1.0/os_dep/os_intfs.o] Error 1
make[1]: *** [Makefile:1521: module/usr/src/8192du-1.0] Error 2
make[1]: Leaving directory '/usr/src/kernels/4.19.2-300.fc29.x86_64'
make: *** [Makefile:686: modules] Error 2

Kernel trap in net/wireless/sme.c after suspend/resume cycle

This trap has been happening for the past few kernel releases with a Netgear N600 dual band USB wireless modem. The chip info is:

Belkin Components F9L1101v2 802.11abgn Wireless Adapter [Realtek RTL8192DU]

It's not a show-stopper, just looks like some work is left on the kernel work queue that was in process when Network Manager puts the interface to sleep. What follows is from the 'dmesg' output:

[ 3558.823618] ------------[ cut here ]------------
[ 3558.823666] WARNING: CPU: 0 PID: 50 at net/wireless/sme.c:857 __cfg80211_disconnected+0x2d0/0x310 cfg80211
[ 3558.823673] Modules linked in: binfmt_misc nf_log_ipv4 nf_log_common xt_LOG nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw netatop(OE) 8192du(OE) cfg80211 rfkill gpio_ich kvm_intel snd_hda_codec_idt snd_hda_codec_generic iTCO_wdt snd_hda_intel iTCO_vendor_support snd_hda_controller snd_hda_codec ppdev snd_hwdep snd_seq snd_seq_device kvm snd_pcm dcdbas serio_raw snd_timer i2c_i801 snd lpc_ich mfd_core soundcore parport_pc shpchp parport acpi_cpufreq
[ 3558.823740] radeon i2c_algo_bit drm_kms_helper ttm drm 8021q garp stp llc mrp e100 mii ata_generic pata_acpi
[ 3558.823760] CPU: 0 PID: 50 Comm: kworker/u8:1 Tainted: G OE 4.0.4-303.fc22.x86_64 #1
[ 3558.823763] Hardware name: Dell Inc. Dell DM051 /0HJ054, BIOS A05 03/31/2006
[ 3558.823777] Workqueue: cfg80211 cfg80211_event_work [cfg80211]
[ 3558.823780] 0000000000000000 00000000b2e4937b ffff8800b8233c68 ffffffff81783124
[ 3558.823786] 0000000000000000 0000000000000000 ffff8800b8233ca8 ffffffff8109c66a
[ 3558.823791] 0000000000000000 ffff8800b8186280 0000000000000000 ffff8800b9d07000
[ 3558.823797] Call Trace:
[ 3558.823808] [] dump_stack+0x45/0x57
[ 3558.823814] [] warn_slowpath_common+0x8a/0xc0
[ 3558.823818] [] warn_slowpath_null+0x1a/0x20
[ 3558.823837] [] __cfg80211_disconnected+0x2d0/0x310 [cfg80211]
[ 3558.823842] [] ? __schedule+0x2fc/0x970
[ 3558.823858] [] cfg80211_process_wdev_events+0x17c/0x1c0 [cfg80211]
[ 3558.823873] [] cfg80211_process_rdev_events+0x38/0x70 [cfg80211]
[ 3558.823887] [] cfg80211_event_work+0x22/0x30 [cfg80211]
[ 3558.823893] [] process_one_work+0x1bb/0x410
[ 3558.823897] [] worker_thread+0x53/0x470
[ 3558.823901] [] ? process_one_work+0x410/0x410
[ 3558.823905] [] ? process_one_work+0x410/0x410
[ 3558.823910] [] kthread+0xd8/0xf0
[ 3558.823915] [] ? kthread_worker_fn+0x180/0x180
[ 3558.823921] [] ret_from_fork+0x58/0x90
[ 3558.823925] [] ? kthread_worker_fn+0x180/0x180
[ 3558.823929] ---[ end trace c0003ec258ccc64e ]---
[ 3559.021228] PM: Syncing filesystems ... done.
[ 3559.813479] PM: Preparing system for mem sleep
[ 3560.220071] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 3560.222050] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 3560.223214] PM: Entering mem sleep

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.