diff options
author | Dan Williams <dcbw@redhat.com> | 2013-06-03 16:01:57 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-05-06 21:48:55 -0500 |
commit | 6080425088470ffb1ba0e52076e65d3b3c58aa00 (patch) | |
tree | 578cd8e4b6f820407c88f41e2069b77f8155127d /include | |
parent | bb1fece6e6bdae53bc8383d300fa866150032ebc (diff) | |
download | NetworkManager-6080425088470ffb1ba0e52076e65d3b3c58aa00.tar.gz |
wwan: use modem states instead of enabled/connected properties
Determining when the NMDeviceModem is available and when different
connections are available is easier if the modem's state is tracked,
instead of using the separate Enabled and Connected properties.
These properties could not accurately represent the SIM lock state
and prevented NetworkManager from making the modem available for
auto-activation when locked, even if a PIN was available.
In this new scheme, the NMDeviceModem is UNAVAILABLE when the
ModemManager modem state is FAILED, UNKNOWN, or INITIALIZING. It
transitions to the NM DISCONNECTED state when the modem has finished
initializing and has not failed.
Once the NMDeviceModem is in DISCONNECTED state it can be activated
even if the SIM is locked and a PIN is required; the PIN will be
requested when starting activation, either from the connection itself
or via a secrets request. This makes auto-activation of WWAN
connections possible.
This also allows us to consolidate code dealing with modem enable/disable
into the base NMModem class using the modem state, and to log more modem
information for debugging purposes.
Diffstat (limited to 'include')
-rw-r--r-- | include/NetworkManager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/NetworkManager.h b/include/NetworkManager.h index 89b42aeb82..e0df39be4c 100644 --- a/include/NetworkManager.h +++ b/include/NetworkManager.h @@ -552,6 +552,12 @@ typedef enum { /* teamd control failed */ NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED = 56, + /* Modem failed or no longer available */ + NM_DEVICE_STATE_REASON_MODEM_FAILED = 57, + + /* Modem now ready and available */ + NM_DEVICE_STATE_REASON_MODEM_AVAILABLE = 58, + /* Unused */ NM_DEVICE_STATE_REASON_LAST = 0xFFFF } NMDeviceStateReason; |