A few months ago, I bought an Alfa AWUS036ac USB wireless adapter, since my desktop is no longer near an ethernet port. Some work is needed to help the thing be recognized as a wlan device on Ubuntu.
Recent changes to GCC and libc, though, have made it a little more complicated than just following the instructions provided with the Linux driver.
In the hope that someone might be helped a little bit by this, here’s what I did to get the AWUS036ac working on Ubuntu 15.10.
Untar
rtl8821AU_linux_v4.3.14.13455.20150212_BTCOEX20150128-51.tar.gz
. You’ll need to make some changes.Recent GCCs error if the build is non-reproducible because of using the date or time macros. In the
driver
directory, add the following to the Makefile:EXTRA_CFLAGS += -Wno-error=date-time
You’ll need to comment out section of
install.sh
that extracts the tarball, since, of course, you don’t want your changes overwritten.file_path
is now an exported symbol, so there will be an error for redfinition:redeclared as different kind of symbol
. To fix this, you’ll need to rename thefile_path
variable in the driver source something else. You can do this by entering thedriver
directory and runningfind . -type f | xargs sed -i 's/file_path/file_path_custom/g'
In
driver/rtl.../os_dep/linux/
, you’ll need to editrtw_android.c
to avoid usingstrnicmp
, since that’s not in the C standard. You’ll need to make a quick change by adding the following line:#DEFINE strnicmp strncasecmp
Then, just run the changed
install.sh
script as root. The driver should install. If you update your kernel at all (as Ubuntu is wont to do), you’ll need to re-run the script, but you won’t need to make all these changes again.
I got a lot of this stuff from http://askubuntu.com/questions/573737/alfa-awus036ac-usb-wifi-adapter and http://stackoverflow.com/questions/1784767/.
Edit [2016-05-03]: On upgrading to Ubuntu 16.04, with its 4.4 kernel, there was an additional change. In the driver directory, in rtw_debug.h
, there are a couple errors because seq_printf
is void, not int. So, there are two places where you’ll need to get rid of the if
surrounding use of _seqdump
, which is on lines 232 and 242.