From owner-svn-src-all@FreeBSD.ORG Mon Dec 6 18:28:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AD161065673; Mon, 6 Dec 2010 18:28:39 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78FC28FC0C; Mon, 6 Dec 2010 18:28:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oB6ISdul040985; Mon, 6 Dec 2010 18:28:39 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oB6ISdjA040983; Mon, 6 Dec 2010 18:28:39 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201012061828.oB6ISdjA040983@svn.freebsd.org> From: Bernhard Schmidt Date: Mon, 6 Dec 2010 18:28:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216237 - head/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2010 18:28:39 -0000 Author: bschmidt Date: Mon Dec 6 18:28:39 2010 New Revision: 216237 URL: http://svn.freebsd.org/changeset/base/216237 Log: 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 MFC after: 1 week Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Dec 6 17:06:21 2010 (r216236) +++ head/sys/dev/iwn/if_iwn.c Mon Dec 6 18:28:39 2010 (r216237) @@ -1983,7 +1983,8 @@ iwn_newstate(struct ieee80211vap *vap, e /* * 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 iee 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);