FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 02-13-2012, 02:01 PM
Jonathan Nieder
 
Default Bug#659521: ath9k: no packets are transmitted or received with WEP

Hi,

stef schip wrote:

> I confirm the bug on my laptop, equipped with AR9285 (module ath9k)
> wireless chip.
>
> the laptop (samsung N220 netbook) has a fairly clean debian testing
> installation,
> after kernel upgrade from 3.1.0-1-686-pae to 3.2.0-1-686-pae connection to
> a wifi router with WEP encryption (*) does not work anymore.
> i can setup the interface with manual ifconfig / iwconfig commands, no
> errors are reported,
[...]
> no packets are transmitted nor received over the wireless link.

Thanks. Sounds like a completely different bug.

Does the following work?

apt-get install iproute iw
/etc/init.d/NetworkManager stop
ifdown wlan0

ip link set wlan0 up
iw dev wlan0 connect -w <SSID> key d:0:<WEP key>
dhclient wlan0

ping google.com

ip link set wlan0 down



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120213150133.GF4140@burratino">http://lists.debian.org/20120213150133.GF4140@burratino
 
Old 02-13-2012, 10:47 PM
stefan schippers
 
Default Bug#659521: ath9k: no packets are transmitted or received with WEP

Hello, Jonathan,
sending again with 659521@bugs.debian.org copied in Cc.

in the command log below you see i used 'ifconfig' to assign a static IP and setup a network route,
i also tried to do the same thing with only 'ip' commands, but things worked with kernel 3.1.0-1
and again did not work (as i expected) with kernel 3.2.0-1:

ip link set wlan0 up
ip addr flush dev wlan0
ip addr add 192.168.0.79/32 dev wlan0
ip route add 192.168.0.0/24 dev wlan0



Thank you

Stefan.


I have done the tests as you suggested, the log of all commands for
newer and older kernel is attached hereafter.
Some comments :

- i have no network manager installed (this is one of the first things i get
rid of after installing debian)
- the wifi router has DHCP disabled, and is configured with IP=192.168.0.1 and WEP encryption
- laptop configured with static IP=192.168.0.78
- router responds to ICMP (ping)

Even with the commands you suggested wifi connection does not work (can not ping the router)
with newer kernel and works with older kernel.
I have posted also the wlan0-related lines of dmesg in both cases.

I also have cross-checked the new 3.2.0-1 kernel on another laptop with broadcom BCM4313
wireless chip (brcmsmac module), same debian testing installation and here wifi works perfectly,
so the problem 'seems' to be related to the ath9k module.


Thank you for your attention
STefan

================================================== ============================
command log follows
================================================== ============================


================================================== ============================
3.2.0-1 kernel
================================================== ============================

schippes@miniguru:~$ sudo su
root@miniguru:/home/schippes# uname -a
Linux miniguru 3.2.0-1-686-pae #1 SMP Sun Feb 5 23:52:49 UTC 2012 i686 GNU/Linux
root@miniguru:/home/schippes# ip link set wlan0 up
root@miniguru:/home/schippes# iw dev wlan0 connect -w ANUBIS key d:0:********************
wlan0 (phy #0): connected to 00:1f:1f:72:4f:50
root@miniguru:/home/schippes# ifconfig wlan0 192.168.0.78 up
root@miniguru:/home/schippes# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
>From 192.168.0.78 icmp_seq=1 Destination Host Unreachable
>From 192.168.0.78 icmp_seq=2 Destination Host Unreachable
>From 192.168.0.78 icmp_seq=3 Destination Host Unreachable
>From 192.168.0.78 icmp_seq=4 Destination Host Unreachable
>From 192.168.0.78 icmp_seq=5 Destination Host Unreachable
>From 192.168.0.78 icmp_seq=6 Destination Host Unreachable
^C
--- 192.168.0.1 ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6031ms
pipe 3
root@miniguru:/home/schippes# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
root@miniguru:/home/schippes# ifconfig
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:19 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1504 (1.4 KiB) TX bytes:1504 (1.4 KiB)

wlan0 Link encap:Ethernet HWaddr c4:17:fe:5c:f2:80
inet addr:192.168.0.78 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::c617:feff:fe5c:f280/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1212 (1.1 KiB) TX bytes:5040 (4.9 KiB)

root@miniguru:/home/schippes# iwconfig
lo no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:"ANUBIS"
Mode:Managed Frequency:2.427 GHz Access Point: 00:1F:1F:72:4F:50
Bit Rate=54 Mb/s Tx-Power=15 dBm
Retry long limit:7 RTS thrff Fragment thrff
Encryption keyff
Power Managementn
Link Quality=64/70 Signal level=-46 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:1 Invalid misc:51 Missed beacon:0

eth0 no wireless extensions.


dmesg log
==========
[ 1794.813674] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1799.979704] wlan0: authenticate with 00:1f:1f:72:4f:50 (try 1)
[ 1799.981734] wlan0: authenticated
[ 1800.014538] wlan0: associate with 00:1f:1f:72:4f:50 (try 1)
[ 1800.017193] wlan0: RX AssocResp from 00:1f:1f:72:4f:50 (capab=0x411 status=0 aid=1)
[ 1800.017200] wlan0: associated
[ 1800.017688] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 1810.640146] wlan0: no IPv6 routers present



