diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2010-08-30 15:14:56 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-31 14:22:24 -0400 |
commit | 0e3afe5b20c4ccdeff5178c62b557a917945a828 (patch) | |
tree | 737b0fe01751e65e78dcbed46f9bb21b653de0ee /drivers | |
parent | e0540879db337b18ef7c580234038ff62c8cd381 (diff) |
rt2x00: Correctly kill beacon queue
USB devices upload their beacon and then automatically send
it out every beacon interval. However when killing a TX queue
we only kill the URB and not the actual transmission of the beacon.
This will reset the Beacon register to prevent any beacons from
being transmitted.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 10 |
3 files changed, 27 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 71d8d821c4e1..a161e9e33b73 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1196,6 +1196,14 @@ static int rt2500usb_get_tx_data_len(struct queue_entry *entry) | |||
1196 | return length; | 1196 | return length; |
1197 | } | 1197 | } |
1198 | 1198 | ||
1199 | static void rt2500usb_kill_tx_queue(struct data_queue *queue) | ||
1200 | { | ||
1201 | if (queue->qid == QID_BEACON) | ||
1202 | rt2500usb_register_write(queue->rt2x00dev, TXRX_CSR19, 0); | ||
1203 | |||
1204 | rt2x00usb_kill_tx_queue(queue); | ||
1205 | } | ||
1206 | |||
1199 | /* | 1207 | /* |
1200 | * RX control handlers | 1208 | * RX control handlers |
1201 | */ | 1209 | */ |
@@ -1794,7 +1802,7 @@ static const struct rt2x00lib_ops rt2500usb_rt2x00_ops = { | |||
1794 | .write_beacon = rt2500usb_write_beacon, | 1802 | .write_beacon = rt2500usb_write_beacon, |
1795 | .get_tx_data_len = rt2500usb_get_tx_data_len, | 1803 | .get_tx_data_len = rt2500usb_get_tx_data_len, |
1796 | .kick_tx_queue = rt2x00usb_kick_tx_queue, | 1804 | .kick_tx_queue = rt2x00usb_kick_tx_queue, |
1797 | .kill_tx_queue = rt2x00usb_kill_tx_queue, | 1805 | .kill_tx_queue = rt2500usb_kill_tx_queue, |
1798 | .fill_rxdone = rt2500usb_fill_rxdone, | 1806 | .fill_rxdone = rt2500usb_fill_rxdone, |
1799 | .config_shared_key = rt2500usb_config_key, | 1807 | .config_shared_key = rt2500usb_config_key, |
1800 | .config_pairwise_key = rt2500usb_config_key, | 1808 | .config_pairwise_key = rt2500usb_config_key, |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index d275549a1fb9..3dff56ec195a 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -335,6 +335,14 @@ static void rt2800usb_work_txdone(struct work_struct *work) | |||
335 | } | 335 | } |
336 | } | 336 | } |
337 | 337 | ||
338 | static void rt2800usb_kill_tx_queue(struct data_queue *queue) | ||
339 | { | ||
340 | if (queue->qid == QID_BEACON) | ||
341 | rt2x00usb_register_write(queue->rt2x00dev, BCN_TIME_CFG, 0); | ||
342 | |||
343 | rt2x00usb_kill_tx_queue(queue); | ||
344 | } | ||
345 | |||
338 | /* | 346 | /* |
339 | * RX control handlers | 347 | * RX control handlers |
340 | */ | 348 | */ |
@@ -533,7 +541,7 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { | |||
533 | .write_beacon = rt2800_write_beacon, | 541 | .write_beacon = rt2800_write_beacon, |
534 | .get_tx_data_len = rt2800usb_get_tx_data_len, | 542 | .get_tx_data_len = rt2800usb_get_tx_data_len, |
535 | .kick_tx_queue = rt2x00usb_kick_tx_queue, | 543 | .kick_tx_queue = rt2x00usb_kick_tx_queue, |
536 | .kill_tx_queue = rt2x00usb_kill_tx_queue, | 544 | .kill_tx_queue = rt2800usb_kill_tx_queue, |
537 | .fill_rxdone = rt2800usb_fill_rxdone, | 545 | .fill_rxdone = rt2800usb_fill_rxdone, |
538 | .config_shared_key = rt2800_config_shared_key, | 546 | .config_shared_key = rt2800_config_shared_key, |
539 | .config_pairwise_key = rt2800_config_pairwise_key, | 547 | .config_pairwise_key = rt2800_config_pairwise_key, |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index ac8f6d0b8f49..df0ef3f70f1e 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1573,6 +1573,14 @@ static int rt73usb_get_tx_data_len(struct queue_entry *entry) | |||
1573 | return length; | 1573 | return length; |
1574 | } | 1574 | } |
1575 | 1575 | ||
1576 | static void rt73usb_kill_tx_queue(struct data_queue *queue) | ||
1577 | { | ||
1578 | if (queue->qid == QID_BEACON) | ||
1579 | rt2x00usb_register_write(queue->rt2x00dev, TXRX_CSR9, 0); | ||
1580 | |||
1581 | rt2x00usb_kill_tx_queue(queue); | ||
1582 | } | ||
1583 | |||
1576 | /* | 1584 | /* |
1577 | * RX control handlers | 1585 | * RX control handlers |
1578 | */ | 1586 | */ |
@@ -2262,7 +2270,7 @@ static const struct rt2x00lib_ops rt73usb_rt2x00_ops = { | |||
2262 | .write_beacon = rt73usb_write_beacon, | 2270 | .write_beacon = rt73usb_write_beacon, |
2263 | .get_tx_data_len = rt73usb_get_tx_data_len, | 2271 | .get_tx_data_len = rt73usb_get_tx_data_len, |
2264 | .kick_tx_queue = rt2x00usb_kick_tx_queue, | 2272 | .kick_tx_queue = rt2x00usb_kick_tx_queue, |
2265 | .kill_tx_queue = rt2x00usb_kill_tx_queue, | 2273 | .kill_tx_queue = rt73usb_kill_tx_queue, |
2266 | .fill_rxdone = rt73usb_fill_rxdone, | 2274 | .fill_rxdone = rt73usb_fill_rxdone, |
2267 | .config_shared_key = rt73usb_config_shared_key, | 2275 | .config_shared_key = rt73usb_config_shared_key, |
2268 | .config_pairwise_key = rt73usb_config_pairwise_key, | 2276 | .config_pairwise_key = rt73usb_config_pairwise_key, |