1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Fixes for monitor mode:

- Do not call iwn_calib_reset() for monitor mode. We do not want to query
  information and do runtime calibration while in monitor mode. Poking the
  firmware with adjustments for calibration results in firmware asserts.
  This could happened on RUN -> RUN transition only.
- Adjust blink rate for monitor mode. It's supposed to not freak out and
  turn off after a while.
- While here, remove one useless assignment of calib.state, it gets
  overwritten later in the function.

Submitted by:	Brandon Gooch <jamesbrandongooch at gmail.com>
MFC after:	1 week
This commit is contained in:
Bernhard Schmidt 2010-12-06 18:28:39 +00:00
parent 6074a71604
commit 1b6b62c900
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216237

View File

@ -1983,7 +1983,8 @@ iwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
/*
* RUN -> RUN transition; Just restart the timers.
*/
if (vap->iv_state == IEEE80211_S_RUN) {
if (vap->iv_state == IEEE80211_S_RUN &&
vap->iv_opmode != IEEE80211_M_MONITOR) {
iwn_calib_reset(sc);
break;
}
@ -4851,11 +4852,9 @@ iwn_run(struct iwn_softc *sc, struct ieee80211vap *vap)
struct iwn_node_info node;
int error;
sc->calib.state = IWN_CALIB_STATE_INIT;
if (ic->ic_opmode == IEEE80211_M_MONITOR) {
/* Link LED blinks while monitoring. */
iwn_set_led(sc, IWN_LED_LINK, 5, 5);
iwn_set_led(sc, IWN_LED_LINK, 20, 20);
return 0;
}
error = iwn_set_timing(sc, ni);