diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2010-05-08 17:40:24 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-10 14:56:48 -0400 |
commit | d61cb26696e19494c049297def6c8f37d9e2f534 (patch) | |
tree | 29d4f3fa8a6cb3ad61112c0791a8cbe659a53602 /drivers/net/wireless/rt2x00/rt2500pci.c | |
parent | 2de64dd22d0390688b853788dcadee3c0ad9e518 (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/rt2500pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index d9b630455e7d..84ab56ec5872 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1246,6 +1246,14 @@ static void rt2500pci_write_beacon(struct queue_entry *entry) | |||
1246 | rt2x00_desc_read(entry_priv->desc, 1, &word); | 1246 | rt2x00_desc_read(entry_priv->desc, 1, &word); |
1247 | rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma); | 1247 | rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma); |
1248 | rt2x00_desc_write(entry_priv->desc, 1, word); | 1248 | rt2x00_desc_write(entry_priv->desc, 1, word); |
1249 | |||
1250 | /* | ||
1251 | * Enable beaconing again. | ||
1252 | */ | ||
1253 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 1); | ||
1254 | rt2x00_set_field32(®, CSR14_TBCN, 1); | ||
1255 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 1); | ||
1256 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | ||
1249 | } | 1257 | } |
1250 | 1258 | ||
1251 | static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, | 1259 | static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, |
@@ -1253,17 +1261,6 @@ static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, | |||
1253 | { | 1261 | { |
1254 | u32 reg; | 1262 | u32 reg; |
1255 | 1263 | ||
1256 | if (queue == QID_BEACON) { | ||
1257 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); | ||
1258 | if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) { | ||
1259 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 1); | ||
1260 | rt2x00_set_field32(®, CSR14_TBCN, 1); | ||
1261 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 1); | ||
1262 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | ||
1263 | } | ||
1264 | return; | ||
1265 | } | ||
1266 | |||
1267 | rt2x00pci_register_read(rt2x00dev, TXCSR0, ®); | 1264 | rt2x00pci_register_read(rt2x00dev, TXCSR0, ®); |
1268 | rt2x00_set_field32(®, TXCSR0_KICK_PRIO, (queue == QID_AC_BE)); | 1265 | rt2x00_set_field32(®, TXCSR0_KICK_PRIO, (queue == QID_AC_BE)); |
1269 | rt2x00_set_field32(®, TXCSR0_KICK_TX, (queue == QID_AC_BK)); | 1266 | rt2x00_set_field32(®, TXCSR0_KICK_TX, (queue == QID_AC_BK)); |