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
This commit is contained in:
parent
eb3d4ff1d0
commit
392f5f9c34
@ -1568,14 +1568,9 @@ urtwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user