Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166274
b: refs/heads/master
c: 990b86f
h: refs/heads/master
v: v3
  • Loading branch information
Michael Buesch authored and John W. Linville committed Sep 23, 2009
1 parent 9fe39f7 commit db09d3b
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 176e9f6a4cf4b1bf66d18243ede0938a35c81541
refs/heads/master: 990b86f4f9c54f83085d4136498ac44719b17654
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/b43/b43.h
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,10 @@ struct b43_wldev {
/* Debugging stuff follows. */
#ifdef CONFIG_B43_DEBUG
struct b43_dfsentry *dfsentry;
unsigned int irq_count;
unsigned int irq_bit_count[32];
unsigned int tx_count;
unsigned int rx_count;
#endif
};

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/b43/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ static void b43_add_dynamic_debug(struct b43_wldev *dev)
add_dyn_dbg("debug_lo", B43_DBG_LO, 0);
add_dyn_dbg("debug_firmware", B43_DBG_FIRMWARE, 0);
add_dyn_dbg("debug_keys", B43_DBG_KEYS, 0);
add_dyn_dbg("debug_verbose_stats", B43_DBG_VERBOSESTATS, 0);

#undef add_dyn_dbg
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/b43/debugfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ enum b43_dyndbg { /* Dynamic debugging features */
B43_DBG_LO,
B43_DBG_FIRMWARE,
B43_DBG_KEYS,
B43_DBG_VERBOSESTATS,
__B43_NR_DYNDBG,
};

Expand Down
34 changes: 34 additions & 0 deletions trunk/drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1830,6 +1830,16 @@ static void b43_do_interrupt_thread(struct b43_wldev *dev)

/* Re-enable interrupts on the device by restoring the current interrupt mask. */
b43_write32(dev, B43_MMIO_GEN_IRQ_MASK, dev->irq_mask);

#if B43_DEBUG
if (b43_debug(dev, B43_DBG_VERBOSESTATS)) {
dev->irq_count++;
for (i = 0; i < ARRAY_SIZE(dev->irq_bit_count); i++) {
if (reason & (1 << i))
dev->irq_bit_count[i]++;
}
}
#endif
}

/* Interrupt thread handler. Handles device interrupts in thread context. */
Expand Down Expand Up @@ -2893,6 +2903,27 @@ static void b43_periodic_every15sec(struct b43_wldev *dev)

atomic_set(&phy->txerr_cnt, B43_PHY_TX_BADNESS_LIMIT);
wmb();

#if B43_DEBUG
if (b43_debug(dev, B43_DBG_VERBOSESTATS)) {
unsigned int i;

b43dbg(dev->wl, "Stats: %7u IRQs/sec, %7u TX/sec, %7u RX/sec\n",
dev->irq_count / 15,
dev->tx_count / 15,
dev->rx_count / 15);
dev->irq_count = 0;
dev->tx_count = 0;
dev->rx_count = 0;
for (i = 0; i < ARRAY_SIZE(dev->irq_bit_count); i++) {
if (dev->irq_bit_count[i]) {
b43dbg(dev->wl, "Stats: %7u IRQ-%02u/sec (0x%08X)\n",
dev->irq_bit_count[i] / 15, i, (1 << i));
dev->irq_bit_count[i] = 0;
}
}
}
#endif
}

static void do_periodic_work(struct b43_wldev *dev)
Expand Down Expand Up @@ -3092,6 +3123,9 @@ static void b43_tx_work(struct work_struct *work)
dev_kfree_skb(skb); /* Drop it */
}

#if B43_DEBUG
dev->tx_count++;
#endif
mutex_unlock(&wl->mutex);
}

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/b43/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,9 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));
ieee80211_rx(dev->wl->hw, skb);

#if B43_DEBUG
dev->rx_count++;
#endif
return;
drop:
b43dbg(dev->wl, "RX: Packet dropped\n");
Expand Down

0 comments on commit db09d3b

Please sign in to comment.