aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/b43/b43.h4
-rw-r--r--drivers/net/wireless/b43/debugfs.c1
-rw-r--r--drivers/net/wireless/b43/debugfs.h1
-rw-r--r--drivers/net/wireless/b43/main.c34
-rw-r--r--drivers/net/wireless/b43/xmit.c3
5 files changed, 43 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index 89ccf0d50f33..fa1549a03c71 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -817,6 +817,10 @@ struct b43_wldev {
817 /* Debugging stuff follows. */ 817 /* Debugging stuff follows. */
818#ifdef CONFIG_B43_DEBUG 818#ifdef CONFIG_B43_DEBUG
819 struct b43_dfsentry *dfsentry; 819 struct b43_dfsentry *dfsentry;
820 unsigned int irq_count;
821 unsigned int irq_bit_count[32];
822 unsigned int tx_count;
823 unsigned int rx_count;
820#endif 824#endif
821}; 825};
822 826
diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c
index 8f64943e3f60..80b19a44a407 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -689,6 +689,7 @@ static void b43_add_dynamic_debug(struct b43_wldev *dev)
689 add_dyn_dbg("debug_lo", B43_DBG_LO, 0); 689 add_dyn_dbg("debug_lo", B43_DBG_LO, 0);
690 add_dyn_dbg("debug_firmware", B43_DBG_FIRMWARE, 0); 690 add_dyn_dbg("debug_firmware", B43_DBG_FIRMWARE, 0);
691 add_dyn_dbg("debug_keys", B43_DBG_KEYS, 0); 691 add_dyn_dbg("debug_keys", B43_DBG_KEYS, 0);
692 add_dyn_dbg("debug_verbose_stats", B43_DBG_VERBOSESTATS, 0);
692 693
693#undef add_dyn_dbg 694#undef add_dyn_dbg
694} 695}
diff --git a/drivers/net/wireless/b43/debugfs.h b/drivers/net/wireless/b43/debugfs.h
index e47b4b488b04..822aad8842f4 100644
--- a/drivers/net/wireless/b43/debugfs.h
+++ b/drivers/net/wireless/b43/debugfs.h
@@ -13,6 +13,7 @@ enum b43_dyndbg { /* Dynamic debugging features */
13 B43_DBG_LO, 13 B43_DBG_LO,
14 B43_DBG_FIRMWARE, 14 B43_DBG_FIRMWARE,
15 B43_DBG_KEYS, 15 B43_DBG_KEYS,
16 B43_DBG_VERBOSESTATS,
16 __B43_NR_DYNDBG, 17 __B43_NR_DYNDBG,
17}; 18};
18 19
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 7d22dadfd890..6468bbeba687 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1830,6 +1830,16 @@ static void b43_do_interrupt_thread(struct b43_wldev *dev)
1830 1830
1831 /* Re-enable interrupts on the device by restoring the current interrupt mask. */ 1831 /* Re-enable interrupts on the device by restoring the current interrupt mask. */
1832 b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask); 1832 b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask);
1833
1834#if B43_DEBUG
1835 if (b43_debug(dev, B43_DBG_VERBOSESTATS)) {
1836 dev->irq_count++;
1837 for (i = 0; i < ARRAY_SIZE(dev->irq_bit_count); i++) {
1838 if (reason & (1 << i))
1839 dev->irq_bit_count[i]++;
1840 }
1841 }
1842#endif
1833} 1843}
1834 1844
1835/* Interrupt thread handler. Handles device interrupts in thread context. */ 1845/* Interrupt thread handler. Handles device interrupts in thread context. */
@@ -2893,6 +2903,27 @@ static void b43_periodic_every15sec(struct b43_wldev *dev)
2893 2903
2894 atomic_set(&phy->txerr_cnt, B43_PHY_TX_BADNESS_LIMIT); 2904 atomic_set(&phy->txerr_cnt, B43_PHY_TX_BADNESS_LIMIT);
2895 wmb(); 2905 wmb();
2906
2907#if B43_DEBUG
2908 if (b43_debug(dev, B43_DBG_VERBOSESTATS)) {
2909 unsigned int i;
2910
2911 b43dbg(dev->wl, "Stats: %7u IRQs/sec, %7u TX/sec, %7u RX/sec\n",
2912 dev->irq_count / 15,
2913 dev->tx_count / 15,
2914 dev->rx_count / 15);
2915 dev->irq_count = 0;
2916 dev->tx_count = 0;
2917 dev->rx_count = 0;
2918 for (i = 0; i < ARRAY_SIZE(dev->irq_bit_count); i++) {
2919 if (dev->irq_bit_count[i]) {
2920 b43dbg(dev->wl, "Stats: %7u IRQ-%02u/sec (0x%08X)\n",
2921 dev->irq_bit_count[i] / 15, i, (1 << i));
2922 dev->irq_bit_count[i] = 0;
2923 }
2924 }
2925 }
2926#endif
2896} 2927}
2897 2928
2898static void do_periodic_work(struct b43_wldev *dev) 2929static void do_periodic_work(struct b43_wldev *dev)
@@ -3092,6 +3123,9 @@ static void b43_tx_work(struct work_struct *work)
3092 dev_kfree_skb(skb); /* Drop it */ 3123 dev_kfree_skb(skb); /* Drop it */
3093 } 3124 }
3094 3125
3126#if B43_DEBUG
3127 dev->tx_count++;
3128#endif
3095 mutex_unlock(&wl->mutex); 3129 mutex_unlock(&wl->mutex);
3096} 3130}
3097 3131
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index c403c616d3bd..ac9f600995e4 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -692,6 +692,9 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
692 memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status)); 692 memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));
693 ieee80211_rx(dev->wl->hw, skb); 693 ieee80211_rx(dev->wl->hw, skb);
694 694
695#if B43_DEBUG
696 dev->rx_count++;
697#endif
695 return; 698 return;
696drop: 699drop:
697 b43dbg(dev->wl, "RX: Packet dropped\n"); 700 b43dbg(dev->wl, "RX: Packet dropped\n");