commit f989c827e19e1eff36d6e5c2c443255d0ca81fa9 Author: Jiri Slaby Date: Sat Aug 4 22:40:06 2007 +0200 remove stats diff --git a/ath5k_base.c b/ath5k_base.c index 5b3ea0e..261e4aa 100644 --- a/ath5k_base.c +++ b/ath5k_base.c @@ -267,7 +267,6 @@ static int ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf) DPRINTF(sc, ATH_DEBUG_ANY, "%s: skbuff alloc of " "size %u failed\n", __func__, sc->rxbufsize + sc->cachelsz - 1); - sc->stats.ast_rx_nobuf++; return -ENOMEM; } /* @@ -286,7 +285,6 @@ static int ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf) printk(KERN_ERR "%s: DMA mapping failed\n", __func__); dev_kfree_skb(skb); bf->skb = NULL; - sc->stats.ast_rx_busdma++; return -ENOMEM; } } @@ -402,16 +400,8 @@ static void ath_tasklet_rx(unsigned long data) stat = ds->ds_rxstat.rs_status; if (unlikely(stat)) { - if (stat & AR5K_RXERR_CRC) - sc->stats.ast_rx_crcerr++; - if (stat & AR5K_RXERR_FIFO) - sc->stats.ast_rx_fifoerr++; - if (stat & AR5K_RXERR_PHY) { - sc->stats.ast_rx_phyerr++; - sc->stats.ast_rx_phy - [ds->ds_rxstat.rs_phyerr & 0x1f]++; + if (stat & AR5K_RXERR_PHY) goto next; - } if (stat & AR5K_RXERR_DECRYPT) { /* * Decrypt error. If the error occurred @@ -427,11 +417,9 @@ static void ath_tasklet_rx(unsigned long data) AR5K_RXKEYIX_INVALID && !(stat & AR5K_RXERR_CRC)) goto accept; - sc->stats.ast_rx_badcrypt++; } if (stat & AR5K_RXERR_MIC) { rxs.flag |= RX_FLAG_MMIC_ERROR; - sc->stats.ast_rx_badmic++; goto accept; } @@ -453,8 +441,6 @@ accept: skb_put(skb, len); - sc->stats.ast_ant_rx[ds->ds_rxstat.rs_antenna]++; - if (sc->opmode == IEEE80211_IF_TYPE_MNTR) rxs.mactime = ath_extend_tsf(sc->ah, ds->ds_rxstat.rs_tstamp); @@ -514,11 +500,10 @@ static int ath_beacon_setup(struct ath_softc *sc, struct ath_buf *bf, ds->ds_link = 0; /* * Switch antenna every 4 beacons if txantenna is not set - * XXX assumes two antenna + * XXX assumes two antennas */ - if (antenna == 0) { - antenna = (sc->stats.ast_be_xmit & 4 ? 2 : 1); - } + if (antenna == 0) + antenna = sc->bsent & 4 ? 2 : 1; } ds->ds_data = bf->skbaddr; @@ -606,7 +591,7 @@ static void ath_beacon_send(struct ath_softc *sc) DPRINTF(sc, ATH_DEBUG_BEACON_PROC, "%s: TXDP[%u] = %llx (%p)\n", __func__, sc->bhalq, (unsigned long long)bf->daddr, bf->desc); - sc->stats.ast_be_xmit++; + sc->bsent++; } static int ath_beaconq_config(struct ath_softc *sc) @@ -1264,7 +1249,6 @@ static int ath_tx(struct ieee80211_hw *hw, struct sk_buff *skb, if (net_ratelimit()) printk(KERN_ERR "ath: no further txbuf available, " "dropping packet\n"); - sc->stats.ast_tx_nobuf++; spin_unlock_irqrestore(&sc->txbuflock, flags); ieee80211_stop_queue(hw, ctl->queue); return -1; @@ -1272,10 +1256,8 @@ static int ath_tx(struct ieee80211_hw *hw, struct sk_buff *skb, bf = list_first_entry(&sc->txbuf, struct ath_buf, list); list_del(&bf->list); sc->txbuf_len--; - if (list_empty(&sc->txbuf)) { - sc->stats.ast_tx_qstop++; + if (list_empty(&sc->txbuf)) ieee80211_stop_queues(hw); - } spin_unlock_irqrestore(&sc->txbuflock, flags); bf->skb = skb; @@ -1576,8 +1558,6 @@ static void ath_calibrate(unsigned long data) struct ath_softc *sc = (void *)data; struct ath_hw *ah = sc->ah; - sc->stats.ast_per_cal++; - DPRINTF(sc, ATH_DEBUG_CALIBRATE, "ath: channel %u/%x\n", sc->curchan->chan, sc->curchan->val); @@ -1586,15 +1566,12 @@ static void ath_calibrate(unsigned long data) * Rfgain is out of bounds, reset the chip * to load new gain values. */ - sc->stats.ast_per_rfgain++; DPRINTF(sc, ATH_DEBUG_RESET, "calibration, resetting\n"); ath_reset(sc->hw); } - if (ath5k_hw_phy_calibrate(ah, sc->curchan)) { + if (ath5k_hw_phy_calibrate(ah, sc->curchan)) DPRINTF(sc, ATH_DEBUG_ANY, "ath: calibration of channel %u " "failed\n", sc->curchan->chan); - sc->stats.ast_per_calfail++; - } mod_timer(&sc->calib_tim, round_jiffies(jiffies + msecs_to_jiffies(ath_calinterval * 1000))); @@ -1673,10 +1650,8 @@ static irqreturn_t ath_intr(int irq, void *dev_id) * the exact reason is not (presently) returned * by the hal. */ - sc->stats.ast_hardware++; tasklet_schedule(&sc->restq); } else if (unlikely(status & AR5K_INT_RXORN)) { - sc->stats.ast_rxorn++; tasklet_schedule(&sc->restq); } else { if (status & AR5K_INT_SWBA) { @@ -1694,11 +1669,9 @@ static irqreturn_t ath_intr(int irq, void *dev_id) * RXE bit is written, but it doesn't work at * least on older hardware revs. */ - sc->stats.ast_rxeol++; sc->rxlink = NULL; } if (status & AR5K_INT_TXURN) { - sc->stats.ast_txurn++; /* bump tx trigger level */ ath5k_hw_update_tx_triglevel(ah, true); } @@ -1707,11 +1680,9 @@ static irqreturn_t ath_intr(int irq, void *dev_id) if (status & AR5K_INT_TX) tasklet_schedule(&sc->txtq); if (status & AR5K_INT_BMISS) { - sc->stats.ast_bmiss++; /* tasklet_schedule(&sc->bmisstq);*/ } if (status & AR5K_INT_MIB) { - sc->stats.ast_mib++; /* TODO */ } } diff --git a/ath5k_base.h b/ath5k_base.h index 64d1ecf..bc38bec 100644 --- a/ath5k_base.h +++ b/ath5k_base.h @@ -111,72 +111,6 @@ struct ath_txq { bool setup; }; -struct ath_stats { - __u32 ast_watchdog; /* device reset by watchdog */ - __u32 ast_hardware; /* fatal hardware error interrupts */ - __u32 ast_bmiss; /* beacon miss interrupts */ - __u32 ast_bstuck; /* beacon stuck interrupts */ - __u32 ast_rxorn; /* rx overrun interrupts */ - __u32 ast_rxeol; /* rx eol interrupts */ - __u32 ast_txurn; /* tx underrun interrupts */ - __u32 ast_mib; /* mib interrupts */ - __u32 ast_intrcoal; /* interrupts coalesced */ - __u32 ast_tx_packets; /* packet sent on the interface */ - __u32 ast_tx_mgmt; /* management frames transmitted */ - __u32 ast_tx_discard; /* frames discarded prior to assoc */ - __u32 ast_tx_invalid; /* frames discarded 'cuz device gone */ - __u32 ast_tx_qstop; /* output stopped 'cuz no buffer */ - __u32 ast_tx_encap; /* tx encapsulation failed */ - __u32 ast_tx_nonode; /* tx failed 'cuz no node */ - __u32 ast_tx_nobuf; /* tx failed 'cuz no tx buffer (data) */ - __u32 ast_tx_nobufmgt;/* tx failed 'cuz no tx buffer (mgmt)*/ - __u32 ast_tx_linear; /* tx linearized to cluster */ - __u32 ast_tx_nodata; /* tx discarded empty frame */ - __u32 ast_tx_busdma; /* tx failed for dma resrcs */ - __u32 ast_tx_xretries;/* tx failed 'cuz too many retries */ - __u32 ast_tx_fifoerr; /* tx failed 'cuz FIFO underrun */ - __u32 ast_tx_filtered;/* tx failed 'cuz xmit filtered */ - __u32 ast_tx_shortretry;/* tx on-chip retries (short) */ - __u32 ast_tx_longretry;/* tx on-chip retries (long) */ - __u32 ast_tx_badrate; /* tx failed 'cuz bogus xmit rate */ - __u32 ast_tx_noack; /* tx frames with no ack marked */ - __u32 ast_tx_rts; /* tx frames with rts enabled */ - __u32 ast_tx_cts; /* tx frames with cts enabled */ - __u32 ast_tx_shortpre;/* tx frames with short preamble */ - __u32 ast_tx_altrate; /* tx frames with alternate rate */ - __u32 ast_tx_protect; /* tx frames with protection */ - __u32 ast_tx_ctsburst;/* tx frames with cts and bursting */ - __u32 ast_tx_ctsext; /* tx frames with cts extension */ - __u32 ast_rx_nobuf; /* rx setup failed 'cuz no skb */ - __u32 ast_rx_busdma; /* rx setup failed for dma resrcs */ - __u32 ast_rx_orn; /* rx failed 'cuz of desc overrun */ - __u32 ast_rx_crcerr; /* rx failed 'cuz of bad CRC */ - __u32 ast_rx_fifoerr; /* rx failed 'cuz of FIFO overrun */ - __u32 ast_rx_badcrypt;/* rx failed 'cuz decryption */ - __u32 ast_rx_badmic; /* rx failed 'cuz MIC failure */ - __u32 ast_rx_phyerr; /* rx failed 'cuz of PHY err */ - __u32 ast_rx_phy[32]; /* rx PHY error per-code counts */ - __u32 ast_rx_tooshort;/* rx discarded 'cuz frame too short */ - __u32 ast_rx_toobig; /* rx discarded 'cuz frame too large */ - __u32 ast_rx_packets; /* packet recv on the interface */ - __u32 ast_rx_mgt; /* management frames received */ - __u32 ast_rx_ctl; /* rx discarded 'cuz ctl frame */ - __s8 ast_tx_rssi; /* tx rssi of last ack */ - __s8 ast_rx_rssi; /* rx rssi from histogram */ - __u32 ast_be_xmit; /* beacons transmitted */ - __u32 ast_be_nobuf; /* beacon setup failed 'cuz no skb */ - __u32 ast_per_cal; /* periodic calibration calls */ - __u32 ast_per_calfail;/* periodic calibration failed */ - __u32 ast_per_rfgain; /* periodic calibration rfgain reset */ - __u32 ast_rate_calls; /* rate control checks */ - __u32 ast_rate_raise; /* rate control raised xmit rate */ - __u32 ast_rate_drop; /* rate control dropped xmit rate */ - __u32 ast_ant_defswitch;/* rx/default antenna switches */ - __u32 ast_ant_txswitch;/* tx antenna switches */ - __u32 ast_ant_rx[8]; /* rx frames with antenna */ - __u32 ast_ant_tx[8]; /* tx frames with antenna */ -}; - #if CHAN_DEBUG #define ATH_CHAN_MAX (26+26+26+200+200) #else @@ -187,7 +121,6 @@ struct ath_softc { struct pci_dev *pdev; /* for dma mapping */ void __iomem *iobase; /* address of the device */ struct mutex lock; /* dev-level lock */ - struct ath_stats stats; /* private statistics */ struct ieee80211_tx_queue_stats tx_stats; struct ieee80211_low_level_stats ll_stats; struct ieee80211_hw *hw; /* IEEE 802.11 common */ @@ -272,7 +205,8 @@ struct ath_softc { struct ath_buf *bbuf; /* beacon buffer */ unsigned int bhalq, /* HAL q for outgoing beacons */ bmisscount, /* missed beacon transmits */ - bintval; /* beacon interval */ + bintval, /* beacon interval */ + bsent; #ifdef BEACON u32 sc_ant_tx[8]; /* recent tx frames/antenna */ struct ath_txq *cabq; /* tx q for cab frames */