mirror of git://git.sysmocom.de/ofono
radio-settings: handling of dual mode technology preference
Handled two new dual mode technology preferences "umts,gsm" and "lte,umts".
This commit is contained in:
parent
b2e948f8d8
commit
0c2f2815ca
|
@ -71,9 +71,15 @@ static const char *radio_access_mode_to_string(enum ofono_radio_access_mode m)
|
|||
return "umts";
|
||||
case OFONO_RADIO_ACCESS_MODE_LTE:
|
||||
return "lte";
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (m == (OFONO_RADIO_ACCESS_MODE_UMTS|OFONO_RADIO_ACCESS_MODE_GSM))
|
||||
return "umts,gsm";
|
||||
|
||||
if (m == (OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_UMTS))
|
||||
return "lte,umts";
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean radio_access_mode_from_string(const char *str,
|
||||
|
@ -92,6 +98,12 @@ static gboolean radio_access_mode_from_string(const char *str,
|
|||
} else if (g_str_equal(str, "lte")) {
|
||||
*mode = OFONO_RADIO_ACCESS_MODE_LTE;
|
||||
return TRUE;
|
||||
} else if (g_str_equal(str, "umts,gsm")) {
|
||||
*mode = OFONO_RADIO_ACCESS_MODE_UMTS|OFONO_RADIO_ACCESS_MODE_GSM;
|
||||
return TRUE;
|
||||
} else if (g_str_equal(str, "lte,umts")) {
|
||||
*mode = OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_UMTS;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in New Issue