diff options
author | Zhaoyang Liu <liuzy@marvell.com> | 2015-07-22 04:53:43 -0700 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-08-06 10:13:50 +0300 |
commit | 398750992ebe8a3f26d9c1c978911b55c2b2ff8b (patch) | |
tree | e847c63328466d8ea8a32fe58666d31bdec6f064 /drivers/net/wireless/mwifiex | |
parent | 3afafd6dcc0cb894a2a6cc1a42bb6f84a0519f16 (diff) |
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: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r-- | drivers/net/wireless/mwifiex/init.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/util.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c index 8fa363add970..7a970c28c557 100644 --- a/drivers/net/wireless/mwifiex/init.c +++ b/drivers/net/wireless/mwifiex/init.c @@ -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++) { if (adapter->priv[i]) { ret = mwifiex_sta_init_cmd(adapter->priv[i], first_sta, diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c index a5f34f2c1086..0cec8a64473e 100644 --- a/drivers/net/wireless/mwifiex/util.c +++ b/drivers/net/wireless/mwifiex/util.c @@ -126,6 +126,10 @@ static int num_of_items = ARRAY_SIZE(items); 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; wake_up_interruptible(&adapter->init_wait_q); return 0; |