aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@iki.fi>2010-02-07 12:51:00 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-08 16:51:00 -0500
commit8b2bbe66abfdc60f73b094a56ab29bfbf939201c (patch)
treee964523cb00ee9dc17b2d574f104877076b2a864 /drivers/net/wireless/b43legacy
parent3b27521a5be8b700451d54d4fa670f754e7f9720 (diff)
b43legacy: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211. Compile-tested only. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy')
-rw-r--r--drivers/net/wireless/b43legacy/dma.c20
-rw-r--r--drivers/net/wireless/b43legacy/dma.h10
-rw-r--r--drivers/net/wireless/b43legacy/main.c24
-rw-r--r--drivers/net/wireless/b43legacy/pio.c13
-rw-r--r--drivers/net/wireless/b43legacy/pio.h11
5 files changed, 0 insertions, 78 deletions
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index 0a86bdf53154..8b9387c6ff36 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -1411,7 +1411,6 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev,
1411 b43legacyerr(dev->wl, "DMA tx mapping failure\n"); 1411 b43legacyerr(dev->wl, "DMA tx mapping failure\n");
1412 goto out_unlock; 1412 goto out_unlock;
1413 } 1413 }
1414 ring->nr_tx_packets++;
1415 if ((free_slots(ring) < SLOTS_PER_PACKET) || 1414 if ((free_slots(ring) < SLOTS_PER_PACKET) ||
1416 should_inject_overflow(ring)) { 1415 should_inject_overflow(ring)) {
1417 /* This TX ring is full. */ 1416 /* This TX ring is full. */
@@ -1527,25 +1526,6 @@ void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev,
1527 spin_unlock(&ring->lock); 1526 spin_unlock(&ring->lock);
1528} 1527}
1529 1528
1530void b43legacy_dma_get_tx_stats(struct b43legacy_wldev *dev,
1531 struct ieee80211_tx_queue_stats *stats)
1532{
1533 const int nr_queues = dev->wl->hw->queues;
1534 struct b43legacy_dmaring *ring;
1535 unsigned long flags;
1536 int i;
1537
1538 for (i = 0; i < nr_queues; i++) {
1539 ring = priority_to_txring(dev, i);
1540
1541 spin_lock_irqsave(&ring->lock, flags);
1542 stats[i].len = ring->used_slots / SLOTS_PER_PACKET;
1543 stats[i].limit = ring->nr_slots / SLOTS_PER_PACKET;
1544 stats[i].count = ring->nr_tx_packets;
1545 spin_unlock_irqrestore(&ring->lock, flags);
1546 }
1547}
1548
1549static void dma_rx(struct b43legacy_dmaring *ring, 1529static void dma_rx(struct b43legacy_dmaring *ring,
1550 int *slot) 1530 int *slot)
1551{ 1531{
diff --git a/drivers/net/wireless/b43legacy/dma.h b/drivers/net/wireless/b43legacy/dma.h
index 2f186003c31e..f9681041c2d8 100644
--- a/drivers/net/wireless/b43legacy/dma.h
+++ b/drivers/net/wireless/b43legacy/dma.h
@@ -243,8 +243,6 @@ struct b43legacy_dmaring {
243 int used_slots; 243 int used_slots;
244 /* Currently used slot in the ring. */ 244 /* Currently used slot in the ring. */
245 int current_slot; 245 int current_slot;
246 /* Total number of packets sent. Statistics only. */
247 unsigned int nr_tx_packets;
248 /* Frameoffset in octets. */ 246 /* Frameoffset in octets. */
249 u32 frameoffset; 247 u32 frameoffset;
250 /* Descriptor buffer size. */ 248 /* Descriptor buffer size. */
@@ -292,9 +290,6 @@ void b43legacy_dma_free(struct b43legacy_wldev *dev);
292void b43legacy_dma_tx_suspend(struct b43legacy_wldev *dev); 290void b43legacy_dma_tx_suspend(struct b43legacy_wldev *dev);
293void b43legacy_dma_tx_resume(struct b43legacy_wldev *dev); 291void b43legacy_dma_tx_resume(struct b43legacy_wldev *dev);
294 292
295void b43legacy_dma_get_tx_stats(struct b43legacy_wldev *dev,
296 struct ieee80211_tx_queue_stats *stats);
297
298int b43legacy_dma_tx(struct b43legacy_wldev *dev, 293int b43legacy_dma_tx(struct b43legacy_wldev *dev,
299 struct sk_buff *skb); 294 struct sk_buff *skb);
300void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev, 295void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev,
@@ -315,11 +310,6 @@ void b43legacy_dma_free(struct b43legacy_wldev *dev)
315{ 310{
316} 311}
317static inline 312static inline
318void b43legacy_dma_get_tx_stats(struct b43legacy_wldev *dev,
319 struct ieee80211_tx_queue_stats *stats)
320{
321}
322static inline
323int b43legacy_dma_tx(struct b43legacy_wldev *dev, 313int b43legacy_dma_tx(struct b43legacy_wldev *dev,
324 struct sk_buff *skb) 314 struct sk_buff *skb)
325{ 315{
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index b4e89a35e3fb..08523a45e23b 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2446,29 +2446,6 @@ static int b43legacy_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
2446 return 0; 2446 return 0;
2447} 2447}
2448 2448
2449static int b43legacy_op_get_tx_stats(struct ieee80211_hw *hw,
2450 struct ieee80211_tx_queue_stats *stats)
2451{
2452 struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
2453 struct b43legacy_wldev *dev = wl->current_dev;
2454 unsigned long flags;
2455 int err = -ENODEV;
2456
2457 if (!dev)
2458 goto out;
2459 spin_lock_irqsave(&wl->irq_lock, flags);
2460 if (likely(b43legacy_status(dev) >= B43legacy_STAT_STARTED)) {
2461 if (b43legacy_using_pio(dev))
2462 b43legacy_pio_get_tx_stats(dev, stats);
2463 else
2464 b43legacy_dma_get_tx_stats(dev, stats);
2465 err = 0;
2466 }
2467 spin_unlock_irqrestore(&wl->irq_lock, flags);
2468out:
2469 return err;
2470}
2471
2472static int b43legacy_op_get_stats(struct ieee80211_hw *hw, 2449static int b43legacy_op_get_stats(struct ieee80211_hw *hw,
2473 struct ieee80211_low_level_stats *stats) 2450 struct ieee80211_low_level_stats *stats)
2474{ 2451{
@@ -3513,7 +3490,6 @@ static const struct ieee80211_ops b43legacy_hw_ops = {
3513 .bss_info_changed = b43legacy_op_bss_info_changed, 3490 .bss_info_changed = b43legacy_op_bss_info_changed,
3514 .configure_filter = b43legacy_op_configure_filter, 3491 .configure_filter = b43legacy_op_configure_filter,
3515 .get_stats = b43legacy_op_get_stats, 3492 .get_stats = b43legacy_op_get_stats,
3516 .get_tx_stats = b43legacy_op_get_tx_stats,
3517 .start = b43legacy_op_start, 3493 .start = b43legacy_op_start,
3518 .stop = b43legacy_op_stop, 3494 .stop = b43legacy_op_stop,
3519 .set_tim = b43legacy_op_beacon_set_tim, 3495 .set_tim = b43legacy_op_beacon_set_tim,
diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c
index 51866c9a2769..017c0e9c37ef 100644
--- a/drivers/net/wireless/b43legacy/pio.c
+++ b/drivers/net/wireless/b43legacy/pio.c
@@ -477,7 +477,6 @@ int b43legacy_pio_tx(struct b43legacy_wldev *dev,
477 477
478 list_move_tail(&packet->list, &queue->txqueue); 478 list_move_tail(&packet->list, &queue->txqueue);
479 queue->nr_txfree--; 479 queue->nr_txfree--;
480 queue->nr_tx_packets++;
481 B43legacy_WARN_ON(queue->nr_txfree >= B43legacy_PIO_MAXTXPACKETS); 480 B43legacy_WARN_ON(queue->nr_txfree >= B43legacy_PIO_MAXTXPACKETS);
482 481
483 tasklet_schedule(&queue->txtask); 482 tasklet_schedule(&queue->txtask);
@@ -546,18 +545,6 @@ void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev,
546 tasklet_schedule(&queue->txtask); 545 tasklet_schedule(&queue->txtask);
547} 546}
548 547
549void b43legacy_pio_get_tx_stats(struct b43legacy_wldev *dev,
550 struct ieee80211_tx_queue_stats *stats)
551{
552 struct b43legacy_pio *pio = &dev->pio;
553 struct b43legacy_pioqueue *queue;
554
555 queue = pio->queue1;
556 stats[0].len = B43legacy_PIO_MAXTXPACKETS - queue->nr_txfree;
557 stats[0].limit = B43legacy_PIO_MAXTXPACKETS;
558 stats[0].count = queue->nr_tx_packets;
559}
560
561static void pio_rx_error(struct b43legacy_pioqueue *queue, 548static void pio_rx_error(struct b43legacy_pioqueue *queue,
562 int clear_buffers, 549 int clear_buffers,
563 const char *error) 550 const char *error)
diff --git a/drivers/net/wireless/b43legacy/pio.h b/drivers/net/wireless/b43legacy/pio.h
index 464fec05a06d..8e6773ea6e75 100644
--- a/drivers/net/wireless/b43legacy/pio.h
+++ b/drivers/net/wireless/b43legacy/pio.h
@@ -74,10 +74,6 @@ struct b43legacy_pioqueue {
74 * posted to the device. We are waiting for the txstatus. 74 * posted to the device. We are waiting for the txstatus.
75 */ 75 */
76 struct list_head txrunning; 76 struct list_head txrunning;
77 /* Total number or packets sent.
78 * (This counter can obviously wrap).
79 */
80 unsigned int nr_tx_packets;
81 struct tasklet_struct txtask; 77 struct tasklet_struct txtask;
82 struct b43legacy_pio_txpacket 78 struct b43legacy_pio_txpacket
83 tx_packets_cache[B43legacy_PIO_MAXTXPACKETS]; 79 tx_packets_cache[B43legacy_PIO_MAXTXPACKETS];
@@ -106,8 +102,6 @@ int b43legacy_pio_tx(struct b43legacy_wldev *dev,
106 struct sk_buff *skb); 102 struct sk_buff *skb);
107void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev, 103void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev,
108 const struct b43legacy_txstatus *status); 104 const struct b43legacy_txstatus *status);
109void b43legacy_pio_get_tx_stats(struct b43legacy_wldev *dev,
110 struct ieee80211_tx_queue_stats *stats);
111void b43legacy_pio_rx(struct b43legacy_pioqueue *queue); 105void b43legacy_pio_rx(struct b43legacy_pioqueue *queue);
112 106
113/* Suspend TX queue in hardware. */ 107/* Suspend TX queue in hardware. */
@@ -140,11 +134,6 @@ void b43legacy_pio_handle_txstatus(struct b43legacy_wldev *dev,
140{ 134{
141} 135}
142static inline 136static inline
143void b43legacy_pio_get_tx_stats(struct b43legacy_wldev *dev,
144 struct ieee80211_tx_queue_stats *stats)
145{
146}
147static inline
148void b43legacy_pio_rx(struct b43legacy_pioqueue *queue) 137void b43legacy_pio_rx(struct b43legacy_pioqueue *queue)
149{ 138{
150} 139}