aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2400pci.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/rt2400pci.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/rt2400pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 6f898913492a..9c13a4e0e731 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1089,6 +1089,14 @@ static void rt2400pci_write_beacon(struct queue_entry *entry)
1089 rt2x00_desc_read(entry_priv->desc, 1, &word); 1089 rt2x00_desc_read(entry_priv->desc, 1, &word);
1090 rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma); 1090 rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma);
1091 rt2x00_desc_write(entry_priv->desc, 1, word); 1091 rt2x00_desc_write(entry_priv->desc, 1, word);
1092
1093 /*
1094 * Enable beaconing again.
1095 */
1096 rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 1);
1097 rt2x00_set_field32(&reg, CSR14_TBCN, 1);
1098 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 1);
1099 rt2x00pci_register_write(rt2x00dev, CSR14, reg);
1092} 1100}
1093 1101
1094static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, 1102static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
@@ -1096,17 +1104,6 @@ static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1096{ 1104{
1097 u32 reg; 1105 u32 reg;
1098 1106
1099 if (queue == QID_BEACON) {
1100 rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
1101 if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) {
1102 rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 1);
1103 rt2x00_set_field32(&reg, CSR14_TBCN, 1);
1104 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 1);
1105 rt2x00pci_register_write(rt2x00dev, CSR14, reg);
1106 }
1107 return;
1108 }
1109
1110 rt2x00pci_register_read(rt2x00dev, TXCSR0, &reg); 1107 rt2x00pci_register_read(rt2x00dev, TXCSR0, &reg);
1111 rt2x00_set_field32(&reg, TXCSR0_KICK_PRIO, (queue == QID_AC_BE)); 1108 rt2x00_set_field32(&reg, TXCSR0_KICK_PRIO, (queue == QID_AC_BE));
1112 rt2x00_set_field32(&reg, TXCSR0_KICK_TX, (queue == QID_AC_BK)); 1109 rt2x00_set_field32(&reg, TXCSR0_KICK_TX, (queue == QID_AC_BK));