net: wireless: bcmdhd: Check if FW is up during SAR setup

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>
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c
index 4b57190..9a8a9b8 100644
--- a/drivers/net/wireless/bcmdhd/dhd_linux.c
+++ b/drivers/net/wireless/bcmdhd/dhd_linux.c
@@ -823,8 +823,11 @@
 	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