aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-04-29 11:18:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-07 15:02:26 -0400
commit57ffc589a92424f9def74fe0d49b2f7763ff07fd (patch)
tree2ec3f60cac2e5757206dee219e7b3a60ded13004 /drivers/net/wireless/b43legacy
parent3e0d4cb12f6fd97193a455b49125398b2231c87c (diff)
mac80211: clean up get_tx_stats callback
The callback takes a ieee80211_tx_queue_stats with a contained array of ieee80211_tx_queue_stats_data, remove the former, rename the latter to ieee80211_tx_queue_stats and make tx_stats() take the array directly. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy')
-rw-r--r--drivers/net/wireless/b43legacy/dma.c8
-rw-r--r--drivers/net/wireless/b43legacy/pio.c8
2 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index c990f87b107a..d6686f713b6d 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -1455,18 +1455,16 @@ void b43legacy_dma_get_tx_stats(struct b43legacy_wldev *dev,
1455{ 1455{
1456 const int nr_queues = dev->wl->hw->queues; 1456 const int nr_queues = dev->wl->hw->queues;
1457 struct b43legacy_dmaring *ring; 1457 struct b43legacy_dmaring *ring;
1458 struct ieee80211_tx_queue_stats_data *data;
1459 unsigned long flags; 1458 unsigned long flags;
1460 int i; 1459 int i;
1461 1460
1462 for (i = 0; i < nr_queues; i++) { 1461 for (i = 0; i < nr_queues; i++) {
1463 data = &(stats->data[i]);
1464 ring = priority_to_txring(dev, i); 1462 ring = priority_to_txring(dev, i);
1465 1463
1466 spin_lock_irqsave(&ring->lock, flags); 1464 spin_lock_irqsave(&ring->lock, flags);
1467 data->len = ring->used_slots / SLOTS_PER_PACKET; 1465 stats[i].len = ring->used_slots / SLOTS_PER_PACKET;
1468 data->limit = ring->nr_slots / SLOTS_PER_PACKET; 1466 stats[i].limit = ring->nr_slots / SLOTS_PER_PACKET;
1469 data->count = ring->nr_tx_packets; 1467 stats[i].count = ring->nr_tx_packets;
1470 spin_unlock_irqrestore(&ring->lock, flags); 1468 spin_unlock_irqrestore(&ring->lock, flags);
1471 } 1469 }
1472} 1470}
diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c
index bcdd54eb2edb..8d3d27d3cd67 100644
--- a/drivers/net/wireless/b43legacy/pio.c
+++ b/drivers/net/wireless/b43legacy/pio.c
@@ -525,13 +525,11 @@ void b43legacy_pio_get_tx_stats(struct b43legacy_wldev *dev,
525{ 525{
526 struct b43legacy_pio *pio = &dev->pio; 526 struct b43legacy_pio *pio = &dev->pio;
527 struct b43legacy_pioqueue *queue; 527 struct b43legacy_pioqueue *queue;
528 struct ieee80211_tx_queue_stats_data *data;
529 528
530 queue = pio->queue1; 529 queue = pio->queue1;
531 data = &(stats->data[0]); 530 stats[0].len = B43legacy_PIO_MAXTXPACKETS - queue->nr_txfree;
532 data->len = B43legacy_PIO_MAXTXPACKETS - queue->nr_txfree; 531 stats[0].limit = B43legacy_PIO_MAXTXPACKETS;
533 data->limit = B43legacy_PIO_MAXTXPACKETS; 532 stats[0].count = queue->nr_tx_packets;
534 data->count = queue->nr_tx_packets;
535} 533}
536 534
537static void pio_rx_error(struct b43legacy_pioqueue *queue, 535static void pio_rx_error(struct b43legacy_pioqueue *queue,