Re: [PATCH] Alternate rtl8192cu driver.

2015-07-22 Thread P. Varet

Back home! Thanks for the reply, Greg. I'll do that, then.

Cheers,

-- P.


On 10/07/15 21:28, Greg KH wrote:

On Fri, Jul 10, 2015 at 07:54:30PM +0200, P. Varet wrote:

Here's what I see on my side. I'll try to be as thorough as I can.


snip

Please send this to the maintainer of the driver, and the linux-wireless
mailing list.  The people there can help you out much more so than the
people on this driverdev-devel mailing list.

thanks,

greg k-h


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Alternate rtl8192cu driver.

2015-07-10 Thread P. Varet

Hi Dan, hi all,


On 08/07/15 12:36, Dan Carpenter wrote:


The bug report says that it connects fine.  Then in 10 minutes the
connection dies and reconnects.  Is connecting an issue for you?


Oh, I was under the impression that the person who connects fine then 
loses the connection sporadically had applied out-of-repository patches 
-- guess you're right, that bug is a jumbled mess.


Here's what I see on my side. I'll try to be as thorough as I can.

I tried first with the Realtek driver (as in, the one available on my 
github repo, that actually works), and scanned for access points using 
NetworkManager, then manually with iwlist in order to rule out a problem 
with NM. Then I repeated the same operations with the in-kernel driver. 
I kept the logs of all cases (attached herein).


With the Realtek driver: the logs for when I load the module are in the 
attached file, module-load-realtek.log. The driver itself isn't very 
talkative, most of the logs are NetworkManager taking note of the device.


The logs of when I then tell NM to activate WiFi are in 
nm-enable-realtek.log.


With that driver, NM scans and finds my access point, and autoconnects 
to it.


I verified that after modprobing the driver, I can ifconfig the device 
up, manually scan the neighborhood with 'iwlist wlan0 scan', and see the 
access point.


Now, with the in-kernel driver. The logs for when I load it are in 
module-load-inkernel.log. The logs are somewhat more verbose, though not 
that much. I see nothing in there that would explain the problems.


When I then fire up the WiFi from NetworkManager, the logs 
(nm-enable-inkernel.log) are mostly identical up until the point where 
the interface state goes from ready to inactive. After this point, 
however, NetworkManager doesn't see any access point, and stops there.


Once again, I used iwlist to scan for access points. Unlike with the 
Realtek driver, this requires turning on the interface with the rfkill 
command, but I don't think that's abnormal; I'm assuming this additional 
level of control is a benefit of the in-kernel driver. With the 
in-kernel driver, however, iwlist sees no access point (No scan 
results). iw dev wlan0 scan doesn't show anything either.


There are no errors in the logs or on stderr. It's like the driver and 
the wireless tools all think that everything is fine, they just fail to 
see any access point, like the device just wasn't listening on its antenna.


Note: this is a slightly different from the behavior I was seeing way 
back when I purchased that device and first discovered it was not 
properly supported, somewhere around the time of kernel 3.10: back then, 
the nearby access points WERE visible, but the connection would fail to 
come up, like the device lost interest in listening to its antenna after 
a few packets.


The TL;DR of that is the device doesn't work with the official driver 
and I have no useful information to provide as to why, which sucks.


Note: I also tried loading the module with the swenc=1 parameter, as 
suggested in the bug report thread, but the result was identical.


As well: I dug out a 32 bits bootable image with the same kernel I'm 
running (3.19.0). The symptoms are identical to what I see on my 64 bits 
kernel. I don't know if that's the expected outcome.


At this point I can only see a few general approaches:

1/ Is it possible dump packets from the wireless interface (with 
tcpdump, for instance) before the connection to the access point has 
been established? Would such a dump help?


2/ Bisect the in-kernel module until I find the exact patch where things 
stopped working. (Do I need to be running that exact kernel version or 
can I bisect only the module?)


3/ Get the module maintainer the same device I own and hope they can 
reproduce the issue. (Is that a thing that people do?)


