meta-digi/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.41/ccimx6ul/0005-bluetooth-Fix-bug-in-f...

52 lines
2.3 KiB
Diff

From: Anantha Krishnan <ananthk@codeaurora.org>
Date: Thu, 11 Sep 2014 18:57:45 +0530
Subject: [PATCH] bluetooth: Fix bug in firmware parsing mechanism
Reorganize the RAMPATCH members to be present as part of the
RAMPATCH header structre instead of the main firmware structure
Change-Id: If523e1bb20edcd52b7c6f623c07af492e6305bd0
Signed-off-by: Rupesh Tatiya <rtatiya@codeaurora.org>
---
tools/hciattach_rome.c | 4 ++--
tools/hciattach_rome.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/hciattach_rome.c b/tools/hciattach_rome.c
index f31be43c09e4..122a0f4b89bc 100644
--- a/tools/hciattach_rome.c
+++ b/tools/hciattach_rome.c
@@ -851,8 +851,8 @@ int rome_get_tlv_file(char *file_path)
fprintf(stderr, "Length\t\t\t : %d bytes\n", (ptlv_header->tlv_length1) |
(ptlv_header->tlv_length2 << 8) |
(ptlv_header->tlv_length3 << 16));
- fprintf(stderr, "Total Length\t\t\t : %d bytes\n", ptlv_header->tlv_data_len);
- fprintf(stderr, "Patch Data Length\t\t\t : %d bytes\n",ptlv_header->tlv_patch_data_len);
+ fprintf(stderr, "Total Length\t\t\t : %d bytes\n", ptlv_header->tlv.patch.tlv_data_len);
+ fprintf(stderr, "Patch Data Length\t\t\t : %d bytes\n",ptlv_header->tlv.patch.tlv_patch_data_len);
fprintf(stderr, "Signing Format Version\t : 0x%x\n", ptlv_header->tlv.patch.sign_ver);
fprintf(stderr, "Signature Algorithm\t\t : 0x%x\n", ptlv_header->tlv.patch.sign_algorithm);
fprintf(stderr, "Reserved\t\t\t : 0x%x\n", ptlv_header->tlv.patch.reserved1);
diff --git a/tools/hciattach_rome.h b/tools/hciattach_rome.h
index aa59965643ec..07127f30a70a 100644
--- a/tools/hciattach_rome.h
+++ b/tools/hciattach_rome.h
@@ -236,6 +236,8 @@ typedef struct {
} __attribute__ ((packed)) patch_info;
typedef struct {
+ unsigned int tlv_data_len;
+ unsigned int tlv_patch_data_len;
unsigned char sign_ver;
unsigned char sign_algorithm;
unsigned short reserved1;
@@ -258,8 +260,6 @@ typedef struct {
unsigned char tlv_length1;
unsigned char tlv_length2;
unsigned char tlv_length3;
- unsigned int tlv_data_len;
- unsigned int tlv_patch_data_len;
union{
tlv_patch_hdr patch;