]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
rtlwifi: Fix enter/exit power_save
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 26 Nov 2016 20:43:35 +0000 (14:43 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 29 Nov 2016 15:33:10 +0000 (17:33 +0200)
commitba9f93f82abafe2552eac942ebb11c2df4f8dd7f
tree8ae00b560f1a66ba3526a24de79ad22fea833685
parent05db221e30a924f5f80cbef34eb9f210522ceb84
rtlwifi: Fix enter/exit power_save

In commit a5ffbe0a1993 ("rtlwifi: Fix scheduling while atomic bug") and
commit a269913c52ad ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter()
to use work queue"), an error was introduced in the power-save routines
due to the fact that leaving PS was delayed by the use of a work queue.

This problem is fixed by detecting if the enter or leave routines are
in interrupt mode. If so, the workqueue is used to place the request.
If in normal mode, the enter or leave routines are called directly.

Fixes: a269913c52ad ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue")
Reported-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/base.c
drivers/net/wireless/realtek/rtlwifi/core.c
drivers/net/wireless/realtek/rtlwifi/pci.c
drivers/net/wireless/realtek/rtlwifi/ps.c