Commit 39875099 authored by Zhaoyang Liu's avatar Zhaoyang Liu Committed by Kalle Valo

mwifiex: fix command timeout for PCIe chipsets

When WLAN interface is up and running, driver unload and
load was causing command timeout error.

We enable Rx data by updating RX ring read pointer in
init_fw_port(). It should be done when FW is completely
intialialised. Command timeout is fixed in this patch by
moving init_fw_port() call to mwifiex_init_fw_complete().
Signed-off-by: default avatarZhaoyang Liu <liuzy@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 3afafd6d
...@@ -551,11 +551,6 @@ int mwifiex_init_fw(struct mwifiex_adapter *adapter) ...@@ -551,11 +551,6 @@ int mwifiex_init_fw(struct mwifiex_adapter *adapter)
} }
} }
if (adapter->if_ops.init_fw_port) {
if (adapter->if_ops.init_fw_port(adapter))
return -1;
}
for (i = 0; i < adapter->priv_num; i++) { for (i = 0; i < adapter->priv_num; i++) {
if (adapter->priv[i]) { if (adapter->priv[i]) {
ret = mwifiex_sta_init_cmd(adapter->priv[i], first_sta, ret = mwifiex_sta_init_cmd(adapter->priv[i], first_sta,
......
...@@ -126,6 +126,10 @@ static int num_of_items = ARRAY_SIZE(items); ...@@ -126,6 +126,10 @@ static int num_of_items = ARRAY_SIZE(items);
int mwifiex_init_fw_complete(struct mwifiex_adapter *adapter) int mwifiex_init_fw_complete(struct mwifiex_adapter *adapter)
{ {
if (adapter->hw_status == MWIFIEX_HW_STATUS_READY)
if (adapter->if_ops.init_fw_port)
adapter->if_ops.init_fw_port(adapter);
adapter->init_wait_q_woken = true; adapter->init_wait_q_woken = true;
wake_up_interruptible(&adapter->init_wait_q); wake_up_interruptible(&adapter->init_wait_q);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment