* TX data initialization
  */
 static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
-                                   unsigned int queue)
+                                   const unsigned int queue)
 {
        u32 reg;
 
-       if (queue == IEEE80211_TX_QUEUE_BEACON) {
+       if (queue == RT2X00_BCN_QUEUE_BEACON) {
                rt2x00pci_register_read(rt2x00dev, CSR14, ®);
                if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) {
                        rt2x00_set_field32(®, CSR14_BEACON_GEN, 1);
        rt2x00_set_field32(®, TXCSR0_KICK_TX,
                           (queue == IEEE80211_TX_QUEUE_DATA1));
        rt2x00_set_field32(®, TXCSR0_KICK_ATIM,
-                          (queue == IEEE80211_TX_QUEUE_AFTER_BEACON));
+                          (queue == RT2X00_BCN_QUEUE_ATIM));
        rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
 }
 
         * 3 - Atim ring transmit done interrupt.
         */
        if (rt2x00_get_field32(reg, CSR7_TXDONE_ATIMRING))
-               rt2400pci_txdone(rt2x00dev, IEEE80211_TX_QUEUE_AFTER_BEACON);
+               rt2400pci_txdone(rt2x00dev, RT2X00_BCN_QUEUE_ATIM);
 
        /*
         * 4 - Priority ring transmit done interrupt.
        rt2x00pci_register_write(rt2x00dev, CSR17, 0);
 }
 
+static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
+                                  struct ieee80211_tx_control *control)
+{
+       struct rt2x00_dev *rt2x00dev = hw->priv;
+       struct rt2x00_intf *intf = vif_to_intf(control->vif);
+       struct queue_entry_priv_pci_tx *priv_tx;
+       struct skb_frame_desc *skbdesc;
+
+       if (unlikely(!intf->beacon))
+               return -ENOBUFS;
+
+       priv_tx = intf->beacon->priv_data;
+
+       /*
+        * Fill in skb descriptor
+        */
+       skbdesc = get_skb_frame_desc(skb);
+       memset(skbdesc, 0, sizeof(*skbdesc));
+       skbdesc->data = skb->data;
+       skbdesc->data_len = skb->len;
+       skbdesc->desc = priv_tx->desc;
+       skbdesc->desc_len = intf->beacon->queue->desc_size;
+       skbdesc->entry = intf->beacon;
+
+       /*
+        * mac80211 doesn't provide the control->queue variable
+        * for beacons. Set our own queue identification so
+        * it can be used during descriptor initialization.
+        */
+       control->queue = RT2X00_BCN_QUEUE_BEACON;
+       rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
+
+       /*
+        * Enable beacon generation.
+        * Write entire beacon with descriptor to register,
+        * and kick the beacon generator.
+        */
+       memcpy(priv_tx->data, skb->data, skb->len);
+       rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, control->queue);
+
+       return 0;
+}
+
 static int rt2400pci_tx_last_beacon(struct ieee80211_hw *hw)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
        .get_tx_stats           = rt2x00mac_get_tx_stats,
        .get_tsf                = rt2400pci_get_tsf,
        .reset_tsf              = rt2400pci_reset_tsf,
