broadband-modem-qmi: only give gsm/wcdma acquisition order if both 2G & 3G given

This commit is contained in:
Aleksander Morgado
2012-10-25 16:50:08 +02:00
parent 79af94fdbd
commit a772b28ad6
+3 -1
View File
@@ -2511,7 +2511,9 @@ set_allowed_modes_context_step (SetAllowedModesContext *ctx)
input = qmi_message_nas_set_system_selection_preference_input_new ();
qmi_message_nas_set_system_selection_preference_input_set_mode_preference (input, pref, NULL);
if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self))) {
/* Only set acquisition order preference if both 2G and 3G given as allowed */
if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self)) &&
(ctx->allowed & (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G))) {
QmiNasGsmWcdmaAcquisitionOrderPreference order;
order = mm_modem_mode_to_qmi_gsm_wcdma_acquisition_order_preference (ctx->preferred);