================================================== ============================
3.1.0-1 kernel
================================================== ============================

schippes@miniguru:~$ sudo su
root@miniguru:/home/schippes# uname -a
Linux miniguru 3.1.0-1-686-pae #1 SMP Tue Jan 10 05:42:54 UTC 2012 i686 GNU/Linux
root@miniguru:/home/schippes# ip link set wlan0 up
root@miniguru:/home/schippes# iw dev wlan0 connect -w ANUBIS key d:0:****************
wlan0 (phy #0): connected to 00:1f:1f:72:4f:50
root@miniguru:/home/schippes# ifconfig wlan0 192.168.0.78 up
root@miniguru:/home/schippes# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_req=1 ttl=64 time=6.11 ms
64 bytes from 192.168.0.1: icmp_req=2 ttl=64 time=1.86 ms
64 bytes from 192.168.0.1: icmp_req=3 ttl=64 time=1.63 ms
64 bytes from 192.168.0.1: icmp_req=4 ttl=64 time=1.89 ms
64 bytes from 192.168.0.1: icmp_req=5 ttl=64 time=1.89 ms
^C
--- 192.168.0.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 1.633/2.679/6.113/1.720 ms
root@miniguru:/home/schippes# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
root@miniguru:/home/schippes# ifconfig
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:240 (240.0 B) TX bytes:240 (240.0 B)

wlan0 Link encap:Ethernet HWaddr c4:17:fe:5c:f2:80
inet addr:192.168.0.78 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::c617:feff:fe5c:f280/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4661 (4.5 KiB) TX bytes:5412 (5.2 KiB)

root@miniguru:/home/schippes# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:"ANUBIS"
Mode:Managed Frequency:2.427 GHz Access Point: 00:1F:1F:72:4F:50
Bit Rate=54 Mb/s Tx-Power=14 dBm
Retry long limit:7 RTS thrff Fragment thrff
Encryption keyff
Power Managementn
Link Quality=59/70 Signal level=-51 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:30 Missed beacon:0


dmesg log
==========
[ 142.709996] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 159.231354] wlan0: authenticate with 00:1f:1f:72:4f:50 (try 1)
[ 159.233401] wlan0: authenticated
[ 159.233460] wlan0: associate with 00:1f:1f:72:4f:50 (try 1)
[ 159.236090] wlan0: RX AssocResp from 00:1f:1f:72:4f:50 (capab=0x411 status=0 aid=1)
[ 159.236099] wlan0: associated
[ 159.236720] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 169.256150] wlan0: no IPv6 routers present




================================================== ============================
<<EOF>>
================================================== ============================




On 02/13/2012 04:01 PM, Jonathan Nieder wrote:
> Hi,
>
> stef schip wrote:
>
>> I confirm the bug on my laptop, equipped with AR9285 (module ath9k)
>> wireless chip.
>>
>> the laptop (samsung N220 netbook) has a fairly clean debian testing
>> installation,
>> after kernel upgrade from 3.1.0-1-686-pae to 3.2.0-1-686-pae connection to
>> a wifi router with WEP encryption (*) does not work anymore.
>> i can setup the interface with manual ifconfig / iwconfig commands, no
>> errors are reported,
> [...]
>> no packets are transmitted nor received over the wireless link.
> Thanks. Sounds like a completely different bug.
>
> Does the following work?
>
> apt-get install iproute iw
> /etc/init.d/NetworkManager stop
> ifdown wlan0
>
> ip link set wlan0 up
> iw dev wlan0 connect -w <SSID> key d:0:<WEP key>
> dhclient wlan0
>
> ping google.com
>
> ip link set wlan0 down




