From 54aa95888bccde5a352c06e4e460d431cf8f13a2 Mon Sep 17 00:00:00 2001 From: Saurabh Srivastava Date: Wed, 28 Dec 2016 16:44:58 +0530 Subject: [PATCH] Updating ro.baseband target property value Updating target derivation logic based on ro.baseband property. There are new values which must be considered in the target derivation logic. Change-Id: I2e81ab00c107247dcb8f1a919136bb61b482e73c CRs-Fixed: 1105916 --- utils/loc_target.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/utils/loc_target.cpp b/utils/loc_target.cpp index 10168610..6f550191 100644 --- a/utils/loc_target.cpp +++ b/utils/loc_target.cpp @@ -52,6 +52,9 @@ #define STR_SURF "Surf" #define STR_MTP "MTP" #define STR_APQ "apq" +#define STR_SDC "sdc" // alternative string for APQ targets +#define STR_MSM "msm" +#define STR_SDM "sdm" // alternative string for MSM targets #define STR_APQ_NO_WGR "baseband_apq_nowgr" #define STR_AUTO "auto" #define IS_STR_END(c) ((c) == '\0' || (c) == '\n' || (c) == '\r') @@ -238,7 +241,8 @@ unsigned int loc_get_target(void) goto detected; } - if( !memcmp(baseband, STR_APQ, LENGTH(STR_APQ)) ){ + if( !memcmp(baseband, STR_APQ, LENGTH(STR_APQ)) || + !memcmp(baseband, STR_SDC, LENGTH(STR_SDC)) ){ if( !memcmp(rd_id, MPQ8064_ID_1, LENGTH(MPQ8064_ID_1)) && IS_STR_END(rd_id[LENGTH(MPQ8064_ID_1)]) ) @@ -257,11 +261,17 @@ unsigned int loc_get_target(void) if (!read_a_line( mdm, rd_mdm, LINE_LEN)) gTarget = TARGET_MDM; } + else if( (!memcmp(rd_id, MSM8930_ID_1, LENGTH(MSM8930_ID_1)) && IS_STR_END(rd_id[LENGTH(MSM8930_ID_1)])) || (!memcmp(rd_id, MSM8930_ID_2, LENGTH(MSM8930_ID_2)) && IS_STR_END(rd_id[LENGTH(MSM8930_ID_2)])) ) gTarget = TARGET_MSM_NO_SSC; + + else if ( !memcmp(baseband, STR_MSM, LENGTH(STR_MSM)) || + !memcmp(baseband, STR_SDM, LENGTH(STR_SDM)) ) + gTarget = TARGET_DEFAULT; + else gTarget = TARGET_UNKNOWN; }