summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/ps.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2013-06-28 09:12:53 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-07-17 14:34:48 -0400
commitbcfb879432094c267c35a7ff75d953d3a66c193a (patch)
tree0936e7c4badd2d5efd5f4de84cb5a8f8d66bfad0 /drivers/net/wireless/rtlwifi/ps.c
parentad81f0545ef01ea651886dddac4bef6cec930092 (diff)
rtlwifi: Initialize power-setting callback for USB devices
Commit a269913c5 entitled "rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue" has two bugs for USB drivers. Firstly, the work queue in question was not initialized. Secondly, the callback routine used by this queue is contained within the file used for PCI devices. As a result, it is not available for architectures without PCI hardware. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: Richard Genoud <richard.genoud@gmail.com> Tested-by: Richard Genoud <richard.genoud@gmail.com> Cc: Richard Genoud <richard.genoud@gmail.com> Cc: Stable <stable@vger.kernel.org> [3.10] Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/ps.c')
-rw-r--r--drivers/net/wireless/rtlwifi/ps.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c
index 884bceae38a..71e917db833 100644
--- a/drivers/net/wireless/rtlwifi/ps.c
+++ b/drivers/net/wireless/rtlwifi/ps.c
@@ -611,6 +611,18 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw)
MSECS(sleep_intv * mac->vif->bss_conf.beacon_int - 40));
}
+void rtl_lps_change_work_callback(struct work_struct *work)
+{
+ struct rtl_works *rtlworks =
+ container_of(work, struct rtl_works, lps_change_work);
+ struct ieee80211_hw *hw = rtlworks->hw;
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+
+ if (rtlpriv->enter_ps)
+ rtl_lps_enter(hw);
+ else
+ rtl_lps_leave(hw);
+}
void rtl_swlps_wq_callback(void *data)
{