aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index b9104e28bc2e..eb82860c54f9 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1093,21 +1093,10 @@ static int rt2500pci_enable_radio(struct rt2x00_dev *rt2x00dev)
1093 1093
1094static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev) 1094static void rt2500pci_disable_radio(struct rt2x00_dev *rt2x00dev)
1095{ 1095{
1096 u32 reg;
1097
1098 rt2x00pci_register_write(rt2x00dev, PWRCSR0, 0);
1099
1100 /* 1096 /*
1101 * Disable synchronisation. 1097 * Disable power
1102 */ 1098 */
1103 rt2x00pci_register_write(rt2x00dev, CSR14, 0); 1099 rt2x00pci_register_write(rt2x00dev, PWRCSR0, 0);
1104
1105 /*
1106 * Cancel RX and TX.
1107 */
1108 rt2x00pci_register_read(rt2x00dev, TXCSR0, &reg);
1109 rt2x00_set_field32(&reg, TXCSR0_ABORT, 1);
1110 rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
1111} 1100}
1112 1101
1113static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev, 1102static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev,
@@ -1303,6 +1292,20 @@ static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1303 rt2x00pci_register_write(rt2x00dev, TXCSR0, reg); 1292 rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
1304} 1293}
1305 1294
1295static void rt2500pci_kill_tx_queue(struct rt2x00_dev *rt2x00dev,
1296 const enum data_queue_qid qid)
1297{
1298 u32 reg;
1299
1300 if (qid == QID_BEACON) {
1301 rt2x00pci_register_write(rt2x00dev, CSR14, 0);
1302 } else {
1303 rt2x00pci_register_read(rt2x00dev, TXCSR0, &reg);
1304 rt2x00_set_field32(&reg, TXCSR0_ABORT, 1);
1305 rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
1306 }
1307}
1308
1306/* 1309/*
1307 * RX control handlers 1310 * RX control handlers
1308 */ 1311 */
@@ -1905,6 +1908,7 @@ static const struct rt2x00lib_ops rt2500pci_rt2x00_ops = {
1905 .write_tx_data = rt2x00pci_write_tx_data, 1908 .write_tx_data = rt2x00pci_write_tx_data,
1906 .write_beacon = rt2500pci_write_beacon, 1909 .write_beacon = rt2500pci_write_beacon,
1907 .kick_tx_queue = rt2500pci_kick_tx_queue, 1910 .kick_tx_queue = rt2500pci_kick_tx_queue,
1911 .kill_tx_queue = rt2500pci_kill_tx_queue,
1908 .fill_rxdone = rt2500pci_fill_rxdone, 1912 .fill_rxdone = rt2500pci_fill_rxdone,
1909 .config_filter = rt2500pci_config_filter, 1913 .config_filter = rt2500pci_config_filter,
1910 .config_intf = rt2500pci_config_intf, 1914 .config_intf = rt2500pci_config_intf,