From owner-p4-projects@FreeBSD.ORG Sat Dec 25 19:28:04 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D3C0816A4D0; Sat, 25 Dec 2004 19:28:03 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 921D116A4CE for ; Sat, 25 Dec 2004 19:28:03 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BC9C43D5C for ; Sat, 25 Dec 2004 19:28:03 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBPJS3sV056155 for ; Sat, 25 Dec 2004 19:28:03 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBPJS3HH056152 for perforce@freebsd.org; Sat, 25 Dec 2004 19:28:03 GMT (envelope-from sam@freebsd.org) Date: Sat, 25 Dec 2004 19:28:03 GMT Message-Id: <200412251928.iBPJS3HH056152@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67687 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Dec 2004 19:28:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=67687 Change 67687 by sam@sam_ebb on 2004/12/25 19:27:40 remove code to purge any node references held by buffers on the tx queues; this is no longer needed with the revised node table management Affected files ... .. //depot/projects/wifi/sys/dev/ath/if_ath.c#45 edit Differences ... ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#45 (text+ko) ==== @@ -2304,43 +2304,14 @@ return &an->an_node; } -/* - * Clear any references to a node in a transmit queue. - * This happens when the node is cleaned so we don't - * need to worry about the reference count going to zero; - * we just reclaim the reference w/o dropping the txq lock. - * Then we null the pointer and the right thing happens - * when the buffer is cleaned in ath_tx_processq. - */ static void -ath_tx_cleanq(struct ieee80211com *ic, struct ath_txq *txq, - struct ieee80211_node *ni) -{ - struct ath_buf *bf; - - ATH_TXQ_LOCK(txq); - STAILQ_FOREACH(bf, &txq->axq_q, bf_list) { - if (bf->bf_node == ni) { - /* NB: this clears the pointer too */ - ieee80211_unref_node(&bf->bf_node); - } - } - ATH_TXQ_UNLOCK(txq); -} - -static void ath_node_free(struct ieee80211_node *ni) { struct ieee80211com *ic = ni->ni_ic; struct ath_softc *sc = ic->ic_ifp->if_softc; - int i; DPRINTF(sc, ATH_DEBUG_NODE, "%s: ni %p\n", __func__, ni); - /* XXX can this happen since refcnt must be zero for us to be called? */ - for (i = 0; i < HAL_NUM_TX_QUEUES; i++) - if (ATH_TXQ_SETUP(sc, i)) - ath_tx_cleanq(ic, &sc->sc_txq[i], ni); ath_rate_node_cleanup(sc, ATH_NODE(ni)); sc->sc_node_free(ni); }