Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Mar 2015 21:29:37 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r280118 - head/sys/dev/wpi
Message-ID:  <201503152129.t2FLTbmc091546@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun Mar 15 21:29:36 2015
New Revision: 280118
URL: https://svnweb.freebsd.org/changeset/base/280118

Log:
  Fix scan timeouts with powersave enabled.
  
  PR:		kern/197143
  Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>

Modified:
  head/sys/dev/wpi/if_wpi.c

Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c	Sun Mar 15 21:29:20 2015	(r280117)
+++ head/sys/dev/wpi/if_wpi.c	Sun Mar 15 21:29:36 2015	(r280118)
@@ -1658,6 +1658,15 @@ wpi_newstate(struct ieee80211vap *vap, e
 		ieee80211_state_name[vap->iv_state],
 		ieee80211_state_name[nstate]);
 
+	if (vap->iv_state == IEEE80211_S_RUN && nstate != IEEE80211_S_RUN) {
+		if ((error = wpi_set_pslevel(sc, 0, 0, 1)) != 0) {
+			device_printf(sc->sc_dev,
+			    "%s: could not set power saving level\n",
+			    __func__);
+			return error;
+		}
+	}
+
 	switch (nstate) {
 	case IEEE80211_S_SCAN:
 		WPI_RXON_LOCK(sc);
@@ -4326,8 +4335,6 @@ wpi_run(struct wpi_softc *sc, struct iee
 	if ((vap->iv_flags & IEEE80211_F_PMGTON) &&
 	    vap->iv_opmode != IEEE80211_M_IBSS)
 		(void)wpi_set_pslevel(sc, 0, 3, 1);
-	else
-		(void)wpi_set_pslevel(sc, 0, 0, 1);
 
 	DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503152129.t2FLTbmc091546>