diff mbox

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

Message ID 1357668645-5101-4-git-send-email-seth.forshee@canonical.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Seth Forshee Jan. 8, 2013, 6:10 p.m. UTC
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@canonical.com>
---
 net/mac80211/scan.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Stanislaw Gruszka Jan. 9, 2013, 11:03 a.m. UTC | #1
Hi

On Tue, Jan 08, 2013 at 12:10:45PM -0600, Seth Forshee wrote:
> 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.

I posted a patch, which remove offchannel_ps_disable argument from
ieee80211_offchannel_return, since there were possible AP and STA power
save state mismash:

http://marc.info/?l=linux-wireless&m=135601089321822&w=2

It should give the same effect on performance as this patch.

Thanks
Stanislaw

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Seth Forshee Jan. 9, 2013, 1:27 p.m. UTC | #2
On Wed, Jan 09, 2013 at 12:03:44PM +0100, Stanislaw Gruszka wrote:
> Hi
> 
> On Tue, Jan 08, 2013 at 12:10:45PM -0600, Seth Forshee wrote:
> > 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.
> 
> I posted a patch, which remove offchannel_ps_disable argument from
> ieee80211_offchannel_return, since there were possible AP and STA power
> save state mismash:
> 
> http://marc.info/?l=linux-wireless&m=135601089321822&w=2
> 
> It should give the same effect on performance as this patch.

I guess I missed that one in my pile of post-holiday emails. I agree, it
ought to have the same effect as this patch.

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

Patch

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);