Add global TX timeout handling.
The global TX timeout counter increments whenever a frame is ready to be transmitted and the medium is busy.
This commit is contained in:
parent
66f3a31ff9
commit
6ad02dbafe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220772
@ -123,6 +123,7 @@ typedef enum {
|
|||||||
HAL_CAP_SPLIT_4KB_TRANS = 40, /* hardware supports descriptors straddling a 4k page boundary */
|
HAL_CAP_SPLIT_4KB_TRANS = 40, /* hardware supports descriptors straddling a 4k page boundary */
|
||||||
HAL_CAP_HAS_PSPOLL = 41, /* hardware has ps-poll support */
|
HAL_CAP_HAS_PSPOLL = 41, /* hardware has ps-poll support */
|
||||||
HAL_CAP_RXDESC_SELFLINK = 42, /* support a self-linked tail RX descriptor */
|
HAL_CAP_RXDESC_SELFLINK = 42, /* support a self-linked tail RX descriptor */
|
||||||
|
HAL_CAP_GTXTO = 43, /* hardware supports global tx timeout */
|
||||||
} HAL_CAPABILITY_TYPE;
|
} HAL_CAPABILITY_TYPE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -275,6 +275,8 @@ ar5416GetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
|
|||||||
uint32_t capability, uint32_t *result)
|
uint32_t capability, uint32_t *result)
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case HAL_CAP_GTXTO:
|
||||||
|
return HAL_OK; /* All AR5416+ supports Global TX Timeout */
|
||||||
case HAL_CAP_BB_HANG:
|
case HAL_CAP_BB_HANG:
|
||||||
switch (capability) {
|
switch (capability) {
|
||||||
case HAL_BB_HANG_RIFS:
|
case HAL_BB_HANG_RIFS:
|
||||||
|
@ -605,10 +605,8 @@ ar5416InitUserSettings(struct ath_hal *ah)
|
|||||||
ar5212SetCTSTimeout(ah, ahp->ah_ctstimeout);
|
ar5212SetCTSTimeout(ah, ahp->ah_ctstimeout);
|
||||||
if (AH_PRIVATE(ah)->ah_diagreg != 0)
|
if (AH_PRIVATE(ah)->ah_diagreg != 0)
|
||||||
OS_REG_WRITE(ah, AR_DIAG_SW, AH_PRIVATE(ah)->ah_diagreg);
|
OS_REG_WRITE(ah, AR_DIAG_SW, AH_PRIVATE(ah)->ah_diagreg);
|
||||||
#if 0 /* XXX Todo */
|
if (AH5416(ah)->ah_globaltxtimeout != (u_int) -1)
|
||||||
if (ahp->ah_globaltxtimeout != (u_int) -1)
|
ar5416SetGlobalTxTimeout(ah, AH5416(ah)->ah_globaltxtimeout);
|
||||||
ar5416SetGlobalTxTimeout(ah, ahp->ah_globaltxtimeout);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1355,6 +1355,8 @@ ath_intr(void *arg)
|
|||||||
sc->sc_stats.ast_bmiss++;
|
sc->sc_stats.ast_bmiss++;
|
||||||
taskqueue_enqueue(sc->sc_tq, &sc->sc_bmisstask);
|
taskqueue_enqueue(sc->sc_tq, &sc->sc_bmisstask);
|
||||||
}
|
}
|
||||||
|
if (status & HAL_INT_GTT)
|
||||||
|
sc->sc_stats.ast_tx_timeout++;
|
||||||
if (status & HAL_INT_MIB) {
|
if (status & HAL_INT_MIB) {
|
||||||
sc->sc_stats.ast_mib++;
|
sc->sc_stats.ast_mib++;
|
||||||
/*
|
/*
|
||||||
@ -1559,6 +1561,10 @@ ath_init(void *arg)
|
|||||||
if (sc->sc_needmib && ic->ic_opmode == IEEE80211_M_STA)
|
if (sc->sc_needmib && ic->ic_opmode == IEEE80211_M_STA)
|
||||||
sc->sc_imask |= HAL_INT_MIB;
|
sc->sc_imask |= HAL_INT_MIB;
|
||||||
|
|
||||||
|
/* Enable global TX timeout statistics if available */
|
||||||
|
if (ath_hal_gtxto_supported(ah))
|
||||||
|
sc->sc_imask |= (HAL_INT_GTT & HAL_INT_BMISC);
|
||||||
|
|
||||||
ifp->if_drv_flags |= IFF_DRV_RUNNING;
|
ifp->if_drv_flags |= IFF_DRV_RUNNING;
|
||||||
callout_reset(&sc->sc_wd_ch, hz, ath_watchdog, sc);
|
callout_reset(&sc->sc_wd_ch, hz, ath_watchdog, sc);
|
||||||
ath_hal_intrset(ah, sc->sc_imask);
|
ath_hal_intrset(ah, sc->sc_imask);
|
||||||
|
@ -705,6 +705,8 @@ ath_sysctl_stats_attach(struct ath_softc *sc)
|
|||||||
&sc->sc_stats.ast_tx_htprotect, 0, "HT tx frames with protection");
|
&sc->sc_stats.ast_tx_htprotect, 0, "HT tx frames with protection");
|
||||||
SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_hitqueueend", CTLFLAG_RD,
|
SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_hitqueueend", CTLFLAG_RD,
|
||||||
&sc->sc_stats.ast_rx_hitqueueend, 0, "RX hit queue end");
|
&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");
|
||||||
|
|
||||||
/* Attach the RX phy error array */
|
/* Attach the RX phy error array */
|
||||||
ath_sysctl_stats_attach_rxphyerr(sc, child);
|
ath_sysctl_stats_attach_rxphyerr(sc, child);
|
||||||
|
@ -129,7 +129,8 @@ struct ath_stats {
|
|||||||
u_int32_t ast_rx_hi_rx_chain;
|
u_int32_t ast_rx_hi_rx_chain;
|
||||||
u_int32_t ast_tx_htprotect; /* HT tx frames with protection */
|
u_int32_t ast_tx_htprotect; /* HT tx frames with protection */
|
||||||
u_int32_t ast_rx_hitqueueend;
|
u_int32_t ast_rx_hitqueueend;
|
||||||
u_int32_t ast_pad[2];
|
u_int32_t ast_tx_timeout; /* Global TX timeout */
|
||||||
|
u_int32_t ast_pad[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SIOCGATHSTATS _IOWR('i', 137, struct ifreq)
|
#define SIOCGATHSTATS _IOWR('i', 137, struct ifreq)
|
||||||
|
@ -649,6 +649,8 @@ void ath_intr(void *);
|
|||||||
(ath_hal_getcapability(_ah, HAP_CAP_SPLIT_4KB_TRANS, 0, NULL) == HAL_OK)
|
(ath_hal_getcapability(_ah, HAP_CAP_SPLIT_4KB_TRANS, 0, NULL) == HAL_OK)
|
||||||
#define ath_hal_self_linked_final_rxdesc(_ah) \
|
#define ath_hal_self_linked_final_rxdesc(_ah) \
|
||||||
(ath_hal_getcapability(_ah, HAL_CAP_RXDESC_SELFLINK, 0, NULL) == HAL_OK)
|
(ath_hal_getcapability(_ah, HAL_CAP_RXDESC_SELFLINK, 0, NULL) == HAL_OK)
|
||||||
|
#define ath_hal_gtxto_supported(_ah) \
|
||||||
|
(ath_hal_getcapability(_ah, HAL_CAP_GTXTO, 0, NULL) == HAL_OK)
|
||||||
|
|
||||||
#define ath_hal_setuprxdesc(_ah, _ds, _size, _intreq) \
|
#define ath_hal_setuprxdesc(_ah, _ds, _size, _intreq) \
|
||||||
((*(_ah)->ah_setupRxDesc)((_ah), (_ds), (_size), (_intreq)))
|
((*(_ah)->ah_setupRxDesc)((_ah), (_ds), (_size), (_intreq)))
|
||||||
|
Loading…
Reference in New Issue
Block a user