summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hsu <mhsu@nvidia.com>2013-07-24 12:34:54 -0700
committerRiham Haidar <rhaidar@nvidia.com>2013-07-25 20:26:08 -0700
commitc3602b567c7c15b0a78bf2a7ba63adc45fa786c5 (patch)
tree25e2e05bb80788a7368bbcb0b6d09f48b28c397f
parent8067f19868040be42e53bb05778138502c899632 (diff)
net: wireless: bcmdhd: Ensure OOB interrupt is registered
Ensure OOB interrupt is always registered when bus is active. Fixes this bug: If there was an SDIO error during the initial firmware download, the OOB interrupt will not get registered. Then, on subsequent device resets, the code for registering OOB interrupt did not get called again - causing a persistent wifi failure. Bug 1327983 Change-Id: Ie0bca0a1ae757074140cc78e9b7c44175eec8581 Signed-off-by: Michael Hsu <mhsu@nvidia.com> Reviewed-on: http://git-master/r/253016 Reviewed-by: Kyeong Kim <kyeongk@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Steve Lin <stlin@nvidia.com>
-rw-r--r--drivers/net/wireless/bcmdhd/bcmsdh_linux.c8
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_sdio.c6
-rw-r--r--drivers/net/wireless/bcmdhd/include/bcmsdh.h1
3 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/bcmsdh_linux.c b/drivers/net/wireless/bcmdhd/bcmsdh_linux.c
index 51d0c031e1a6..f44f84d15419 100644
--- a/drivers/net/wireless/bcmdhd/bcmsdh_linux.c
+++ b/drivers/net/wireless/bcmdhd/bcmsdh_linux.c
@@ -677,6 +677,14 @@ void bcmsdh_unregister_oob_intr(void)
sdhcinfo->oob_irq_registered = FALSE;
}
}
+
+bool bcmsdh_is_oob_intr_registered(void)
+{
+ if (sdhcinfo)
+ return sdhcinfo->oob_irq_registered;
+ else
+ return FALSE;
+}
#endif
#if defined(BCMLXSDMMC)
diff --git a/drivers/net/wireless/bcmdhd/dhd_sdio.c b/drivers/net/wireless/bcmdhd/dhd_sdio.c
index a5d5df22b36c..e3b16adaab1e 100644
--- a/drivers/net/wireless/bcmdhd/dhd_sdio.c
+++ b/drivers/net/wireless/bcmdhd/dhd_sdio.c
@@ -7658,6 +7658,12 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
bcmerror = dhd_bus_init((dhd_pub_t *) bus->dhd, FALSE);
if (bcmerror == BCME_OK) {
#if defined(OOB_INTR_ONLY)
+ if (!bcmsdh_is_oob_intr_registered()) {
+ sdioh_start(NULL, 1);
+ bcmsdh_register_oob_intr(dhdp);
+ dhdp->iswl = TRUE;
+ }
+
bcmsdh_set_irq(TRUE);
dhd_enable_oob_intr(bus, TRUE);
#endif
diff --git a/drivers/net/wireless/bcmdhd/include/bcmsdh.h b/drivers/net/wireless/bcmdhd/include/bcmsdh.h
index 064307177e86..efb78fed70bf 100644
--- a/drivers/net/wireless/bcmdhd/include/bcmsdh.h
+++ b/drivers/net/wireless/bcmdhd/include/bcmsdh.h
@@ -219,6 +219,7 @@ extern void bcmsdh_unreg_sdio_notify(void);
extern int bcmsdh_register_oob_intr(void * dhdp);
extern void bcmsdh_unregister_oob_intr(void);
extern void bcmsdh_oob_intr_set(bool enable);
+extern bool bcmsdh_is_oob_intr_registered(void);
#endif
/* Function to pass device-status bits to DHD. */