diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2014-04-14 18:32:55 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-04-22 15:06:30 -0400 |
commit | 3977a6477dd1e53fac2016a719a3c2cb2cdba771 (patch) | |
tree | 7af474506c8155b88778121292f39f38edb09b2b | |
parent | 3fffd7c17cca31b8538a313e02f9f4a6e63d360a (diff) |
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: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/mwifiex/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/main.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/pcie.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/sdio.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/usb.c | 5 |
5 files changed, 0 insertions, 14 deletions
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 9c771b3e9918..cbabc12fbda3 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c | |||
@@ -521,7 +521,6 @@ done: | |||
521 | release_firmware(adapter->firmware); | 521 | release_firmware(adapter->firmware); |
522 | adapter->firmware = NULL; | 522 | adapter->firmware = NULL; |
523 | } | 523 | } |
524 | complete(&adapter->fw_load); | ||
525 | if (init_failed) | 524 | if (init_failed) |
526 | mwifiex_free_adapter(adapter); | 525 | mwifiex_free_adapter(adapter); |
527 | up(sem); | 526 | up(sem); |
@@ -535,7 +534,6 @@ static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter) | |||
535 | { | 534 | { |
536 | int ret; | 535 | int ret; |
537 | 536 | ||
538 | init_completion(&adapter->fw_load); | ||
539 | ret = request_firmware_nowait(THIS_MODULE, 1, adapter->fw_name, | 537 | ret = request_firmware_nowait(THIS_MODULE, 1, adapter->fw_name, |
540 | adapter->dev, GFP_KERNEL, adapter, | 538 | adapter->dev, GFP_KERNEL, adapter, |
541 | mwifiex_fw_dpc); | 539 | mwifiex_fw_dpc); |
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index d53e1e8c9467..ae8b042271c0 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h | |||
@@ -787,7 +787,6 @@ struct mwifiex_adapter { | |||
787 | struct mwifiex_wait_queue cmd_wait_q; | 787 | struct mwifiex_wait_queue cmd_wait_q; |
788 | u8 scan_wait_q_woken; | 788 | u8 scan_wait_q_woken; |
789 | spinlock_t queue_lock; /* lock for tx queues */ | 789 | spinlock_t queue_lock; /* lock for tx queues */ |
790 | struct completion fw_load; | ||
791 | u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; | 790 | u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; |
792 | u16 max_mgmt_ie_index; | 791 | u16 max_mgmt_ie_index; |
793 | u8 scan_delay_cnt; | 792 | u8 scan_delay_cnt; |
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index a7e8b96b2d90..c2cfeec466d8 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c | |||
@@ -221,9 +221,6 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev) | |||
221 | if (!adapter || !adapter->priv_num) | 221 | if (!adapter || !adapter->priv_num) |
222 | return; | 222 | return; |
223 | 223 | ||
224 | /* In case driver is removed when asynchronous FW load is in progress */ | ||
225 | wait_for_completion(&adapter->fw_load); | ||
226 | |||
227 | if (user_rmmod) { | 224 | if (user_rmmod) { |
228 | #ifdef CONFIG_PM_SLEEP | 225 | #ifdef CONFIG_PM_SLEEP |
229 | if (adapter->is_suspended) | 226 | if (adapter->is_suspended) |
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index accceed72af8..a1773d3cb49f 100644 --- a/drivers/net/wireless/mwifiex/sdio.c +++ b/drivers/net/wireless/mwifiex/sdio.c | |||
@@ -179,9 +179,6 @@ mwifiex_sdio_remove(struct sdio_func *func) | |||
179 | if (!adapter || !adapter->priv_num) | 179 | if (!adapter || !adapter->priv_num) |
180 | return; | 180 | return; |
181 | 181 | ||
182 | /* In case driver is removed when asynchronous FW load is in progress */ | ||
183 | wait_for_completion(&adapter->fw_load); | ||
184 | |||
185 | if (user_rmmod) { | 182 | if (user_rmmod) { |
186 | if (adapter->is_suspended) | 183 | if (adapter->is_suspended) |
187 | mwifiex_sdio_resume(adapter->dev); | 184 | mwifiex_sdio_resume(adapter->dev); |
diff --git a/drivers/net/wireless/mwifiex/usb.c b/drivers/net/wireless/mwifiex/usb.c index db6377f7dcb8..a8ce8130cfae 100644 --- a/drivers/net/wireless/mwifiex/usb.c +++ b/drivers/net/wireless/mwifiex/usb.c | |||
@@ -543,11 +543,6 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf) | |||
543 | if (!adapter->priv_num) | 543 | if (!adapter->priv_num) |
544 | return; | 544 | return; |
545 | 545 | ||
546 | /* In case driver is removed when asynchronous FW downloading is | ||
547 | * in progress | ||
548 | */ | ||
549 | wait_for_completion(&adapter->fw_load); | ||
550 | |||
551 | if (user_rmmod) { | 546 | if (user_rmmod) { |
552 | #ifdef CONFIG_PM | 547 | #ifdef CONFIG_PM |
553 | if (adapter->is_suspended) | 548 | if (adapter->is_suspended) |