Commit 61c6e489 authored by Gertjan van Wingerde's avatar Gertjan van Wingerde Committed by John W. Linville

rt2x00: Include ATIM queue support in rt2x00queue_get_tx_queue.

The ATIM queue is considered to be a TX queue by the drivers that support
the queue. Therefore include support for the ATIM queue to the
rt2x00queue_get_tx_queue function so that the drivers that support the ATIM
queue can also use that function.

Add the support in such a way that drivers that do not support the ATIM
queue are not penalized in their efficiency.
Signed-off-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Acked-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e74df4a7
...@@ -1278,7 +1278,7 @@ static void rt2400pci_fill_rxdone(struct queue_entry *entry, ...@@ -1278,7 +1278,7 @@ static void rt2400pci_fill_rxdone(struct queue_entry *entry,
static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev, static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev,
const enum data_queue_qid queue_idx) const enum data_queue_qid queue_idx)
{ {
struct data_queue *queue = rt2x00queue_get_queue(rt2x00dev, queue_idx); struct data_queue *queue = rt2x00queue_get_tx_queue(rt2x00dev, queue_idx);
struct queue_entry_priv_pci *entry_priv; struct queue_entry_priv_pci *entry_priv;
struct queue_entry *entry; struct queue_entry *entry;
struct txdone_entry_desc txdesc; struct txdone_entry_desc txdesc;
......
...@@ -1410,7 +1410,7 @@ static void rt2500pci_fill_rxdone(struct queue_entry *entry, ...@@ -1410,7 +1410,7 @@ static void rt2500pci_fill_rxdone(struct queue_entry *entry,
static void rt2500pci_txdone(struct rt2x00_dev *rt2x00dev, static void rt2500pci_txdone(struct rt2x00_dev *rt2x00dev,
const enum data_queue_qid queue_idx) const enum data_queue_qid queue_idx)
{ {
struct data_queue *queue = rt2x00queue_get_queue(rt2x00dev, queue_idx); struct data_queue *queue = rt2x00queue_get_tx_queue(rt2x00dev, queue_idx);
struct queue_entry_priv_pci *entry_priv; struct queue_entry_priv_pci *entry_priv;
struct queue_entry *entry; struct queue_entry *entry;
struct txdone_entry_desc txdesc; struct txdone_entry_desc txdesc;
......
...@@ -1076,6 +1076,9 @@ rt2x00queue_get_tx_queue(struct rt2x00_dev *rt2x00dev, ...@@ -1076,6 +1076,9 @@ rt2x00queue_get_tx_queue(struct rt2x00_dev *rt2x00dev,
if (queue < rt2x00dev->ops->tx_queues && rt2x00dev->tx) if (queue < rt2x00dev->ops->tx_queues && rt2x00dev->tx)
return &rt2x00dev->tx[queue]; return &rt2x00dev->tx[queue];
if (queue == QID_ATIM)
return rt2x00dev->atim;
return NULL; return NULL;
} }
......
...@@ -116,12 +116,12 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -116,12 +116,12 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
goto exit_fail; goto exit_fail;
/* /*
* Determine which queue to put packet on. * Use the ATIM queue if appropriate and present.
*/ */
if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM && if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM &&
test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags)) test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags))
queue = rt2x00queue_get_queue(rt2x00dev, QID_ATIM); qid = QID_ATIM;
else
queue = rt2x00queue_get_tx_queue(rt2x00dev, qid); queue = rt2x00queue_get_tx_queue(rt2x00dev, qid);
if (unlikely(!queue)) { if (unlikely(!queue)) {
ERROR(rt2x00dev, ERROR(rt2x00dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment