aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800pci.c
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2010-05-08 17:40:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-05-10 14:56:48 -0400
commitd61cb26696e19494c049297def6c8f37d9e2f534 (patch)
tree29d4f3fa8a6cb3ad61112c0791a8cbe659a53602 /drivers/net/wireless/rt2x00/rt2800pci.c
parent2de64dd22d0390688b853788dcadee3c0ad9e518 (diff)
rt2x00: Clean up all driver's kick_tx_queue callback functions.
All of the driver's kick_tx_queue callback functions treat the TX queue for beacons in a special manner. Clean this up by integrating the kicking of the beacon queue into the write_beacon callback function, and let the generic code no longer call the kick_tx_queue callback function when updating the beacon. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 308842a2e8ba..6d564607bbbd 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -705,6 +705,14 @@ static void rt2800pci_write_beacon(struct queue_entry *entry)
705 entry->skb->data, entry->skb->len); 705 entry->skb->data, entry->skb->len);
706 706
707 /* 707 /*
708 * Enable beaconing again.
709 */
710 rt2x00_set_field32(&reg, BCN_TIME_CFG_TSF_TICKING, 1);
711 rt2x00_set_field32(&reg, BCN_TIME_CFG_TBTT_ENABLE, 1);
712 rt2x00_set_field32(&reg, BCN_TIME_CFG_BEACON_GEN, 1);
713 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
714
715 /*
708 * Clean up beacon skb. 716 * Clean up beacon skb.
709 */ 717 */
710 dev_kfree_skb_any(entry->skb); 718 dev_kfree_skb_any(entry->skb);
@@ -716,18 +724,6 @@ static void rt2800pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
716{ 724{
717 struct data_queue *queue; 725 struct data_queue *queue;
718 unsigned int idx, qidx = 0; 726 unsigned int idx, qidx = 0;
719 u32 reg;
720
721 if (queue_idx == QID_BEACON) {
722 rt2800_register_read(rt2x00dev, BCN_TIME_CFG, &reg);
723 if (!rt2x00_get_field32(reg, BCN_TIME_CFG_BEACON_GEN)) {
724 rt2x00_set_field32(&reg, BCN_TIME_CFG_TSF_TICKING, 1);
725 rt2x00_set_field32(&reg, BCN_TIME_CFG_TBTT_ENABLE, 1);
726 rt2x00_set_field32(&reg, BCN_TIME_CFG_BEACON_GEN, 1);
727 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
728 }
729 return;
730 }
731 727
732 if (queue_idx > QID_HCCA && queue_idx != QID_MGMT) 728 if (queue_idx > QID_HCCA && queue_idx != QID_MGMT)
733 return; 729 return;