Date: Thu, 8 Sep 2011 23:59:16 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r225453 - user/adrian/if_ath_tx/sys/dev/ath Message-ID: <201109082359.p88NxGg8012712@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Thu Sep 8 23:59:16 2011 New Revision: 225453 URL: http://svn.freebsd.org/changeset/base/225453 Log: * Printing the TX flags field ("F") needed fixing - it was printing an 04 in front, rather than using 04 as part of the field description. * Add support to dump a chain of aggregate buffers, rather than a single buffer. This is suboptimal as the calls to ieee80211_dump_pkt() only dump the first mbuf chain, rather than all aggregate packets. I'll have to fix this up before I commit it to -HEAD. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_debug.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_debug.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_debug.c Thu Sep 8 23:46:07 2011 (r225452) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_debug.c Thu Sep 8 23:59:16 2011 (r225453) @@ -123,33 +123,37 @@ ath_printrxbuf(struct ath_softc *sc, con } void -ath_printtxbuf(struct ath_softc *sc, const struct ath_buf *bf, +ath_printtxbuf(struct ath_softc *sc, const struct ath_buf *first_bf, u_int qnum, u_int ix, int done) { - const struct ath_tx_status *ts = &bf->bf_status.ds_txstat; + const struct ath_tx_status *ts = &first_bf->bf_last->bf_status.ds_txstat; + const struct ath_buf *bf = first_bf; struct ath_hal *ah = sc->sc_ah; const struct ath_desc *ds; int i; printf("Q%u[%3u]", qnum, ix); - for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) { - printf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:04%x%s\n" - " %08x %08x %08x %08x %08x %08x\n", - ds, (const struct ath_desc *)bf->bf_daddr + i, - ds->ds_link, ds->ds_data, bf->bf_txflags, - !done ? "" : (ts->ts_status == 0) ? " *" : " !", - ds->ds_ctl0, ds->ds_ctl1, - ds->ds_hw[0], ds->ds_hw[1], ds->ds_hw[2], ds->ds_hw[3]); - if (ah->ah_magic == 0x20065416) { - printf(" %08x %08x %08x %08x %08x %08x %08x %08x\n", - ds->ds_hw[4], ds->ds_hw[5], ds->ds_hw[6], - ds->ds_hw[7], ds->ds_hw[8], ds->ds_hw[9], - ds->ds_hw[10],ds->ds_hw[11]); - printf(" %08x %08x %08x %08x %08x %08x %08x %08x\n", - ds->ds_hw[12],ds->ds_hw[13],ds->ds_hw[14], - ds->ds_hw[15],ds->ds_hw[16],ds->ds_hw[17], - ds->ds_hw[18], ds->ds_hw[19]); + while (bf != NULL) { + for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) { + printf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:%04x%s\n" + " %08x %08x %08x %08x %08x %08x\n", + ds, (const struct ath_desc *)bf->bf_daddr + i, + ds->ds_link, ds->ds_data, bf->bf_txflags, + !done ? "" : (ts->ts_status == 0) ? " *" : " !", + ds->ds_ctl0, ds->ds_ctl1, + ds->ds_hw[0], ds->ds_hw[1], ds->ds_hw[2], ds->ds_hw[3]); + if (ah->ah_magic == 0x20065416) { + printf(" %08x %08x %08x %08x %08x %08x %08x %08x\n", + ds->ds_hw[4], ds->ds_hw[5], ds->ds_hw[6], + ds->ds_hw[7], ds->ds_hw[8], ds->ds_hw[9], + ds->ds_hw[10],ds->ds_hw[11]); + printf(" %08x %08x %08x %08x %08x %08x %08x %08x\n", + ds->ds_hw[12],ds->ds_hw[13],ds->ds_hw[14], + ds->ds_hw[15],ds->ds_hw[16],ds->ds_hw[17], + ds->ds_hw[18], ds->ds_hw[19]); + } } + bf = bf->bf_next; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109082359.p88NxGg8012712>