aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00queue.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2009-01-27 18:32:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-09 15:03:34 -0500
commita2c9b652a12a550d3d8509e9bae43bac396c5076 (patch)
tree8e871e038bc73465c6eca67f8563e9562d079d56 /drivers/net/wireless/rt2x00/rt2x00queue.c
parent382fe0f2da78db7833c6a7278e33e694e6e2a6f3 (diff)
rt2x00: Add kill_tx_queue callback function
provide rt2x00lib the possibility to kill a particular TX queue. This can be useful when disabling the radio, but more importantly will allow beaconing to be disabled when mac80211 requests this (during scanning for example) Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index c86fb6471754..a5664bd8493e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -443,7 +443,8 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
443} 443}
444 444
445int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev, 445int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev,
446 struct ieee80211_vif *vif) 446 struct ieee80211_vif *vif,
447 const bool enable_beacon)
447{ 448{
448 struct rt2x00_intf *intf = vif_to_intf(vif); 449 struct rt2x00_intf *intf = vif_to_intf(vif);
449 struct skb_frame_desc *skbdesc; 450 struct skb_frame_desc *skbdesc;
@@ -453,6 +454,11 @@ int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev,
453 if (unlikely(!intf->beacon)) 454 if (unlikely(!intf->beacon))
454 return -ENOBUFS; 455 return -ENOBUFS;
455 456
457 if (!enable_beacon) {
458 rt2x00dev->ops->lib->kill_tx_queue(rt2x00dev, QID_BEACON);
459 return 0;
460 }
461
456 intf->beacon->skb = ieee80211_beacon_get(rt2x00dev->hw, vif); 462 intf->beacon->skb = ieee80211_beacon_get(rt2x00dev->hw, vif);
457 if (!intf->beacon->skb) 463 if (!intf->beacon->skb)
458 return -ENOMEM; 464 return -ENOMEM;
@@ -501,6 +507,9 @@ struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev,
501{ 507{
502 int atim = test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags); 508 int atim = test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags);
503 509
510 if (queue == QID_RX)
511 return rt2x00dev->rx;
512
504 if (queue < rt2x00dev->ops->tx_queues && rt2x00dev->tx) 513 if (queue < rt2x00dev->ops->tx_queues && rt2x00dev->tx)
505 return &rt2x00dev->tx[queue]; 514 return &rt2x00dev->tx[queue];
506 515
@@ -577,6 +586,14 @@ static void rt2x00queue_reset(struct data_queue *queue)
577 spin_unlock_irqrestore(&queue->lock, irqflags); 586 spin_unlock_irqrestore(&queue->lock, irqflags);
578} 587}
579 588
589void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev)
590{
591 struct data_queue *queue;
592
593 txall_queue_for_each(rt2x00dev, queue)
594 rt2x00dev->ops->lib->kill_tx_queue(rt2x00dev, queue->qid);
595}
596
580void rt2x00queue_init_queues(struct rt2x00_dev *rt2x00dev) 597void rt2x00queue_init_queues(struct rt2x00_dev *rt2x00dev)
581{ 598{
582 struct data_queue *queue; 599 struct data_queue *queue;