aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshwin <ashwin.bhat@broadcom.com>2015-08-24 13:43:30 -0700
committerDmitry Shmidt <dimitrysh@google.com>2015-08-25 10:03:18 -0700
commite42477a8ea94e0c48d5e6987098d1f09e4ce854d (patch)
tree9e6db4326e1181c7eb30a361c961b5e06f97d95b
parent9ead725bef42c23ff10958392b219acc0b432505 (diff)
net: wireless: bcmdhd: Check if FW is up during SAR setupandroid-6.0.0_r0.5
Added extra check to see if FW is up and running before we try to setup SAR and if ther is no return error. Bug: 23464710 Bug: 23481741 Change-Id: If3bab41594995baffc5749d6f431ec10bcfd8a66 Signed-off-by: Ashwin <ashwin.bhat@broadcom.com> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--drivers/net/wireless/bcmdhd/dhd_linux.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index 4b57190af945..9a8a9b896e18 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -823,8 +823,11 @@ static int dhd_sar_callback(struct notifier_block *nfb, unsigned long action, vo
s32 txpower;
int ret;
- if (dhd->pub.busstate == DHD_BUS_DOWN)
- return NOTIFY_DONE;
+ if (dhd->pub.busstate == DHD_BUS_DOWN || dhd->pub.up == 0) {
+ DHD_ERROR(("%s Not ready, Bus state %d firmware state %d\n",
+ __FUNCTION__, dhd->pub.busstate, dhd->pub.up));
+ return NOTIFY_BAD;
+ }
if (data) {
/* if data != NULL then we expect that the notifier passed