network: "Remove" support for dial-up modems
NetworkManager has never supported dial-up modems, which are the only case we have a modem device without any of these capabilities. https://bugzilla.gnome.org/show_bug.cgi?id=701954
This commit is contained in:
parent
9520880568
commit
a0991c8261
@ -584,46 +584,25 @@ const NMDeviceWired = new Lang.Class({
|
|||||||
const NMDeviceModem = new Lang.Class({
|
const NMDeviceModem = new Lang.Class({
|
||||||
Name: 'NMDeviceModem',
|
Name: 'NMDeviceModem',
|
||||||
Extends: NMDevice,
|
Extends: NMDevice,
|
||||||
|
category: NMConnectionCategory.WWAN,
|
||||||
|
|
||||||
_init: function(client, device, connections) {
|
_init: function(client, device, connections) {
|
||||||
let is_wwan = false;
|
|
||||||
|
|
||||||
device._description = _("Mobile broadband");
|
device._description = _("Mobile broadband");
|
||||||
this._enabled = true;
|
this._enabled = true;
|
||||||
this.mobileDevice = null;
|
this.mobileDevice = null;
|
||||||
this._connectionType = 'ppp';
|
|
||||||
|
|
||||||
this._capabilities = device.current_capabilities;
|
this._capabilities = device.current_capabilities;
|
||||||
// Support new ModemManager1 devices
|
// Support new ModemManager1 devices
|
||||||
if (device.udi.indexOf('/org/freedesktop/ModemManager1/Modem') == 0) {
|
if (device.udi.indexOf('/org/freedesktop/ModemManager1/Modem') == 0) {
|
||||||
is_wwan = true;
|
|
||||||
this.mobileDevice = new ModemManager.BroadbandModem(device.udi, device.current_capabilities);
|
this.mobileDevice = new ModemManager.BroadbandModem(device.udi, device.current_capabilities);
|
||||||
if (this._capabilities & NetworkManager.DeviceModemCapabilities.GSM_UMTS) {
|
|
||||||
this._connectionType = NetworkManager.SETTING_GSM_SETTING_NAME;
|
|
||||||
} else if (this._capabilities & NetworkManager.DeviceModemCapabilities.LTE) {
|
|
||||||
this._connectionType = NetworkManager.SETTING_GSM_SETTING_NAME;
|
|
||||||
} else if (this._capabilities & NetworkManager.DeviceModemCapabilities.CDMA_EVDO) {
|
|
||||||
this._connectionType = NetworkManager.SETTING_CDMA_SETTING_NAME;
|
|
||||||
}
|
|
||||||
} else if (this._capabilities & NetworkManager.DeviceModemCapabilities.GSM_UMTS) {
|
} else if (this._capabilities & NetworkManager.DeviceModemCapabilities.GSM_UMTS) {
|
||||||
is_wwan = true;
|
|
||||||
this.mobileDevice = new ModemManager.ModemGsm(device.udi);
|
this.mobileDevice = new ModemManager.ModemGsm(device.udi);
|
||||||
this._connectionType = NetworkManager.SETTING_GSM_SETTING_NAME;
|
|
||||||
} else if (this._capabilities & NetworkManager.DeviceModemCapabilities.CDMA_EVDO) {
|
} else if (this._capabilities & NetworkManager.DeviceModemCapabilities.CDMA_EVDO) {
|
||||||
is_wwan = true;
|
|
||||||
this.mobileDevice = new ModemManager.ModemCdma(device.udi);
|
this.mobileDevice = new ModemManager.ModemCdma(device.udi);
|
||||||
this._connectionType = NetworkManager.SETTING_CDMA_SETTING_NAME;
|
|
||||||
} else if (this._capabilities & NetworkManager.DeviceModemCapabilities.LTE) {
|
} else if (this._capabilities & NetworkManager.DeviceModemCapabilities.LTE) {
|
||||||
is_wwan = true;
|
|
||||||
this.mobileDevice = new ModemManager.ModemGsm(device.udi);
|
this.mobileDevice = new ModemManager.ModemGsm(device.udi);
|
||||||
this._connectionType = NetworkManager.SETTING_GSM_SETTING_NAME;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_wwan)
|
|
||||||
this.category = NMConnectionCategory.WWAN;
|
|
||||||
else
|
|
||||||
this.category = NMConnectionCategory.WIRED;
|
|
||||||
|
|
||||||
if (this.mobileDevice) {
|
if (this.mobileDevice) {
|
||||||
this._operatorNameId = this.mobileDevice.connect('notify::operator-name', Lang.bind(this, function() {
|
this._operatorNameId = this.mobileDevice.connect('notify::operator-name', Lang.bind(this, function() {
|
||||||
if (this._operatorItem) {
|
if (this._operatorItem) {
|
||||||
|
Loading…
Reference in New Issue
Block a user