summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00mac.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2011-03-03 19:38:55 +0100
committerJohn W. Linville <linville@tuxdriver.com>2011-03-04 14:06:46 -0500
commit11f818e0eb50864c7e6f8af38d8f8822f992906a (patch)
tree25e5da8f41a1304240c164d26128805e42cf7832 /drivers/net/wireless/rt2x00/rt2x00mac.c
parentadde5882bc6c21de7ee80ee15dfd58c7e9a472ac (diff)
rt2x00: Optimize calls to rt2x00queue_get_queue
In some cases (tx path for example) we don't need to check for non-tx queues in rt2x00queue_get_queue. Hence, introduce a new method rt2x00queue_get_tx_queue that is only valid for tx queues and use it in places where only tx queues are valid. Furthermore, this new method is quite short and as such can be inlined to avoid the function call overhead. This only converts the txdone functions of drivers that don't use an ATIM queue and the generic tx path. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> 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/rt2x00mac.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index c2c35838c2f3..7714198b9d3e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -122,7 +122,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags))
queue = rt2x00queue_get_queue(rt2x00dev, QID_ATIM);
else
- queue = rt2x00queue_get_queue(rt2x00dev, qid);
+ queue = rt2x00queue_get_tx_queue(rt2x00dev, qid);
if (unlikely(!queue)) {
ERROR(rt2x00dev,
"Attempt to send packet over invalid queue %d.\n"
@@ -692,7 +692,7 @@ int rt2x00mac_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
struct rt2x00_dev *rt2x00dev = hw->priv;
struct data_queue *queue;
- queue = rt2x00queue_get_queue(rt2x00dev, queue_idx);
+ queue = rt2x00queue_get_tx_queue(rt2x00dev, queue_idx);
if (unlikely(!queue))
return -EINVAL;