Search Linux Wireless

[RFC 3/3] mac80211: Disable off-channel powersave when software scans are suspended

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

 



Leaving powersave enabled while the scan is suspended requires the use
of PS-Poll to retrieve frames buffered at the AP. PS-Poll isn't a very
efficient means of data transfer and may not even work with drivers not
supporting powersave. These problems can largely be avoided by simply
disabling off-channel powersave when the scan is suspended and enabling
it again when returning to off-channel operation.

The results of this change are fantastic. Previously when using iperf I
would see greatly decreased throughput (often dropping to 0 bits/sec for
several seconds) and very high packet loss during software scans. This
patch completely eliminates the packet loss and reduces the loss in
throughput to very reasonable levels.

Signed-off-by: Seth Forshee <seth.forshee@xxxxxxxxxxxxx>
---
 net/mac80211/scan.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index a875f74..f982dda 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -699,11 +699,11 @@ static void ieee80211_scan_state_suspend(struct ieee80211_local *local,
 	ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
 
 	/*
-	 * Re-enable vifs and beaconing.  Leave PS
-	 * in off-channel state..will put that back
-	 * on-channel at the end of scanning.
+	 * Re-enable vifs and beaconing.  Disable PS
+	 * while the scan is suspended for more
+	 * efficient frame rx than with PS-Poll.
 	 */
-	ieee80211_offchannel_return(local, false);
+	ieee80211_offchannel_return(local, true);
 
 	*next_delay = HZ / 5;
 	/* afterwards, resume scan & go to next channel */
@@ -713,8 +713,8 @@ static void ieee80211_scan_state_suspend(struct ieee80211_local *local,
 static void ieee80211_scan_state_resume(struct ieee80211_local *local,
 					unsigned long *next_delay)
 {
-	/* PS already is in off-channel mode */
-	ieee80211_offchannel_stop_vifs(local, false);
+	/* Put PS back in off-channel mode */
+	ieee80211_offchannel_stop_vifs(local, true);
 
 	if (local->ops->flush) {
 		drv_flush(local, false);
-- 
1.7.9.5

--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux