rt2x00: Decrease association time for USB devices
When powersaving is enabled, assocaition times are very high (for WPA2 networks, the time can easily be around the 3 seconds). This is caused, because the flushing of the queues takes too much time. Without the flushing callback mac80211 assumes a timeout of 100ms while scanning. Limit all flush waiting loops to the same maximum. We can apply this maximum by passing the drop status to the driver, which makes sure the driver performs extra actions during the waiting for the queue to become empty. After these changes, association times fall within the healthy range of ~0.6 seconds with powersaving enabled. The difference between association time between powersaving enabled and disabled is now only ~0.1 second (which can also be due to the measuring method). Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
f0187a1987
commit
152a599274
@@ -458,13 +458,14 @@ static bool rt2x00usb_flush_entry(struct queue_entry *entry, void* data)
|
||||
return false;
|
||||
}
|
||||
|
||||
void rt2x00usb_flush_queue(struct data_queue *queue)
|
||||
void rt2x00usb_flush_queue(struct data_queue *queue, bool drop)
|
||||
{
|
||||
struct work_struct *completion;
|
||||
unsigned int i;
|
||||
|
||||
rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX, NULL,
|
||||
rt2x00usb_flush_entry);
|
||||
if (drop)
|
||||
rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX, NULL,
|
||||
rt2x00usb_flush_entry);
|
||||
|
||||
/*
|
||||
* Obtain the queue completion handler
|
||||
@@ -483,7 +484,7 @@ void rt2x00usb_flush_queue(struct data_queue *queue)
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < 20; i++) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
/*
|
||||
* Check if the driver is already done, otherwise we
|
||||
* have to sleep a little while to give the driver/hw
|
||||
|
Reference in New Issue
Block a user