summaryrefslogtreecommitdiffstats
path: root/libbt/src/hardware.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbt/src/hardware.c')
-rw-r--r--libbt/src/hardware.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/libbt/src/hardware.c b/libbt/src/hardware.c
index df20c9f..0a4f063 100644
--- a/libbt/src/hardware.c
+++ b/libbt/src/hardware.c
@@ -513,6 +513,33 @@ static uint8_t hw_config_findpatch(char *p_chip_id_str)
return (retval);
}
+uint8_t hw_config_checkpatches(void)
+{
+ char fw_patchfile_chip_name[256] = FW_PATCHFILE_CHIP_NAME;
+ struct stat fw_prepatch_stat;
+ uint8_t found;
+ int rc;
+
+ if (strlen(fw_prepatch_name) > 0)
+ {
+ rc = stat(fw_prepatch_name, &fw_prepatch_stat);
+ if (rc < 0)
+ {
+ ALOGE("Prepatch firmware is missing");
+ return FALSE;
+ }
+ }
+
+ found = hw_config_findpatch(fw_patchfile_chip_name);
+ if (found == FALSE)
+ {
+ ALOGE("Patch firmware is missing");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
/*******************************************************************************
**
** Function hw_config_set_bdaddr