UPSTREAM: net/wireless: enable wiphy device to suspend/resume asynchronously

Now, PM core supports asynchronous suspend/resume mode for devices
during system suspend/resume, and the power state transition of one
device may be completed in separate kernel thread. PM core ensures
all power state transition timing dependency between devices. This
patch enables wiphy device to suspend/resume asynchronously. This can
take advantage of multicore and improve system suspend/resume speed.

Comparison of power_Resume test results (by cywang):
w/o patch
seconds_system_resume_kernel{perf}=0.879189
seconds_system_resume{perf}=1.31215405464
w/ patch
seconds_system_resume_kernel{perf}=0.634252
seconds_system_resume{perf}=1.07773995399

This shows an improvement of overall resume time of ~230 ms.

BUG=chrome-os-partner:46185
TEST=run the power_Resume test with and without this patch and check
that the total wake-up time is shorter with this patch.

Change-Id: I5c09b78ffcc4c315ddc698a6e95b60174b7865b5
Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry-picked from 9f0e13546ef5773b7059b531a667ec47a5f897ee)
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/304337
Reviewed-by: Sameer Nanda <snanda@chromium.org>
1 file changed