From owner-p4-projects@FreeBSD.ORG Tue Oct 2 03:54:15 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DC8D216A468; Tue, 2 Oct 2007 03:54:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85DFD16A420 for ; Tue, 2 Oct 2007 03:54:14 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 066BC13C45B for ; Tue, 2 Oct 2007 03:54:14 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l923sDte081112 for ; Tue, 2 Oct 2007 03:54:13 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l923sDgF081109 for perforce@freebsd.org; Tue, 2 Oct 2007 03:54:13 GMT (envelope-from thompsa@freebsd.org) Date: Tue, 2 Oct 2007 03:54:13 GMT Message-Id: <200710020354.l923sDgF081109@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 127086 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 03:54:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=127086 Change 127086 by thompsa@thompsa_heff on 2007/10/02 03:54:06 Move the INITED check to when the fw command is actaully issued, and use the ASSOCIATED to see if we are actually connected. Affected files ... .. //depot/projects/wifi/sys/dev/ipw/if_ipw.c#33 edit Differences ... ==== //depot/projects/wifi/sys/dev/ipw/if_ipw.c#33 (text+ko) ==== @@ -850,12 +850,7 @@ return (*sc->sc_newstate)(ic, nstate, arg); case IEEE80211_S_INIT: - /* - * NB: don't try to do this if ipw_stop_master has - * shutdown the firmware and disabled interrupts. - */ - if (ic->ic_state == IEEE80211_S_RUN && - (sc->flags & IPW_FLAG_FW_INITED)) + if (sc->flags & IPW_FLAG_ASSOCIATED) taskqueue_enqueue_fast(taskqueue_fast, &sc->sc_disassoc_task); @@ -2457,6 +2452,13 @@ DPRINTF(("Disassociate from %6D\n", ni->ni_bssid, ":")); + /* + * NB: don't try to do this if ipw_stop_master has + * shutdown the firmware and disabled interrupts. + */ + if (sc->flags & IPW_FLAG_FW_INITED) + return (0); + sc->flags &= ~IPW_FLAG_ASSOCIATED; /* * NB: firmware currently ignores bssid parameter, but