projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d966cdd
)
WiFi:bcmdhd: fix wifi driver endless loop when initialization fail.
author
gwl
<gwl@rock-chips.com>
Thu, 26 Jun 2014 07:55:05 +0000
(15:55 +0800)
committer
gwl
<gwl@rock-chips.com>
Thu, 26 Jun 2014 07:56:01 +0000
(15:56 +0800)
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c
b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c
index ec3f537d6a319ac5338371db660a50409e2ca4a4..b5b3cd171d43854049d9aea337746d286bdbd3cf 100644
(file)
--- a/
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c
+++ b/
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c
@@
-29,10
+29,11
@@
static uint32
get_erom_ent(si_t *sih, uint32 **eromptr, uint32 mask, uint32 match)
{
- uint32 ent;
+ uint32 ent
= 0
;
uint inv = 0, nom = 0;
+ uint retry = 20;
- while (
TRUE
) {
+ while (
retry--
) {
ent = R_REG(si_osh(sih), *eromptr);
(*eromptr)++;
@@
-52,6
+53,8
@@
get_erom_ent(si_t *sih, uint32 **eromptr, uint32 mask, uint32 match)
nom++;
}
+ if (!retry)
+ SI_ERROR(("%s: WiFi read register fail, retry = %d.\n", __FUNCTION__, retry));
SI_VMSG(("%s: Returning ent 0x%08x\n", __FUNCTION__, ent));
if (inv + nom) {