ath9k: Fix beacon processing in offchannel
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Fri, 12 Sep 2014 06:40:48 +0000 (12:10 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 15 Sep 2014 19:00:50 +0000 (15:00 -0400)
commit48bf43fad76eb656f55bff3e3febe91578f1afe3
treee124a36255506ed29cdb41f8fef42de85319e20f
parent6b5447ce630cdc231caf4f958325f8fa925216bf
ath9k: Fix beacon processing in offchannel

When interfaces of different types are present
in a context and an offchannel request is received
on a STA interface, we end up trying to process
beacons received when we are offchannel. This hits
the below warning since offchannel will not have proper
beacon parameters.

Fix this by not processing beacons received when we
are offchannel.

------------[ cut here ]------------
WARNING: CPU: 1 PID: 0 at ../drivers/net/wireless/ath/ath9k/recv.c:552 ath_rx_tasklet+0xf8f/0x1020 [ath9k]()
CPU: 1 PID: 0 Comm: swapper/1 Tainted: G           O   3.17.0-rc4-wl-debug #16
Hardware name: LENOVO 28427ZQ/INVALID, BIOS 6JET58WW (1.16 ) 09/17/2009
 0000000000000000 15916787056abba3 ffff88013b603d08 ffffffff8156af94
 ffff88013b603d50 ffff88013b603d40 ffffffff81070dbd ffff8800a84bb300
 ffff8800b05db358 ffff8800a84cc578 ffff8800a84bb300 ffff8800b05daa40
Call Trace:
 <IRQ>  [<ffffffff8156af94>] dump_stack+0x4d/0x6f
 [<ffffffff81070dbd>] warn_slowpath_common+0x7d/0xa0
 [<ffffffff81070e3c>] warn_slowpath_fmt+0x5c/0x80
 [<ffffffff81572143>] ? _raw_spin_lock_irqsave+0x83/0xa0
 [<ffffffffa09d04a6>] ? ath_rx_tasklet+0x9f6/0x1020 [ath9k]
 [<ffffffffa09d0a3f>] ath_rx_tasklet+0xf8f/0x1020 [ath9k]
 [<ffffffffa09cd4f4>] ath9k_tasklet+0xf4/0x310 [ath9k]
 [<ffffffff81075a97>] tasklet_action+0xe7/0xf0
 [<ffffffff8107508a>] __do_softirq+0x12a/0x340
 [<ffffffff8107544e>] irq_exit+0x9e/0xc0
 [<ffffffff81575e56>] do_IRQ+0x56/0xe0
 [<ffffffff81573c72>] common_interrupt+0x72/0x72
 <EOI>  [<ffffffff81421037>] ? cpuidle_enter_state+0x67/0x1a0
 [<ffffffff81421257>] cpuidle_enter+0x17/0x20
 [<ffffffff810b3ebe>] cpu_startup_entry+0x3ce/0x420
 [<ffffffff81048563>] start_secondary+0x233/0x2c0
---[ end trace f15c3e33ba78d840 ]---
------------[ cut here ]------------

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/recv.c