Fix device_info for v1/v2.
Change-Id: I77c1da11f042bf2523d5768b18c18b9a0e1e0c6e
diff --git a/mbtk/mbtk_rild_v2/src/main.c b/mbtk/mbtk_rild_v2/src/main.c
index ae286cc..c4befdf 100755
--- a/mbtk/mbtk_rild_v2/src/main.c
+++ b/mbtk/mbtk_rild_v2/src/main.c
@@ -2910,27 +2910,37 @@
band_info.band_support.nr_0_band = 0;
#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;
+ if(info_modem.version == DEV_INFO_VERSION_V1) {
+ band_info.band_area = info_modem.modem.v1.band_area;
+ band_info.band_support.net_pref = MBTK_NET_PREF_GSM_UMTS_LTE_LTE_PREF; // 15
+ band_info.band_support.gsm_band = info_modem.modem.v1.band_gsm;
+ band_info.band_support.umts_band = info_modem.modem.v1.band_wcdma;
+ band_info.band_support.tdlte_band = info_modem.modem.v1.band_tdlte;
+ band_info.band_support.fddlte_band = info_modem.modem.v1.band_fddlte;
+ band_info.band_support.lte_ext_band = info_modem.modem.v1.band_lte_ext;
} else {
- if(band_info.net_support & MBTK_NET_SUPPORT_5G) {
- band_info.band_support.net_pref = MBTK_NET_PREF_LTE_NR_NR_PREF; // 19
+ band_info.band_area = info_modem.modem.v2.band_area;
+ band_info.net_support = info_modem.modem.v2.net_support;
+ if(info_modem.modem.v2.net_pref < MBTK_NET_PREF_MAX) {
+ band_info.band_support.net_pref = info_modem.modem.v2.net_pref;
} else {
- band_info.band_support.net_pref = MBTK_NET_PREF_GSM_UMTS_LTE_LTE_PREF; // 15
+ if(band_info.net_support & MBTK_NET_SUPPORT_5G) {
+ band_info.band_support.net_pref = MBTK_NET_PREF_LTE_NR_NR_PREF; // 19
+ } else {
+ 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.gsm_band = info_modem.modem.v2.band_gsm;
+ band_info.band_support.umts_band = info_modem.modem.v2.band_wcdma;
+ band_info.band_support.tdlte_band = info_modem.modem.v2.band_tdlte;
+ band_info.band_support.fddlte_band = info_modem.modem.v2.band_fddlte;
+ band_info.band_support.lte_ext_band = info_modem.modem.v2.band_lte_ext;
- band_info.band_support.nr_3_band = info_modem.band_nr_3;
- band_info.band_support.nr_2_band = info_modem.band_nr_2;
- band_info.band_support.nr_1_band = info_modem.band_nr_1;
- band_info.band_support.nr_0_band = info_modem.band_nr_0;
+ band_info.band_support.nr_3_band = info_modem.modem.v2.band_nr_3;
+ band_info.band_support.nr_2_band = info_modem.modem.v2.band_nr_2;
+ band_info.band_support.nr_1_band = info_modem.modem.v2.band_nr_1;
+ band_info.band_support.nr_0_band = info_modem.modem.v2.band_nr_0;
+ }
}
}