Giter VIP home page Giter VIP logo

rt8192cu's Introduction

Realtek driver for 8192cu / 8188cu devices

The in-tree kernel drivers for these devices do not work so the official realtek drivers have to be used. Gladly, these were released as GPL code so we can publish them freely. Unfortunately, they have some issues with 64bit machines so this repository contains the fixes to make them work.

Please note that these fixes are not officially from realtek so there is no guarantee that they work. However, I run this driver on my 64bit x86_64 linux machine and they work like a charm. Furthermore, I try to keep them compatible with linux-next. Therefore, they should work with every new kernel release.

If the current code does not compile with your kernel, please check out a previous version that was known to work. I try to add tags for every kernel release.

If there are issues, please do not hesitate to contact me. Furthermore, if any of you can confirm that the in-tree kernel drivers work with these devices, I will gladly drop this repository as it isn't really fun to maintain this.

WHAT IS NEW?

Added support for kernel 3.10+ (3.11 working, 3.12 not tested) DKMS method

Install

Easy Install on Ubuntu using DKMS

On Ubuntu 13.10, the following commands ought to download and install this module, replacing the buggy built-in rtl8192cu driver. This will also automatically rebuild kernel module on kernel upgrade:

sudo apt-get install git build-essential linux-headers-generic dkms
git clone https://github.com/dz0ny/rt8192cu.git --depth 1
cd rt8192cu
sudo make dkms

Hard Install

sudo apt-get install git build-essential linux-headers-generic dkms
git clone https://github.com/dz0ny/rt8192cu.git --depth 1
cd rt8192cu
sudo make install

The current Realtek driver version that this repository is based on is:

v4.0.2_9000

License / Copying

The Realtek tarball didn't include license-terms, however, all code files that I added to this repository are licensed as GPL-v2, therefore, there shouldn't be any issues if you clone this.

rt8192cu's People

Contributors

adamnovak avatar dz0ny avatar interfect avatar profpoop 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rt8192cu's Issues

Failed to compile in gcc 4.9

Failed to compile in gcc 4.9

rt8192cu/os_dep/linux/usb_intf.c:1580:52: error: macro "DATE" might prevent reproducible builds [-Werror=date-time]

rt8192cu/os_dep/linux/usb_intf.c:1580:1: error: macro "TIME" might prevent reproducible builds [-Werror=date-time]

TXPower setting not working on RTL8188RU

Hi,

You driver is working link a charm with a RLT8188RU chipset (on a RPi + Raspbian) ! Thx for your work.

But there seems to be an issue with TXPower ? Iwconfig does not work ...

iwconfig wlan1 txpower 33
Error for wireless request "Set Tx Power" (8B26) :
SET failed on device wlan1 ; Operation not permitted.

What need to be changed to hardcode this value in the driver ? My adapter allows up to 33 Dbm ...
FYI, the power can't also be read using iwconfig or iwlist, so we have no way to know the current power setting ...

iwlist txpower
wlan1 unknown transmit-power information.

iwconfig wlan1
wlan1 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
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

trying but getting errors ...

