Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 May 2015 22:55:07 +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: r282381 - head/sys/dev/wpi
Message-ID:  <201505032255.t43Mt7Jh074313@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun May  3 22:55:06 2015
New Revision: 282381
URL: https://svnweb.freebsd.org/changeset/base/282381

Log:
  Turn off led when leaving RUN state.
  
  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 May  3 22:51:42 2015	(r282380)
+++ head/sys/dev/wpi/if_wpi.c	Sun May  3 22:55:06 2015	(r282381)
@@ -1672,13 +1672,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 (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;
 		}
+
+		wpi_set_led(sc, WPI_LED_LINK, 1, 0);
 	}
 
 	switch (nstate) {



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