Jump to content

OrangePI 2 wifi driver issue in mainline dev (4.10)


rufik

Recommended Posts

I've build an dev image for my OrangePi 2 (kernel 4.10) to try mainline kernel and got into troubles with onboard wifi. It works fine in legacy with 8189es module, but there is no 8189es module in mainline image. So I tried 8189fs but it's not working.

 

After doing some search I've managed to build 8189es module myself using https://github.com/jwrdegoede/rtl8189ES_linux.gitrepository. Quick manual:

git clone https://github.com/jwrdegoede/rtl8189ES_linux.git
cd rtl8189ES_linux/
make ARCH=arm KSRC=/usr/src/linux-headers-$(uname -r) CROSS_COMPILE=
sudo mkdir /lib/modules/4.10.0-sun8i/kernel/drivers/net/wireless/realtek/rtl8189es/
sudo cp 8189es.ko /lib/modules/4.10.0-sun8i/kernel/drivers/net/wireless/realtek/rtl8189es/
sudo depmod -a
sudo modprobe 8189es

I'd suspect that this issue applies to all boards with RTL8189ETV sdio wifi (OPI 2, OPI+2, NanoPI A64, etc). And the question is - why this driver is missing in default armbian repo?

 

Link to comment
Share on other sites

why this driver is missing in default armbian repo?

 

Since Hans started to play around is possible, that driver will find a way upstream and we won't need to add it with a patch. Anyway, this kernel is Work In Progress and if you see something missing or you find a bug and know how to fix it, you are welcome to help. We can't address all issues.

Link to comment
Share on other sites

Since Hans started to play around is possible, that driver will find a way upstream and we won't need to add it with a patch. 

Hm. I'm not sure about that.

 

And the question is - why this driver is missing in default armbian repo?

Feel free to convert this driver to in-tree one and making a pull request if you want to solve this problem sooner than later.

Link to comment
Share on other sites

I've just tried to build driver on kernel 4.11.0 but got some nasty errors:

 

Spoiler

rufik@opi:~/workspace/rtl8189ES_linux$ make ARCH=arm KSRC=/usr/src/linux-headers-4.11.0-sun8i CROSS_COMPILE=
make ARCH=arm CROSS_COMPILE= -C /usr/src/linux-headers-4.11.0-sun8i M=/home/rufik/workspace/rtl8189ES_linux  modules
make[1]: Entering directory '/usr/src/linux-headers-4.11.0-sun8i'
  CC [M]  /home/rufik/workspace/rtl8189ES_linux/core/rtw_cmd.o
In file included from /home/rufik/workspace/rtl8189ES_linux/include/drv_types.h:32:0,
                 from /home/rufik/workspace/rtl8189ES_linux/core/rtw_cmd.c:22:
/home/rufik/workspace/rtl8189ES_linux/include/osdep_service.h: In function thread_enter’:
/home/rufik/workspace/rtl8189ES_linux/include/osdep_service.h:343:2: error: implicit declaration of function allow_signal [-Werror=implicit-function-declaration]
  allow_signal(SIGTERM);
  ^
/home/rufik/workspace/rtl8189ES_linux/include/osdep_service.h: In function flush_signals_thread’:
/home/rufik/workspace/rtl8189ES_linux/include/osdep_service.h:353:6: error: implicit declaration of function signal_pending [-Werror=implicit-function-declaration]
  if (signal_pending (current))
      ^
/home/rufik/workspace/rtl8189ES_linux/include/osdep_service.h:355:3: error: implicit declaration of function flush_signals [-Werror=implicit-function-declaration]
   flush_signals(current);
   ^
cc1: some warnings being treated as errors
scripts/Makefile.build:294: recipe for target '/home/rufik/workspace/rtl8189ES_linux/core/rtw_cmd.o' failed
make[2]: *** [/home/rufik/workspace/rtl8189ES_linux/core/rtw_cmd.o] Error 1
Makefile:1492: recipe for target '_module_/home/rufik/workspace/rtl8189ES_linux' failed
make[1]: *** [_module_/home/rufik/workspace/rtl8189ES_linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.11.0-sun8i'
Makefile:1640: recipe for target 'modules' failed
make: *** [modules] Error 2

 

 

 

So I've made quick fix, here is PR to Hans' repo: https://github.com/jwrdegoede/rtl8189ES_linux/pull/2

Works quite fine:

[Thu May  4 14:18:59 2017] 8189es: loading out-of-tree module taints kernel.
[Thu May  4 14:18:59 2017] bFWReady == _FALSE call reset 8051...
[Thu May  4 14:19:00 2017] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[Thu May  4 14:19:00 2017] ==> rtl8188e_iol_efuse_patch
[Thu May  4 14:19:00 2017] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[Thu May  4 14:19:00 2017] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

#ifconfig
wlan0     Link encap:Ethernet  HWaddr 00:e0:4c:f0:1c:fd
          inet addr:xxx.xxx.xxx.6  Bcast:xxx.xxx.xxx.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2426 (2.4 KB)  TX bytes:3674 (3.6 KB)

 

 

I'll try to adopt it as in-tree in the meantime...

 

Link to comment
Share on other sites

5 minutes ago, rufik said:

So I've made quick fix, here is PR to Hans' repo: https://github.com/jwrdegoede/rtl8189ES_linux/pull/2

The fix was already included in the driver: https://github.com/jwrdegoede/rtl8189ES_linux/pull/1/files

Also this fix was already integrated into the in-tree driver patch, but I'm not sure if the driver was enabled in the kernel config after fixing it.

Link to comment
Share on other sites

6 minutes ago, zador.blood.stained said:

Don't have any boards with 8189es chip, so can't test if 8189fs driver works with them, sorry.

 

Yeah, I have OPI 2, so I'll do it :)

I just wonder what is the difference between ES and FS versions...

Link to comment
Share on other sites

Tested. The FS version does not work on OPI 2 kernel 4.11.0 at all, iface does not show up:

# lsmod
Module                  Size  Used by
8189fs                839680  0

# dmesg
[Fri May  5 14:17:11 2017] ######platform_wifi_power_on:

# ifconfig wlan0
wlan0: error fetching interface information: Device not found

 

So, it looks like this driver should be fetched from master branch with my PR and converted to in-tree as RTL8189ES.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines