mwifiex: use asynchronous firmware loading
[cascardo/linux.git] / drivers / net / wireless / mwifiex / pcie.c
index 5867fac..13fbc4e 100644 (file)
@@ -119,6 +119,9 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
        if (!adapter || !adapter->priv_num)
                return;
 
+       /* In case driver is removed when asynchronous FW load is in progress */
+       wait_for_completion(&adapter->fw_load);
+
        if (user_rmmod) {
 #ifdef CONFIG_PM
                if (adapter->is_suspended)