From ac29316d9ab81a8f1bd6cb54bf35253cfb748876 Mon Sep 17 00:00:00 2001 From: adrian Date: Tue, 13 Nov 2012 06:28:57 +0000 Subject: [PATCH] Add some debugging to try and catch an invalid TX rate (0x0) that is being reported. --- sys/dev/ath/if_ath_tx.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index e18785ead05..52c71fb1561 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -528,11 +528,19 @@ ath_tx_setds_11n(struct ath_softc *sc, struct ath_buf *bf_first) __func__, bf_first->bf_state.bfs_nframes, bf_first->bf_state.bfs_al); + bf = bf_first; + + if (bf->bf_state.bfs_txrate0 == 0) + device_printf(sc->sc_dev, "%s: bf=%p, txrate0=%d\n", + __func__, bf, 0); + if (bf->bf_state.bfs_rc[0].ratecode == 0) + device_printf(sc->sc_dev, "%s: bf=%p, rix0=%d\n", + __func__, bf, 0); + /* * Setup all descriptors of all subframes - this will * call ath_hal_set11naggrmiddle() on every frame. */ - bf = bf_first; while (bf != NULL) { DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: bf=%p, nseg=%d, pktlen=%d, seqno=%d\n", @@ -1236,6 +1244,10 @@ ath_tx_setds(struct ath_softc *sc, struct ath_buf *bf) struct ath_desc *ds = bf->bf_desc; struct ath_hal *ah = sc->sc_ah; + if (bf->bf_state.bfs_txrate0 == 0) + device_printf(sc->sc_dev, "%s: bf=%p, txrate0=%d\n", + __func__, bf, 0); + ath_hal_setuptxdesc(ah, ds , bf->bf_state.bfs_pktlen /* packet length */ , bf->bf_state.bfs_hdrlen /* header length */ -- 2.45.2