fm: Set lib_running variable only on cleanup
On SSR, we receive HW_ERR_EVENT,we set lib_running variable to 0.
Because of this, hci tx and monitor thread exits before cleanup or exit
happens, causing RX thread to be blocked on cond_wait and failure
happens.
Hence not setting variable during event read.
Change-Id: I82891e12c83fe5d06dbfec060d1ace1231fc25fd
diff --git a/fm_hci/fm_hci.c b/fm_hci/fm_hci.c
index 378e0c9..9d0dafc 100644
--- a/fm_hci/fm_hci.c
+++ b/fm_hci/fm_hci.c
@@ -229,7 +229,6 @@
pthread_cond_signal(&hci->cmd_credits_cond);
} else if (pbuf->evt_code == FM_HW_ERR_EVENT) {
ALOGI("%s: FM H/w Err Event Recvd. Event Code: 0x%2x", __func__, pbuf->evt_code);
- lib_running =0;
hci->vendor->ssr_cleanup(0x22);
status = power(hci, FM_RADIO_DISABLE);
if (status < 0) {