Commit 3977a647 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

mwifiex: remove redundant 'fw_load' completion structure

'add_remove_card_sem' semaphore already takes care of
synchronization for driver load and unload threads.
Hence there won't be a case when unload thread is waiting on
'wait_for_completion(fw_load)'.
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3fffd7c1
...@@ -521,7 +521,6 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context) ...@@ -521,7 +521,6 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
release_firmware(adapter->firmware); release_firmware(adapter->firmware);
adapter->firmware = NULL; adapter->firmware = NULL;
} }
complete(&adapter->fw_load);
if (init_failed) if (init_failed)
mwifiex_free_adapter(adapter); mwifiex_free_adapter(adapter);
up(sem); up(sem);
...@@ -535,7 +534,6 @@ static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter) ...@@ -535,7 +534,6 @@ static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter)
{ {
int ret; int ret;
init_completion(&adapter->fw_load);
ret = request_firmware_nowait(THIS_MODULE, 1, adapter->fw_name, ret = request_firmware_nowait(THIS_MODULE, 1, adapter->fw_name,
adapter->dev, GFP_KERNEL, adapter, adapter->dev, GFP_KERNEL, adapter,
mwifiex_fw_dpc); mwifiex_fw_dpc);
......
...@@ -787,7 +787,6 @@ struct mwifiex_adapter { ...@@ -787,7 +787,6 @@ struct mwifiex_adapter {
struct mwifiex_wait_queue cmd_wait_q; struct mwifiex_wait_queue cmd_wait_q;
u8 scan_wait_q_woken; u8 scan_wait_q_woken;
spinlock_t queue_lock; /* lock for tx queues */ spinlock_t queue_lock; /* lock for tx queues */
struct completion fw_load;
u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
u16 max_mgmt_ie_index; u16 max_mgmt_ie_index;
u8 scan_delay_cnt; u8 scan_delay_cnt;
......
...@@ -221,9 +221,6 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev) ...@@ -221,9 +221,6 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
if (!adapter || !adapter->priv_num) if (!adapter || !adapter->priv_num)
return; return;
/* In case driver is removed when asynchronous FW load is in progress */
wait_for_completion(&adapter->fw_load);
if (user_rmmod) { if (user_rmmod) {
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
if (adapter->is_suspended) if (adapter->is_suspended)
......
...@@ -179,9 +179,6 @@ mwifiex_sdio_remove(struct sdio_func *func) ...@@ -179,9 +179,6 @@ mwifiex_sdio_remove(struct sdio_func *func)
if (!adapter || !adapter->priv_num) if (!adapter || !adapter->priv_num)
return; return;
/* In case driver is removed when asynchronous FW load is in progress */
wait_for_completion(&adapter->fw_load);
if (user_rmmod) { if (user_rmmod) {
if (adapter->is_suspended) if (adapter->is_suspended)
mwifiex_sdio_resume(adapter->dev); mwifiex_sdio_resume(adapter->dev);
......
...@@ -543,11 +543,6 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf) ...@@ -543,11 +543,6 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf)
if (!adapter->priv_num) if (!adapter->priv_num)
return; return;
/* In case driver is removed when asynchronous FW downloading is
* in progress
*/
wait_for_completion(&adapter->fw_load);
if (user_rmmod) { if (user_rmmod) {
#ifdef CONFIG_PM #ifdef CONFIG_PM
if (adapter->is_suspended) if (adapter->is_suspended)
......
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