rt2x00: Don't frequently reset beacon interval in AdHoc mode
Commit 0204464329
"Check for specific changed
flags when updating the erp config" changed the way in which a new beacon
interval gets handled. However, due to a bug in rt2800usb and rt2800pci the
beacon interval was reset during each scan, thus causing problems in AdHoc
mode.
Fix this by not cleaning up the beacon interval when killing the beacon queue
but just prevent the device from sending out beacons.
Reported-by: Wolfgang Kufner <wolfgang.kufner@gmail.com>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
a061a93b6e
commit
89b25f60e0
|
@ -1140,7 +1140,11 @@ static void rt2400pci_kill_tx_queue(struct data_queue *queue)
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
if (queue->qid == QID_BEACON) {
|
if (queue->qid == QID_BEACON) {
|
||||||
rt2x00pci_register_write(rt2x00dev, CSR14, 0);
|
rt2x00pci_register_read(rt2x00dev, CSR14, ®);
|
||||||
|
rt2x00_set_field32(®, CSR14_TSF_COUNT, 0);
|
||||||
|
rt2x00_set_field32(®, CSR14_TBCN, 0);
|
||||||
|
rt2x00_set_field32(®, CSR14_BEACON_GEN, 0);
|
||||||
|
rt2x00pci_register_write(rt2x00dev, CSR14, reg);
|
||||||
} else {
|
} else {
|
||||||
rt2x00pci_register_read(rt2x00dev, TXCSR0, ®);
|
rt2x00pci_register_read(rt2x00dev, TXCSR0, ®);
|
||||||
rt2x00_set_field32(®, TXCSR0_ABORT, 1);
|
rt2x00_set_field32(®, TXCSR0_ABORT, 1);
|
||||||
|
|
|
@ -1294,7 +1294,11 @@ static void rt2500pci_kill_tx_queue(struct data_queue *queue)
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
if (queue->qid == QID_BEACON) {
|
if (queue->qid == QID_BEACON) {
|
||||||
rt2x00pci_register_write(rt2x00dev, CSR14, 0);
|
rt2x00pci_register_read(rt2x00dev, CSR14, ®);
|
||||||
|
rt2x00_set_field32(®, CSR14_TSF_COUNT, 0);
|
||||||
|
rt2x00_set_field32(®, CSR14_TBCN, 0);
|
||||||
|
rt2x00_set_field32(®, CSR14_BEACON_GEN, 0);
|
||||||
|
rt2x00pci_register_write(rt2x00dev, CSR14, reg);
|
||||||
} else {
|
} else {
|
||||||
rt2x00pci_register_read(rt2x00dev, TXCSR0, ®);
|
rt2x00pci_register_read(rt2x00dev, TXCSR0, ®);
|
||||||
rt2x00_set_field32(®, TXCSR0_ABORT, 1);
|
rt2x00_set_field32(®, TXCSR0_ABORT, 1);
|
||||||
|
|
|
@ -1205,8 +1205,16 @@ static int rt2500usb_get_tx_data_len(struct queue_entry *entry)
|
||||||
|
|
||||||
static void rt2500usb_kill_tx_queue(struct data_queue *queue)
|
static void rt2500usb_kill_tx_queue(struct data_queue *queue)
|
||||||
{
|
{
|
||||||
if (queue->qid == QID_BEACON)
|
struct rt2x00_dev *rt2x00dev = queue->rt2x00dev;
|
||||||
rt2500usb_register_write(queue->rt2x00dev, TXRX_CSR19, 0);
|
u16 reg;
|
||||||
|
|
||||||
|
if (queue->qid == QID_BEACON) {
|
||||||
|
rt2500usb_register_read(rt2x00dev, TXRX_CSR19, ®);
|
||||||
|
rt2x00_set_field16(®, TXRX_CSR19_TSF_COUNT, 0);
|
||||||
|
rt2x00_set_field16(®, TXRX_CSR19_TBCN, 0);
|
||||||
|
rt2x00_set_field16(®, TXRX_CSR19_BEACON_GEN, 0);
|
||||||
|
rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg);
|
||||||
|
}
|
||||||
|
|
||||||
rt2x00usb_kill_tx_queue(queue);
|
rt2x00usb_kill_tx_queue(queue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -588,7 +588,11 @@ static void rt2800pci_kill_tx_queue(struct data_queue *queue)
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
if (queue->qid == QID_BEACON) {
|
if (queue->qid == QID_BEACON) {
|
||||||
rt2800_register_write(rt2x00dev, BCN_TIME_CFG, 0);
|
rt2800_register_read(rt2x00dev, BCN_TIME_CFG, ®);
|
||||||
|
rt2x00_set_field32(®, BCN_TIME_CFG_TSF_TICKING, 0);
|
||||||
|
rt2x00_set_field32(®, BCN_TIME_CFG_TBTT_ENABLE, 0);
|
||||||
|
rt2x00_set_field32(®, BCN_TIME_CFG_BEACON_GEN, 0);
|
||||||
|
rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -391,8 +391,16 @@ static void rt2800usb_work_txdone(struct work_struct *work)
|
||||||
|
|
||||||
static void rt2800usb_kill_tx_queue(struct data_queue *queue)
|
static void rt2800usb_kill_tx_queue(struct data_queue *queue)
|
||||||
{
|
{
|
||||||
if (queue->qid == QID_BEACON)
|
struct rt2x00_dev *rt2x00dev = queue->rt2x00dev;
|
||||||
rt2x00usb_register_write(queue->rt2x00dev, BCN_TIME_CFG, 0);
|
u32 reg;
|
||||||
|
|
||||||
|
if (queue->qid == QID_BEACON) {
|
||||||
|
rt2800_register_read(rt2x00dev, BCN_TIME_CFG, ®);
|
||||||
|
rt2x00_set_field32(®, BCN_TIME_CFG_TSF_TICKING, 0);
|
||||||
|
rt2x00_set_field32(®, BCN_TIME_CFG_TBTT_ENABLE, 0);
|
||||||
|
rt2x00_set_field32(®, BCN_TIME_CFG_BEACON_GEN, 0);
|
||||||
|
rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
|
||||||
|
}
|
||||||
|
|
||||||
rt2x00usb_kill_tx_queue(queue);
|
rt2x00usb_kill_tx_queue(queue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1944,7 +1944,11 @@ static void rt61pci_kill_tx_queue(struct data_queue *queue)
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
||||||
if (queue->qid == QID_BEACON) {
|
if (queue->qid == QID_BEACON) {
|
||||||
rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, 0);
|
rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®);
|
||||||
|
rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 0);
|
||||||
|
rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 0);
|
||||||
|
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0);
|
||||||
|
rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1581,8 +1581,16 @@ static int rt73usb_get_tx_data_len(struct queue_entry *entry)
|
||||||
|
|
||||||
static void rt73usb_kill_tx_queue(struct data_queue *queue)
|
static void rt73usb_kill_tx_queue(struct data_queue *queue)
|
||||||
{
|
{
|
||||||
if (queue->qid == QID_BEACON)
|
struct rt2x00_dev *rt2x00dev = queue->rt2x00dev;
|
||||||
rt2x00usb_register_write(queue->rt2x00dev, TXRX_CSR9, 0);
|
u32 reg;
|
||||||
|
|
||||||
|
if (queue->qid == QID_BEACON) {
|
||||||
|
rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®);
|
||||||
|
rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 0);
|
||||||
|
rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 0);
|
||||||
|
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0);
|
||||||
|
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
|
||||||
|
}
|
||||||
|
|
||||||
rt2x00usb_kill_tx_queue(queue);
|
rt2x00usb_kill_tx_queue(queue);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue