Bug 11971

Summary: (ath5k) crashes on ar242
Product: Networking Reporter: Pascal Z. (pascal)
Component: WirelessAssignee: networking_wireless (networking_wireless)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: pascal
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27-7 Subsystem:
Regression: --- Bisected commit-id:

Description Pascal Z. 2008-11-07 06:50:14 UTC
Latest working kernel version: 2.6.27-7-generic 
Earliest failing kernel version: 2.6.27-7-generic 
Distribution: Ubunt 8.10
Hardware Envirounment: Samsung NC10, See lspci
Software Environment: 
Problem Description:

ath5k crashes on my hardware.
It doesnt matter if i set my wlan encryped or unencryped, i always get the same problems.
Sometimes everything works fine, sometimes i just can't connect or get a crash or get very low bandwidth.
Under windows with the same hardware, everything works fine without _any_ problems.

The madwifi-hal drivers also dont work without disconnects etc.
It behaves almost like ath5k, but it doesnt crash.
 
My system is a Samsung NC10 Netbook, which is quite new.

# lspci
...
02:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
...

# dmesg
[   34.806742] NET: Registered protocol family 17
[   34.899574] [drm] Initialized drm 1.1.0 20060810
[   34.911665] pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[   34.911683] pci 0000:00:02.0: setting latency timer to 64
[   34.912065] [drm] Initialized i915 1.6.0 20060119 on minor 0
[   35.671979] wlan0: authenticate with AP 00:15:0c:72:62:04
[   35.673504] wlan0: authenticated
[   35.673526] wlan0: associate with AP 00:15:0c:72:62:04
[   35.675565] wlan0: RX AssocResp from 00:15:0c:72:62:04 (capab=0x401 status=0 aid=1)
[   35.675583] wlan0: associated
[   35.677566] wlan0: disassociating by local choice (reason=3)
[   35.991881] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both
[   55.149182] ath5k phy0: noise floor calibration timeout (2442MHz)
[   62.388641] ------------[ cut here ]------------
[   62.388670] WARNING: at /build/buildd/linux-backports-modules-2.6.27-2.6.27/debian/build/build-generic/compat-wireless-2.6/net/mac80211/rx.c:2200 lbm_cw___lbm_cw_ieee80211_rx+0x19f/0x600 [lbm_cw_mac80211]()
[   62.388690] Modules linked in: i915 drm af_packet binfmt_misc sco bridge stp rfcomm bnep l2cap bluetooth ppdev acpi_cpufreq cpufreq_stats cpufreq_ondemand freq_table cpufreq_powersave cpufreq_userspace cpufreq_conservative pci_slot sbs wmi container sbshc iptable_filter ip_tables x_tables parport_pc lp parport joydev snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm uvcvideo compat_ioctl32 videodev v4l1_compat battery snd_seq_dummy evdev arc4 ecb crypto_blkcipher snd_seq_oss snd_seq_midi snd_rawmidi video output psmouse snd_seq_midi_event serio_raw snd_seq ath5k snd_timer lbm_cw_mac80211 snd_seq_device lbm_cw_cfg80211 led_class ac button snd pcspkr iTCO_wdt iTCO_vendor_support soundcore snd_page_alloc shpchp pci_hotplug intel_agp agpgart ext3 jbd mbcache sd_mod crc_t10dif sg ata_generic pata_acpi ata_piix libata scsi_mod dock ehci_hcd sky2 uhci_hcd usbcore thermal processor fan fbcon tileblit font bitblit softcursor fuse
[   62.388981] Pid: 0, comm: swapper Not tainted 2.6.27-7-generic #1
[   62.388993]  [<c037c406>] ? printk+0x1d/0x1f
[   62.389031]  [<c0131de9>] warn_on_slowpath+0x59/0x90
[   62.389074]  [<c024d1d5>] ? __next_cpu+0x15/0x30
[   62.389092]  [<c012989d>] ? find_busiest_group+0x15d/0x7c0
[   62.389111]  [<c012caf8>] ? balance_tasks+0x88/0x110
[   62.389142]  [<f8b559af>] lbm_cw___lbm_cw_ieee80211_rx+0x19f/0x600 [lbm_cw_mac80211]
[   62.389195]  [<c02eae1c>] ? skb_put+0xc/0xa0
[   62.389213]  [<c01136c0>] ? lapic_next_event+0x20/0x30
[   62.389232]  [<c0151d0f>] ? clockevents_program_event+0x9f/0x150
[   62.389263]  [<f8b2bc83>] ath5k_tasklet_rx+0x2e3/0x550 [ath5k]
[   62.389296]  [<c0137258>] tasklet_action+0x78/0x100
[   62.389312]  [<c0137682>] __do_softirq+0x92/0x120
[   62.389326]  [<c013776d>] do_softirq+0x5d/0x60
[   62.389340]  [<c01378e5>] irq_exit+0x55/0x90
[   62.389354]  [<c0106c1a>] do_IRQ+0x4a/0x80
[   62.389369]  [<c0105003>] common_interrupt+0x23/0x30
[   62.389385]  [<c010acca>] ? mwait_idle+0x4a/0x50
[   62.389401]  [<c010288d>] cpu_idle+0x7d/0x140
[   62.389415]  [<c036edd3>] rest_init+0x53/0x60
[   62.389432]  =======================
[   62.389440] ---[ end trace 6d6f98595a093fd1 ]---
[   75.738807] wlan0: authenticate with AP 00:15:0c:72:62:04
[   75.752155] wlan0: authenticated
[   75.752178] wlan0: associate with AP 00:15:0c:72:62:04
[   75.768647] wlan0: RX ReassocResp from 00:15:0c:72:62:04 (capab=0x401 status=0 aid=1)
[   75.768661] wlan0: associated
[   87.455240] sky2 eth0: Link is down.
[   90.563728] NET: Registered protocol family 10
[   90.565772] lo: Disabled Privacy Extensions
[   90.570769] ADDRCONF(NETDEV_UP): eth0: link is not ready
[  101.500029] wlan0: no IPv6 routers present
[  106.759127] wlan0: disassociating by local choice (reason=3)
Comment 1 John W. Linville 2008-11-07 07:00:00 UTC
This just got merged:

commit c793033945bea23d7a6e0d8d94b2da6603e02af2
Author: Bob Copeland <me@bobcopeland.com>
Date:   Mon Nov 3 22:14:00 2008 -0500

    ath5k: correct handling of rx status fields

    ath5k_rx_status fields rs_antenna and rs_more are u8s, but we
    were setting them with bitwise ANDs of 32-bit values.

    As a consequence, jumbo frames would not be discarded as intended.
    Then, because the hw rate value of such frames is zero, and, since
    "ath5k: rates cleanup", we do not fall back to the basic rate, such
    packets would trigger the following WARN_ON:


    ------------[ cut here ]------------
    WARNING: at net/mac80211/rx.c:2192 __ieee80211_rx+0x4d/0x57e [mac80211]()
    Modules linked in: ath5k af_packet sha256_generic aes_i586 aes_generic cbc l
    Pid: 0, comm: swapper Tainted: G        W  2.6.28-rc2-wl #14
    Call Trace:
     [<c0123d1e>] warn_on_slowpath+0x41/0x5b
     [<c012005d>] ? sched_debug_show+0x31e/0x9c6
     [<c012489f>] ? vprintk+0x369/0x389
     [<c0309539>] ? _spin_unlock_irqrestore+0x54/0x58
     [<c011cd8f>] ? try_to_wake_up+0x14f/0x15a
     [<f81918cb>] __ieee80211_rx+0x4d/0x57e [mac80211]
     [<f828872a>] ath5k_tasklet_rx+0x5a1/0x5e4 [ath5k]
     [<c013b9cd>] ? clockevents_program_event+0xd4/0xe3
     [<c01283a9>] tasklet_action+0x94/0xfd
     [<c0127d19>] __do_softirq+0x8c/0x13e
     [<c0127e04>] do_softirq+0x39/0x55
     [<c0128082>] irq_exit+0x46/0x85
     [<c010576c>] do_IRQ+0x9a/0xb2
     [<c010461c>] common_interrupt+0x28/0x30
     [<f80e934a>] ? acpi_idle_enter_bm+0x2ad/0x31b [processor]
     [<c02976bf>] cpuidle_idle_call+0x65/0x9a
     [<c010262c>] cpu_idle+0x76/0xa6
     [<c02fb402>] rest_init+0x62/0x64

    Signed-off-by: Bob Copeland <me@bobcopeland.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>