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>
This commit is contained in:
committed by
John W. Linville
parent
2de64dd22d
commit
d61cb26696
@@ -1535,6 +1535,19 @@ static void rt73usb_write_beacon(struct queue_entry *entry)
|
||||
entry->skb->data, entry->skb->len,
|
||||
REGISTER_TIMEOUT32(entry->skb->len));
|
||||
|
||||
/*
|
||||
* Enable beaconing again.
|
||||
*
|
||||
* For Wi-Fi faily generated beacons between participating stations.
|
||||
* Set TBTT phase adaptive adjustment step to 8us (default 16us)
|
||||
*/
|
||||
rt2x00usb_register_write(rt2x00dev, TXRX_CSR10, 0x00001008);
|
||||
|
||||
rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1);
|
||||
rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 1);
|
||||
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1);
|
||||
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
|
||||
|
||||
/*
|
||||
* Clean up the beacon skb.
|
||||
*/
|
||||
@@ -1556,31 +1569,6 @@ static int rt73usb_get_tx_data_len(struct queue_entry *entry)
|
||||
return length;
|
||||
}
|
||||
|
||||
static void rt73usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
|
||||
const enum data_queue_qid queue)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
if (queue != QID_BEACON) {
|
||||
rt2x00usb_kick_tx_queue(rt2x00dev, queue);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* For Wi-Fi faily generated beacons between participating stations.
|
||||
* Set TBTT phase adaptive adjustment step to 8us (default 16us)
|
||||
*/
|
||||
rt2x00usb_register_write(rt2x00dev, TXRX_CSR10, 0x00001008);
|
||||
|
||||
rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®);
|
||||
if (!rt2x00_get_field32(reg, TXRX_CSR9_BEACON_GEN)) {
|
||||
rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1);
|
||||
rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 1);
|
||||
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1);
|
||||
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* RX control handlers
|
||||
*/
|
||||
@@ -2261,7 +2249,7 @@ static const struct rt2x00lib_ops rt73usb_rt2x00_ops = {
|
||||
.write_tx_data = rt2x00usb_write_tx_data,
|
||||
.write_beacon = rt73usb_write_beacon,
|
||||
.get_tx_data_len = rt73usb_get_tx_data_len,
|
||||
.kick_tx_queue = rt73usb_kick_tx_queue,
|
||||
.kick_tx_queue = rt2x00usb_kick_tx_queue,
|
||||
.kill_tx_queue = rt2x00usb_kill_tx_queue,
|
||||
.fill_rxdone = rt73usb_fill_rxdone,
|
||||
.config_shared_key = rt73usb_config_shared_key,
|
||||
|
Reference in New Issue
Block a user