aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800usb.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/rt2800usb.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/rt2800usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index db371193b507..dbec71852f00 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -459,6 +459,14 @@ static void rt2800usb_write_beacon(struct queue_entry *entry)
459 REGISTER_TIMEOUT32(entry->skb->len)); 459 REGISTER_TIMEOUT32(entry->skb->len));
460 460
461 /* 461 /*
462 * Enable beaconing again.
463 */
464 rt2x00_set_field32(&reg, BCN_TIME_CFG_TSF_TICKING, 1);
465 rt2x00_set_field32(&reg, BCN_TIME_CFG_TBTT_ENABLE, 1);
466 rt2x00_set_field32(&reg, BCN_TIME_CFG_BEACON_GEN, 1);
467 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
468
469 /*
462 * Clean up the beacon skb. 470 * Clean up the beacon skb.
463 */ 471 */
464 dev_kfree_skb(entry->skb); 472 dev_kfree_skb(entry->skb);
@@ -480,25 +488,6 @@ static int rt2800usb_get_tx_data_len(struct queue_entry *entry)
480 return length; 488 return length;
481} 489}
482 490
483static void rt2800usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
484 const enum data_queue_qid queue)
485{
486 u32 reg;
487
488 if (queue != QID_BEACON) {
489 rt2x00usb_kick_tx_queue(rt2x00dev, queue);
490 return;
491 }
492
493 rt2800_register_read(rt2x00dev, BCN_TIME_CFG, &reg);
494 if (!rt2x00_get_field32(reg, BCN_TIME_CFG_BEACON_GEN)) {
495 rt2x00_set_field32(&reg, BCN_TIME_CFG_TSF_TICKING, 1);
496 rt2x00_set_field32(&reg, BCN_TIME_CFG_TBTT_ENABLE, 1);
497 rt2x00_set_field32(&reg, BCN_TIME_CFG_BEACON_GEN, 1);
498 rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
499 }
500}
501
502/* 491/*
503 * RX control handlers 492 * RX control handlers
504 */ 493 */
@@ -667,7 +656,7 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = {
667 .write_tx_data = rt2x00usb_write_tx_data, 656 .write_tx_data = rt2x00usb_write_tx_data,
668 .write_beacon = rt2800usb_write_beacon, 657 .write_beacon = rt2800usb_write_beacon,
669 .get_tx_data_len = rt2800usb_get_tx_data_len, 658 .get_tx_data_len = rt2800usb_get_tx_data_len,
670 .kick_tx_queue = rt2800usb_kick_tx_queue, 659 .kick_tx_queue = rt2x00usb_kick_tx_queue,
671 .kill_tx_queue = rt2x00usb_kill_tx_queue, 660 .kill_tx_queue = rt2x00usb_kill_tx_queue,
672 .fill_rxdone = rt2800usb_fill_rxdone, 661 .fill_rxdone = rt2800usb_fill_rxdone,
673 .config_shared_key = rt2800_config_shared_key, 662 .config_shared_key = rt2800_config_shared_key,