mwifiex: fix simultaneous scan and Tx traffic problem

If scan operation is started when Tx traffic is already running,
driver locks Tx queue until it gets completed. With this logic
there is a delay for Tx packets.

This patch implements new approach to give Tx path higher priority
in this case. Driver internally sends multiple synchronous scan
commands to firmware when scan is requested by user. Now we will
make sure that Tx queue is empty everytime before sending next scan
command. If Tx queue isn't empty scan command will be postponsed by
20msec. This rule will be followed until Tx queue becomes empty or
timeout of 1 second happens. In case of timeout scan operation will
be aborted.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
这个提交包含在:
Amitkumar Karwar
2012-06-06 21:12:41 -07:00
提交者 John W. Linville
父节点 38e8b7d977
当前提交 3249ba7376
修改 4 个文件,包含 89 行新增10 行删除

查看文件

@@ -244,8 +244,8 @@ process_start:
}
}
if (!adapter->scan_processing && !adapter->data_sent &&
!mwifiex_wmm_lists_empty(adapter)) {
if ((!adapter->scan_processing || adapter->scan_delay_cnt) &&
!adapter->data_sent && !mwifiex_wmm_lists_empty(adapter)) {
mwifiex_wmm_process_tx(adapter);
if (adapter->hs_activated) {
adapter->is_hs_configured = false;