
To protect firmware not downloaded in system suspend, acquire/release the cnss semaphore cnss_pm_sem. It is complex, and cnss function cnss_pm_notify may trigger dead lock issue once PM_POST_SUSPEND is ahead of PM_SUSPEND_PREPARE. Optimize code to use PM wakelock API to protect firmware downloading. Change-Id: I533c373b85f554fbcceb562d9f56c6b88e5155bb CRs-Fixed: 3280247