--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F39A12F.6040503@gmail.com">http://lists.debian.org/4F39A12F.6040503@gmail.com
 
Old 02-14-2012, 12:18 AM
Jonathan Nieder
 
Default Bug#659521: ath9k: no packets are transmitted or received with WEP

stefan schippers wrote:

> # ping 192.168.0.1
> PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
> From 192.168.0.78 icmp_seq=1 Destination Host Unreachable
> From 192.168.0.78 icmp_seq=2 Destination Host Unreachable
> From 192.168.0.78 icmp_seq=3 Destination Host Unreachable
> From 192.168.0.78 icmp_seq=4 Destination Host Unreachable
> From 192.168.0.78 icmp_seq=5 Destination Host Unreachable
> From 192.168.0.78 icmp_seq=6 Destination Host Unreachable
> ^C

Thanks. Can you try this patch?

It works like this:

0. Prerequisites:
apt-get install git build-essential

1. Get a copy of the linux-stable tree:

git clone -o stable
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
linux
cd linux

Or, if you already have a clone of the kernel:

cd linux
git remote add -f stable
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

2. Make sure you can still reproduce the bug:

git checkout stable/linux-3.2.y
cp /boot/config-$(uname -r) .config; # current configuration
make localmodconfig; # optional: minimize configuration
make deb-pkg; # optionally with -j<num> for parallel build
dpkg -i ../<name of package>
reboot

3. Apply the patch and see if it fixes it:

git apply --index <thepatch>
make deb-pkg; # maybe with -j4
dpkg -i ../<name of package>
reboot

commit f88373fa47f3
Author: Felix Fietkau <nbd@openwrt.org>
Date: Sun Feb 5 21:15:17 2012 +0100

ath9k: fix a WEP crypto related regression

commit b4a82a0 "ath9k_hw: fix interpretation of the rx KeyMiss flag"
fixed the interpretation of the KeyMiss flag for keycache based lookups,
however WEP encryption uses a static index, so KeyMiss is always asserted
for it, even though frames are decrypted properly.
Fix this by clearing the ATH9K_RXERR_KEYMISS flag if no keycache based
lookup was performed.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
Reported-by: Laurent Bonnans <bonnans.l@gmail.com>
Reported-by: Jurica Vukadin <u.ra604@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 0e666fbe0842..7e1a91af1497 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -822,6 +822,14 @@ static bool ath9k_rx_accept(struct ath_common *common,
(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC |
ATH9K_RXERR_KEYMISS));

