From b194a07f0394306f16d57e66791da357576a689a Mon Sep 17 00:00:00 2001 From: Shaibal Dutta Date: Thu, 30 Jan 2014 15:08:30 -0800 Subject: [PATCH] net: wireless: move regulatory timeout work to power efficient workqueue For better use of CPU idle time, allow the scheduler to select the CPU on which the timeout work of regulatory settings would be executed. This extends CPU idle residency time and saves power. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Cc: "John W. Linville" Cc: "David S. Miller" Signed-off-by: Shaibal Dutta [zoran.markovic@linaro.org: Rebased to latest kernel. Added commit message.] Signed-off-by: Zoran Markovic Signed-off-by: Johannes Berg --- net/wireless/reg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 589b85afa88b..9a3c2a51d71b 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1588,8 +1588,8 @@ static void reg_process_hint(struct regulatory_request *reg_request, break; default: if (reg_initiator == NL80211_REGDOM_SET_BY_USER) - schedule_delayed_work(®_timeout, - msecs_to_jiffies(3142)); + queue_delayed_work(system_power_efficient_wq, + ®_timeout, msecs_to_jiffies(3142)); break; } } @@ -2192,7 +2192,8 @@ static int __set_regdom(const struct ieee80211_regdomain *rd) if (!request_wiphy && (lr->initiator == NL80211_REGDOM_SET_BY_DRIVER || lr->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE)) { - schedule_delayed_work(®_timeout, 0); + queue_delayed_work(system_power_efficient_wq, + ®_timeout, 0); return -ENODEV; }