From: Grazvydas Ignotas Date: Sat, 4 Aug 2012 23:51:18 +0000 (+0300) Subject: wl1251: only call ieee80211_beacon_loss in managed mode X-Git-Tag: sz_release_151~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c8317659cf5482682be922686cab9673fa5b04a;p=pandora-kernel.git wl1251: only call ieee80211_beacon_loss in managed mode It seems the firmware can send SYNCHRONIZATION_TIMEOUT_EVENT at any time, while ieee80211_beacon_loss() can only be called in managed mode, so we need to do appropriate checks. Otherwise BUG() can be seen triggered while attempting to set up adhoc mode: kernel BUG at kernel/workqueue.c:1040! ... [] (__queue_work+0x17c/0x238) from [] (queue_work_on+0x2c/0x34) [] (queue_work_on+0x2c/0x34) from [] (wl1251_event_handle+0xb8/0x158 [wl1251]) [] (wl1251_event_handle+0xb8/0x158 [wl1251]) from [] (wl1251_irq_work+0x128/0x188 [wl1251]) [] (wl1251_irq_work+0x128/0x188 [wl1251]) from [] (process_one_work+0x1e0/0x30c) ... Signed-off-by: Grazvydas Ignotas --- Reading git-diff-tree failed