From owner-svn-src-user@FreeBSD.ORG Wed May 22 00:58:05 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 095F4B10; Wed, 22 May 2013 00:58:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DF925BEB; Wed, 22 May 2013 00:58:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4M0w4BW041042; Wed, 22 May 2013 00:58:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4M0w48H041037; Wed, 22 May 2013 00:58:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201305220058.r4M0w48H041037@svn.freebsd.org> From: Adrian Chadd Date: Wed, 22 May 2013 00:58:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r250898 - user/adrian/net80211_tx/sys/dev/ath X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2013 00:58:05 -0000 Author: adrian Date: Wed May 22 00:58:03 2013 New Revision: 250898 URL: http://svnweb.freebsd.org/changeset/base/250898 Log: Re-sync against -HEAD. Modified: user/adrian/net80211_tx/sys/dev/ath/if_ath.c user/adrian/net80211_tx/sys/dev/ath/if_ath_sysctl.c user/adrian/net80211_tx/sys/dev/ath/if_ath_tx.c user/adrian/net80211_tx/sys/dev/ath/if_athvar.h Modified: user/adrian/net80211_tx/sys/dev/ath/if_ath.c ============================================================================== --- user/adrian/net80211_tx/sys/dev/ath/if_ath.c Wed May 22 00:57:22 2013 (r250897) +++ user/adrian/net80211_tx/sys/dev/ath/if_ath.c Wed May 22 00:58:03 2013 (r250898) @@ -689,7 +689,6 @@ ath_attach(u_int16_t devid, struct ath_s * otherwise) to be transmitted. */ sc->sc_txq_data_minfree = 10; - /* * Leave this as default to maintain legacy behaviour. * Shortening the cabq/mcastq may end up causing some @@ -4020,9 +4019,6 @@ ath_tx_processq(struct ath_softc *sc, st #endif /* IEEE80211_SUPPORT_SUPERG */ int nacked; HAL_STATUS status; -#ifdef IEEE80211_SUPPORT_TDMA - int qbusy; -#endif /* IEEE80211_SUPPORT_TDMA */ DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: tx queue %u head %p link %p\n", __func__, txq->axq_qnum, @@ -4149,41 +4145,13 @@ ath_tx_processq(struct ath_softc *sc, st ieee80211_ff_flush(ic, txq->axq_ac); #endif - ATH_TX_LOCK(sc); - - /* - * Check whether the queue is currently waiting for - * a buffer push and if so, push it. - * - * Since we now limit how deep the TXQ can get, - * we may reach a point where we can't make further - * progress even though there's frames in the - * queue to be scheduled. If we hit this highly - * unlikely case, let's print out a warning and - * restart transmit. - */ -#ifdef IEEE80211_SUPPORT_TDMA - qbusy = ath_hal_txqenabled(ah, txq->axq_qnum); - /* - * If the queue is no longer busy yet there's a - * pending push, make sure it's done. - */ - if ((txq->axq_flags & ATH_TXQ_PUTPENDING) && !qbusy) { - device_printf(sc->sc_dev, - "%s: TXQ %d: PUTPENDING!\n", - __func__, - txq->axq_qnum); - ath_tx_push_pending(sc, txq); - } -#endif - /* Kick the software TXQ scheduler */ if (dosched) { + ATH_TX_LOCK(sc); ath_txq_sched(sc, txq); + ATH_TX_UNLOCK(sc); } - ATH_TX_UNLOCK(sc); - ATH_KTR(sc, ATH_KTR_TXCOMP, 1, "ath_tx_processq: txq=%u: done", txq->axq_qnum); @@ -6275,13 +6243,6 @@ ath_tx_update_tim(struct ath_softc *sc, ATH_TX_LOCK_ASSERT(sc); if (enable) { - /* - * Don't bother grabbing the lock unless the queue is not - * empty. - */ - if (an->an_swq_depth == 0) - return; - if (an->an_is_powersave && an->an_tim_set == 0 && an->an_swq_depth != 0) { @@ -6294,6 +6255,12 @@ ath_tx_update_tim(struct ath_softc *sc, (void) avp->av_set_tim(ni, 1); } } else { + /* + * Don't bother grabbing the lock unless the queue is empty. + */ + if (&an->an_swq_depth != 0) + return; + if (an->an_is_powersave && an->an_stack_psq == 0 && an->an_tim_set == 1 && Modified: user/adrian/net80211_tx/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- user/adrian/net80211_tx/sys/dev/ath/if_ath_sysctl.c Wed May 22 00:57:22 2013 (r250897) +++ user/adrian/net80211_tx/sys/dev/ath/if_ath_sysctl.c Wed May 22 00:58:03 2013 (r250898) @@ -760,11 +760,6 @@ ath_sysctlattach(struct ath_softc *sc) &sc->sc_txq_node_maxdepth, 0, "Maximum buffer depth for a single node"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "sc_txq_node_psq_maxdepth", CTLFLAG_RW, - &sc->sc_txq_node_psq_maxdepth, 0, - "Maximum queue depth for a node in powersave"); - #if 0 SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "cabq_enable", CTLFLAG_RW, @@ -1084,9 +1079,6 @@ ath_sysctl_stats_attach(struct ath_softc &sc->sc_stats.ast_rx_keymiss, 0, ""); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_swfiltered", CTLFLAG_RD, &sc->sc_stats.ast_tx_swfiltered, 0, ""); - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_node_psq_overflow", - CTLFLAG_RD, &sc->sc_stats.ast_tx_node_psq_overflow, 0, - "Number of frames dropped because the node was in powersave"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_stbc", CTLFLAG_RD, &sc->sc_stats.ast_rx_stbc, 0, "Number of STBC frames received"); Modified: user/adrian/net80211_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/net80211_tx/sys/dev/ath/if_ath_tx.c Wed May 22 00:57:22 2013 (r250897) +++ user/adrian/net80211_tx/sys/dev/ath/if_ath_tx.c Wed May 22 00:58:03 2013 (r250898) @@ -736,43 +736,6 @@ ath_tx_handoff_mcast(struct ath_softc *s ATH_TXQ_UNLOCK(txq); } -void -ath_tx_push_pending(struct ath_softc *sc, struct ath_txq *txq) -{ - struct ath_hal *ah = sc->sc_ah; - struct ath_buf *bf; - - /* - * The q was busy when we previously tried - * to write the address of the first buffer - * in the chain. Since it's not busy now - * handle this chore. We are certain the - * buffer at the front is the right one since - * axq_link is NULL only when the buffer list - * is/was empty. - */ - bf = TAILQ_FIRST(&txq->axq_q); - if (bf == NULL) { - device_printf(sc->sc_dev, - "%s: TXQ %d: called, but no buf?\n", - __func__, - txq->axq_qnum); - return; - } - ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); - txq->axq_flags &= ~ATH_TXQ_PUTPENDING; - DPRINTF(sc, ATH_DEBUG_TDMA | ATH_DEBUG_XMIT, - "%s: Q%u restarted\n", __func__, - txq->axq_qnum); - ATH_KTR(sc, ATH_KTR_TX, 4, - "ath_tx_handoff: txq[%d] restarted, bf=%p " - "daddr=%p ds=%p", - txq->axq_qnum, - bf, - (caddr_t)bf->bf_daddr, - bf->bf_desc); -} - /* * Hand-off packet to a hardware queue. */ @@ -3808,12 +3771,10 @@ ath_tx_tid_drain_print(struct ath_softc tid->baw_tail, tap == NULL ? -1 : tap->txa_start, ni->ni_txseqs[tid->tid]); -#if 0 /* XXX Dump the frame, see what it is? */ ieee80211_dump_pkt(ni->ni_ic, mtod(bf->bf_m, const uint8_t *), bf->bf_m->m_len, 0, -1); -#endif } /* @@ -3854,7 +3815,7 @@ ath_tx_tid_drain(struct ath_softc *sc, s if (t == 0) { ath_tx_tid_drain_print(sc, an, "norm", tid, bf); -// t = 1; + t = 1; } ATH_TID_REMOVE(tid, bf, bf_list); @@ -3870,7 +3831,7 @@ ath_tx_tid_drain(struct ath_softc *sc, s if (t == 0) { ath_tx_tid_drain_print(sc, an, "filt", tid, bf); -// t = 1; + t = 1; } ATH_TID_FILT_REMOVE(tid, bf, bf_list); @@ -5269,6 +5230,7 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft ath_tx_rate_fill_rcflags(sc, bf); ath_tx_setds(sc, bf); ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc); + sc->sc_aggr_stats.aggr_nonbaw_pkt++; /* Queue the packet; continue */ @@ -5367,6 +5329,7 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft * already points to the rest in the chain. */ ath_tx_setds_11n(sc, bf); + } queuepkt: /* Set completion handler, multi-frame aggregate or not */ Modified: user/adrian/net80211_tx/sys/dev/ath/if_athvar.h ============================================================================== --- user/adrian/net80211_tx/sys/dev/ath/if_athvar.h Wed May 22 00:57:22 2013 (r250897) +++ user/adrian/net80211_tx/sys/dev/ath/if_athvar.h Wed May 22 00:58:03 2013 (r250898) @@ -386,6 +386,7 @@ struct ath_txq { #define ATH_TXQ_UNLOCK_ASSERT(_tq) mtx_assert(&(_tq)->axq_lock, \ MA_NOTOWNED) + #define ATH_NODE_LOCK(_an) mtx_lock(&(_an)->an_mtx) #define ATH_NODE_UNLOCK(_an) mtx_unlock(&(_an)->an_mtx) #define ATH_NODE_LOCK_ASSERT(_an) mtx_assert(&(_an)->an_mtx, MA_OWNED)