Bug 83631

Summary: RTL8187SE Performance issues
Product: Drivers Reporter: ZED (ghostz191989)
Component: network-wirelessAssignee: drivers_network-wireless (drivers_network-wireless)
Status: NEW ---    
Severity: high CC: andrea.merello
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 3.16 Subsystem:
Regression: No Bisected commit-id:
Attachments: rtl818x cumulative for 3.16
Fix response rate patch.

Description ZED 2014-09-01 01:15:18 UTC
I have the wireless card RTL8187SE in my laptop. This card works well until kernel 3.14 the problem begins with 3.15 and above. In the same wireless environment and with 3.16 kernel the connection with wifi AP is losing many packets. Network-manager and iwlist shows the link-quality and signal at 15/100.

A friend has exported the driver from 3.14 kernel and we imported to 3.16(after blacklist the current driver) and the problem seems to be solved but I need a stable solution.

https://github.com/freestyl3r/rtl8187se
Comment 1 Andrea Merello 2014-09-02 15:46:08 UTC
The signal strength indication in rtl818x_pci driver is not enabled yet for rtl8187se. It always reports a dummy number regardless the real signal strength.

I have a patch that adds support for it. This has been not merged in the driver yet because I need someone that tests it (but I'm quite confident it should -at least rougly- work).

Cold you please do that for me ?
http://marc.info/?l=linux-wireless&m=140155388332534&w=2

Please don't expect the same signal strength reported by the older driver: They are probably not is the same scale. 

Just to give you an idea, I expect the reported signal to be about -80dBm to -90dBm when the signal is very poor, rising to something like -40dBm when the signal is very strong.

Despite the stuck signal indicator may suggest "the thing is bad" at the very first look, do you confirm that the performance problem has really exists on both 3.15 and 3.16 ?

Can you please check, and report, the link rate with the old (3.14) driver and with the newer one (I mean the reported link speed, not the measured throughput) ?

Can you please try to force the link rate on the newer driver to the same link rate you get using the older driver, and check if the actual performances of the new driver increase this way?
Comment 2 ZED 2014-09-25 16:36:10 UTC
I used your patch with patch command for 3.15 and 3.16 and the result is this

patching file drivers/net/wireless/rtl818x/rtl8180/dev.c
Hunk #3 succeeded at 232 with fuzz 2.
Hunk #4 FAILED at 241.
Hunk #5 FAILED at 279.
Hunk #6 FAILED at 289.
Hunk #7 FAILED at 1823.
4 out of 7 hunks FAILED -- saving rejects to file drivers/net/wireless/rtl818x/rtl8180/dev.c.rej
patch unexpectedly ends in middle of line

The Link speed is the same with the old and the new driver.
Comment 3 Andrea Merello 2014-09-25 18:16:38 UTC
Created attachment 151891 [details]
rtl818x cumulative for 3.16
Comment 4 Andrea Merello 2014-09-25 18:18:04 UTC
Sorry, the former patch was intended for wireless-testing tree.

I just added a cumulative patch, that you may apply to your 3.16 kernel. This 
contains latest fixes and should make you able to apply the RSSI patch on top of it.
Comment 5 ZED 2014-10-02 20:22:19 UTC
Unfortunately I got an error also with this patch.

https://bpaste.net/show/d1577570eb61
Comment 6 ZED 2014-10-02 21:46:41 UTC
Forgot to mention that I was trying to apply it to 3.16
Comment 7 ZED 2014-10-08 19:14:25 UTC
I was try also with 3.17 your RSSI patch seems to work with 77% signal strength while the old driver from 3.14 shows 85% in the same environment. The performance is still poor.
Comment 8 Andrea Merello 2014-10-08 23:04:01 UTC
About the signal strength, difference between old and new driver could be ok: this is probably just due to different measure unit in reported signal strength. If you run iw wlan0 link (assuming your card is wlan0) you should get measurement in absolute dBm unit.

About performance I have two new patches. One has been just merged in wireless testing tree (possibly it may appply on top of your 3.17 + rssi patch kernel) and the other is on my PC waiting for me having some time to check it once more time..

Possibly next days I will see if the former patch applies on the said kernel, otherwise I will post some rebased version here
Comment 9 Andrea Merello 2014-10-11 18:41:27 UTC
Created attachment 153251 [details]
Fix response rate patch.

This patch should apply on top of: 3.17+rssi_patch
Comment 10 ZED 2014-10-24 17:31:44 UTC
I have apply the latest patch you gave me. The results are much better almost the same with the old driver.

old driver(3.14.22 Kernel): 9.26 Mbps Throughput
new driver + your patches(3.17.1 Kernel): 9.03 Mbps Throughput

The packet loss is the same 1% both.

I will try to test with another AP because the packet loss is maybe a problem from the current AP.

Thank you very much and keep up the good work.
Comment 11 ZED 2015-02-19 12:47:58 UTC
Hello again. When this driver is gonna be in the kernel officially?