FM : Fix wrong data being written to controller
In some commands, set/write data to controller, we assign one offset
value in structure and send it to controller. We don't read data from
controller before writing. It may cause writing wrong data to
controller, as the structure may have some garbage values for other
offsets. Errenous data written to controller, may cause functional
failures.
Change-Id: I102c0a256ab19de0d89db4f6da20df0c2522dff3
CRs-fixed: 2031064
diff --git a/helium/radio-helium.h b/helium/radio-helium.h
index adf6f93..067a40b 100644
--- a/helium/radio-helium.h
+++ b/helium/radio-helium.h
@@ -32,6 +32,7 @@
#include <stdbool.h>
+#define HELIUM_CMD_TIME_OUT (5)
#define MIN_TX_TONE_VAL 0x00
#define MAX_TX_TONE_VAL 0x07
#define MIN_HARD_MUTE_VAL 0x00
@@ -1248,6 +1249,9 @@
struct radio_helium_device *radio;
fm_hal_callbacks_t *jni_cb;
void *private_data;
+ pthread_mutex_t cmd_lock;
+ pthread_cond_t cmd_cond;
+ bool set_cmd_sent;
};
struct fm_interface_t {