aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt61pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt61pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index ae12dcdd3c24..98af4d26583d 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -1591,11 +1591,11 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1591 * TX data initialization 1591 * TX data initialization
1592 */ 1592 */
1593static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, 1593static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1594 const unsigned int queue) 1594 const enum data_queue_qid queue)
1595{ 1595{
1596 u32 reg; 1596 u32 reg;
1597 1597
1598 if (queue == RT2X00_BCN_QUEUE_BEACON) { 1598 if (queue == QID_BEACON) {
1599 /* 1599 /*
1600 * For Wi-Fi faily generated beacons between participating 1600 * For Wi-Fi faily generated beacons between participating
1601 * stations. Set TBTT phase adaptive adjustment step to 8us. 1601 * stations. Set TBTT phase adaptive adjustment step to 8us.
@@ -1613,14 +1613,10 @@ static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1613 } 1613 }
1614 1614
1615 rt2x00pci_register_read(rt2x00dev, TX_CNTL_CSR, &reg); 1615 rt2x00pci_register_read(rt2x00dev, TX_CNTL_CSR, &reg);
1616 rt2x00_set_field32(&reg, TX_CNTL_CSR_KICK_TX_AC0, 1616 rt2x00_set_field32(&reg, TX_CNTL_CSR_KICK_TX_AC0, (queue == QID_AC_BE));
1617 (queue == IEEE80211_TX_QUEUE_DATA0)); 1617 rt2x00_set_field32(&reg, TX_CNTL_CSR_KICK_TX_AC1, (queue == QID_AC_BK));
1618 rt2x00_set_field32(&reg, TX_CNTL_CSR_KICK_TX_AC1, 1618 rt2x00_set_field32(&reg, TX_CNTL_CSR_KICK_TX_AC2, (queue == QID_AC_VI));
1619 (queue == IEEE80211_TX_QUEUE_DATA1)); 1619 rt2x00_set_field32(&reg, TX_CNTL_CSR_KICK_TX_AC3, (queue == QID_AC_VO));
1620 rt2x00_set_field32(&reg, TX_CNTL_CSR_KICK_TX_AC2,
1621 (queue == IEEE80211_TX_QUEUE_DATA2));
1622 rt2x00_set_field32(&reg, TX_CNTL_CSR_KICK_TX_AC3,
1623 (queue == IEEE80211_TX_QUEUE_DATA3));
1624 rt2x00pci_register_write(rt2x00dev, TX_CNTL_CSR, reg); 1620 rt2x00pci_register_write(rt2x00dev, TX_CNTL_CSR, reg);
1625} 1621}
1626 1622
@@ -2412,21 +2408,14 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
2412 rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); 2408 rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg);
2413 2409
2414 /* 2410 /*
2415 * mac80211 doesn't provide the control->queue variable
2416 * for beacons. Set our own queue identification so
2417 * it can be used during descriptor initialization.
2418 */
2419 control->queue = RT2X00_BCN_QUEUE_BEACON;
2420 rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
2421
2422 /*
2423 * Write entire beacon with descriptor to register, 2411 * Write entire beacon with descriptor to register,
2424 * and kick the beacon generator. 2412 * and kick the beacon generator.
2425 */ 2413 */
2414 rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
2426 beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx); 2415 beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx);
2427 rt2x00pci_register_multiwrite(rt2x00dev, beacon_base, 2416 rt2x00pci_register_multiwrite(rt2x00dev, beacon_base,
2428 skb->data, skb->len); 2417 skb->data, skb->len);
2429 rt61pci_kick_tx_queue(rt2x00dev, control->queue); 2418 rt61pci_kick_tx_queue(rt2x00dev, QID_BEACON);
2430 2419
2431 return 0; 2420 return 0;
2432} 2421}