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!
...
[<
c0049e90>] (__queue_work+0x17c/0x238) from [<
c0049f98>] (queue_work_on+0x2c/0x34)
[<
c0049f98>] (queue_work_on+0x2c/0x34) from [<
bf2098b4>] (wl1251_event_handle+0xb8/0x158 [wl1251])
[<
bf2098b4>] (wl1251_event_handle+0xb8/0x158 [wl1251]) from [<
bf2095a4>] (wl1251_irq_work+0x128/0x188 [wl1251])
[<
bf2095a4>] (wl1251_irq_work+0x128/0x188 [wl1251]) from [<
c004a2d0>] (process_one_work+0x1e0/0x30c)
...
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>