svn commit: r281070 - head/sys/dev/usb/wlan
Rui Paulo
rpaulo at FreeBSD.org
Sat Apr 4 08:41:04 UTC 2015
Author: rpaulo
Date: Sat Apr 4 08:41:02 2015
New Revision: 281070
URL: https://svnweb.freebsd.org/changeset/base/281070
Log:
urtwn: blink the LED when scanning.
Previously, the driver was trying to blink the LED in the newstate
function, but that only gets called once (unlike OpenBSD's net80211
stack). Move the LED blinking to set_channel().
While there, don't try to set the channel when we switch to the SCAN
state. This is already accomplished by the set_channel() function.
MFC after: 1 week
Modified:
head/sys/dev/usb/wlan/if_urtwn.c
Modified: head/sys/dev/usb/wlan/if_urtwn.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwn.c Sat Apr 4 08:36:02 2015 (r281069)
+++ head/sys/dev/usb/wlan/if_urtwn.c Sat Apr 4 08:41:02 2015 (r281070)
@@ -1568,14 +1568,9 @@ urtwn_newstate(struct ieee80211vap *vap,
urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(1), reg);
}
}
- /* Make link LED blink during scan. */
- urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink);
-
/* Pause AC Tx queues. */
urtwn_write_1(sc, R92C_TXPAUSE,
urtwn_read_1(sc, R92C_TXPAUSE) | 0x0f);
-
- urtwn_set_chan(sc, ic->ic_curchan, NULL);
break;
case IEEE80211_S_AUTH:
/* Set initial gain under link. */
@@ -3131,8 +3126,13 @@ static void
urtwn_set_channel(struct ieee80211com *ic)
{
struct urtwn_softc *sc = ic->ic_ifp->if_softc;
+ struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
URTWN_LOCK(sc);
+ if (vap->iv_state == IEEE80211_S_SCAN) {
+ /* Make link LED blink during scan. */
+ urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink);
+ }
urtwn_set_chan(sc, ic->ic_curchan, NULL);
URTWN_UNLOCK(sc);
}
More information about the svn-src-head
mailing list