Bug 12794
Summary: | BCM4320a poor performance with rndis_wlan (was: rndis_wlan causes segmentation fault) | ||
---|---|---|---|
Product: | Drivers | Reporter: | Pitxyoki (Pitxyoki) |
Component: | network-wireless | Assignee: | Jussi Kivilinna (jussi.kivilinna) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | jussi.kivilinna |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.32-rc5 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
Fix support for bcm4320a
Fix too late initialization of workqueue/work dhclient only able to connect on even attempts Can't connect using iwconfig/dhclient This patch fixes iwconfig setup for rndis_wlan. New patch (v2) for iwconfig setup problem Four test cases using the most recent kernel/driver + patch for iwconfig Fix buffer overflow in rndis_wlan Disable 'stalled link' -workaround Patch 1/2 of tx-power reporting fix 2/2 patch for fixing tx-power reporting |
Description
Pitxyoki
2009-03-01 05:25:40 UTC
Created attachment 21019 [details]
Fix support for bcm4320a
This patch disables configuration parameters for bcm4320a variant, as bcm4320a INF-file doesn't include theim either. Trying to set parameters which are for bcm4320b on bcm4320a might mess up device too much.
Created attachment 21020 [details] Fix too late initialization of workqueue/work I noticed something is actually wrong in driver (and ofcourse messed up device shouldn't cause oops anyway.. I should try to avoid late night coding). So here's new patch, haven't compile tested yet, should be ok (it's for 2.6.29)... rndis_wlan: fix initialization order for workqueue/worker rndis_wext_link_change() might be called from rndis_command() at initialization stage and priv->workqueue/priv->work have not been initialized yet, resulting oops. Initialize workqueue/work in rndis_wext_bind() before rndis_host usage. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Fixed in mainline, http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e805e4d0b53506dff4255a2792483f094e7fcd2c Hi, Using kernel 2.6.30-rc5, there is no segfault anymore. However, my wireless adapter is still not connecting. It is shown on ifconfig and iwconfig, but ifupping it does not work. Notice that the MAC address for the interface is still shown as 01:0a:00:00:00:00. See below the output for ifconfig and iwconfig. When I plug it in, /var/log/syslog shows: May 15 18:10:15 C-5 kernel: [ 101.576026] usb 2-2: new full speed USB device using uhci_hcd and address 3 May 15 18:10:15 C-5 kernel: [ 101.751319] usb 2-2: New USB device found, idVendor=13b1, idProduct=000e May 15 18:10:15 C-5 kernel: [ 101.751324] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 May 15 18:10:15 C-5 kernel: [ 101.751328] usb 2-2: Product: Linksys Wireless-G USB Network Adapter with SpeedBooster May 15 18:10:15 C-5 kernel: [ 101.751332] usb 2-2: Manufacturer: Cisco-Linksys May 15 18:10:15 C-5 kernel: [ 101.751335] usb 2-2: SerialNumber: 1111 May 15 18:10:15 C-5 kernel: [ 101.751452] usb 2-2: configuration #1 chosen from 1 choice May 15 18:10:15 C-5 kernel: [ 101.886551] usbcore: registered new interface driver cdc_ether May 15 18:10:16 C-5 kernel: [ 102.046373] usbcore: registered new interface driver rndis_host May 15 18:10:16 C-5 kernel: [ 102.337315] rndis_wlan 2-2:1.0: rndis media disconnect May 15 18:10:16 C-5 kernel: [ 102.492425] wlan0: register 'rndis_wlan' at usb-0000:00:1d.1-2, Wireless RNDIS device, BCM4320a based, 01:0a:00:00:00:00 May 15 18:10:16 C-5 kernel: [ 102.492461] usbcore: registered new interface driver rndis_wlan [18:10:30] C-5:~# ifconfig -a eth1 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:17 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:200 (200.0 B) TX bytes:200 (200.0 B) wlan0 Link encap:Ethernet HWaddr 01:0a:00:00:00:00 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) [18:10:34] C-5:~# iwconfig lo no wireless extensions. eth1 no wireless extensions. wlan0 IEEE802.11bg ESSID:off/any Mode:Managed Frequency:2.412 GHz Bit Rate=54 Mb/s Tx-Power=14 dBm RTS thr=2347 B Fragment thr=2346 B Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 [18:10:37] C-5:~# ifup wlan0 Internet Systems Consortium DHCP Client V3.1.1 Copyright 2004-2008 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ SIOCSIFFLAGS: Cannot assign requested address SIOCSIFFLAGS: Cannot assign requested address Listening on LPF/wlan0/01:0a:00:00:00:00 Sending on LPF/wlan0/01:0a:00:00:00:00 Sending on Socket/fallback receive_packet failed on wlan0: Network is down DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4 send_packet: Network is down DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4 send_packet: Network is down DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9 send_packet: Network is down DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11 send_packet: Network is down DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10 send_packet: Network is down DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11 send_packet: Network is down DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8 send_packet: Network is down DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4 send_packet: Network is down No DHCPOFFERS received. Also, I noticed that this gets written to /etc/udev/rules.d/70-persistent-net.rules : [18:12:13] C-5:~# cat /etc/udev/rules.d/70-persistent-net.rules # This file was automatically generated by the /lib/udev/write_net_rules # program, run by the persistent-net-generator.rules rules file. # # You can modify it, as long as you keep each rule on a single # line, and change only the value of the NAME= key. # PCI device 0x11ab:0x4362 (sky2) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="XX:XX:XX:XX:XX:XX", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" # USB device 0x:0x (rndis_wlan) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="01:0a:00:00:00:00", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0" Regards, Pitxyoki Have you tried the first patch on this page? The "Fix support for bcm4320a" one? Sorry, I thought that patch had also been included in mainline. Yes, I can finally connect (I'm actually writing this using a 2.6.30-rc6 kernel)! I'm still having a problem: I can only connect if I disable MAC filtering on my router. Here are the steps I followed to get connected: 1. Connected the interface /var/log/syslog: May 17 14:32:06 C-5 kernel: [ 169.281017] usb 2-2: new full speed USB device using uhci_hcd and address 3 May 17 14:32:06 C-5 kernel: [ 169.455928] usb 2-2: New USB device found, idVendor=13b1, idProduct=000e May 17 14:32:06 C-5 kernel: [ 169.455933] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 May 17 14:32:06 C-5 kernel: [ 169.455938] usb 2-2: Product: Linksys Wireless-G USB Network Adapter with SpeedBooster May 17 14:32:06 C-5 kernel: [ 169.455941] usb 2-2: Manufacturer: Cisco-Linksys May 17 14:32:06 C-5 kernel: [ 169.455944] usb 2-2: SerialNumber: 1111 May 17 14:32:06 C-5 kernel: [ 169.456097] usb 2-2: configuration #1 chosen from 1 choice May 17 14:32:06 C-5 kernel: [ 169.551386] usbcore: registered new interface driver cdc_ether May 17 14:32:07 C-5 kernel: [ 169.706991] usbcore: registered new interface driver rndis_host May 17 14:32:07 C-5 kernel: [ 169.809942] rndis_wlan 2-2:1.0: rndis media disconnect May 17 14:32:07 C-5 kernel: [ 169.965726] wlan0: register 'rndis_wlan' at usb-0000:00:1d.1-2, Wireless RNDIS device, BCM4320a based, XX:XX:XX:XX:XX:XX May 17 14:32:07 C-5 kernel: [ 169.965775] usbcore: registered new interface driver rndis_wlan 2. # ifup wlan0: /var/log/syslog: May 17 14:32:23 C-5 dhclient: Internet Systems Consortium DHCP Client V3.1.1 May 17 14:32:23 C-5 dhclient: Copyright 2004-2008 Internet Systems Consortium. May 17 14:32:23 C-5 dhclient: All rights reserved. May 17 14:32:23 C-5 dhclient: For info, please visit http://www.isc.org/sw/dhcp/ May 17 14:32:23 C-5 dhclient: May 17 14:32:23 C-5 kernel: [ 186.251833] ADDRCONF(NETDEV_UP): wlan0: link is not ready May 17 14:32:24 C-5 dhclient: Listening on LPF/wlan0/XX:XX:XX:XX:XX:XX May 17 14:32:24 C-5 dhclient: Sending on LPF/wlan0/XX:XX:XX:XX:XX:XX May 17 14:32:24 C-5 dhclient: Sending on Socket/fallback May 17 14:32:26 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6 May 17 14:32:32 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13 May 17 14:32:45 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20 May 17 14:33:05 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12 May 17 14:33:17 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9 May 17 14:33:25 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 1 May 17 14:33:26 C-5 dhclient: No DHCPOFFERS received. May 17 14:33:26 C-5 dhclient: No working leases in persistent database - sleeping. 3. # ifdown wlan0 # iwconfig wlan0 essid MYESSID # iwconfig wlan0 key MYKEY /var/log/syslog: May 17 14:37:19 C-5 kernel: [ 482.003494] rndis_wlan 2-2:1.0: rndis media connect 4. # dhclient wlan0 /var/log/syslog: May 17 14:37:32 C-5 dhclient: Internet Systems Consortium DHCP Client V3.1.1 May 17 14:37:32 C-5 dhclient: Copyright 2004-2008 Internet Systems Consortium. May 17 14:37:32 C-5 dhclient: All rights reserved. May 17 14:37:32 C-5 dhclient: For info, please visit http://www.isc.org/sw/dhcp/ May 17 14:37:32 C-5 dhclient: May 17 14:37:32 C-5 kernel: [ 495.582947] rndis_wlan 2-2:1.0: rndis media disconnect May 17 14:37:33 C-5 kernel: [ 495.730192] ADDRCONF(NETDEV_UP): wlan0: link is not ready May 17 14:37:34 C-5 dhclient: Listening on LPF/wlan0/XX:XX:XX:XX:XX:XX May 17 14:37:34 C-5 dhclient: Sending on LPF/wlan0/XX:XX:XX:XX:XX:XX May 17 14:37:34 C-5 dhclient: Sending on Socket/fallback May 17 14:37:37 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3 May 17 14:37:40 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5 May 17 14:37:45 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12 May 17 14:37:57 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17 May 17 14:38:14 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20 May 17 14:38:34 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4 May 17 14:38:38 C-5 dhclient: No DHCPOFFERS received. May 17 14:38:38 C-5 dhclient: No working leases in persistent database - sleeping. 5. After removing MAC filtering at the router: # dhclient wlan0 May 17 14:43:01 C-5 dhclient: Internet Systems Consortium DHCP Client V3.1.1 May 17 14:43:01 C-5 dhclient: Copyright 2004-2008 Internet Systems Consortium. May 17 14:43:01 C-5 dhclient: All rights reserved. May 17 14:43:01 C-5 dhclient: For info, please visit http://www.isc.org/sw/dhcp/ May 17 14:43:01 C-5 dhclient: May 17 14:43:02 C-5 kernel: [ 825.005082] rndis_wlan 2-2:1.0: rndis media connect May 17 14:43:02 C-5 dhclient: Listening on LPF/wlan0/XX:XX:XX:XX:XX:XX May 17 14:43:02 C-5 dhclient: Sending on LPF/wlan0/XX:XX:XX:XX:XX:XX May 17 14:43:02 C-5 dhclient: Sending on Socket/fallback May 17 14:43:02 C-5 kernel: [ 825.046229] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready May 17 14:43:03 C-5 avahi-daemon[2289]: Joining mDNS multicast group on interface wlan0.IPv6 with address XXXX::XXXX:XXXX:XXXX:XXXX. May 17 14:43:03 C-5 avahi-daemon[2289]: New relevant interface wlan0.IPv6 for mDNS. May 17 14:43:03 C-5 avahi-daemon[2289]: Registering new address record for XXXX::XXXX:XXXX:XXXX:XXXX on wlan0.*. May 17 14:43:06 C-5 dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8 May 17 14:43:06 C-5 dhclient: DHCPOFFER from 192.168.2.1 May 17 14:43:06 C-5 dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67 May 17 14:43:06 C-5 dhclient: DHCPACK from 192.168.2.1 May 17 14:43:06 C-5 avahi-daemon[2289]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.2.115. May 17 14:43:06 C-5 avahi-daemon[2289]: New relevant interface wlan0.IPv4 for mDNS. May 17 14:43:06 C-5 avahi-daemon[2289]: Registering new address record for 192.168.2.115 on wlan0.IPv4. May 17 14:43:06 C-5 avahi-daemon[2289]: Withdrawing address record for XXXX::XXXX:XXXX:XXXX:XXXX on wlan0. May 17 14:43:06 C-5 avahi-daemon[2289]: Leaving mDNS multicast group on interface wlan0.IPv6 with address XXXX::XXXX:XXXX:XXXX:XXXX. May 17 14:43:06 C-5 avahi-daemon[2289]: Interface wlan0.IPv6 no longer relevant for mDNS. May 17 14:43:06 C-5 dhclient: bound to 192.168.2.115 -- renewal in 227061 seconds. Please forget my last reply. The module is working with the patch, regardless of the MAC address filtering on the router or not. What is strange is that it only connects on each "pair" number of attempts. On the first attempt, it always fails; on the second one, it connects - and so on. Also, I could only get it to connect with iwconfig+dhclient. I haven't been able to make it work with ifup at all. Here is my most recent test (I'm attaching these results so they are more legible and you can see them without bugzilla's wrapping): 1. Connected the device May 17 16:03:27 C-5 kernel: [ 1399.376028] usb 2-2: new full speed USB device using uhci_hcd and address 6 May 17 16:03:27 C-5 kernel: [ 1399.551743] usb 2-2: New USB device found, idVendor=13b1, idProduct=000e May 17 16:03:27 C-5 kernel: [ 1399.551748] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 May 17 16:03:27 C-5 kernel: [ 1399.551753] usb 2-2: Product: Linksys Wireless-G USB Network Adapter with SpeedBooster May 17 16:03:27 C-5 kernel: [ 1399.551756] usb 2-2: Manufacturer: Cisco-Linksys May 17 16:03:27 C-5 kernel: [ 1399.551759] usb 2-2: SerialNumber: 1111 May 17 16:03:27 C-5 kernel: [ 1399.551878] usb 2-2: configuration #1 chosen from 1 choice May 17 16:03:27 C-5 kernel: [ 1399.589514] usbcore: registered new interface driver cdc_ether May 17 16:03:27 C-5 kernel: [ 1399.747844] usbcore: registered new interface driver rndis_host May 17 16:03:27 C-5 kernel: [ 1399.821753] rndis_wlan 2-2:1.0: rndis media disconnect May 17 16:03:28 C-5 kernel: [ 1399.981464] wlan0: register 'rndis_wlan' at usb-0000:00:1d.1-2, Wireless RNDIS device, BCM4320a based, XX:XX:XX:XX:XX:XX May 17 16:03:28 C-5 kernel: [ 1399.981507] usbcore: registered new interface driver rndis_wlan 2. configured it [16:03:11] C-5:/usr/src# iwconfig wlan0 essid MYESSID [16:05:16] C-5:/usr/src# iwconfig wlan0 key MYKEY May 17 16:05:21 C-5 kernel: [ 1513.003582] rndis_wlan 2-2:1.0: rndis media connect 3. dhclient... No connection now. [16:05:26] C-5:/usr/src# dhclient wlan0 May 17 16:05:30 C-5 dhclient: There is already a pid file /var/run/dhclient.pid with pid 3398 May 17 16:05:30 C-5 dhclient: killed old client process, removed PID file May 17 16:05:30 C-5 dhclient: Internet Systems Consortium DHCP Client V3.1.1 May 17 16:05:30 C-5 dhclient: Copyright 2004-2008 Internet Systems Consortium. May 17 16:05:30 C-5 dhclient: All rights reserved. May 17 16:05:30 C-5 dhclient: For info, please visit http://www.isc.org/sw/dhcp/ May 17 16:05:30 C-5 dhclient: May 17 16:05:30 C-5 kernel: [ 1522.291894] rndis_wlan 2-2:1.0: rndis media disconnect May 17 16:05:30 C-5 kernel: [ 1522.438125] ADDRCONF(NETDEV_UP): wlan0: link is not ready May 17 16:05:31 C-5 dhclient: Listening on LPF/wlan0/XX:XX:XX:XX:XX:XX May 17 16:05:31 C-5 dhclient: Sending on LPF/wlan0/XX:XX:XX:XX:XX:XX May 17 16:05:31 C-5 dhclient: Sending on Socket/fallback May 17 16:05:31 C-5 dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67 May 17 16:05:36 C-5 nss_wins[2624]: Deleting interface #5 wlan0, 192.168.2.115#123, interface stats: received=0, sent=0, dropped=0, active_time=900 secs May 17 16:05:38 C-5 dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67 (...) 4. configured it again [16:05:40] C-5:/usr/src# iwconfig wlan0 essid MYESSID [16:05:42] C-5:/usr/src# iwconfig wlan0 key MYKEY May 17 16:05:45 C-5 kernel: [ 1537.003392] rndis_wlan 2-2:1.0: rndis media connect May 17 16:05:45 C-5 kernel: [ 1537.038512] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready May 17 16:05:46 C-5 avahi-daemon[2288]: Joining mDNS multicast group on interface wlan0.IPv6 with address XXXX:XXXX:XXXX:XXXX:XXXX. May 17 16:05:46 C-5 avahi-daemon[2288]: New relevant interface wlan0.IPv6 for mDNS. May 17 16:05:46 C-5 avahi-daemon[2288]: Registering new address record for XXXX:XXXX:XXXX:XXXX:XXXX on wlan0.*. 5. dhclient... Connected! [16:05:44] C-5:/usr/src# dhclient wlan0 May 17 16:05:50 C-5 dhclient: Internet Systems Consortium DHCP Client V3.1.1 May 17 16:05:50 C-5 dhclient: Copyright 2004-2008 Internet Systems Consortium. May 17 16:05:50 C-5 dhclient: All rights reserved. May 17 16:05:50 C-5 dhclient: For info, please visit http://www.isc.org/sw/dhcp/ May 17 16:05:50 C-5 dhclient: May 17 16:05:51 C-5 dhclient: Listening on LPF/wlan0/XX:XX:XX:XX:XX:XX May 17 16:05:51 C-5 dhclient: Sending on LPF/wlan0/XX:XX:XX:XX:XX:XX May 17 16:05:51 C-5 dhclient: Sending on Socket/fallback May 17 16:05:54 C-5 dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67 May 17 16:05:54 C-5 dhclient: DHCPACK from 192.168.2.1 May 17 16:05:54 C-5 avahi-daemon[2288]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.2.115. May 17 16:05:54 C-5 avahi-daemon[2288]: New relevant interface wlan0.IPv4 for mDNS. May 17 16:05:54 C-5 avahi-daemon[2288]: Registering new address record for 192.168.2.115 on wlan0.IPv4. May 17 16:05:54 C-5 avahi-daemon[2288]: Withdrawing address record for XXXX:XXXX:XXXX:XXXX:XXXX on wlan0. May 17 16:05:54 C-5 avahi-daemon[2288]: Leaving mDNS multicast group on interface wlan0.IPv6 with address XXXX:XXXX:XXXX:XXXX:XXXX. May 17 16:05:54 C-5 avahi-daemon[2288]: Interface wlan0.IPv6 no longer relevant for mDNS. May 17 16:05:54 C-5 dhclient: bound to 192.168.2.115 -- renewal in 280798 seconds. Created attachment 21390 [details]
dhclient only able to connect on even attempts
Ok, I managed to reproduce 'connect only on even attempts'. It's different bug and appeared somewhere between rc4 and rc6. I have submitted patch for bcm4320a support upstream and will bisect even-connect bug when I have time. This bug is still present as of kernel 2.6.32-rc5. Besides, I can't connect using a static configuration from /etc/network/interfaces or using iwconfig anymore. Now I can only connect with this adapter if I use network-manager. I reproduced the steps I reported on my last attachment - I'm attaching the output starting from step 2 (step 1 gave a very similar output, so you can check my previous attachment). Besides, this module's performance is very poor in comparison with what was available some time ago using ndiswrapper and the Windows driver's .sys/.inf files (nowadays ndiswrapper doesn't even make the device visible to ifconfig). With ndiswrapper I used to have only around 1~2% packet loss on average. Now I get 25~30% with rndis_wlan, which considerably impairs my connection. Add to this the sudden disconnects now and then and this adapter gets quite unusable. Is any work being made on this? Thanks and regards, Pitxyoki Created attachment 23516 [details]
Can't connect using iwconfig/dhclient
Created attachment 23798 [details]
This patch fixes iwconfig setup for rndis_wlan.
In 2.6.32 rndis_wlan has been reworked to use cfg80211 api. I noticed driver was missing setup for one flag and this is why iwconfig didn't work. I attached patch that fixes this. Performance for bcm4320b is good, I can get 54mbit with 0% packet loss (throught computer/wall/bookcase). I don't have bcm4320a based device, so I cannot test/fix for it, sorry. I guess performance problem has something to do with RNDIS spec requirement that control channel shouldn't be polled to command results, but which rndis_host does anyway. rndis_wlan runs on top of rndis_host/usbnet, rndis_wlan handles wifi-setup, rndis_host/usbnet handle data transfers and command channel. If this is the case, rndis_host would require significant rework. Created attachment 23799 [details]
New patch (v2) for iwconfig setup problem
Thanks. Your last patch fixed the issue with iwconfig and now I can use iwconfig + dhclient again. The device seems to be working despite the high packet loss, the disconnects and an some kernel oops I'm starting to suspect that may be related with this driver. I'm attaching some syslog outputs I got while testing the adapter recently. The first attachment is from when I started my computer with the config at /etc/network/interfaces. The device connected and everything went well. You can see there was a warning from the kernel after the "media connect". Anyway, I got connected and everything went well. On the second one, I restarted my computer with the device disconnected. Then I connected the device and ifup'ed it. I also got connected but you can see the warning there again. This warning seems to be reproducible every time I use the static configuration. The third log is from when I started my computer with the entries at /etc/network/interfaces commented out so network-manager would manage the device. After some time, I got disconnected. Probably the line starting with "Nov 18 13:43:24" corresponds to the time of the disconnect. I'm not sure. I couldn't get connected again, so I did modprobe -r rndis_wlan, disconnected the device and connected it again. I got connected but after a while you can see lots and lots of "slab error"s. I can't tell precisely when, but my computer gave a system beep and suddenly got unresponsive. I had to shut it down (using ssh? I can't remember) to get back to work. After this I restarted my computer once again so that it used the interfaces file again. The slab errors came back again (fourth log). Once again I had to power off the computer. --- When I started using 2.6.32-rc5, I noticed that my computer was halting from time to time, apparently in an unpredictable way. I reported this (bug #14436) and re-compiled the kernel with the debug flags that I've been recommended to on that bug. I'm thinking that maybe these halts were related to the rndis_wlan driver. One thing I notice is that they only happened when I connect the wireless adapter, but I'm not sure if this is what causes the halts. Relating with the high packet loss, I noticed that iwconfig always reports a txpower of 7 dBm and I can't change that to any other value. I checked the user guide for my adapter[1]. On page 44 of the PDF the "transmitted power" is indicated as 15-17dBm. Could this be related? Regards and thank you for your attention, Pitxyoki 1 - http://downloads.linksysbycisco.com/downloads/wusb54gs_ug_1,0.pdf Created attachment 23828 [details]
Four test cases using the most recent kernel/driver + patch for iwconfig
Please try these two patches. First one fixes buffer overflow in rndis_wlan, second one disable 'stalled link' workaround (which works and is for bcm4320a). rndis_wlan cannot set tx_power for device, the reported tx_power levels are for "Linksys WUSB54GSC". You can ignore the tx_power reported by iwconfig. Are you setting any module parameters? 7 dBm is only print if you set "power_output=0". power_output doesn't have effect with bcm4320a, only bcm4320b. Created attachment 23854 [details]
Fix buffer overflow in rndis_wlan
Created attachment 23855 [details]
Disable 'stalled link' -workaround
We seem to be getting closer! Today before I even read your reply I noticed my connection seemed pretty stable. I checked the syslog: the call trace after the "media connect" was there, but the "slab error"s didn't appear one single time. I caught some ping statistics, and I didn't see anything like this for a long time on this adapter: 12% packet loss at the worse case. 4~2% or about 8~11% on others. I also did some updates on my machine and copied some files over from my laptop - I got something like 100KB/s on average on all transfers! This is completely unusual for this adapter on Linux since about a year or more. This is very, __very__ good for what I'm used to see with this. Anyway, after I rebooted my computer, this wasn't the case anymore. Interestingly, the call trace after the "media connect" didn't appear after that reboot, but the kernel "slab error"s did. The connection was again unstable and with about ~20% packet loss. Then I recompiled the kernel with your patches. The connection seems quite flashy again. I have already restarted my computer a couple of times and the connection seems to stay stable, like it was today in the morning. If things stay like this for some more days, say a week or two, I'd say that all previous issues are gone. Let's give it some time for the initial euphoria to pass away... :-) As for the txpower: no, I don't do anything except modprobe -v rndis_wlan when I want to load the module or modprobe -rv to unload it. When I restart the computer, I let it load it by itself. # iwconfig wlan0 wlan0 IEEE 802.11bg ESSID:"MYESSID" Mode:Managed Frequency:2.462 GHz Access Point: YY:YY:YY:YY:YY:YY Bit Rate=36 Mb/s Tx-Power=7 dBm Retry long limit:7 RTS thr:off Fragment thr:off Encryption key:MYKE-YMYK-EY Power Management:on Link Quality=25/100 Signal level=25/100 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 I just ran iperf, and I have to say that I am really amazed: [ ID] Interval Transfer Bandwidth [ 3] 0.0- 2.0 sec 576 KBytes 2.36 Mbits/sec [ 3] 2.0- 4.0 sec 576 KBytes 2.36 Mbits/sec [ 3] 4.0- 6.0 sec 528 KBytes 2.16 Mbits/sec [ 3] 6.0- 8.0 sec 456 KBytes 1.87 Mbits/sec [ 3] 8.0-10.0 sec 408 KBytes 1.67 Mbits/sec [ 3] 10.0-12.0 sec 552 KBytes 2.26 Mbits/sec [ 3] 12.0-14.0 sec 536 KBytes 2.20 Mbits/sec [ 3] 14.0-16.0 sec 568 KBytes 2.33 Mbits/sec [ 3] 16.0-18.0 sec 520 KBytes 2.13 Mbits/sec [ 3] 18.0-20.0 sec 512 KBytes 2.10 Mbits/sec [ 3] 0.0-20.0 sec 5.12 MBytes 2.14 Mbits/sec Created attachment 23873 [details]
Patch 1/2 of tx-power reporting fix
Created attachment 23874 [details]
2/2 patch for fixing tx-power reporting
These two patches should fix tx-power reporting. The problems with this adapter seem to be definitively gone. I still experienced a connection loss once or twice since applying your last patch, but I'm convinced this must be an hardware problem (I remember this happening on Windows too): Sometimes after losing the connection, I can get connected to the AP, but then I don't seem to be able to receive all packets on the network. One of the effects is that I don't even get to receive an IP by DHCP, even though I can see some packets coming from the router. Removing and inserting the module again sometimes solves it. Simply waiting some minutes and trying again later may solve it too. Apart from this, on Windows the driver wasn't even as stable as it seems now on Linux. The tx-power now reports 13dBm. A bit more consistent with the adapter's documentation. Jussi: I really appreciate your attention on this. Is there any way I can pay you? I'd like to thank you for your work somehow. You can reply to my e-mail address if you have something like a wishlist. :) Many thanks, Luís Picciochi |