aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2009-11-30 12:13:20 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-07 16:51:21 -0500
commit89b872e2e476833cde8aaac658c75817f67e8f81 (patch)
treef8f5d70e9f933e75fbf3a1070dd077c9958deb46 /drivers/net/wireless/mwl8k.c
parent7e1112d34aea10fdd689422e6bdc918309043bf3 (diff)
mwl8k: increase firmware loading timeouts
The time between loading the helper image and starting to upload the main firmware image should be at least 5 ms or so. We were doing an msleep(1) before, and 1 ms appears to not be enough in almost all cases, but building with HZ=100 has always masked this so far. Bumping the msleep argument to 5 fixes firmware loading e.g. when HZ=1000. Some firmware images need more than 200ms to initialize. Bump the ready code timeout to 500ms to accommodate for this. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r--drivers/net/wireless/mwl8k.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index a16255810d15..e59a92618807 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -571,7 +571,7 @@ static int mwl8k_load_firmware(struct ieee80211_hw *hw)
571 "helper image\n", pci_name(priv->pdev)); 571 "helper image\n", pci_name(priv->pdev));
572 return rc; 572 return rc;
573 } 573 }
574 msleep(1); 574 msleep(5);
575 575
576 rc = mwl8k_feed_fw_image(priv, fw->data, fw->size); 576 rc = mwl8k_feed_fw_image(priv, fw->data, fw->size);
577 } else { 577 } else {
@@ -588,9 +588,8 @@ static int mwl8k_load_firmware(struct ieee80211_hw *hw)
588 iowrite32(MWL8K_MODE_AP, priv->regs + MWL8K_HIU_GEN_PTR); 588 iowrite32(MWL8K_MODE_AP, priv->regs + MWL8K_HIU_GEN_PTR);
589 else 589 else
590 iowrite32(MWL8K_MODE_STA, priv->regs + MWL8K_HIU_GEN_PTR); 590 iowrite32(MWL8K_MODE_STA, priv->regs + MWL8K_HIU_GEN_PTR);
591 msleep(1);
592 591
593 loops = 200000; 592 loops = 500000;
594 do { 593 do {
595 u32 ready_code; 594 u32 ready_code;
596 595