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" <linville@tuxdriver.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Shaibal Dutta <shaibal.dutta@broadcom.com>
[zoran.markovic@linaro.org: Rebased to latest kernel. Added commit message.]
Signed-off-by: Zoran Markovic <zoran.markovic@linaro.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Shaibal Dutta 2014-01-30 15:08:30 -08:00 committed by syphyr
parent d554c91a58
commit b194a07f03
1 changed files with 4 additions and 3 deletions

View File

@ -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(&reg_timeout,
msecs_to_jiffies(3142));
queue_delayed_work(system_power_efficient_wq,
&reg_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(&reg_timeout, 0);
queue_delayed_work(system_power_efficient_wq,
&reg_timeout, 0);
return -ENODEV;
}