Otherwise... I'm kind of stumped.


And Greg wrote:


Why?  That's better than you will get from any other operating system,
where you don't have access to the developers who wrote the code, nor
even the company.  You have a chance here, much more so than anywhere
else.


I may have misunderstood the spirit of your comment! I thought you meant 
that a theoretically supported device staying unusable for upward of two 
years was business as usual, which was /definitely/ a discomfiting 
thought. :)


Cheers,

-- P.
kernel: rtl8192cu: Chip version 0x11
kernel: rtl8192cu: MAC address: ec:1a:XX:XX:XX:XX
kernel: rtl8192cu: Board Type 0
kernel: rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
kernel: rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
kernel: ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
kernel: usbcore: registered new interface driver rtl8192cu
NetworkManager[829]: info (wlan0): using nl80211 for WiFi device control
NetworkManager[829]: info (wlan0): driver supports Access Point (AP) mode
NetworkManager[829]: info (wlan0): new 802.11 WiFi device (driver: 'rtl8192cu' ifindex: 6)
NetworkManager[829]: 

Re: [PATCH] Alternate rtl8192cu driver.

2015-07-07 Thread P. Varet

On 07/06/2015 07:13 PM, Greg KH wrote:


But, have you tried the in-kernel driver for this device?


Hi Greg! Yes, I have. Sorry for not making this clear. The symptoms are as 
described in bug #57171. I haven't tested it again in recent months but I can do 
that for you when I'm back home if you want.


I too would very much prefer to see the in-kernel driver fixed. It doesn't seem 
to be happening, though. I don't have the specific knowledge to help fix it.


I share your misgivings about having redundant drivers. My idea was that maybe 
we could restrict this alternate driver to USB device IDs that are known to work 
well with it but not with the in-kernel driver, at least until the in-kernel 
driver is fixed, since the main issue here is that the in-kernel driver 
currently doesn't support those devices even though it claims to.


This is only a stopgap that isn't meant to stay indefinitely, though. It's a 
generally very unsatisfying solution, but I don't know how else to keep those 
devices supported until the in-kernel driver is fixed.


Mind you, if this discussion unlocks things and the in-kernel driver gets fixed, 
that's definitely the best outcome as far as I'm concerned. :)


Cheers,

-- P.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Alternate rtl8192cu driver.

2015-07-07 Thread P. Varet

On 07/07/15 11:54, Dan Carpenter wrote:


https://bugzilla.kernel.org/show_bug.cgi?id=57171

This bug is a confusing mix of issues and it seems to be fixed.  Just
use network manager.


Hi Dan! Thank you for your reply!

I gave it another try, then. The behavior was the same as described 
before, and the device failed to work, as before. That's with kernel 
3.19.0 and NetworkManager 0.9.10 (both from the latest stable Ubuntu 
release).


The last commenter on that bug report appears to have given up on 
helping fix it after finding a version of Realtek's driver patched to 
work on recent kernels... So, what I've been offering. I find myself 
hoping that my work hasn't in fact slowed down the actual bug getting fixed.



If there are still an issues we can start a new
thread with Larry Finger and linux-wireless in the CC list.


That would probably help, yes. Thanks, Dan. :)

In the meanwhile, shouldn't we officially consider the affected devices 
unsupported? I don't very much like the idea of people buying said 
devices in good faith and then realizing that they're in fact not usable 
on Linux by default. (Mind, I have no idea what the proper policy is in 
those matter. Does this suggestion make any sense?)


Cheers,

-- P.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Alternate rtl8192cu driver.

2015-07-06 Thread P. Varet

On 07/06/2015 06:47 PM, Greg KH wrote:


How about making it a patch for drivers/staging/ ?  That way the code
can get cleaned up in-tree by others?


Ah, I thought that was what I did? As in, I checked out the kernel git 
repository, moved the driver code into drivers/staging/, and used git diff to 
generate the attached patch. What did I do wrong?


Cheers,

-- P.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel