mwifiex: replace mdelay with msleep
authorAmitkumar Karwar <akarwar@marvell.com>
Tue, 23 Jul 2013 02:17:53 +0000 (19:17 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 24 Jul 2013 15:02:10 +0000 (11:02 -0400)
It is observed that when wrong firmware is downloaded for
PCIe card, system hangs for 10 seconds. The reason is mdelay()
is used when firmware status is polled.

Replace mdelay with msleep(non-blocking API) to fix the issue.

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>
drivers/net/wireless/mwifiex/pcie.c
drivers/net/wireless/mwifiex/sdio.c

index dce6486..098153f 100644 (file)
@@ -1942,7 +1942,7 @@ mwifiex_check_fw_status(struct mwifiex_adapter *adapter, u32 poll_num)
                        ret = 0;
                        break;
                } else {
-                       mdelay(100);
+                       msleep(100);
                        ret = -1;
                }
        }
index 5ee5ed0..14ac51f 100644 (file)
@@ -927,7 +927,7 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter,
                        ret = 0;
                        break;
                } else {
-                       mdelay(100);
+                       msleep(100);
                        ret = -1;
                }
        }