+ /*
+ * Key miss events are only relevant for pairwise keys where the
+ * descriptor does contain a valid key index. This has been observed
+ * mostly with CCMP encryption.
+ */
+ if (rx_stats->rs_keyix == ATH9K_RXKEYIX_INVALID)
+ rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS;
+
if (!rx_stats->rs_datalen)
return false;
/*



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120214011812.GA7951@burratino">http://lists.debian.org/20120214011812.GA7951@burratino
 
Old 02-14-2012, 10:11 PM
stefan schippers
 
Default Bug#659521: ath9k: no packets are transmitted or received with WEP

Hello, Jonathan

i did all the steps you asked:

Booting the laptop with the 3.2.6 kernel built from the git cloned tree shows the exact same problem:
no network traffic over the wireless connection (ath9k module).

applying the patch, rebuilding the kernel and running the laptop with this new kernel solves the problem
and so far i haven't seen any problem with the network connection.

=============================================
command log
=============================================
schippes@miniguru:~$ uname -a
Linux miniguru 3.2.6+ #2 SMP Tue Feb 14 23:18:50 CET 2012 i686 GNU/Linux
schippes@miniguru:~$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_req=1 ttl=64 time=1.87 ms
64 bytes from 192.168.0.1: icmp_req=2 ttl=64 time=3.71 ms
64 bytes from 192.168.0.1: icmp_req=3 ttl=64 time=1.90 ms
64 bytes from 192.168.0.1: icmp_req=4 ttl=64 time=1.89 ms
^C
--- 192.168.0.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 1.875/2.347/3.717/0.791 ms
schippes@miniguru:~$

=============================================
end command log
=============================================

may be we will see the patch applied in a future debian testing kernel update?
Thank you very much for your support !

stefan


On 02/14/2012 02:18 AM, Jonathan Nieder wrote:
> stefan schippers wrote:
>
>> # ping 192.168.0.1
>> PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
>> From 192.168.0.78 icmp_seq=1 Destination Host Unreachable
>> From 192.168.0.78 icmp_seq=2 Destination Host Unreachable
>> From 192.168.0.78 icmp_seq=3 Destination Host Unreachable
>> From 192.168.0.78 icmp_seq=4 Destination Host Unreachable
>> From 192.168.0.78 icmp_seq=5 Destination Host Unreachable
>> From 192.168.0.78 icmp_seq=6 Destination Host Unreachable
>> ^C
> Thanks. Can you try this patch?
>
> It works like this:
>
> 0. Prerequisites:
> apt-get install git build-essential
>
> 1. Get a copy of the linux-stable tree:
>
> git clone -o stable
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
> linux
> cd linux
>
> Or, if you already have a clone of the kernel:
>
> cd linux
> git remote add -f stable
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
>
> 2. Make sure you can still reproduce the bug:
>
> git checkout stable/linux-3.2.y
> cp /boot/config-$(uname -r) .config; # current configuration
> make localmodconfig; # optional: minimize configuration
> make deb-pkg; # optionally with -j<num> for parallel build
> dpkg -i ../<name of package>
> reboot
>
> 3. Apply the patch and see if it fixes it:
>
> git apply --index <thepatch>
> make deb-pkg; # maybe with -j4
> dpkg -i ../<name of package>
> reboot
>
> commit f88373fa47f3
> Author: Felix Fietkau <nbd@openwrt.org>
> Date: Sun Feb 5 21:15:17 2012 +0100
>
> ath9k: fix a WEP crypto related regression
>
> commit b4a82a0 "ath9k_hw: fix interpretation of the rx KeyMiss flag"
> fixed the interpretation of the KeyMiss flag for keycache based lookups,
> however WEP encryption uses a static index, so KeyMiss is always asserted
> for it, even though frames are decrypted properly.
> Fix this by clearing the ATH9K_RXERR_KEYMISS flag if no keycache based
> lookup was performed.
>
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> Cc: stable@vger.kernel.org
> Reported-by: Laurent Bonnans <bonnans.l@gmail.com>
> Reported-by: Jurica Vukadin <u.ra604@googlemail.com>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
>
> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
> index 0e666fbe0842..7e1a91af1497 100644
> --- a/drivers/net/wireless/ath/ath9k/recv.c
> +++ b/drivers/net/wireless/ath/ath9k/recv.c
> @@ -822,6 +822,14 @@ static bool ath9k_rx_accept(struct ath_common *common,
> (ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC |
> ATH9K_RXERR_KEYMISS));
>
> + /*
> + * Key miss events are only relevant for pairwise keys where the
> + * descriptor does contain a valid key index. This has been observed
> + * mostly with CCMP encryption.
> + */
> + if (rx_stats->rs_keyix == ATH9K_RXKEYIX_INVALID)
> + rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS;
> +
> if (!rx_stats->rs_datalen)
> return false;
> /*




--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F3AEA16.8020609@gmail.com">http://lists.debian.org/4F3AEA16.8020609@gmail.com
 
Old 02-14-2012, 10:59 PM
Jonathan Nieder
 
Default Bug#659521: ath9k: no packets are transmitted or received with WEP

clone 659521 -1
submitter 659521 stefan schippers <stefan.schippers@gmail.com>
retitle 659521 [3.1 -> 3.2.2 regression] ath9k: no packets are transmitted or received with WEP
tags 659521 + upstream patch
quit

stefan schippers wrote:

> i did all the steps you asked:
>
> Booting the laptop with the 3.2.6 kernel built from the git cloned tree shows the exact same problem:
> no network traffic over the wireless connection (ath9k module).
>
> applying the patch, rebuilding the kernel and running the laptop with this new kernel solves the problem
> and so far i haven't seen any problem with the network connection.

Awesome, thanks much!

Cloning the bug so we don't forget to apply this.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120214235925.GA11517@burratino">http://lists.debian.org/20120214235925.GA11517@burratino
 
Old 02-15-2012, 01:20 PM
Ben Hutchings
 
Default Bug#659521: ath9k: no packets are transmitted or received with WEP

On Wed, 2012-02-15 at 00:11 +0100, stefan schippers wrote:
[...]
> may be we will see the patch applied in a future debian testing kernel update?
> Thank you very much for your support !

It's in the queue for 3.2.7.

Ben.

--
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein
 

Thread Tools




All times are GMT. The time now is 05:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org