Prism 2.5 wireless card fails as an AP after a kernel upgrade to 2.6.30.1 and later (up to 2.6.30.5). Not tried with 2.6.30. Not tried as STA. The card works well up to kernel 2.6.29.6 To reproduce: # iwconfig wlan0 mode master # iwconfig wlan0 chan 4 # iwconfig wlan0 essid ea0 # ifconfig wlan0 192.168.220.254 >now the STA associates> # tcpdump -i wlan0 -n <now the STA pings> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on wlan0, link-type EN10MB (Ethernet), capture size 96 bytes 23:59:36.177209 ARP, Request who-has 192.168.220.254 tell 192.168.220.88, length 28 23:59:36.177287 ARP, Request who-has 192.168.220.254 tell 192.168.220.88, length 28 23:59:36.177306 ARP, Reply 192.168.220.254 is-at 00:e0:00:8d:bd:8e, length 28 23:59:41.610114 ARP, Request who-has 192.168.220.254 tell 192.168.220.88, length 28 23:59:41.610192 ARP, Request who-has 192.168.220.254 tell 192.168.220.88, length 28 23:59:41.610199 ARP, Reply 192.168.220.254 is-at 00:e0:00:8d:bd:8e, length 28 <packets (ARP, at least) flow from STA to AP, but not the other way round> Related dmesg lines: [ 5.928208] hostap_pci 0000:02:01.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21 [ 5.928781] hostap_pci: Registered netdevice wifi0 [ 5.928854] wifi0: Original COR value: 0x2 [ 6.128188] prism2_hw_init: initialized in 196 ms [ 6.129008] wifi0: NIC: id=0x8013 v1.0.0 [ 6.129225] wifi0: PRI: id=0x15 v1.1.1 [ 6.129437] wifi0: STA: id=0x1f v1.8.2 [ 6.133506] wifi0: Intersil Prism2.5 PCI: mem=0xec000000, irq=21 [ 6.134100] wifi0: registered netdevice wlan0 ..... (unrelated) ..... [ 575.222877] wifi0: deauthentication: 00:0b:6b:35:80:9a len=2, reason_code=3 [ 579.638087] wifi0: 00:0b:6b:35:80:9a auth_cb - alg=0 trans#=2 status=0 - STA authenticated [ 579.639151] wifi0: assoc from 00:0b:6b:35:80:9a with extra data (11 bytes) [<dd><09><00><03><7f><01><01><00><00><00><00>] [ 579.740704] wifi0: 00:0b:6b:35:80:9a assoc_cb - STA associated [ 583.017732] Virtual device wifi0 asks to queue packet! [ 588.025832] Virtual device wifi0 asks to queue packet! [ 596.028100] Virtual device wifi0 asks to queue packet! [ 814.920383] Virtual device wifi0 asks to queue packet! ... and so on OS: Debian Testing, GCC-4.3.3
I marked this as a regression.
$ git log v2.6.29..v2.6.30 drivers/net/wireless/hostap/ commit 5ae4efbcd2611562a8b93596be034e63495706a5 Author: Stephen Hemminger <shemminger@vyatta.com> Date: Fri Mar 20 19:36:43 2009 +0000 hostap: convert to net_device_ops Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 4cfa8e45f4bb26ff38155f94a810a876b739958d Author: Stephen Hemminger <shemminger@vyatta.com> Date: Fri Mar 20 19:36:42 2009 +0000 hostap: convert to internal net_device_stats Use pre-existing net_device_stats in network_device struct. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit 1ea893fde29d8cf1639da8989f4b843dc3283ca8 Author: Dan Williams <dcbw@redhat.com> Date: Wed Feb 11 17:17:10 2009 -0500 hostap: convert usage of net/ieee80211.h to linux/ieee80211.h So that net/ieee80211.h can be made private to ipw2x00 in a follow-up. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> commit c1b4aa3fb619782213af2af6652663c8f9cef373 Author: Harvey Harrison <harvey.harrison@gmail.com> Date: Thu Jan 29 13:26:44 2009 -0800 wireless: replace uses of __constant_{endian} The base versions handle constant folding now. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yasen, are you git savvy enough to revert each of those patches, rebuild, and give the resulting kernels a try?
I promise to try this week. Should not be rocket science.
I reverted the first one 5ae4efbcd2611562a8b93596be034e63495706a5 and AP started to work. Should I try the other ones?
The problem is indeed in commit 5ae4efbcd2611562a8b93596be034e63495706a5. Have a look into hostap_main.c before the commit. The original fragment of code in the function hostap_setup_dev() was: if (type != HOSTAP_INTERFACE_MASTER) { /* use main radio device queue */ dev->tx_queue_len = 0; } While the equivalent new fragment (with unrelated lines marked) is: switch(type) { case HOSTAP_INTERFACE_AP: dev->netdev_ops = &hostap_mgmt_netdev_ops; /* unrelated */ dev->type = ARPHRD_IEEE80211; /* unrelated */ dev->header_ops = &hostap_80211_ops; /* unrelated */ break; case HOSTAP_INTERFACE_MASTER: dev->tx_queue_len = 0; /* use main radio device queue */ dev->netdev_ops = &hostap_master_ops; /* unrelated */ break; default: dev->netdev_ops = &hostap_netdev_ops; /* unrelated */ } Apparently the condition when dev->tx_queue_len should be set to 0 was reversed in the new code, which is wrong. I have already sent a trivial patch to linux-kernel@vger.kernel.org (see http://lkml.org/lkml/2009/9/9/418). I am also posting the patch here so it won't get lost and somebody applies it ASAP.
Created attachment 23057 [details] patch to revert the toxic part of the conversion to net_device_ops
I'm usually in managed mode with my Wifi card, connecting to an AP downstairs. I do get a LOT of warnings in the logs of the form "Virtual device wifi0 asks to queue packet!". This fills up my /var partition within a day. Am I being affected by the bug discussed here or is that something else? Again, this computer is not acting as the AP, but only connecting to one.
(In reply to comment #8) Although I am not an expert on the hostap driver, I believe that the bug discussed here can affect you also, based on the same reasoning (zero-length queue on wifi0). It's easy to prove or disprove the hypothesis, just use the patch from my comment #7 and recompile your kernel. The patch should not break anything and it should apply easily to any kernel since 2.6.30. Even if the kernel from your distro is heavily patched, it should be very easy to patch the sources by hand (there are only 3 lines of code to be modified). I can even send you a spec-file for Fedora 11 if you like ..
The patch from comment 7 is in 2.6.32-rc1. Can you try that and post the results here? Thanks!
The patch from comment #7 works for me. Thanks, Martin!
(In reply to comment #10) 2.6.32-rc1 works for me perfectly. Therefore I suggest closing this bug.
Would it be possible to see this patch committed to the 2.6.31 kernel branch? That was suggested in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/444801/comments/5 as the best way forward for Ubuntu Karmic.
Just forwarded the patch to stable@kernel.org for 2.6.31...