OSDN Git Service

rt2x00: Check IEEE80211_TXCTL_SEND_AFTER_DTIM flag
authorIvo van Doorn <ivdoorn@gmail.com>
Sun, 9 Mar 2008 21:45:47 +0000 (22:45 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 13 Mar 2008 20:02:36 +0000 (16:02 -0400)
When mac sets the IEEE80211_TXCTL_SEND_AFTER_DTIM flag, we should
check if the ATIM queue is available in the driver and put the
frame in that queue for proper behavior (send frame after beacon interval).
Unfortunately not all drivers have this ATIM queue, and will lack
this feature for now.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00mac.c

index a54f687..76a2a7c 100644 (file)
@@ -99,7 +99,11 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
        /*
         * Determine which queue to put packet on.
         */
-       queue = rt2x00queue_get_queue(rt2x00dev, control->queue);
+       if (control->flags & IEEE80211_TXCTL_SEND_AFTER_DTIM &&
+           test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags))
+               queue = rt2x00queue_get_queue(rt2x00dev, RT2X00_BCN_QUEUE_ATIM);
+       else
+               queue = rt2x00queue_get_queue(rt2x00dev, control->queue);
        if (unlikely(!queue)) {
                ERROR(rt2x00dev,
                      "Attempt to send packet over invalid queue %d.\n"