make KERNELRELEASE=3.16.0-34-generic -C /lib/modules/3.16.0-34-generic/build M=/var/lib/dkms/8192cu/4.0.29/build..........(bad exit status: 2)
ERROR (dkms apport): binary package for 8192cu: 4.0.29 not found
Error! Bad return status for module build on kernel: 3.16.0-34-generic (x86_64)
Consult /var/lib/dkms/8192cu/4.0.29/build/make.log for more information.
Makefile:595: recipe for target 'dkms' failed
make: *** [dkms] Error 10
wintersj@wintersj-MS-7797:/rt8192cu$ cat /var/lib/dkms/8192cu/4.0.29/build/make.log
DKMS make.log for 8192cu-4.0.29 for kernel 3.16.0-34-generic (x86_64)
Tue Apr 21 21:13:02 CEST 2015
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-34-generic'
LD /var/lib/dkms/8192cu/4.0.29/build/built-in.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_cmd.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_security.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_debug.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_io.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_ioctl_query.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_ioctl_set.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_ieee80211.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_mlme.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_mlme_ext.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_wlan_util.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_pwrctrl.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_rf.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_recv.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_sta_mgt.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_ap.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_xmit.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_p2p.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_tdls.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_br_ext.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_iol.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/rtw_sreset.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/core/efuse/rtw_efuse.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/hal_intf.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/hal_com.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/dm.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_hal_init.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_phycfg.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_rf6052.o
/var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_rf6052.c: In function ‘PHY_RFShadowRefresh’:
/var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_rf6052.c:1020:37: warning: iteration 63u invokes undefined behavior [-Waggressive-loop-optimizations]
RF_Shadow[eRFPath][Offset].Value = 0;
^
/var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_rf6052.c:1018:3: note: containing loop
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
^
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_dm.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_rxdesc.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_cmd.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/usb/usb_halinit.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/usb/rtl8192cu_led.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/usb/rtl8192cu_xmit.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/usb/rtl8192cu_recv.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/usb/usb_ops_linux.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_sreset.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/rtl8192c_xmit.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/hal/rtl8192c/usb/Hal8192CUHWImg.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/os_dep/osdep_service.o
CC [M] /var/lib/dkms/8192cu/4.0.29/build/os_dep/linux/os_intfs.o
/var/lib/dkms/8192cu/4.0.29/build/os_dep/linux/os_intfs.c:1017:2: warning: initialization from incompatible pointer type
.ndo_select_queue = rtw_select_queue,
^
/var/lib/dkms/8192cu/4.0.29/build/os_dep/linux/os_intfs.c:1017:2: warning: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’)
CC [M] /var/lib/dkms/8192cu/4.0.29/build/os_dep/linux/usb_intf.o
/var/lib/dkms/8192cu/4.0.29/build/os_dep/linux/usb_intf.c: In function ‘rtw_drv_entry’:
/var/lib/dkms/8192cu/4.0.29/build/os_dep/linux/usb_intf.c:1580:52: error: macro "DATE" might prevent reproducible builds [-Werror=date-time]
DBG_871X("build time: %s %s\n", DATE, TIME);
^
/var/lib/dkms/8192cu/4.0.29/build/os_dep/linux/usb_intf.c:1580:1: error: macro "TIME" might prevent reproducible builds [-Werror=date-time]
DBG_871X("build time: %s %s\n", DATE, TIME);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:257: recipe for target '/var/lib/dkms/8192cu/4.0.29/build/os_dep/linux/usb_intf.o' failed
make[2]: *** [/var/lib/dkms/8192cu/4.0.29/build/os_dep/linux/usb_intf.o] Error 1
Makefile:1345: recipe for target 'module/var/lib/dkms/8192cu/4.0.29/build' failed
make[1]: *** [module/var/lib/dkms/8192cu/4.0.29/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-34-generic'
wintersj@wintersj-MS-7797:
/rt8192cu$ sudo make install
install -p -m 644 8192cu.ko /lib/modules/3.16.0-34-generic/kernel/drivers/net/wireless/
install: cannot stat ‘8192cu.ko’: No such file or directory
Makefile:590: recipe for target 'install' failed
make: *** [install] Error 1
wintersj@wintersj-MS-7797:~/rt8192cu$ sudo make install
install -p -m 644 8192cu.ko /lib/modules/3.16.0-34-generic/kernel/drivers/net/wireless/
install: cannot stat ‘8192cu.ko’: No such file or directory
Makefile:590: recipe for target 'install' failed
make: *** [install] Error 1

I hope this is enough info.
thxs

kernel module stops working after a while with "No buffer space available"

hi,

I have a sun7i arm system running a 3.4 kernel, and a RTL8192CU connected via usb. this works fine for a while, but at some point wireless connections stop working. when new clients try to connect via hostapd, I get this in the logs:

l2_packet_send - send: No buffer space available

stopping and starting hostapd does not solve the problem, but unloading the kernel driver and reloading does! other people seem to have encountered the exact same problem as well: https://www.bountysource.com/teams/rtl8192cu-fixes/issues?tracker_ids=622650

my driver is built from 97351bc

Please let me know if there is anything I can do to help debug this, it looks like the driver consumes some resource or locks up in some way...

macchanger MAC doesn't stick

When i use macchanger to change the MAC, it works on my internal NIC, but doesn't work on this TP-Link usb nic.
MAC changer says the address was changed, but ifconfig shows the same original address, and the routers pick that up also.
My system is Linux Mint 16.
The card otherwise works great with your driver. Thank you very much for your work!

compliling on Odroid C2 with Kali linux

~/rt8192cu[master]$ git diff
diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c
index 6bb924e..24e2b11 100755
--- a/core/rtw_br_ext.c
+++ b/core/rtw_br_ext.c
@@ -26,6 +26,7 @@
#include <linux/atalk.h>
#include <linux/udp.h>
#include <linux/if_pppox.h>
+#include <net/ip6_checksum.h>
#endif

#if 1 // rtw_wifi_driver

Will this work for Edimax EW-7811Un

Hi I am having the same compile error for my "Edimax EW-7811Un" so I want to use your solution.
Will this driver in Git work for my "Edimax EW-7811Un" as well?
I am guessing not.

Thanks

system unstable when using rt8192cu wifi card as hostapd accesspoint

hi,

when using rtl 8192cu based wifi device as accesspoint (using this driver with hostapd), the system will end up hanging with dumping several rcu_sched stalls into kernel message log (dmesg, see the screenshot attached - unfortunately I have found no better way how to get the logs out of the unstable system, but I will keep trying).
Just to make things clear - the accesspoint works as expected for some amount of time before it hangs (the time is quite unpredictable and varies from several minutes up to hours - the biggest uptime having AP on was cca 20hrs).

The system is gentoo linux, kernel 3.12.13-gentoo, x86_64, CPU Intel Core i7, QM67 chipset, please let me know if You need some further information or assistance with reproducing the bug...

Thank You guys for the great work Your are making here. Looking forward if You can help me further.

Dizzy

imag0194

make aborts

Thank you. Unfortunately, the compilation does not work any more. make aborts with; "error: implicit declaration of function ‘create_proc_entry’ [-Werror=implicit-function-declaration]". Could you fix this?

Monitor mode?

Hey there! Does the driver supports monitor mode?

Compiling issue with GCC 4.8.2-21~rpi3rpi1 ?

Hi,

I've used this driver many times without issue, but on one of my machines I can't get it to compile!

root@pi3:~# cd rt8192cu/
root@pi3:~/rt8192cu# ls
blacklist-dkms-8192cu.conf  clean  core  dkms-8192cu.install  dkms.conf  hal  ifcfg-wlan0  include  Kconfig  Makefile  os_dep  README.md  runwpa  wlan0dhcp
root@pi3:~/rt8192cu# make
make ARCH=armv6l CROSS_COMPILE= -C /lib/modules/3.18.11+/build M=/root/rt8192cu  modules
make[1]: Entering directory '/root/linux-bb6b4b6b331680bed807605685572d727638bb51'
  CC [M]  /root/rt8192cu/core/rtw_cmd.o
  CC [M]  /root/rt8192cu/core/rtw_security.o
  CC [M]  /root/rt8192cu/core/rtw_debug.o
  CC [M]  /root/rt8192cu/core/rtw_io.o
  CC [M]  /root/rt8192cu/core/rtw_ioctl_query.o
  CC [M]  /root/rt8192cu/core/rtw_ioctl_set.o
  CC [M]  /root/rt8192cu/core/rtw_ieee80211.o
  CC [M]  /root/rt8192cu/core/rtw_mlme.o
  CC [M]  /root/rt8192cu/core/rtw_mlme_ext.o
  CC [M]  /root/rt8192cu/core/rtw_wlan_util.o
  CC [M]  /root/rt8192cu/core/rtw_pwrctrl.o
  CC [M]  /root/rt8192cu/core/rtw_rf.o
  CC [M]  /root/rt8192cu/core/rtw_recv.o
  CC [M]  /root/rt8192cu/core/rtw_sta_mgt.o
  CC [M]  /root/rt8192cu/core/rtw_ap.o
  CC [M]  /root/rt8192cu/core/rtw_xmit.o
  CC [M]  /root/rt8192cu/core/rtw_p2p.o
  CC [M]  /root/rt8192cu/core/rtw_tdls.o
  CC [M]  /root/rt8192cu/core/rtw_br_ext.o
  CC [M]  /root/rt8192cu/core/rtw_iol.o
  CC [M]  /root/rt8192cu/core/rtw_sreset.o
  CC [M]  /root/rt8192cu/core/efuse/rtw_efuse.o
  CC [M]  /root/rt8192cu/hal/hal_intf.o
  CC [M]  /root/rt8192cu/hal/hal_com.o
  CC [M]  /root/rt8192cu/hal/dm.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_hal_init.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_phycfg.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_rf6052.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_dm.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_rxdesc.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_cmd.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/usb_halinit.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/rtl8192cu_led.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/rtl8192cu_xmit.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/rtl8192cu_recv.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/usb_ops_linux.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_sreset.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/rtl8192c_xmit.o
  CC [M]  /root/rt8192cu/hal/rtl8192c/usb/Hal8192CUHWImg.o
  CC [M]  /root/rt8192cu/os_dep/osdep_service.o
  CC [M]  /root/rt8192cu/os_dep/linux/os_intfs.o
/root/rt8192cu/os_dep/linux/os_intfs.c:1017:2: warning: initialization from incompatible pointer type [enabled by default]
  .ndo_select_queue = rtw_select_queue,
  ^
/root/rt8192cu/os_dep/linux/os_intfs.c:1017:2: warning: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’) [enabled by default]
  CC [M]  /root/rt8192cu/os_dep/linux/usb_intf.o
  CC [M]  /root/rt8192cu/os_dep/linux/usb_ops_linux.o
  CC [M]  /root/rt8192cu/os_dep/linux/ioctl_linux.o
  CC [M]  /root/rt8192cu/os_dep/linux/xmit_linux.o
  CC [M]  /root/rt8192cu/os_dep/linux/mlme_linux.o
  CC [M]  /root/rt8192cu/os_dep/linux/recv_linux.o
  CC [M]  /root/rt8192cu/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /root/rt8192cu/os_dep/linux/rtw_android.o
  LD [M]  /root/rt8192cu/8192cu.o
  Building modules, stage 2.
  MODPOST 1 modules
