summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2012-03-12 19:35:11 -0700
committerJohn W. Linville <linville@tuxdriver.com>2012-03-13 14:54:18 -0400
commite7891ba2de9a67f22e5fd2a137f98d89cfb71348 (patch)
tree8a974aaedf751fc37fd719b9575b11a492bc2bb1
parent6685d109f4b60604fd206cff01355094a2e3b419 (diff)
downloadlwn-e7891ba2de9a67f22e5fd2a137f98d89cfb71348.tar.gz
lwn-e7891ba2de9a67f22e5fd2a137f98d89cfb71348.zip
mwifiex: use usleep_range instead of udelay
For the delay of 10 uSec or more usleep_range is prefered. Unlike udelay, sleep_range avoids large number of undesired interrupts. Ref Documentation/timers/timers-howto.txt Signed-off-by: Yogesh Ashok Powar <yogeshp@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/pcie.c6
-rw-r--r--drivers/net/wireless/mwifiex/sdio.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index 405350940a45..1033f00a775f 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -288,7 +288,7 @@ static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter)
while (mwifiex_pcie_ok_to_access_hw(adapter)) {
i++;
- udelay(10);
+ usleep_range(10, 20);
/* 50ms max wait */
if (i == 50000)
break;
@@ -1088,7 +1088,7 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
card->cmdrsp_buf->len);
while (mwifiex_pcie_ok_to_access_hw(adapter) &&
(count++ < 10))
- udelay(50);
+ usleep_range(50, 60);
} else {
dev_err(adapter->dev, "There is no command but "
"got cmdrsp\n");
@@ -1337,7 +1337,7 @@ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
}
if (len)
break;
- udelay(10);
+ usleep_range(10, 20);
}
if (!len) {
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index d39d8457f252..fe6fbc123b2e 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -583,7 +583,7 @@ mwifiex_sdio_poll_card_status(struct mwifiex_adapter *adapter, u8 bits)
else if ((cs & bits) == bits)
return 0;
- udelay(10);
+ usleep_range(10, 20);
}
dev_err(adapter->dev, "poll card status failed, tries = %d\n",
@@ -761,7 +761,7 @@ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
if (len)
break;
- udelay(10);
+ usleep_range(10, 20);
}
if (!len) {