Author: adrian
Date: Mon Apr 18 14:06:18 2011
New Revision: 220782
URL: http://svn.freebsd.org/changeset/base/220782

Log:
  Add TX carrier sense timeout statistics.

Modified:
  head/sys/dev/ath/if_ath.c
  head/sys/dev/ath/if_ath_sysctl.c
  head/sys/dev/ath/if_athioctl.h

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c   Mon Apr 18 14:05:26 2011        (r220781)
+++ head/sys/dev/ath/if_ath.c   Mon Apr 18 14:06:18 2011        (r220782)
@@ -1357,6 +1357,8 @@ ath_intr(void *arg)
                }
                if (status & HAL_INT_GTT)
                        sc->sc_stats.ast_tx_timeout++;
+               if (status & HAL_INT_CST)
+                       sc->sc_stats.ast_tx_cst++;
                if (status & HAL_INT_MIB) {
                        sc->sc_stats.ast_mib++;
                        /*
@@ -1561,9 +1563,9 @@ ath_init(void *arg)
        if (sc->sc_needmib && ic->ic_opmode == IEEE80211_M_STA)
                sc->sc_imask |= HAL_INT_MIB;
 
-       /* Enable global TX timeout statistics if available */
+       /* Enable global TX timeout and carrier sense timeout if available */
        if (ath_hal_gtxto_supported(ah))
-               sc->sc_imask |= HAL_INT_GTT;
+               sc->sc_imask |= (HAL_INT_GTT | HAL_INT_CST);
 
        DPRINTF(sc, ATH_DEBUG_RESET, "%s: imask=0x%x\n",
                __func__, sc->sc_imask);

Modified: head/sys/dev/ath/if_ath_sysctl.c
==============================================================================
--- head/sys/dev/ath/if_ath_sysctl.c    Mon Apr 18 14:05:26 2011        
(r220781)
+++ head/sys/dev/ath/if_ath_sysctl.c    Mon Apr 18 14:06:18 2011        
(r220782)
@@ -707,6 +707,8 @@ ath_sysctl_stats_attach(struct ath_softc
            &sc->sc_stats.ast_rx_hitqueueend, 0, "RX hit queue end");
        SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_timeout", CTLFLAG_RD,
            &sc->sc_stats.ast_tx_timeout, 0, "TX Global Timeout");
+       SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_cst", CTLFLAG_RD,
+           &sc->sc_stats.ast_tx_cst, 0, "TX Carrier Sense Timeout");
 
        /* Attach the RX phy error array */
        ath_sysctl_stats_attach_rxphyerr(sc, child);

Modified: head/sys/dev/ath/if_athioctl.h
==============================================================================
--- head/sys/dev/ath/if_athioctl.h      Mon Apr 18 14:05:26 2011        
(r220781)
+++ head/sys/dev/ath/if_athioctl.h      Mon Apr 18 14:06:18 2011        
(r220782)
@@ -130,6 +130,7 @@ struct ath_stats {
        u_int32_t       ast_tx_htprotect;       /* HT tx frames with protection 
*/
        u_int32_t       ast_rx_hitqueueend;
        u_int32_t       ast_tx_timeout;         /* Global TX timeout */
+       u_int32_t       ast_tx_cst;             /* Carrier sense timeout */
        u_int32_t       ast_pad[16];
 };
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to