-       .beacon_update          = rt2x00pci_beacon_update,
+       .beacon_update          = rt2400pci_beacon_update,
        .tx_last_beacon         = rt2400pci_tx_last_beacon,
 };
 
 
                                  const unsigned int flags)
 {
        struct data_queue *queue =
-           rt2x00queue_get_queue(rt2x00dev, IEEE80211_TX_QUEUE_BEACON);
+           rt2x00queue_get_queue(rt2x00dev, RT2X00_BCN_QUEUE_BEACON);
        unsigned int bcn_preload;
        u32 reg;
 
  * TX data initialization
  */
 static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
-                                   unsigned int queue)
+                                   const unsigned int queue)
 {
        u32 reg;
 
-       if (queue == IEEE80211_TX_QUEUE_BEACON) {
+       if (queue == RT2X00_BCN_QUEUE_BEACON) {
                rt2x00pci_register_read(rt2x00dev, CSR14, ®);
                if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) {
                        rt2x00_set_field32(®, CSR14_BEACON_GEN, 1);
        rt2x00_set_field32(®, TXCSR0_KICK_TX,
                           (queue == IEEE80211_TX_QUEUE_DATA1));
        rt2x00_set_field32(®, TXCSR0_KICK_ATIM,
-                          (queue == IEEE80211_TX_QUEUE_AFTER_BEACON));
+                          (queue == RT2X00_BCN_QUEUE_ATIM));
        rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
 }
 
         * 3 - Atim ring transmit done interrupt.
         */
        if (rt2x00_get_field32(reg, CSR7_TXDONE_ATIMRING))
-               rt2500pci_txdone(rt2x00dev, IEEE80211_TX_QUEUE_AFTER_BEACON);
+               rt2500pci_txdone(rt2x00dev, RT2X00_BCN_QUEUE_ATIM);
 
        /*
         * 4 - Priority ring transmit done interrupt.
        rt2x00pci_register_write(rt2x00dev, CSR17, 0);
 }
 
+static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
+                                  struct ieee80211_tx_control *control)
+{
+       struct rt2x00_dev *rt2x00dev = hw->priv;
+       struct rt2x00_intf *intf = vif_to_intf(control->vif);
+       struct queue_entry_priv_pci_tx *priv_tx;
+       struct skb_frame_desc *skbdesc;
+
+       if (unlikely(!intf->beacon))
+               return -ENOBUFS;
+
+       priv_tx = intf->beacon->priv_data;
+
+       /*
+        * Fill in skb descriptor
+        */
+       skbdesc = get_skb_frame_desc(skb);
+       memset(skbdesc, 0, sizeof(*skbdesc));
+       skbdesc->data = skb->data;
+       skbdesc->data_len = skb->len;
+       skbdesc->desc = priv_tx->desc;
+       skbdesc->desc_len = intf->beacon->queue->desc_size;
+       skbdesc->entry = intf->beacon;
+
+       /*
+        * mac80211 doesn't provide the control->queue variable
+        * for beacons. Set our own queue identification so
+        * it can be used during descriptor initialization.
+        */
+       control->queue = RT2X00_BCN_QUEUE_BEACON;
+       rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
+
+       /*
+        * Enable beacon generation.
+        * Write entire beacon with descriptor to register,
+        * and kick the beacon generator.
+        */
+       memcpy(priv_tx->data, skb->data, skb->len);
+       rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, control->queue);
+
+       return 0;
+}
+
 static int rt2500pci_tx_last_beacon(struct ieee80211_hw *hw)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
        .get_tx_stats           = rt2x00mac_get_tx_stats,
        .get_tsf                = rt2500pci_get_tsf,
        .reset_tsf              = rt2500pci_reset_tsf,
-       .beacon_update          = rt2x00pci_beacon_update,
+       .beacon_update          = rt2500pci_beacon_update,
        .tx_last_beacon         = rt2500pci_tx_last_beacon,
 };
 
 
  * TX data initialization
  */
 static void rt2500usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
-                                   unsigned int queue)
+                                   const unsigned int queue)
 {
        u16 reg;
 
-       if (queue != IEEE80211_TX_QUEUE_BEACON)
+       if (queue != RT2X00_BCN_QUEUE_BEACON)
                return;
 
        rt2500usb_register_read(rt2x00dev, TXRX_CSR19, ®);
        skbdesc->entry = intf->beacon;
 
        /*
-        * Just in case mac80211 doesn't set this correctly,
-        * but we need this queue set for the descriptor
-        * initialization.
+        * mac80211 doesn't provide the control->queue variable
+        * for beacons. Set our own queue identification so
+        * it can be used during descriptor initialization.
         */
-       control->queue = IEEE80211_TX_QUEUE_BEACON;
+       control->queue = RT2X00_BCN_QUEUE_BEACON;
        rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
 
        /*
 
        int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev,
                                struct sk_buff *skb);
        void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev,
-                              unsigned int queue);
+                              const unsigned int queue);
 
        /*
         * RX control handlers
 /**
  * rt2x00queue_get_queue - Convert mac80211 queue index to rt2x00 queue
  * @rt2x00dev: Pointer to &struct rt2x00_dev.
- * @queue: mac80211 queue index (see &enum ieee80211_tx_queue).
+ * @queue: mac80211/rt2x00 queue index
+ *     (see &enum ieee80211_tx_queue and &enum rt2x00_bcn_queue).
  */
 struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev,
-                                        const enum ieee80211_tx_queue queue);
+                                        const unsigned int queue);
 
 /**
  * rt2x00queue_get_entry - Get queue entry where the given index points to.
 
         * Beacons and probe responses require the tsf timestamp
         * to be inserted into the frame.
         */
-       if (control->queue == IEEE80211_TX_QUEUE_BEACON ||
+       if (control->queue == RT2X00_BCN_QUEUE_BEACON ||
            is_probe_resp(frame_control))
                __set_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc.flags);
 
 
        struct rt2x00_dev *rt2x00dev = hw->priv;
        struct rt2x00_intf *intf = vif_to_intf(conf->vif);
        struct data_queue *queue =
-           rt2x00queue_get_queue(rt2x00dev, IEEE80211_TX_QUEUE_BEACON);
+           rt2x00queue_get_queue(rt2x00dev, RT2X00_BCN_QUEUE_BEACON);
        struct queue_entry *entry = NULL;
        unsigned int i;
 
 
 #include "rt2x00.h"
 #include "rt2x00pci.h"
 
