rt2x00: Add kill_tx_queue callback function
provide rt2x00lib the possibility to kill a particular TX queue. This can be useful when disabling the radio, but more importantly will allow beaconing to be disabled when mac80211 requests this (during scanning for example) Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
382fe0f2da
commit
a2c9b652a1
@ -934,21 +934,10 @@ static int rt2400pci_enable_radio(struct rt2x00_dev *rt2x00dev)
|
||||
|
||||
static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
/*
|
||||
* Disable power
|
||||
*/
|
||||
rt2x00pci_register_write(rt2x00dev, PWRCSR0, 0);
|
||||
|
||||
/*
|
||||
* Disable synchronisation.
|
||||
*/
|
||||
rt2x00pci_register_write(rt2x00dev, CSR14, 0);
|
||||
|
||||
/*
|
||||
* Cancel RX and TX.
|
||||
*/
|
||||
rt2x00pci_register_read(rt2x00dev, TXCSR0, ®);
|
||||
rt2x00_set_field32(®, TXCSR0_ABORT, 1);
|
||||
rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
|
||||
}
|
||||
|
||||
static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev,
|
||||
@ -1145,6 +1134,20 @@ static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
|
||||
rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
|
||||
}
|
||||
|
||||
static void rt2400pci_kill_tx_queue(struct rt2x00_dev *rt2x00dev,
|
||||
const enum data_queue_qid qid)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
if (qid == QID_BEACON) {
|
||||
rt2x00pci_register_write(rt2x00dev, CSR14, 0);
|
||||
} else {
|
||||
rt2x00pci_register_read(rt2x00dev, TXCSR0, ®);
|
||||
rt2x00_set_field32(®, TXCSR0_ABORT, 1);
|
||||
rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* RX control handlers
|
||||
*/
|
||||
@ -1606,6 +1609,7 @@ static const struct rt2x00lib_ops rt2400pci_rt2x00_ops = {
|
||||
.write_tx_data = rt2x00pci_write_tx_data,
|
||||
.write_beacon = rt2400pci_write_beacon,
|
||||
.kick_tx_queue = rt2400pci_kick_tx_queue,
|
||||
.kill_tx_queue = rt2400pci_kill_tx_queue,
|
||||
.fill_rxdone = rt2400pci_fill_rxdone,
|
||||
.config_filter = rt2400pci_config_filter,
|
||||
.config_intf = rt2400pci_config_intf,
|
||||
|
Reference in New Issue
Block a user