aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c11
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c11
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c11
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c11
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c11
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h9
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00reg.h2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c24
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.h4
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c11
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c11
15 files changed, 55 insertions, 83 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 35d9a06a76a..2fc6ca5e096 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1058,12 +1058,6 @@ static int rt2400pci_set_device_state(struct rt2x00_dev *rt2x00dev,
1058 case STATE_RADIO_OFF: 1058 case STATE_RADIO_OFF:
1059 rt2400pci_disable_radio(rt2x00dev); 1059 rt2400pci_disable_radio(rt2x00dev);
1060 break; 1060 break;
1061 case STATE_RADIO_RX_ON:
1062 rt2400pci_start_queue(rt2x00dev->rx);
1063 break;
1064 case STATE_RADIO_RX_OFF:
1065 rt2400pci_stop_queue(rt2x00dev->rx);
1066 break;
1067 case STATE_RADIO_IRQ_ON: 1061 case STATE_RADIO_IRQ_ON:
1068 case STATE_RADIO_IRQ_ON_ISR: 1062 case STATE_RADIO_IRQ_ON_ISR:
1069 case STATE_RADIO_IRQ_OFF: 1063 case STATE_RADIO_IRQ_OFF:
@@ -1672,10 +1666,11 @@ static const struct rt2x00lib_ops rt2400pci_rt2x00_ops = {
1672 .link_stats = rt2400pci_link_stats, 1666 .link_stats = rt2400pci_link_stats,
1673 .reset_tuner = rt2400pci_reset_tuner, 1667 .reset_tuner = rt2400pci_reset_tuner,
1674 .link_tuner = rt2400pci_link_tuner, 1668 .link_tuner = rt2400pci_link_tuner,
1669 .start_queue = rt2400pci_start_queue,
1670 .kick_queue = rt2400pci_kick_queue,
1671 .stop_queue = rt2400pci_stop_queue,
1675 .write_tx_desc = rt2400pci_write_tx_desc, 1672 .write_tx_desc = rt2400pci_write_tx_desc,
1676 .write_beacon = rt2400pci_write_beacon, 1673 .write_beacon = rt2400pci_write_beacon,
1677 .kick_tx_queue = rt2400pci_kick_queue,
1678 .kill_tx_queue = rt2400pci_stop_queue,
1679 .fill_rxdone = rt2400pci_fill_rxdone, 1674 .fill_rxdone = rt2400pci_fill_rxdone,
1680 .config_filter = rt2400pci_config_filter, 1675 .config_filter = rt2400pci_config_filter,
1681 .config_intf = rt2400pci_config_intf, 1676 .config_intf = rt2400pci_config_intf,
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index bee7ce14028..d67f9119233 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1213,12 +1213,6 @@ static int rt2500pci_set_device_state(struct rt2x00_dev *rt2x00dev,
1213 case STATE_RADIO_OFF: 1213 case STATE_RADIO_OFF:
1214 rt2500pci_disable_radio(rt2x00dev); 1214 rt2500pci_disable_radio(rt2x00dev);
1215 break; 1215 break;
1216 case STATE_RADIO_RX_ON:
1217 rt2500pci_start_queue(rt2x00dev->rx);
1218 break;
1219 case STATE_RADIO_RX_OFF:
1220 rt2500pci_stop_queue(rt2x00dev->rx);
1221 break;
1222 case STATE_RADIO_IRQ_ON: 1216 case STATE_RADIO_IRQ_ON:
1223 case STATE_RADIO_IRQ_ON_ISR: 1217 case STATE_RADIO_IRQ_ON_ISR:
1224 case STATE_RADIO_IRQ_OFF: 1218 case STATE_RADIO_IRQ_OFF:
@@ -1969,10 +1963,11 @@ static const struct rt2x00lib_ops rt2500pci_rt2x00_ops = {
1969 .link_stats = rt2500pci_link_stats, 1963 .link_stats = rt2500pci_link_stats,
1970 .reset_tuner = rt2500pci_reset_tuner, 1964 .reset_tuner = rt2500pci_reset_tuner,
1971 .link_tuner = rt2500pci_link_tuner, 1965 .link_tuner = rt2500pci_link_tuner,
1966 .start_queue = rt2500pci_start_queue,
1967 .kick_queue = rt2500pci_kick_queue,
1968 .stop_queue = rt2500pci_stop_queue,
1972 .write_tx_desc = rt2500pci_write_tx_desc, 1969 .write_tx_desc = rt2500pci_write_tx_desc,
1973 .write_beacon = rt2500pci_write_beacon, 1970 .write_beacon = rt2500pci_write_beacon,
1974 .kick_tx_queue = rt2500pci_kick_queue,
1975 .kill_tx_queue = rt2500pci_stop_queue,
1976 .fill_rxdone = rt2500pci_fill_rxdone, 1971 .fill_rxdone = rt2500pci_fill_rxdone,
1977 .config_filter = rt2500pci_config_filter, 1972 .config_filter = rt2500pci_config_filter,
1978 .config_intf = rt2500pci_config_intf, 1973 .config_intf = rt2500pci_config_intf,
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 52bd0ed0872..a56b38f9bf2 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1057,12 +1057,6 @@ static int rt2500usb_set_device_state(struct rt2x00_dev *rt2x00dev,
1057 case STATE_RADIO_OFF: 1057 case STATE_RADIO_OFF:
1058 rt2500usb_disable_radio(rt2x00dev); 1058 rt2500usb_disable_radio(rt2x00dev);
1059 break; 1059 break;
1060 case STATE_RADIO_RX_ON:
1061 rt2500usb_start_queue(rt2x00dev->rx);
1062 break;
1063 case STATE_RADIO_RX_OFF:
1064 rt2500usb_stop_queue(rt2x00dev->rx);
1065 break;
1066 case STATE_RADIO_IRQ_ON: 1060 case STATE_RADIO_IRQ_ON:
1067 case STATE_RADIO_IRQ_ON_ISR: 1061 case STATE_RADIO_IRQ_ON_ISR:
1068 case STATE_RADIO_IRQ_OFF: 1062 case STATE_RADIO_IRQ_OFF:
@@ -1845,11 +1839,12 @@ static const struct rt2x00lib_ops rt2500usb_rt2x00_ops = {
1845 .link_stats = rt2500usb_link_stats, 1839 .link_stats = rt2500usb_link_stats,
1846 .reset_tuner = rt2500usb_reset_tuner, 1840 .reset_tuner = rt2500usb_reset_tuner,
1847 .watchdog = rt2x00usb_watchdog, 1841 .watchdog = rt2x00usb_watchdog,
1842 .start_queue = rt2500usb_start_queue,
1843 .kick_queue = rt2x00usb_kick_queue,
1844 .stop_queue = rt2500usb_stop_queue,
1848 .write_tx_desc = rt2500usb_write_tx_desc, 1845 .write_tx_desc = rt2500usb_write_tx_desc,
1849 .write_beacon = rt2500usb_write_beacon, 1846 .write_beacon = rt2500usb_write_beacon,
1850 .get_tx_data_len = rt2500usb_get_tx_data_len, 1847 .get_tx_data_len = rt2500usb_get_tx_data_len,
1851 .kick_tx_queue = rt2x00usb_kick_tx_queue,
1852 .kill_tx_queue = rt2500usb_stop_queue,
1853 .fill_rxdone = rt2500usb_fill_rxdone, 1848 .fill_rxdone = rt2500usb_fill_rxdone,
1854 .config_shared_key = rt2500usb_config_key, 1849 .config_shared_key = rt2500usb_config_key,
1855 .config_pairwise_key = rt2500usb_config_key, 1850 .config_pairwise_key = rt2500usb_config_key,
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index a7105974a2a..15eef7212bb 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -537,12 +537,6 @@ static int rt2800pci_set_device_state(struct rt2x00_dev *rt2x00dev,
537 rt2800pci_disable_radio(rt2x00dev); 537 rt2800pci_disable_radio(rt2x00dev);
538 rt2800pci_set_state(rt2x00dev, STATE_SLEEP); 538 rt2800pci_set_state(rt2x00dev, STATE_SLEEP);
539 break; 539 break;
540 case STATE_RADIO_RX_ON:
541 rt2800pci_start_queue(rt2x00dev->rx);
542 break;
543 case STATE_RADIO_RX_OFF:
544 rt2800pci_stop_queue(rt2x00dev->rx);
545 break;
546 case STATE_RADIO_IRQ_ON: 540 case STATE_RADIO_IRQ_ON:
547 case STATE_RADIO_IRQ_ON_ISR: 541 case STATE_RADIO_IRQ_ON_ISR:
548 case STATE_RADIO_IRQ_OFF: 542 case STATE_RADIO_IRQ_OFF:
@@ -1004,11 +998,12 @@ static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = {
1004 .link_stats = rt2800_link_stats, 998 .link_stats = rt2800_link_stats,
1005 .reset_tuner = rt2800_reset_tuner, 999 .reset_tuner = rt2800_reset_tuner,
1006 .link_tuner = rt2800_link_tuner, 1000 .link_tuner = rt2800_link_tuner,
1001 .start_queue = rt2800pci_start_queue,
1002 .kick_queue = rt2800pci_kick_queue,
1003 .stop_queue = rt2800pci_stop_queue,
1007 .write_tx_desc = rt2800pci_write_tx_desc, 1004 .write_tx_desc = rt2800pci_write_tx_desc,
1008 .write_tx_data = rt2800_write_tx_data, 1005 .write_tx_data = rt2800_write_tx_data,
1009 .write_beacon = rt2800_write_beacon, 1006 .write_beacon = rt2800_write_beacon,
1010 .kick_tx_queue = rt2800pci_kick_queue,
1011 .kill_tx_queue = rt2800pci_stop_queue,
1012 .fill_rxdone = rt2800pci_fill_rxdone, 1007 .fill_rxdone = rt2800pci_fill_rxdone,
1013 .config_shared_key = rt2800_config_shared_key, 1008 .config_shared_key = rt2800_config_shared_key,
1014 .config_pairwise_key = rt2800_config_pairwise_key, 1009 .config_pairwise_key = rt2800_config_pairwise_key,
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index ee51936d8d1..60b55031368 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -254,12 +254,6 @@ static int rt2800usb_set_device_state(struct rt2x00_dev *rt2x00dev,
254 rt2800usb_disable_radio(rt2x00dev); 254 rt2800usb_disable_radio(rt2x00dev);
255 rt2800usb_set_state(rt2x00dev, STATE_SLEEP); 255 rt2800usb_set_state(rt2x00dev, STATE_SLEEP);
256 break; 256 break;
257 case STATE_RADIO_RX_ON:
258 rt2800usb_start_queue(rt2x00dev->rx);
259 break;
260 case STATE_RADIO_RX_OFF:
261 rt2800usb_stop_queue(rt2x00dev->rx);
262 break;
263 case STATE_RADIO_IRQ_ON: 257 case STATE_RADIO_IRQ_ON:
264 case STATE_RADIO_IRQ_ON_ISR: 258 case STATE_RADIO_IRQ_ON_ISR:
265 case STATE_RADIO_IRQ_OFF: 259 case STATE_RADIO_IRQ_OFF:
@@ -626,12 +620,13 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = {
626 .reset_tuner = rt2800_reset_tuner, 620 .reset_tuner = rt2800_reset_tuner,
627 .link_tuner = rt2800_link_tuner, 621 .link_tuner = rt2800_link_tuner,
628 .watchdog = rt2800usb_watchdog, 622 .watchdog = rt2800usb_watchdog,
623 .start_queue = rt2800usb_start_queue,
624 .kick_queue = rt2x00usb_kick_queue,
625 .stop_queue = rt2800usb_stop_queue,
629 .write_tx_desc = rt2800usb_write_tx_desc, 626 .write_tx_desc = rt2800usb_write_tx_desc,
630 .write_tx_data = rt2800usb_write_tx_data, 627 .write_tx_data = rt2800usb_write_tx_data,
631 .write_beacon = rt2800_write_beacon, 628 .write_beacon = rt2800_write_beacon,
632 .get_tx_data_len = rt2800usb_get_tx_data_len, 629 .get_tx_data_len = rt2800usb_get_tx_data_len,
633 .kick_tx_queue = rt2x00usb_kick_tx_queue,
634 .kill_tx_queue = rt2800usb_stop_queue,
635 .fill_rxdone = rt2800usb_fill_rxdone, 630 .fill_rxdone = rt2800usb_fill_rxdone,
636 .config_shared_key = rt2800_config_shared_key, 631 .config_shared_key = rt2800_config_shared_key,
637 .config_pairwise_key = rt2800_config_pairwise_key, 632 .config_pairwise_key = rt2800_config_pairwise_key,
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index e72117f3fdf..b72f59ba4e1 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -567,7 +567,14 @@ struct rt2x00lib_ops {
567 struct link_qual *qual); 567 struct link_qual *qual);
568 void (*link_tuner) (struct rt2x00_dev *rt2x00dev, 568 void (*link_tuner) (struct rt2x00_dev *rt2x00dev,
569 struct link_qual *qual, const u32 count); 569 struct link_qual *qual, const u32 count);
570
571 /*
572 * Data queue handlers.
573 */
570 void (*watchdog) (struct rt2x00_dev *rt2x00dev); 574 void (*watchdog) (struct rt2x00_dev *rt2x00dev);
575 void (*start_queue) (struct data_queue *queue);
576 void (*kick_queue) (struct data_queue *queue);
577 void (*stop_queue) (struct data_queue *queue);
571 578
572 /* 579 /*
573 * TX control handlers 580 * TX control handlers
@@ -579,8 +586,6 @@ struct rt2x00lib_ops {
579 void (*write_beacon) (struct queue_entry *entry, 586 void (*write_beacon) (struct queue_entry *entry,
580 struct txentry_desc *txdesc); 587 struct txentry_desc *txdesc);
581 int (*get_tx_data_len) (struct queue_entry *entry); 588 int (*get_tx_data_len) (struct queue_entry *entry);
582 void (*kick_tx_queue) (struct data_queue *queue);
583 void (*kill_tx_queue) (struct data_queue *queue);
584 589
585 /* 590 /*
586 * RX control handlers 591 * RX control handlers
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index a238e908c85..d2f1f0ad2bc 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -146,8 +146,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
146 * else the changes will be ignored by the device. 146 * else the changes will be ignored by the device.
147 */ 147 */
148 if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) 148 if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
149 rt2x00dev->ops->lib->set_device_state(rt2x00dev, 149 rt2x00dev->ops->lib->stop_queue(rt2x00dev->rx);
150 STATE_RADIO_RX_OFF);
151 150
152 /* 151 /*
153 * Write new antenna setup to device and reset the link tuner. 152 * Write new antenna setup to device and reset the link tuner.
@@ -161,8 +160,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
161 memcpy(active, &config, sizeof(config)); 160 memcpy(active, &config, sizeof(config));
162 161
163 if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) 162 if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
164 rt2x00dev->ops->lib->set_device_state(rt2x00dev, 163 rt2x00dev->ops->lib->start_queue(rt2x00dev->rx);
165 STATE_RADIO_RX_ON);
166} 164}
167 165
168void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, 166void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index bd3afc92f43..2c5f246408e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -68,7 +68,7 @@ int rt2x00lib_enable_radio(struct rt2x00_dev *rt2x00dev)
68 /* 68 /*
69 * Enable RX. 69 * Enable RX.
70 */ 70 */
71 rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_RX_ON); 71 rt2x00dev->ops->lib->start_queue(rt2x00dev->rx);
72 rt2x00link_start_tuner(rt2x00dev); 72 rt2x00link_start_tuner(rt2x00dev);
73 73
74 /* 74 /*
@@ -104,7 +104,7 @@ void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev)
104 * Disable RX. 104 * Disable RX.
105 */ 105 */
106 rt2x00link_stop_tuner(rt2x00dev); 106 rt2x00link_stop_tuner(rt2x00dev);
107 rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_RX_OFF); 107 rt2x00dev->ops->lib->stop_queue(rt2x00dev->rx);
108 108
109 /* 109 /*
110 * Disable radio. 110 * Disable radio.
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 7ad4b276156..6713f1ab128 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -352,7 +352,7 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed)
352 * if for any reason the link tuner must be reset, this will be 352 * if for any reason the link tuner must be reset, this will be
353 * handled by rt2x00lib_config(). 353 * handled by rt2x00lib_config().
354 */ 354 */
355 rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_RX_OFF); 355 rt2x00dev->ops->lib->stop_queue(rt2x00dev->rx);
356 356
357 /* 357 /*
358 * When we've just turned on the radio, we want to reprogram 358 * When we've just turned on the radio, we want to reprogram
@@ -370,7 +370,7 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed)
370 rt2x00lib_config_antenna(rt2x00dev, rt2x00dev->default_ant); 370 rt2x00lib_config_antenna(rt2x00dev, rt2x00dev->default_ant);
371 371
372 /* Turn RX back on */ 372 /* Turn RX back on */
373 rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_RX_ON); 373 rt2x00dev->ops->lib->start_queue(rt2x00dev->rx);
374 374
375 return 0; 375 return 0;
376} 376}
@@ -727,7 +727,7 @@ void rt2x00mac_flush(struct ieee80211_hw *hw, bool drop)
727 * any pending frames to be transmitted. 727 * any pending frames to be transmitted.
728 */ 728 */
729 tx_queue_for_each(rt2x00dev, queue) { 729 tx_queue_for_each(rt2x00dev, queue) {
730 rt2x00dev->ops->lib->kick_tx_queue(queue); 730 rt2x00dev->ops->lib->kick_queue(queue);
731 } 731 }
732 732
733 /** 733 /**
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 35133d8558b..2af6cea0d2d 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -471,7 +471,7 @@ static void rt2x00queue_kick_tx_queue(struct data_queue *queue,
471 */ 471 */
472 if (rt2x00queue_threshold(queue) || 472 if (rt2x00queue_threshold(queue) ||
473 !test_bit(ENTRY_TXD_BURST, &txdesc->flags)) 473 !test_bit(ENTRY_TXD_BURST, &txdesc->flags))
474 queue->rt2x00dev->ops->lib->kick_tx_queue(queue); 474 queue->rt2x00dev->ops->lib->kick_queue(queue);
475} 475}
476 476
477int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, 477int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
@@ -585,7 +585,7 @@ int rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev,
585 rt2x00queue_free_skb(intf->beacon); 585 rt2x00queue_free_skb(intf->beacon);
586 586
587 if (!enable_beacon) { 587 if (!enable_beacon) {
588 rt2x00dev->ops->lib->kill_tx_queue(intf->beacon->queue); 588 rt2x00dev->ops->lib->stop_queue(intf->beacon->queue);
589 mutex_unlock(&intf->beacon_skb_mutex); 589 mutex_unlock(&intf->beacon_skb_mutex);
590 return 0; 590 return 0;
591 } 591 }
@@ -761,7 +761,7 @@ void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev)
761 struct data_queue *queue; 761 struct data_queue *queue;
762 762
763 txall_queue_for_each(rt2x00dev, queue) 763 txall_queue_for_each(rt2x00dev, queue)
764 rt2x00dev->ops->lib->kill_tx_queue(queue); 764 rt2x00dev->ops->lib->stop_queue(queue);
765} 765}
766 766
767void rt2x00queue_init_queues(struct rt2x00_dev *rt2x00dev) 767void rt2x00queue_init_queues(struct rt2x00_dev *rt2x00dev)
diff --git a/drivers/net/wireless/rt2x00/rt2x00reg.h b/drivers/net/wireless/rt2x00/rt2x00reg.h
index ed71be95136..e8259ae48ce 100644
--- a/drivers/net/wireless/rt2x00/rt2x00reg.h
+++ b/drivers/net/wireless/rt2x00/rt2x00reg.h
@@ -83,8 +83,6 @@ enum dev_state {
83 */ 83 */
84 STATE_RADIO_ON, 84 STATE_RADIO_ON,
85 STATE_RADIO_OFF, 85 STATE_RADIO_OFF,
86 STATE_RADIO_RX_ON,
87 STATE_RADIO_RX_OFF,
88 STATE_RADIO_IRQ_ON, 86 STATE_RADIO_IRQ_ON,
89 STATE_RADIO_IRQ_OFF, 87 STATE_RADIO_IRQ_OFF,
90 STATE_RADIO_IRQ_ON_ISR, 88 STATE_RADIO_IRQ_ON_ISR,
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 12958a45e45..d4361dc0773 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -261,12 +261,22 @@ static void rt2x00usb_kick_tx_entry(struct queue_entry *entry)
261 } 261 }
262} 262}
263 263
264void rt2x00usb_kick_tx_queue(struct data_queue *queue) 264void rt2x00usb_kick_queue(struct data_queue *queue)
265{ 265{
266 rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX, 266 switch (queue->qid) {
267 rt2x00usb_kick_tx_entry); 267 case QID_AC_BE:
268 case QID_AC_BK:
269 case QID_AC_VI:
270 case QID_AC_VO:
271 if (!rt2x00queue_empty(queue))
272 rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX,
273 rt2x00usb_kick_tx_entry);
274 break;
275 default:
276 break;
277 }
268} 278}
269EXPORT_SYMBOL_GPL(rt2x00usb_kick_tx_queue); 279EXPORT_SYMBOL_GPL(rt2x00usb_kick_queue);
270 280
271static void rt2x00usb_kill_entry(struct queue_entry *entry) 281static void rt2x00usb_kill_entry(struct queue_entry *entry)
272{ 282{
@@ -422,11 +432,7 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
422 rt2x00usb_vendor_request_sw(rt2x00dev, USB_RX_CONTROL, 0, 0, 432 rt2x00usb_vendor_request_sw(rt2x00dev, USB_RX_CONTROL, 0, 0,
423 REGISTER_TIMEOUT); 433 REGISTER_TIMEOUT);
424 434
425 /* 435 rt2x00dev->ops->lib->stop_queue(rt2x00dev->rx);
426 * The USB version of also works
427 * on the RX queue.
428 */
429 rt2x00dev->ops->lib->kill_tx_queue(rt2x00dev->rx);
430} 436}
431EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio); 437EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio);
432 438
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h
index 656a35f421a..05a5424d9b7 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.h
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.h
@@ -378,13 +378,13 @@ struct queue_entry_priv_usb_bcn {
378}; 378};
379 379
380/** 380/**
381 * rt2x00usb_kick_tx_queue - Kick data queue 381 * rt2x00usb_kick_queue - Kick data queue
382 * @queue: Data queue to kick 382 * @queue: Data queue to kick
383 * 383 *
384 * This will walk through all entries of the queue and push all pending 384 * This will walk through all entries of the queue and push all pending
385 * frames to the hardware as a single burst. 385 * frames to the hardware as a single burst.
386 */ 386 */
387void rt2x00usb_kick_tx_queue(struct data_queue *queue); 387void rt2x00usb_kick_queue(struct data_queue *queue);
388 388
389/** 389/**
390 * rt2x00usb_stop_queue - Stop data queue 390 * rt2x00usb_stop_queue - Stop data queue
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 044f500ff1a..7156b788123 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -1832,12 +1832,6 @@ static int rt61pci_set_device_state(struct rt2x00_dev *rt2x00dev,
1832 case STATE_RADIO_OFF: 1832 case STATE_RADIO_OFF:
1833 rt61pci_disable_radio(rt2x00dev); 1833 rt61pci_disable_radio(rt2x00dev);
1834 break; 1834 break;
1835 case STATE_RADIO_RX_ON:
1836 rt61pci_start_queue(rt2x00dev->rx);
1837 break;
1838 case STATE_RADIO_RX_OFF:
1839 rt61pci_stop_queue(rt2x00dev->rx);
1840 break;
1841 case STATE_RADIO_IRQ_ON: 1835 case STATE_RADIO_IRQ_ON:
1842 case STATE_RADIO_IRQ_ON_ISR: 1836 case STATE_RADIO_IRQ_ON_ISR:
1843 case STATE_RADIO_IRQ_OFF: 1837 case STATE_RADIO_IRQ_OFF:
@@ -2900,10 +2894,11 @@ static const struct rt2x00lib_ops rt61pci_rt2x00_ops = {
2900 .link_stats = rt61pci_link_stats, 2894 .link_stats = rt61pci_link_stats,
2901 .reset_tuner = rt61pci_reset_tuner, 2895 .reset_tuner = rt61pci_reset_tuner,
2902 .link_tuner = rt61pci_link_tuner, 2896 .link_tuner = rt61pci_link_tuner,
2897 .start_queue = rt61pci_start_queue,
2898 .kick_queue = rt61pci_kick_queue,
2899 .stop_queue = rt61pci_stop_queue,
2903 .write_tx_desc = rt61pci_write_tx_desc, 2900 .write_tx_desc = rt61pci_write_tx_desc,
2904 .write_beacon = rt61pci_write_beacon, 2901 .write_beacon = rt61pci_write_beacon,
2905 .kick_tx_queue = rt61pci_kick_queue,
2906 .kill_tx_queue = rt61pci_stop_queue,
2907 .fill_rxdone = rt61pci_fill_rxdone, 2902 .fill_rxdone = rt61pci_fill_rxdone,
2908 .config_shared_key = rt61pci_config_shared_key, 2903 .config_shared_key = rt61pci_config_shared_key,
2909 .config_pairwise_key = rt61pci_config_pairwise_key, 2904 .config_pairwise_key = rt61pci_config_pairwise_key,
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index e9b1e3d5f47..f55e74ef02e 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1441,12 +1441,6 @@ static int rt73usb_set_device_state(struct rt2x00_dev *rt2x00dev,
1441 case STATE_RADIO_OFF: 1441 case STATE_RADIO_OFF:
1442 rt73usb_disable_radio(rt2x00dev); 1442 rt73usb_disable_radio(rt2x00dev);
1443 break; 1443 break;
1444 case STATE_RADIO_RX_ON:
1445 rt73usb_start_queue(rt2x00dev->rx);
1446 break;
1447 case STATE_RADIO_RX_OFF:
1448 rt73usb_stop_queue(rt2x00dev->rx);
1449 break;
1450 case STATE_RADIO_IRQ_ON: 1444 case STATE_RADIO_IRQ_ON:
1451 case STATE_RADIO_IRQ_ON_ISR: 1445 case STATE_RADIO_IRQ_ON_ISR:
1452 case STATE_RADIO_IRQ_OFF: 1446 case STATE_RADIO_IRQ_OFF:
@@ -2312,11 +2306,12 @@ static const struct rt2x00lib_ops rt73usb_rt2x00_ops = {
2312 .reset_tuner = rt73usb_reset_tuner, 2306 .reset_tuner = rt73usb_reset_tuner,
2313 .link_tuner = rt73usb_link_tuner, 2307 .link_tuner = rt73usb_link_tuner,
2314 .watchdog = rt2x00usb_watchdog, 2308 .watchdog = rt2x00usb_watchdog,
2309 .start_queue = rt73usb_start_queue,
2310 .kick_queue = rt2x00usb_kick_queue,
2311 .stop_queue = rt73usb_stop_queue,
2315 .write_tx_desc = rt73usb_write_tx_desc, 2312 .write_tx_desc = rt73usb_write_tx_desc,
2316 .write_beacon = rt73usb_write_beacon, 2313 .write_beacon = rt73usb_write_beacon,
2317 .get_tx_data_len = rt73usb_get_tx_data_len, 2314 .get_tx_data_len = rt73usb_get_tx_data_len,
2318 .kick_tx_queue = rt2x00usb_kick_tx_queue,
2319 .kill_tx_queue = rt73usb_stop_queue,
2320 .fill_rxdone = rt73usb_fill_rxdone, 2315 .fill_rxdone = rt73usb_fill_rxdone,
2321 .config_shared_key = rt73usb_config_shared_key, 2316 .config_shared_key = rt73usb_config_shared_key,
2322 .config_pairwise_key = rt73usb_config_pairwise_key, 2317 .config_pairwise_key = rt73usb_config_pairwise_key,