From owner-svn-src-all@FreeBSD.ORG Fri Apr 15 16:55:45 2011 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 E3E14106566B; Fri, 15 Apr 2011 16:55:45 +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 D30408FC16; Fri, 15 Apr 2011 16:55:45 +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 p3FGtjjn075910; Fri, 15 Apr 2011 16:55:45 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3FGtjAI075908; Fri, 15 Apr 2011 16:55:45 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201104151655.p3FGtjAI075908@svn.freebsd.org> From: Bernhard Schmidt Date: Fri, 15 Apr 2011 16:55:45 +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: r220660 - 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: Fri, 15 Apr 2011 16:55:46 -0000 Author: bschmidt Date: Fri Apr 15 16:55:45 2011 New Revision: 220660 URL: http://svn.freebsd.org/changeset/base/220660 Log: Only handle beacon misses while in RUN state and not scanning. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Fri Apr 15 16:50:37 2011 (r220659) +++ head/sys/dev/iwn/if_iwn.c Fri Apr 15 16:55:45 2011 (r220660) @@ -2463,23 +2463,22 @@ iwn_notif_intr(struct iwn_softc *sc) BUS_DMASYNC_POSTREAD); misses = le32toh(miss->consecutive); - /* XXX not sure why we're notified w/ zero */ - if (misses == 0) - break; DPRINTF(sc, IWN_DEBUG_STATE, "%s: beacons missed %d/%d\n", __func__, misses, le32toh(miss->total)); - /* * If more than 5 consecutive beacons are missed, * reinitialize the sensitivity state machine. */ - if (vap->iv_state == IEEE80211_S_RUN && misses > 5) - (void) iwn_init_sensitivity(sc); - if (misses >= vap->iv_bmissthreshold) { - IWN_UNLOCK(sc); - ieee80211_beacon_miss(ic); - IWN_LOCK(sc); + if (vap->iv_state == IEEE80211_S_RUN && + (ic->ic_flags & IEEE80211_F_SCAN) != 0) { + if (misses > 5) + (void)iwn_init_sensitivity(sc); + if (misses >= vap->iv_bmissthreshold) { + IWN_UNLOCK(sc); + ieee80211_beacon_miss(ic); + IWN_LOCK(sc); + } } break; }