]> git.karo-electronics.de Git - linux-beck.git/commitdiff
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 dce6486826948407039e4740752beacfd94a2ca2..098153f14e18e18aceee0f4f90461dbc85776cd1 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 5ee5ed02eccd56645c94f8b4972962130f5b305b..14ac51fd7d3c1aeda32615e74c73aae8c528e527 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;
                }
        }