Fix ril v2 build error.
Change-Id: I81361c5f39f8d9a7a3a7041b9cc7f4241f7ec699
diff --git a/mbtk/mbtk_rild_v2/src/main.c b/mbtk/mbtk_rild_v2/src/main.c
index 46758b4..c196470 100755
--- a/mbtk/mbtk_rild_v2/src/main.c
+++ b/mbtk/mbtk_rild_v2/src/main.c
@@ -721,6 +721,7 @@
// $CREG: 1, "8330", "06447347", 7,"0d4", 2, 0
// $CREG: 1, "8010", "000060a7", 0,, 2, 0
// +CGREG: 1
+// +C5GREG: 1,"00280386","07e920010",11,1,"01"
static void urc_net_reg_state_change_process(const char *s, const char *sms_pdu)
{
mbtk_ril_net_reg_state_info_t state;
@@ -769,7 +770,6 @@
{
goto CGREG_EXIT;
}
-
state.tech = (mbtk_radio_technology_enum)tmp_int; // AcT
}
@@ -2790,6 +2790,7 @@
mbtk_device_info_modem_t info_modem;
memset(&band_info.band_support, 0, sizeof(mbtk_band_info_t));
memset(&info_modem, 0, sizeof(mbtk_device_info_modem_t));
+#ifdef MBTK_DEV_INFO_VERSION_2
if(mbtk_dev_info_read(MBTK_DEVICE_INFO_ITEM_MODEM, &(info_modem), sizeof(mbtk_device_info_modem_t))) {
LOGD("mbtk_dev_info_read(MODEM) fail, use default band.");
band_info.band_area = MBTK_MODEM_BAND_AREA_ALL;
@@ -2824,7 +2825,6 @@
#endif
} else {
band_info.band_area = info_modem.band_area;
-
band_info.net_support = info_modem.net_support;
if(info_modem.net_pref < MBTK_NET_PREF_MAX) {
band_info.band_support.net_pref = info_modem.net_pref;
@@ -2846,6 +2846,39 @@
band_info.band_support.nr_1_band = info_modem.band_nr_1;
band_info.band_support.nr_0_band = info_modem.band_nr_0;
}
+#else
+ if(mbtk_dev_info_read(MBTK_DEVICE_INFO_ITEM_MODEM, &(info_modem), sizeof(mbtk_device_info_modem_t))) {
+ LOGD("mbtk_dev_info_read(MODEM) fail, use default band.");
+ band_info.band_area = MBTK_MODEM_BAND_AREA_ALL;
+ band_info.band_support.net_pref = MBTK_NET_PREF_GSM_UMTS_LTE_LTE_PREF; // 15
+ band_info.net_support = MBTK_NET_SUPPORT_2G | MBTK_NET_SUPPORT_3G | MBTK_NET_SUPPORT_4G;
+
+ band_info.band_support.gsm_band = MBTK_BAND_ALL_GSM_DEFAULT;
+ band_info.band_support.umts_band = MBTK_BAND_ALL_WCDMA_DEFAULT;
+ band_info.band_support.tdlte_band = MBTK_BAND_ALL_TDLTE_DEFAULT;
+ band_info.band_support.fddlte_band = MBTK_BAND_ALL_FDDLTE_DEFAULT;
+ band_info.band_support.lte_ext_band = MBTK_BAND_ALL_EXT_LTE_DEFAULT;
+
+ band_info.band_support.nr_3_band = 0;
+ band_info.band_support.nr_2_band = 0;
+ band_info.band_support.nr_1_band = 0;
+ band_info.band_support.nr_0_band = 0;
+ } else {
+ band_info.band_area = info_modem.band_area;
+ band_info.net_support = MBTK_NET_SUPPORT_2G | MBTK_NET_SUPPORT_3G | MBTK_NET_SUPPORT_4G;
+ band_info.band_support.net_pref = MBTK_NET_PREF_GSM_UMTS_LTE_LTE_PREF; // 15
+ band_info.band_support.gsm_band = info_modem.band_gsm;
+ band_info.band_support.umts_band = info_modem.band_wcdma;
+ band_info.band_support.tdlte_band = info_modem.band_tdlte;
+ band_info.band_support.fddlte_band = info_modem.band_fddlte;
+ band_info.band_support.lte_ext_band = info_modem.band_lte_ext;
+
+ band_info.band_support.nr_3_band = 0;
+ band_info.band_support.nr_2_band = 0;
+ band_info.band_support.nr_1_band = 0;
+ band_info.band_support.nr_0_band = 0;
+ }
+#endif
}
static void* ril_process_thread(void* arg)