mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 18:54:36 +00:00
core: add settings for 4G (LTE) network modes
NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G and NM_SETTING_GSM_NETWORK_TYPE_4G added.
This commit is contained in:
parent
d8b2e8c64a
commit
c4a85acf80
|
@ -658,10 +658,10 @@ nm_setting_gsm_class_init (NMSettingGsmClass *setting_class)
|
|||
"Network preference to force the device to only use "
|
||||
"specific network technologies. The permitted values "
|
||||
"are: -1: any, 0: 3G only, 1: GPRS/EDGE only, "
|
||||
"2: prefer 3G, and 3: prefer 2G. Note that not all "
|
||||
"devices allow network preference control.",
|
||||
"2: prefer 3G, 3: prefer 2G, 4: prefer 4G/LTE, 5: 4G/LTE only. "
|
||||
"Note that not all devices allow network preference control.",
|
||||
NM_SETTING_GSM_NETWORK_TYPE_ANY,
|
||||
NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE,
|
||||
NM_SETTING_GSM_NETWORK_TYPE_4G,
|
||||
NM_SETTING_GSM_NETWORK_TYPE_ANY,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE));
|
||||
|
||||
|
|
|
@ -81,6 +81,10 @@ GQuark nm_setting_gsm_error_quark (void);
|
|||
* preferred but 2G-type technologies may be used as a fallback
|
||||
* @NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE: 2G-type technologies are
|
||||
* preferred but 3G-type technologies may be used as a fallback
|
||||
* @NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G: 4G/LTE-type technologies are
|
||||
* preferred but 3G/2/-type technologies may be used as a fallback
|
||||
* @NM_SETTING_GSM_NETWORK_TYPE_4G: only 4G/LTE type
|
||||
* technologies may be used
|
||||
*
|
||||
* #NMSettingGsmNetworkType values indicate the allowed access technologies
|
||||
* the device may use when connecting to this network.
|
||||
|
@ -90,7 +94,9 @@ typedef enum {
|
|||
NM_SETTING_GSM_NETWORK_TYPE_UMTS_HSPA = 0,
|
||||
NM_SETTING_GSM_NETWORK_TYPE_GPRS_EDGE = 1,
|
||||
NM_SETTING_GSM_NETWORK_TYPE_PREFER_UMTS_HSPA = 2,
|
||||
NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE = 3
|
||||
NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE = 3,
|
||||
NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G = 4,
|
||||
NM_SETTING_GSM_NETWORK_TYPE_4G = 5
|
||||
} NMSettingGsmNetworkType;
|
||||
|
||||
/**
|
||||
|
|
|
@ -58,8 +58,10 @@ typedef enum {
|
|||
MM_MODEM_GSM_ALLOWED_MODE_3G_PREFERRED = 2,
|
||||
MM_MODEM_GSM_ALLOWED_MODE_2G_ONLY = 3,
|
||||
MM_MODEM_GSM_ALLOWED_MODE_3G_ONLY = 4,
|
||||
MM_MODEM_GSM_ALLOWED_MODE_4G_PREFERRED = 5,
|
||||
MM_MODEM_GSM_ALLOWED_MODE_4G_ONLY = 6,
|
||||
|
||||
MM_MODEM_GSM_ALLOWED_MODE_LAST = MM_MODEM_GSM_ALLOWED_MODE_3G_ONLY
|
||||
MM_MODEM_GSM_ALLOWED_MODE_LAST = MM_MODEM_GSM_ALLOWED_MODE_4G_ONLY
|
||||
} MMModemGsmAllowedMode;
|
||||
|
||||
typedef enum {
|
||||
|
@ -389,6 +391,14 @@ create_connect_properties (NMConnection *connection)
|
|||
value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_2G_PREFERRED);
|
||||
value_hash_add_uint (properties, "allowed_mode", MM_MODEM_GSM_ALLOWED_MODE_2G_PREFERRED);
|
||||
break;
|
||||
case NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G:
|
||||
/* deprecated modes not extended for 4G, so no need to set them here */
|
||||
value_hash_add_uint (properties, "allowed_mode", MM_MODEM_GSM_ALLOWED_MODE_4G_PREFERRED);
|
||||
break;
|
||||
case NM_SETTING_GSM_NETWORK_TYPE_4G:
|
||||
/* deprecated modes not extended for 4G, so no need to set them here */
|
||||
value_hash_add_uint (properties, "allowed_mode", MM_MODEM_GSM_ALLOWED_MODE_4G_ONLY);
|
||||
break;
|
||||
default:
|
||||
value_hash_add_uint (properties, "network_mode", MM_MODEM_GSM_NETWORK_DEPRECATED_MODE_ANY);
|
||||
value_hash_add_uint (properties, "allowed_mode", MM_MODEM_GSM_ALLOWED_MODE_ANY);
|
||||
|
|
Loading…
Reference in a new issue