Search Linux Wireless

[RFC 3/3 v2] mac80211: enable PS by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Enable PS by default (depending on Kconfig) -- rely on drivers
to control the level using pm_qos. Due to the previous patch
we turn off PS when necessary due to latency requirements.

This has a Kconfig symbol so people can, if they really want,
configure the default in their kernels. We may want to keep it
at "default y" only in wireless-testing for a while.

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
---
 net/mac80211/Kconfig |   16 ++++++++++++++++
 net/mac80211/mlme.c  |    3 +++
 2 files changed, 19 insertions(+)

--- wireless-testing.orig/net/mac80211/mlme.c	2009-04-16 12:22:35.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c	2009-04-16 12:34:21.000000000 +0200
@@ -2200,6 +2200,9 @@ void ieee80211_sta_setup_sdata(struct ie
 		IEEE80211_STA_AUTO_CHANNEL_SEL;
 	if (sdata->local->hw.queues >= 4)
 		ifmgd->flags |= IEEE80211_STA_WMM_ENABLED;
+
+	if (sdata->local->hw.flags & IEEE80211_HW_SUPPORTS_PS)
+		ifmgd->powersave = CONFIG_MAC80211_DEFAULT_PS_VALUE;
 }
 
 /* configuration hooks */
--- wireless-testing.orig/net/mac80211/Kconfig	2009-04-16 12:34:28.000000000 +0200
+++ wireless-testing/net/mac80211/Kconfig	2009-04-16 12:36:52.000000000 +0200
@@ -11,6 +11,22 @@ config MAC80211
 	  This option enables the hardware independent IEEE 802.11
 	  networking stack.
 
+config MAC80211_DEFAULT_PS
+	bool "enable powersave by default"
+	depends on MAC80211
+	default y
+	help
+	  This option enables powersave mode by default.
+
+	  If this causes your applications to misbehave you should fix your
+	  applications instead -- they need to register their network
+	  latency requirement, see Documentation/power/pm_qos_interface.txt.
+
+config MAC80211_DEFAULT_PS_VALUE
+	int
+	default 1 if MAC80211_DEFAULT_PS
+	default 0
+
 menu "Rate control algorithm selection"
 	depends on MAC80211 != n
 


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux