Linux driver for Realtek RTL8723AU devices with USB ID 0bda:1724 such as found in Lenovo IdeaPad Yoga 13
Subsystems (2)
After receiving a number of inquiries regarding a Linux driver for the RTL8723AU device with USB ID 0bda:1724, I asked my contacts in the USB group at Realtek if such a driver were available. They responded that there is one, but not on their public FTP site; however, they gave me the necessary info to get it from their private site, and also granted permission for me to make it publicly available.
Therefore, I have created a git repository that can be copied using the command:
git clone http://github.com/lwfinger/rtl8723au.git
Once cloned, the command sequence 'make && sudo make install' in the resulting source directory will build and install the driver, which is named 8723au. At the moment, it does not require external firmware. The driver will build on all kernel versions up to, and including 3.9. I have not tested on kernels older than 3.7, but the code contains conditional statements testing against kernel 2.6.18. It should build on any kernel new enough for the base hardware.
My plan is to evolve this driver into a form that is suitable for inclusion in the staging tree of the kernel; however, that will take some effort and time, which is why I am making the intermediate results available now. As that work proceeds, the git version will evolve into code that can be submitted to the kernel with only small changes.
Please be aware that I do not have any hardware that uses this driver, thus I can only guarantee that the code compiles; however, Joon Ro has tested the driver and he assures me that it works. Together we have been eliminating spurious log entries.
The 8723a chip also includes Bluetooth hardware. I have not received any indication that it is active in the RTL8723AU, but it certainly is in the RTL8723AE, the PCIe version. In a separate activity, I am working with Realtek to prepare a kernel driver for this portion of the device.
I welcome your comments, bug reports, patches, suggestions for changes, and testing. In addition, please spread the word to anyone that has been seeking this driver.
Thanks,
Larry
Quoted 12 lines · Larry Finger
My plan is to evolve this driver into a form that is suitable for inclusion in the staging tree of the kernel; however, that will take some effort and time, which is why I am making the intermediate results available now. As that work proceeds, the git version will evolve into code that can be submitted to the kernel with only small changes.
Please be aware that I do not have any hardware that uses this driver, thus I can only guarantee that the code compiles; however, Joon Ro has tested the driver and he assures me that it works. Together we have been eliminating spurious log entries.
Quoted 5 lines
The 8723a chip also includes Bluetooth hardware. I have not received any indication that it is active in the RTL8723AU, but it certainly is in the RTL8723AE, the PCIe version. In a separate activity, I am working with Realtek to prepare a kernel driver for this portion of the device.
So I can verify that this driver works against 3.8.11 (not against current -linus because of a build failure), and yes, there is Bluetooth in this device. In fact, it seems to work better than some in-tree drivers I have seen in the past.
However, I'm confused as to the above and what it implies for the purpose of the staging tree. Wasn't the whole point of the staging tree to have a working-but-ugly driver upstream and have the work to clean it up happen in the mainline tree instead of off somewhere.
-hpa
Quoted 10 lines · H. Peter Anvin
So I can verify that this driver works against 3.8.11 (not against current -linus because of a build failure), and yes, there is Bluetooth in this device. In fact, it seems to work better than some in-tree drivers I have seen in the past.
However, I'm confused as to the above and what it implies for the purpose of the staging tree. Wasn't the whole point of the staging tree to have a working-but-ugly driver upstream and have the work to clean it up happen in the mainline tree instead of off somewhere.
Yes, but even staging has some standards. For example, they frown on inclusion of firmware in a massive data block in a file in the driver - it should be in a separate file the /lib/firmware/ tree. In addition, the mainline drivers/net/wireless/ tree is only available to devices that use mac80211 for the software-based MAC layer. That conversion is a serious effort that may never be done, thus the 8723au driver may never leave staging.
What are the details of the build failure on the mainline tree? It builds fine here. One possibility is that your source tree has a leftover copy of include/linux/version.h that contains a stale coded value of the kernel version. I just pushed a Makefile fix that causes the compiler to look in the new location for version.h first. If that doesn't work, please post the error.
Larry
Quoted 7 lines · Larry Finger
Quoted 6 lines · H. Peter Anvin
So I can verify that this driver works against 3.8.11 (not against current -linus because of a build failure), and yes, there is Bluetooth in this device. In fact, it seems to work better than some in-tree drivers I have seen in the past.
Quoted 6 lines
Quoted 4 lines
However, I'm confused as to the above and what it implies for the purpose of the staging tree. Wasn't the whole point of the staging tree to have a working-but-ugly driver upstream and have the work to clean it up happen in the mainline tree instead of off somewhere.
Yes, but even staging has some standards.
I have standards? That's a first :)
Quoted 3 lines
For example, they frown on inclusion of firmware in a massive data block in a file in the driver - it should be in a separate file the
/lib/firmware/tree.
Sure, that would be "nice", but it's not something that I should reject a driver for, have I done that?
Quoted 4 lines
In addition, the mainline
drivers/net/wireless/tree is only available to devices that use mac80211 for the software-based MAC layer. That conversion is a serious effort that may never be done, thus the 8723au driver may never leave staging.
That's a bigger deal, but note, some drivers have done it, it is not impossible.
thanks,
greg k-h
Quoted 20 lines · Larry Finger
Quoted 10 lines · H. Peter Anvin
So I can verify that this driver works against 3.8.11 (not against current -linus because of a build failure), and yes, there is Bluetooth in this device. In fact, it seems to work better than some in-tree drivers I have seen in the past.
However, I'm confused as to the above and what it implies for the purpose of the staging tree. Wasn't the whole point of the staging tree to have a working-but-ugly driver upstream and have the work to clean it up happen in the mainline tree instead of off somewhere.
Yes, but even staging has some standards. For example, they frown on inclusion of firmware in a massive data block in a file in the driver - it should be in a separate file the
/lib/firmware/tree. In addition, the mainlinedrivers/net/wireless/tree is only available to devices that use mac80211 for the software-based MAC layer. That conversion is a serious effort that may never be done, thus the 8723au driver may never leave staging.
Quoted 7 lines
What are the details of the build failure on the mainline tree? It builds fine here. One possibility is that your source tree has a leftover copy of
include/linux/version.hthat contains a stale coded value of the kernel version. I just pushed aMakefilefix that causes the compiler to look in the new location forversion.hfirst. If that doesn't work, please post the error.
Unlikely, since the kernel source tree is clean.
The error is on os_dep/os_intfs.c:
/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c: In function ‘rtw_proc_init_one’:/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:315:3: error: implicit declaration of function ‘create_proc_entry’ [-Werror=implicit-function-declaration] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:315:11: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:322:3: error: implicit declaration of function ‘create_proc_read_entry’ [-Werror=implicit-function-declaration] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:322:9: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:333:21: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:364:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:370:7: error: dereferencing pointer to incomplete type /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:372:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:378:7: error: dereferencing pointer to incomplete type /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:381:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:389:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:397:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:405:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:412:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:419:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:426:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:433:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:440:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:447:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:454:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:461:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:468:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:475:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:482:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:489:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:496:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:505:9: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:512:9: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:522:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:539:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:545:7: error: dereferencing pointer to incomplete type /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:547:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:553:7: error: dereferencing pointer to incomplete type /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:555:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:561:7: error: dereferencing pointer to incomplete type /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:563:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:569:7: error: dereferencing pointer to incomplete type /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:572:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:576:8: warning: assignment makes pointer from integer without a cast [enabled by default] /home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:582:7: error: dereferencing pointer to incomplete type
Quoted 8 lines · H. Peter Anvin
Unlikely, since the kernel source tree is clean.
The error is on
os_dep/os_intfs.c:
/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c: In function ?rtw_proc_init_one?:/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:315:3: error: implicit declaration of function ?create_proc_entry?
create_proc_entry is gone (and good riddance); use proc_create()
Quoted 2 lines
/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:322:3: error: implicit declaration of function ?create_proc_read_entry?
ditto.
Quoted 2 lines
/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:370:7: error:
dereferencing pointer to incomplete type
... and don't poke in proc_dir_entry innards, while we are at it.
Quoted 15 lines · Greg KH
Quoted 7 lines · Larry Finger
Quoted 6 lines · H. Peter Anvin
So I can verify that this driver works against 3.8.11 (not against current -linus because of a build failure), and yes, there is Bluetooth in this device. In fact, it seems to work better than some in-tree drivers I have seen in the past.
Quoted 6 lines
Quoted 4 lines
However, I'm confused as to the above and what it implies for the purpose of the staging tree. Wasn't the whole point of the staging tree to have a working-but-ugly driver upstream and have the work to clean it up happen in the mainline tree instead of off somewhere.
Yes, but even staging has some standards.
Quoted 8 lines
I have standards? That's a first :)
Quoted 3 lines
For example, they frown on inclusion of firmware in a massive data block in a file in the driver - it should be in a separate file the
/lib/firmware/tree.Sure, that would be "nice", but it's not something that I should reject a driver for, have I done that?
No. You merely "recommended" that it be the #1 item in the TODO list, which forced me to fix it fairly quickly for r8712u.
Quoted 8 lines
Quoted 5 lines
In addition, the mainline
drivers/net/wireless/tree is only available to devices that use mac80211 for the software-based MAC layer. That conversion is a serious effort that may never be done, thus the 8723au driver may never leave staging.That's a bigger deal, but note, some drivers have done it, it is not impossible.
Most of them were in the kernel before mac80211, and have been given a pass as part of a "grandfather" clause.
Unfortunately, I forgot the main reason for development in an off-line repo. I do not have one of these devices, and I have drawn the line at purchasing a $1000 Lenovo tablet just to get one. Making "small" untested changes in the off-line repo for the users to verify is a lot simpler than working through staging, no matter how accommodating you are. :)
If someone wants to donate a device, that would speed up the process.
Larry
Quoted 106 lines · H. Peter Anvin
Quoted 20 lines · Larry Finger
Quoted 10 lines · H. Peter Anvin
So I can verify that this driver works against 3.8.11 (not against current -linus because of a build failure), and yes, there is Bluetooth in this device. In fact, it seems to work better than some in-tree drivers I have seen in the past.
However, I'm confused as to the above and what it implies for the purpose of the staging tree. Wasn't the whole point of the staging tree to have a working-but-ugly driver upstream and have the work to clean it up happen in the mainline tree instead of off somewhere.
Yes, but even staging has some standards. For example, they frown on inclusion of firmware in a massive data block in a file in the driver - it should be in a separate file the
/lib/firmware/tree. In addition, the mainlinedrivers/net/wireless/tree is only available to devices that use mac80211 for the software-based MAC layer. That conversion is a serious effort that may never be done, thus the 8723au driver may never leave staging.Quoted 7 lines
What are the details of the build failure on the mainline tree? It builds fine here. One possibility is that your source tree has a leftover copy of
include/linux/version.hthat contains a stale coded value of the kernel version. I just pushed aMakefilefix that causes the compiler to look in the new location forversion.hfirst. If that doesn't work, please post the error.Unlikely, since the kernel source tree is clean.
The error is on
os_dep/os_intfs.c:
/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c: In function ‘rtw_proc_init_one’:/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:315:3: error: implicit declaration of function ‘create_proc_entry’ [-Werror=implicit-function-declaration]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:315:11: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:322:3: error: implicit declaration of function ‘create_proc_read_entry’ [-Werror=implicit-function-declaration]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:322:9: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:333:21: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:364:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:370:7: error: dereferencing pointer to incomplete type/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:372:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:378:7: error: dereferencing pointer to incomplete type/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:381:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:389:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:397:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:405:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:412:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:419:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:426:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:433:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:440:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:447:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:454:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:461:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:468:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:475:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:482:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:489:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:496:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:505:9: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:512:9: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:522:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:539:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:545:7: error: dereferencing pointer to incomplete type/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:547:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:553:7: error: dereferencing pointer to incomplete type/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:555:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:561:7: error: dereferencing pointer to incomplete type/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:563:8: warning: assignment makes pointer from integer without a cast [enabled by default]
Quoted 8 lines
/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:569:7: error: dereferencing pointer to incomplete type/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:572:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:576:8: warning: assignment makes pointer from integer without a cast [enabled by default]/home/hpa/kernel/rtl8723au/os_dep/os_intfs.c:582:7: error: dereferencing pointer to incomplete type
I just pushed a "fix" that will allow the driver to build on kernel 3.10-rc0 (aka 3.9-git). This one removes all the procfs stuff. It will be added back in /sysfs later.
Larry