Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
debug.c File Reference
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/export.h>
#include <asm/unaligned.h>
#include "ath9k.h"

Go to the source code of this file.

Macros

#define REG_WRITE_D(_ah, _reg, _val)   ath9k_hw_common(_ah)->ops->write((_ah), (_val), (_reg))
 
#define REG_READ_D(_ah, _reg)   ath9k_hw_common(_ah)->ops->read((_ah), (_reg))
 
#define DMA_BUF_LEN   1024
 
#define PR_IS(a, s)
 
#define PR_QNUM(_n)   sc->tx.txq_map[_n]->axq_qnum
 
#define PR(str, elem)
 
#define PRX(str, elem)
 
#define PRQLE(str, elem)
 
#define TX_SAMP_DBG(c)
 
#define PHY_ERR(s, p)
 
#define RXS_ERR(s, e)
 
#define RX_PHY_ERR_INC(c)   sc->debug.stats.rxstats.phy_err_stats[c]++
 
#define RX_SAMP_DBG(c)
 
#define REGDUMP_LINE_SIZE   20
 

Functions

void ath_debug_stat_interrupt (struct ath_softc *sc, enum ath9k_int status)
 
void ath_debug_stat_tx (struct ath_softc *sc, struct ath_buf *bf, struct ath_tx_status *ts, struct ath_txq *txq, unsigned int flags)
 
void ath_debug_stat_rx (struct ath_softc *sc, struct ath_rx_status *rs)
 
int ath9k_init_debug (struct ath_hw *ah)
 

Macro Definition Documentation

#define DMA_BUF_LEN   1024

Definition at line 88 of file debug.c.

#define PHY_ERR (   s,
  p 
)
Value:
len += snprintf(buf + len, size - len, "%22s : %10u\n", s, \
sc->debug.stats.rxstats.phy_err_stats[p]);
#define PR (   str,
  elem 
)
Value:
do { \
len += snprintf(buf + len, size - len, \
"%s%13u%11u%10u%10u\n", str, \
sc->debug.stats.txstats[PR_QNUM(WME_AC_BE)].elem, \
sc->debug.stats.txstats[PR_QNUM(WME_AC_BK)].elem, \
sc->debug.stats.txstats[PR_QNUM(WME_AC_VI)].elem, \
sc->debug.stats.txstats[PR_QNUM(WME_AC_VO)].elem); \
if (len >= size) \
goto done; \
} while(0)

Definition at line 516 of file debug.c.

#define PR_IS (   a,
  s 
)
Value:
do { \
len += snprintf(buf + len, mxlen - len, \
"%21s: %10u\n", a, \
sc->debug.stats.istats.s); \
} while (0)
#define PR_QNUM (   _n)    sc->tx.txq_map[_n]->axq_qnum

Definition at line 515 of file debug.c.

#define PRQLE (   str,
  elem 
)
Value:
do { \
len += snprintf(buf + len, size - len, \
"%s%13i%11i%10i%10i\n", str, \
list_empty(&sc->tx.txq_map[WME_AC_BE]->elem), \
list_empty(&sc->tx.txq_map[WME_AC_BK]->elem), \
list_empty(&sc->tx.txq_map[WME_AC_VI]->elem), \
list_empty(&sc->tx.txq_map[WME_AC_VO]->elem)); \
if (len >= size) \
goto done; \
} while (0)

Definition at line 540 of file debug.c.

#define PRX (   str,
  elem 
)
Value:
do { \
len += snprintf(buf + len, size - len, \
"%s%13u%11u%10u%10u\n", str, \
(unsigned int)(sc->tx.txq_map[WME_AC_BE]->elem), \
(unsigned int)(sc->tx.txq_map[WME_AC_BK]->elem), \
(unsigned int)(sc->tx.txq_map[WME_AC_VI]->elem), \
(unsigned int)(sc->tx.txq_map[WME_AC_VO]->elem)); \
if (len >= size) \
goto done; \
} while(0)

Definition at line 528 of file debug.c.

#define REG_READ_D (   _ah,
  _reg 
)    ath9k_hw_common(_ah)->ops->read((_ah), (_reg))

Definition at line 26 of file debug.c.

#define REG_WRITE_D (   _ah,
  _reg,
  _val 
)    ath9k_hw_common(_ah)->ops->write((_ah), (_val), (_reg))

Definition at line 24 of file debug.c.

#define REGDUMP_LINE_SIZE   20

Definition at line 1167 of file debug.c.

#define RX_PHY_ERR_INC (   c)    sc->debug.stats.rxstats.phy_err_stats[c]++
#define RX_SAMP_DBG (   c)
Value:
(sc->debug.bb_mac_samp[sc->debug.sampidx].rs\
[sc->debug.rsidx].c)
#define RXS_ERR (   s,
  e 
)
Value:
do { \
len += snprintf(buf + len, size - len, \
"%22s : %10u\n", s, \
sc->debug.stats.rxstats.e); \
} while (0)
#define TX_SAMP_DBG (   c)
Value:
(sc->debug.bb_mac_samp[sc->debug.sampidx].ts\
[sc->debug.tsidx].c)

Function Documentation

int ath9k_init_debug ( struct ath_hw ah)

Definition at line 1589 of file debug.c.

void ath_debug_stat_interrupt ( struct ath_softc sc,
enum ath9k_int  status 
)

Definition at line 378 of file debug.c.

void ath_debug_stat_rx ( struct ath_softc sc,
struct ath_rx_status rs 
)

Definition at line 1023 of file debug.c.

void ath_debug_stat_tx ( struct ath_softc sc,
struct ath_buf bf,
struct ath_tx_status ts,
struct ath_txq txq,
unsigned int  flags 
)

Definition at line 847 of file debug.c.