aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-02-03 09:54:57 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:19:29 -0500
commit5957da4c6e67a5447e75c2ad65252fdd5e22f9d0 (patch)
tree33eeb503f785c564c474148f8d17db081357b2fe /drivers
parent091ed315ef77a4949a6ce22e43af15a504ada348 (diff)
rt2x00: Move beacon and atim queue defines into rt2x00
As Johannes Berg indicated the BEACON and AFTER_BEACON queue indeces in mac80211 should be removed because they are too hardware specific. This patch adds the queue index defines into rt2x00queue.h and removes the dependency of the defines inside mac80211.h. Also move rt2x00pci_beacon_update() into rt2400pci and rt2500pci individually since it is no longer a generic function since rt61 and rt2800 no longer use that. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c53
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c55
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c12
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h7
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.c47
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.h6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.h15
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c12
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c12
12 files changed, 139 insertions, 90 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 61766ed800e3..feb8c09a33ad 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1041,11 +1041,11 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1041 * TX data initialization 1041 * TX data initialization
1042 */ 1042 */
1043static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, 1043static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1044 unsigned int queue) 1044 const unsigned int queue)
1045{ 1045{
1046 u32 reg; 1046 u32 reg;
1047 1047
1048 if (queue == IEEE80211_TX_QUEUE_BEACON) { 1048 if (queue == RT2X00_BCN_QUEUE_BEACON) {
1049 rt2x00pci_register_read(rt2x00dev, CSR14, &reg); 1049 rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
1050 if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) { 1050 if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) {
1051 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 1); 1051 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 1);
@@ -1060,7 +1060,7 @@ static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1060 rt2x00_set_field32(&reg, TXCSR0_KICK_TX, 1060 rt2x00_set_field32(&reg, TXCSR0_KICK_TX,
1061 (queue == IEEE80211_TX_QUEUE_DATA1)); 1061 (queue == IEEE80211_TX_QUEUE_DATA1));
1062 rt2x00_set_field32(&reg, TXCSR0_KICK_ATIM, 1062 rt2x00_set_field32(&reg, TXCSR0_KICK_ATIM,
1063 (queue == IEEE80211_TX_QUEUE_AFTER_BEACON)); 1063 (queue == RT2X00_BCN_QUEUE_ATIM));
1064 rt2x00pci_register_write(rt2x00dev, TXCSR0, reg); 1064 rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
1065} 1065}
1066 1066
@@ -1165,7 +1165,7 @@ static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance)
1165 * 3 - Atim ring transmit done interrupt. 1165 * 3 - Atim ring transmit done interrupt.
1166 */ 1166 */
1167 if (rt2x00_get_field32(reg, CSR7_TXDONE_ATIMRING)) 1167 if (rt2x00_get_field32(reg, CSR7_TXDONE_ATIMRING))
1168 rt2400pci_txdone(rt2x00dev, IEEE80211_TX_QUEUE_AFTER_BEACON); 1168 rt2400pci_txdone(rt2x00dev, RT2X00_BCN_QUEUE_ATIM);
1169 1169
1170 /* 1170 /*
1171 * 4 - Priority ring transmit done interrupt. 1171 * 4 - Priority ring transmit done interrupt.
@@ -1510,6 +1510,49 @@ static void rt2400pci_reset_tsf(struct ieee80211_hw *hw)
1510 rt2x00pci_register_write(rt2x00dev, CSR17, 0); 1510 rt2x00pci_register_write(rt2x00dev, CSR17, 0);
1511} 1511}
1512 1512
1513static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
1514 struct ieee80211_tx_control *control)
1515{
1516 struct rt2x00_dev *rt2x00dev = hw->priv;
1517 struct rt2x00_intf *intf = vif_to_intf(control->vif);
1518 struct queue_entry_priv_pci_tx *priv_tx;
1519 struct skb_frame_desc *skbdesc;
1520
1521 if (unlikely(!intf->beacon))
1522 return -ENOBUFS;
1523
1524 priv_tx = intf->beacon->priv_data;
1525
1526 /*
1527 * Fill in skb descriptor
1528 */
1529 skbdesc = get_skb_frame_desc(skb);
1530 memset(skbdesc, 0, sizeof(*skbdesc));
1531 skbdesc->data = skb->data;
1532 skbdesc->data_len = skb->len;
1533 skbdesc->desc = priv_tx->desc;
1534 skbdesc->desc_len = intf->beacon->queue->desc_size;
1535 skbdesc->entry = intf->beacon;
1536
1537 /*
1538 * mac80211 doesn't provide the control->queue variable
1539 * for beacons. Set our own queue identification so
1540 * it can be used during descriptor initialization.
1541 */
1542 control->queue = RT2X00_BCN_QUEUE_BEACON;
1543 rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
1544
1545 /*
1546 * Enable beacon generation.
1547 * Write entire beacon with descriptor to register,
1548 * and kick the beacon generator.
1549 */
1550 memcpy(priv_tx->data, skb->data, skb->len);
1551 rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, control->queue);
1552
1553 return 0;
1554}
1555
1513static int rt2400pci_tx_last_beacon(struct ieee80211_hw *hw) 1556static int rt2400pci_tx_last_beacon(struct ieee80211_hw *hw)
1514{ 1557{
1515 struct rt2x00_dev *rt2x00dev = hw->priv; 1558 struct rt2x00_dev *rt2x00dev = hw->priv;
@@ -1535,7 +1578,7 @@ static const struct ieee80211_ops rt2400pci_mac80211_ops = {
1535 .get_tx_stats = rt2x00mac_get_tx_stats, 1578 .get_tx_stats = rt2x00mac_get_tx_stats,
1536 .get_tsf = rt2400pci_get_tsf, 1579 .get_tsf = rt2400pci_get_tsf,
1537 .reset_tsf = rt2400pci_reset_tsf, 1580 .reset_tsf = rt2400pci_reset_tsf,
1538 .beacon_update = rt2x00pci_beacon_update, 1581 .beacon_update = rt2400pci_beacon_update,
1539 .tx_last_beacon = rt2400pci_tx_last_beacon, 1582 .tx_last_beacon = rt2400pci_tx_last_beacon,
1540}; 1583};
1541 1584
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 6a558bf74f11..36c64f751b1d 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -252,7 +252,7 @@ static void rt2500pci_config_intf(struct rt2x00_dev *rt2x00dev,
252 const unsigned int flags) 252 const unsigned int flags)
253{ 253{
254 struct data_queue *queue = 254 struct data_queue *queue =
255 rt2x00queue_get_queue(rt2x00dev, IEEE80211_TX_QUEUE_BEACON); 255 rt2x00queue_get_queue(rt2x00dev, RT2X00_BCN_QUEUE_BEACON);
256 unsigned int bcn_preload; 256 unsigned int bcn_preload;
257 u32 reg; 257 u32 reg;
258 258
@@ -1195,11 +1195,11 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1195 * TX data initialization 1195 * TX data initialization
1196 */ 1196 */
1197static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, 1197static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1198 unsigned int queue) 1198 const unsigned int queue)
1199{ 1199{
1200 u32 reg; 1200 u32 reg;
1201 1201
1202 if (queue == IEEE80211_TX_QUEUE_BEACON) { 1202 if (queue == RT2X00_BCN_QUEUE_BEACON) {
1203 rt2x00pci_register_read(rt2x00dev, CSR14, &reg); 1203 rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
1204 if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) { 1204 if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) {
1205 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 1); 1205 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 1);
@@ -1214,7 +1214,7 @@ static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1214 rt2x00_set_field32(&reg, TXCSR0_KICK_TX, 1214 rt2x00_set_field32(&reg, TXCSR0_KICK_TX,
1215 (queue == IEEE80211_TX_QUEUE_DATA1)); 1215 (queue == IEEE80211_TX_QUEUE_DATA1));
1216 rt2x00_set_field32(&reg, TXCSR0_KICK_ATIM, 1216 rt2x00_set_field32(&reg, TXCSR0_KICK_ATIM,
1217 (queue == IEEE80211_TX_QUEUE_AFTER_BEACON)); 1217 (queue == RT2X00_BCN_QUEUE_ATIM));
1218 rt2x00pci_register_write(rt2x00dev, TXCSR0, reg); 1218 rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
1219} 1219}
1220 1220
@@ -1316,7 +1316,7 @@ static irqreturn_t rt2500pci_interrupt(int irq, void *dev_instance)
1316 * 3 - Atim ring transmit done interrupt. 1316 * 3 - Atim ring transmit done interrupt.
1317 */ 1317 */
1318 if (rt2x00_get_field32(reg, CSR7_TXDONE_ATIMRING)) 1318 if (rt2x00_get_field32(reg, CSR7_TXDONE_ATIMRING))
1319 rt2500pci_txdone(rt2x00dev, IEEE80211_TX_QUEUE_AFTER_BEACON); 1319 rt2500pci_txdone(rt2x00dev, RT2X00_BCN_QUEUE_ATIM);
1320 1320
1321 /* 1321 /*
1322 * 4 - Priority ring transmit done interrupt. 1322 * 4 - Priority ring transmit done interrupt.
@@ -1822,6 +1822,49 @@ static void rt2500pci_reset_tsf(struct ieee80211_hw *hw)
1822 rt2x00pci_register_write(rt2x00dev, CSR17, 0); 1822 rt2x00pci_register_write(rt2x00dev, CSR17, 0);
1823} 1823}
1824 1824
1825static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
1826 struct ieee80211_tx_control *control)
1827{
1828 struct rt2x00_dev *rt2x00dev = hw->priv;
1829 struct rt2x00_intf *intf = vif_to_intf(control->vif);
1830 struct queue_entry_priv_pci_tx *priv_tx;
1831 struct skb_frame_desc *skbdesc;
1832
1833 if (unlikely(!intf->beacon))
1834 return -ENOBUFS;
1835
1836 priv_tx = intf->beacon->priv_data;
1837
1838 /*
1839 * Fill in skb descriptor
1840 */
1841 skbdesc = get_skb_frame_desc(skb);
1842 memset(skbdesc, 0, sizeof(*skbdesc));
1843 skbdesc->data = skb->data;
1844 skbdesc->data_len = skb->len;
1845 skbdesc->desc = priv_tx->desc;
1846 skbdesc->desc_len = intf->beacon->queue->desc_size;
1847 skbdesc->entry = intf->beacon;
1848
1849 /*
1850 * mac80211 doesn't provide the control->queue variable
1851 * for beacons. Set our own queue identification so
1852 * it can be used during descriptor initialization.
1853 */
1854 control->queue = RT2X00_BCN_QUEUE_BEACON;
1855 rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
1856
1857 /*
1858 * Enable beacon generation.
1859 * Write entire beacon with descriptor to register,
1860 * and kick the beacon generator.
1861 */
1862 memcpy(priv_tx->data, skb->data, skb->len);
1863 rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, control->queue);
1864
1865 return 0;
1866}
1867
1825static int rt2500pci_tx_last_beacon(struct ieee80211_hw *hw) 1868static int rt2500pci_tx_last_beacon(struct ieee80211_hw *hw)
1826{ 1869{
1827 struct rt2x00_dev *rt2x00dev = hw->priv; 1870 struct rt2x00_dev *rt2x00dev = hw->priv;
@@ -1847,7 +1890,7 @@ static const struct ieee80211_ops rt2500pci_mac80211_ops = {
1847 .get_tx_stats = rt2x00mac_get_tx_stats, 1890 .get_tx_stats = rt2x00mac_get_tx_stats,
1848 .get_tsf = rt2500pci_get_tsf, 1891 .get_tsf = rt2500pci_get_tsf,
1849 .reset_tsf = rt2500pci_reset_tsf, 1892 .reset_tsf = rt2500pci_reset_tsf,
1850 .beacon_update = rt2x00pci_beacon_update, 1893 .beacon_update = rt2500pci_beacon_update,
1851 .tx_last_beacon = rt2500pci_tx_last_beacon, 1894 .tx_last_beacon = rt2500pci_tx_last_beacon,
1852}; 1895};
1853 1896
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 31258ee24ee3..38c968ee50f1 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1100,11 +1100,11 @@ static int rt2500usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev,
1100 * TX data initialization 1100 * TX data initialization
1101 */ 1101 */
1102static void rt2500usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev, 1102static void rt2500usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1103 unsigned int queue) 1103 const unsigned int queue)
1104{ 1104{
1105 u16 reg; 1105 u16 reg;
1106 1106
1107 if (queue != IEEE80211_TX_QUEUE_BEACON) 1107 if (queue != RT2X00_BCN_QUEUE_BEACON)
1108 return; 1108 return;
1109 1109
1110 rt2500usb_register_read(rt2x00dev, TXRX_CSR19, &reg); 1110 rt2500usb_register_read(rt2x00dev, TXRX_CSR19, &reg);
@@ -1758,11 +1758,11 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw,
1758 skbdesc->entry = intf->beacon; 1758 skbdesc->entry = intf->beacon;
1759 1759
1760 /* 1760 /*
1761 * Just in case mac80211 doesn't set this correctly, 1761 * mac80211 doesn't provide the control->queue variable
1762 * but we need this queue set for the descriptor 1762 * for beacons. Set our own queue identification so
1763 * initialization. 1763 * it can be used during descriptor initialization.
1764 */ 1764 */
1765 control->queue = IEEE80211_TX_QUEUE_BEACON; 1765 control->queue = RT2X00_BCN_QUEUE_BEACON;
1766 rt2x00lib_write_tx_desc(rt2x00dev, skb, control); 1766 rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
1767 1767
1768 /* 1768 /*
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 2363ca4903cc..b0e4ea7c9dca 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -526,7 +526,7 @@ struct rt2x00lib_ops {
526 int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, 526 int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev,
527 struct sk_buff *skb); 527 struct sk_buff *skb);
528 void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, 528 void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev,
529 unsigned int queue); 529 const unsigned int queue);
530 530
531 /* 531 /*
532 * RX control handlers 532 * RX control handlers
@@ -906,10 +906,11 @@ static inline u16 get_duration_res(const unsigned int size, const u8 rate)
906/** 906/**
907 * rt2x00queue_get_queue - Convert mac80211 queue index to rt2x00 queue 907 * rt2x00queue_get_queue - Convert mac80211 queue index to rt2x00 queue
908 * @rt2x00dev: Pointer to &struct rt2x00_dev. 908 * @rt2x00dev: Pointer to &struct rt2x00_dev.
909 * @queue: mac80211 queue index (see &enum ieee80211_tx_queue). 909 * @queue: mac80211/rt2x00 queue index
910 * (see &enum ieee80211_tx_queue and &enum rt2x00_bcn_queue).
910 */ 911 */
911struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev, 912struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev,
912 const enum ieee80211_tx_queue queue); 913 const unsigned int queue);
913 914
914/** 915/**
915 * rt2x00queue_get_entry - Get queue entry where the given index points to. 916 * rt2x00queue_get_entry - Get queue entry where the given index points to.
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 1bc8c14e6aec..0df8062b1a8e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -679,7 +679,7 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
679 * Beacons and probe responses require the tsf timestamp 679 * Beacons and probe responses require the tsf timestamp
680 * to be inserted into the frame. 680 * to be inserted into the frame.
681 */ 681 */
682 if (control->queue == IEEE80211_TX_QUEUE_BEACON || 682 if (control->queue == RT2X00_BCN_QUEUE_BEACON ||
683 is_probe_resp(frame_control)) 683 is_probe_resp(frame_control))
684 __set_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc.flags); 684 __set_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc.flags);
685 685
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 65a2bcd18aa1..8c24d3b36d28 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -164,7 +164,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
164 struct rt2x00_dev *rt2x00dev = hw->priv; 164 struct rt2x00_dev *rt2x00dev = hw->priv;
165 struct rt2x00_intf *intf = vif_to_intf(conf->vif); 165 struct rt2x00_intf *intf = vif_to_intf(conf->vif);
166 struct data_queue *queue = 166 struct data_queue *queue =
167 rt2x00queue_get_queue(rt2x00dev, IEEE80211_TX_QUEUE_BEACON); 167 rt2x00queue_get_queue(rt2x00dev, RT2X00_BCN_QUEUE_BEACON);
168 struct queue_entry *entry = NULL; 168 struct queue_entry *entry = NULL;
169 unsigned int i; 169 unsigned int i;
170 170
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index 764147dd5aea..275c8a1e6638 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -32,53 +32,6 @@
32#include "rt2x00pci.h" 32#include "rt2x00pci.h"
33 33
34/* 34/*
35 * Beacon handlers.
36 */
37int rt2x00pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
38 struct ieee80211_tx_control *control)
39{
40 struct rt2x00_dev *rt2x00dev = hw->priv;
41 struct rt2x00_intf *intf = vif_to_intf(control->vif);
42 struct queue_entry_priv_pci_tx *priv_tx;
43 struct skb_frame_desc *skbdesc;
44
45 if (unlikely(!intf->beacon))
46 return -ENOBUFS;
47
48 priv_tx = intf->beacon->priv_data;
49
50 /*
51 * Fill in skb descriptor
52 */
53 skbdesc = get_skb_frame_desc(skb);
54 memset(skbdesc, 0, sizeof(*skbdesc));
55 skbdesc->data = skb->data;
56 skbdesc->data_len = skb->len;
57 skbdesc->desc = priv_tx->desc;
58 skbdesc->desc_len = intf->beacon->queue->desc_size;
59 skbdesc->entry = intf->beacon;
60
61 /*
62 * Just in case mac80211 doesn't set this correctly,
63 * but we need this queue set for the descriptor
64 * initialization.
65 */
66 control->queue = IEEE80211_TX_QUEUE_BEACON;
67 rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
68
69 /*
70 * Enable beacon generation.
71 * Write entire beacon with descriptor to register,
72 * and kick the beacon generator.
73 */
74 memcpy(priv_tx->data, skb->data, skb->len);
75 rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, control->queue);
76
77 return 0;
78}
79EXPORT_SYMBOL_GPL(rt2x00pci_beacon_update);
80
81/*
82 * TX data handlers. 35 * TX data handlers.
83 */ 36 */
84int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, 37int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h
index 3b1597ffb4f2..71335e16b058 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.h
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.h
@@ -88,12 +88,6 @@ rt2x00pci_register_multiwrite(struct rt2x00_dev *rt2x00dev,
88} 88}
89 89
90/* 90/*
91 * Beacon handlers.
92 */
93int rt2x00pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
94 struct ieee80211_tx_control *control);
95
96/*
97 * TX data handlers. 91 * TX data handlers.
98 */ 92 */
99int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, 93int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 921eca35719d..52bb57ddc05f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -30,7 +30,7 @@
30#include "rt2x00lib.h" 30#include "rt2x00lib.h"
31 31
32struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev, 32struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev,
33 const enum ieee80211_tx_queue queue) 33 const unsigned int queue)
34{ 34{
35 int atim = test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags); 35 int atim = test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags);
36 36
@@ -40,9 +40,9 @@ struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev,
40 if (!rt2x00dev->bcn) 40 if (!rt2x00dev->bcn)
41 return NULL; 41 return NULL;
42 42
43 if (queue == IEEE80211_TX_QUEUE_BEACON) 43 if (queue == RT2X00_BCN_QUEUE_BEACON)
44 return &rt2x00dev->bcn[0]; 44 return &rt2x00dev->bcn[0];
45 else if (queue == IEEE80211_TX_QUEUE_AFTER_BEACON && atim) 45 else if (queue == RT2X00_BCN_QUEUE_ATIM && atim)
46 return &rt2x00dev->bcn[1]; 46 return &rt2x00dev->bcn[1];
47 47
48 return NULL; 48 return NULL;
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index 75af48eddc25..956e0be8aadd 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -67,6 +67,21 @@ enum data_queue_qid {
67}; 67};
68 68
69/** 69/**
70 * enum rt2x00_bcn_queue: Beacon queue index
71 *
72 * Start counting with a high offset, this because this enumeration
73 * supplements &enum ieee80211_tx_queue and we should prevent value
74 * conflicts.
75 *
76 * @RT2X00_BCN_QUEUE_BEACON: Beacon queue
77 * @RT2X00_BCN_QUEUE_ATIM: Atim queue (sends frame after beacon)
78 */
79enum rt2x00_bcn_queue {
80 RT2X00_BCN_QUEUE_BEACON = 100,
81 RT2X00_BCN_QUEUE_ATIM = 101,
82};
83
84/**
70 * struct skb_frame_desc: Descriptor information for the skb buffer 85 * struct skb_frame_desc: Descriptor information for the skb buffer
71 * 86 *
72 * This structure is placed over the skb->cb array, this means that 87 * This structure is placed over the skb->cb array, this means that
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 534e1647b7cf..59e87a1d96a4 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -1582,11 +1582,11 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1582 * TX data initialization 1582 * TX data initialization
1583 */ 1583 */
1584static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, 1584static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1585 unsigned int queue) 1585 const unsigned int queue)
1586{ 1586{
1587 u32 reg; 1587 u32 reg;
1588 1588
1589 if (queue == IEEE80211_TX_QUEUE_BEACON) { 1589 if (queue == RT2X00_BCN_QUEUE_BEACON) {
1590 /* 1590 /*
1591 * For Wi-Fi faily generated beacons between participating 1591 * For Wi-Fi faily generated beacons between participating
1592 * stations. Set TBTT phase adaptive adjustment step to 8us. 1592 * stations. Set TBTT phase adaptive adjustment step to 8us.
@@ -2431,11 +2431,11 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
2431 skbdesc->entry = intf->beacon; 2431 skbdesc->entry = intf->beacon;
2432 2432
2433 /* 2433 /*
2434 * Just in case the ieee80211 doesn't set this, 2434 * mac80211 doesn't provide the control->queue variable
2435 * but we need this queue set for the descriptor 2435 * for beacons. Set our own queue identification so
2436 * initialization. 2436 * it can be used during descriptor initialization.
2437 */ 2437 */
2438 control->queue = IEEE80211_TX_QUEUE_BEACON; 2438 control->queue = RT2X00_BCN_QUEUE_BEACON;
2439 rt2x00lib_write_tx_desc(rt2x00dev, skb, control); 2439 rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
2440 2440
2441 /* 2441 /*
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index b519a4bfc212..4b5bde8b53de 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1326,11 +1326,11 @@ static int rt73usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev,
1326 * TX data initialization 1326 * TX data initialization
1327 */ 1327 */
1328static void rt73usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev, 1328static void rt73usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1329 unsigned int queue) 1329 const unsigned int queue)
1330{ 1330{
1331 u32 reg; 1331 u32 reg;
1332 1332
1333 if (queue != IEEE80211_TX_QUEUE_BEACON) 1333 if (queue != RT2X00_BCN_QUEUE_BEACON)
1334 return; 1334 return;
1335 1335
1336 /* 1336 /*
@@ -2031,11 +2031,11 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
2031 skbdesc->entry = intf->beacon; 2031 skbdesc->entry = intf->beacon;
2032 2032
2033 /* 2033 /*
2034 * Just in case the ieee80211 doesn't set this, 2034 * mac80211 doesn't provide the control->queue variable
2035 * but we need this queue set for the descriptor 2035 * for beacons. Set our own queue identification so
2036 * initialization. 2036 * it can be used during descriptor initialization.
2037 */ 2037 */
2038 control->queue = IEEE80211_TX_QUEUE_BEACON; 2038 control->queue = RT2X00_BCN_QUEUE_BEACON;
2039 rt2x00lib_write_tx_desc(rt2x00dev, skb, control); 2039 rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
2040 2040
2041 /* 2041 /*