diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 228c18189a3..03a474092e8 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -818,6 +818,7 @@ void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, | |||
818 | if (ts->ts_flags & ATH9K_TX_DELIM_UNDERRUN) | 818 | if (ts->ts_flags & ATH9K_TX_DELIM_UNDERRUN) |
819 | TX_STAT_INC(qnum, delim_underrun); | 819 | TX_STAT_INC(qnum, delim_underrun); |
820 | 820 | ||
821 | #ifdef CONFIG_ATH9K_MAC_DEBUG | ||
821 | spin_lock(&sc->debug.samp_lock); | 822 | spin_lock(&sc->debug.samp_lock); |
822 | TX_SAMP_DBG(jiffies) = jiffies; | 823 | TX_SAMP_DBG(jiffies) = jiffies; |
823 | TX_SAMP_DBG(rssi_ctl0) = ts->ts_rssi_ctl0; | 824 | TX_SAMP_DBG(rssi_ctl0) = ts->ts_rssi_ctl0; |
@@ -844,6 +845,7 @@ void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, | |||
844 | 845 | ||
845 | sc->debug.tsidx = (sc->debug.tsidx + 1) % ATH_DBG_MAX_SAMPLES; | 846 | sc->debug.tsidx = (sc->debug.tsidx + 1) % ATH_DBG_MAX_SAMPLES; |
846 | spin_unlock(&sc->debug.samp_lock); | 847 | spin_unlock(&sc->debug.samp_lock); |
848 | #endif | ||
847 | 849 | ||
848 | #undef TX_SAMP_DBG | 850 | #undef TX_SAMP_DBG |
849 | } | 851 | } |
@@ -1019,6 +1021,7 @@ void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs) | |||
1019 | 1021 | ||
1020 | sc->debug.stats.rxstats.rs_antenna = rs->rs_antenna; | 1022 | sc->debug.stats.rxstats.rs_antenna = rs->rs_antenna; |
1021 | 1023 | ||
1024 | #ifdef CONFIG_ATH9K_MAC_DEBUG | ||
1022 | spin_lock(&sc->debug.samp_lock); | 1025 | spin_lock(&sc->debug.samp_lock); |
1023 | RX_SAMP_DBG(jiffies) = jiffies; | 1026 | RX_SAMP_DBG(jiffies) = jiffies; |
1024 | RX_SAMP_DBG(rssi_ctl0) = rs->rs_rssi_ctl0; | 1027 | RX_SAMP_DBG(rssi_ctl0) = rs->rs_rssi_ctl0; |
@@ -1035,6 +1038,8 @@ void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs) | |||
1035 | sc->debug.rsidx = (sc->debug.rsidx + 1) % ATH_DBG_MAX_SAMPLES; | 1038 | sc->debug.rsidx = (sc->debug.rsidx + 1) % ATH_DBG_MAX_SAMPLES; |
1036 | spin_unlock(&sc->debug.samp_lock); | 1039 | spin_unlock(&sc->debug.samp_lock); |
1037 | 1040 | ||
1041 | #endif | ||
1042 | |||
1038 | #undef RX_STAT_INC | 1043 | #undef RX_STAT_INC |
1039 | #undef RX_PHY_ERR_INC | 1044 | #undef RX_PHY_ERR_INC |
1040 | #undef RX_SAMP_DBG | 1045 | #undef RX_SAMP_DBG |
@@ -1278,6 +1283,8 @@ static const struct file_operations fops_modal_eeprom = { | |||
1278 | .llseek = default_llseek, | 1283 | .llseek = default_llseek, |
1279 | }; | 1284 | }; |
1280 | 1285 | ||
1286 | #ifdef CONFIG_ATH9K_MAC_DEBUG | ||
1287 | |||
1281 | void ath9k_debug_samp_bb_mac(struct ath_softc *sc) | 1288 | void ath9k_debug_samp_bb_mac(struct ath_softc *sc) |
1282 | { | 1289 | { |
1283 | #define ATH_SAMP_DBG(c) (sc->debug.bb_mac_samp[sc->debug.sampidx].c) | 1290 | #define ATH_SAMP_DBG(c) (sc->debug.bb_mac_samp[sc->debug.sampidx].c) |
@@ -1551,6 +1558,7 @@ static const struct file_operations fops_samps = { | |||
1551 | .llseek = default_llseek, | 1558 | .llseek = default_llseek, |
1552 | }; | 1559 | }; |
1553 | 1560 | ||
1561 | #endif | ||
1554 | 1562 | ||
1555 | int ath9k_init_debug(struct ath_hw *ah) | 1563 | int ath9k_init_debug(struct ath_hw *ah) |
1556 | { | 1564 | { |
@@ -1604,8 +1612,10 @@ int ath9k_init_debug(struct ath_hw *ah) | |||
1604 | &fops_base_eeprom); | 1612 | &fops_base_eeprom); |
1605 | debugfs_create_file("modal_eeprom", S_IRUSR, sc->debug.debugfs_phy, sc, | 1613 | debugfs_create_file("modal_eeprom", S_IRUSR, sc->debug.debugfs_phy, sc, |
1606 | &fops_modal_eeprom); | 1614 | &fops_modal_eeprom); |
1615 | #ifdef CONFIG_ATH9K_MAC_DEBUG | ||
1607 | debugfs_create_file("samples", S_IRUSR, sc->debug.debugfs_phy, sc, | 1616 | debugfs_create_file("samples", S_IRUSR, sc->debug.debugfs_phy, sc, |
1608 | &fops_samps); | 1617 | &fops_samps); |
1618 | #endif | ||
1609 | 1619 | ||
1610 | debugfs_create_u32("gpio_mask", S_IRUSR | S_IWUSR, | 1620 | debugfs_create_u32("gpio_mask", S_IRUSR | S_IWUSR, |
1611 | sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask); | 1621 | sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask); |