/bin/sh: 1: scripts/mod/modpost: not found
scripts/Makefile.modpost:90: recipe for target '__modpost' failed
make[2]: *** [__modpost] Error 127
Makefile:1384: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/root/linux-bb6b4b6b331680bed807605685572d727638bb51'
Makefile:584: recipe for target 'modules' failed
make: *** [modules] Error 2
root@pi3:~/rt8192cu# cd ~/linux/scripts/
root@pi3:~/linux/scripts# make
make: *** No rule to make target '/unifdef', needed by 'build_unifdef'.  Stop.
root@pi3:~/linux/scripts# make modules_prepare
make: *** No rule to make target 'modules_prepare'.  Stop.
root@pi3:~/linux/scripts# cd ..
root@pi3:~/linux# ls
arch   COPYING  crypto         drivers   fs       init  Kbuild   kernel  MAINTAINERS  mm              Module.symvers.backup  README          samples  security  tools  virt
block  CREDITS  Documentation  firmware  include  ipc   Kconfig  lib     Makefile     Module.symvers  net                    REPORTING-BUGS  scripts  sound     usr
root@pi3:~/linux# make modules_prepare
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
  CC      arch/arm/kernel/asm-offsets.s
arch/arm/kernel/asm-offsets.c:53:2: error: #error Your compiler is too buggy; it is known to miscompile kernels
 #error Your compiler is too buggy; it is known to miscompile kernels
  ^
arch/arm/kernel/asm-offsets.c:54:2: error: #error and result in filesystem corruption and oopses.
 #error and result in filesystem corruption and oopses.
  ^
Kbuild:81: recipe for target 'arch/arm/kernel/asm-offsets.s' failed
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
Makefile:980: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2

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.