-/*
- * Beacon handlers.
- */
-int rt2x00pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
-                           struct ieee80211_tx_control *control)
-{
-       struct rt2x00_dev *rt2x00dev = hw->priv;
-       struct rt2x00_intf *intf = vif_to_intf(control->vif);
-       struct queue_entry_priv_pci_tx *priv_tx;
-       struct skb_frame_desc *skbdesc;
-
-       if (unlikely(!intf->beacon))
-               return -ENOBUFS;
-
-       priv_tx = intf->beacon->priv_data;
-
-       /*
-        * Fill in skb descriptor
-        */
-       skbdesc = get_skb_frame_desc(skb);
-       memset(skbdesc, 0, sizeof(*skbdesc));
-       skbdesc->data = skb->data;
-       skbdesc->data_len = skb->len;
-       skbdesc->desc = priv_tx->desc;
-       skbdesc->desc_len = intf->beacon->queue->desc_size;
-       skbdesc->entry = intf->beacon;
-
-       /*
-        * Just in case mac80211 doesn't set this correctly,
-        * but we need this queue set for the descriptor
-        * initialization.
-        */
-       control->queue = IEEE80211_TX_QUEUE_BEACON;
-       rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
-
-       /*
-        * Enable beacon generation.
-        * Write entire beacon with descriptor to register,
-        * and kick the beacon generator.
-        */
-       memcpy(priv_tx->data, skb->data, skb->len);
-       rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, control->queue);
-
-       return 0;
-}
-EXPORT_SYMBOL_GPL(rt2x00pci_beacon_update);
-
 /*
  * TX data handlers.
  */
 
        memcpy_toio(rt2x00dev->csr_addr + offset, value, length);
 }
 
-/*
- * Beacon handlers.
- */
-int rt2x00pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
-                           struct ieee80211_tx_control *control);
-
 /*
  * TX data handlers.
  */
 
 #include "rt2x00lib.h"
 
 struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev,
-                                        const enum ieee80211_tx_queue queue)
+                                        const unsigned int queue)
 {
        int atim = test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags);
 
        if (!rt2x00dev->bcn)
                return NULL;
 
-       if (queue == IEEE80211_TX_QUEUE_BEACON)
+       if (queue == RT2X00_BCN_QUEUE_BEACON)
                return &rt2x00dev->bcn[0];
-       else if (queue == IEEE80211_TX_QUEUE_AFTER_BEACON && atim)
+       else if (queue == RT2X00_BCN_QUEUE_ATIM && atim)
                return &rt2x00dev->bcn[1];
 
        return NULL;
 
        QID_OTHER = 15,
 };
 
+/**
+ * enum rt2x00_bcn_queue: Beacon queue index
+ *
+ * Start counting with a high offset, this because this enumeration
+ * supplements &enum ieee80211_tx_queue and we should prevent value
+ * conflicts.
+ *
+ * @RT2X00_BCN_QUEUE_BEACON: Beacon queue
+ * @RT2X00_BCN_QUEUE_ATIM: Atim queue (sends frame after beacon)
+ */
+enum rt2x00_bcn_queue {
+       RT2X00_BCN_QUEUE_BEACON = 100,
+       RT2X00_BCN_QUEUE_ATIM = 101,
+};
+
 /**
  * struct skb_frame_desc: Descriptor information for the skb buffer
  *
 
  * TX data initialization
  */
 static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
-                                 unsigned int queue)
+                                 const unsigned int queue)
 {
        u32 reg;
 
-       if (queue == IEEE80211_TX_QUEUE_BEACON) {
+       if (queue == RT2X00_BCN_QUEUE_BEACON) {
                /*
                 * For Wi-Fi faily generated beacons between participating
                 * stations. Set TBTT phase adaptive adjustment step to 8us.
        skbdesc->entry = intf->beacon;
 
        /*
-        * Just in case the ieee80211 doesn't set this,
-        * but we need this queue set for the descriptor
-        * initialization.
+        * mac80211 doesn't provide the control->queue variable
+        * for beacons. Set our own queue identification so
+        * it can be used during descriptor initialization.
         */
-       control->queue = IEEE80211_TX_QUEUE_BEACON;
+       control->queue = RT2X00_BCN_QUEUE_BEACON;
        rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
 
        /*
 
  * TX data initialization
  */
 static void rt73usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
-                                 unsigned int queue)
+                                 const unsigned int queue)
 {
        u32 reg;
 
-       if (queue != IEEE80211_TX_QUEUE_BEACON)
+       if (queue != RT2X00_BCN_QUEUE_BEACON)
                return;
 
        /*
        skbdesc->entry = intf->beacon;
 
        /*
-        * Just in case the ieee80211 doesn't set this,
-        * but we need this queue set for the descriptor
-        * initialization.
+        * mac80211 doesn't provide the control->queue variable
+        * for beacons. Set our own queue identification so
+        * it can be used during descriptor initialization.
         */
-       control->queue = IEEE80211_TX_QUEUE_BEACON;
+       control->queue = RT2X00_BCN_QUEUE_BEACON;
        rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
 
        /*