wlcore: Simplify runtime resume ELP path
authorTony Lindgren <tony@atomide.com>
Thu, 2 Jul 2020 16:29:48 +0000 (09:29 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 15 Jul 2020 09:12:27 +0000 (12:12 +0300)
commiteb215c33f308cefe6d3691ffac27f9f498280811
tree7222f54cba9d109f0a750615393dec4d06f6ff41
parent0ef0ace3e8e7d7be6dd7de2617ef3590170a3392
wlcore: Simplify runtime resume ELP path

We can simplify the runtime resume ELP path by always setting and
clearing the completion in runtime resume. This way we can test for
WL1271_FLAG_IRQ_RUNNING after the resume write to see if we need
completion at all.

And in wlcore_irq(), we need to take spinlock for running the
completion and for the pm_wakeup_event(). Spinlock is not needed
around the bitops flags check for WL1271_FLAG_SUSPENDED so the
spinlocked sections get shorter.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200702162951.45392-2-tony@atomide.com
drivers/net/wireless/ti/wlcore/main.c