Commit graph

21 commits

Author SHA1 Message Date
Dan Williams
0e801e5ca3 modem: ensure radio disable cleans up during activation too
Instead of just when activated.
2012-06-06 10:25:47 -05:00
Dan Williams
43f449824a mobile: ensure IPv4 timeout fails activation
With the switch to IPv4 being allowed to fail by default we need
to clean up this old code a bit.  PPP failure during IP config
should trigger a timeout, and the core code will handle whether
to fail the device completely or not.  But if we got a valid IPv4
config and PPP failed later, the device gets failed.  Previously
the device would just sit in IP_CONFIG state because now IPv4
defaults may-fail to TRUE, and when PPP failed the
nm_device_ip_config_should_fail() check would obviously not pass.
2012-03-20 23:21:17 -05:00
Dan Williams
6b9511f6e9 core: treat missing IPv6 setting as AUTO
Like IPv4, if the connection contains no IPv6 setting, perform
IPv6 addressing.  Since may-fail defaults to TRUE for IPv6, failure
should have no consequence.
2012-03-16 09:43:16 -05:00
Dan Williams
da8e21a7d7 core: kill NMDeviceInterface 2011-12-02 13:30:07 -06:00
Dan Williams
6d567e71e6 core: move NMDeviceInterface properties and methods to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
827d9defb9 core: move nm_device_interface_set_enabled() to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
51c25508c2 core: move nm_device_interface_get_enabled() to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
f8852bf4a4 core: kill nm_device_interface_get_state() 2011-12-02 13:30:06 -06:00
Dan Williams
3927ccd1c0 core: decouple initial IP configuration states from device state
Initial IP configuration can happen during ACTIVATED state if both
v4 and v6 are enabled, but one takes longer than the other.  Thus
various checks throughout the code for IP_CONFIG were incorrect
since they depended on IP configuration only happening during the
IP_CONFIG state.  Fix that by using a separate state for IP config
and using that state for various checks instead of the overall
device state.
2011-11-09 21:36:52 -06:00
Dan Williams
bdd556fe4d core: kill stage4 (IP Config Get)
It was somewhat pointless since the IP config is always known when
stage4 gets scheduled, so why not just pass the config to stage5
immediately?  Also helps consolidate the v4/v6 failure handling
logic and makes the operational flow clearer where both v4 and
v6 are active and proceeding in parallel.
2011-11-09 21:36:52 -06:00
Dan Williams
23943e7ce2 core: handle new device states
The device states aren't used yet, but handle them anyway.
2011-03-17 13:42:22 -05:00
Dan Williams
2140dad5e0 core: consolidate mobile broadband device types
These days more and more devices are showing up that support a
number of different access technology families in the same hardware,
like Qualcomm Gobi (CDMA and GSM), Pantech UM190 (CDMA and GSM),
Pantech UML290 (CDMA and LTE), LG VL600 (CDMA and LTE), Sierra
320U (GSM and LTE), etc.  The previous scheme of having device
classes based on access technology family simply cannot handle
this hardware and attempting to add LTE to both the CDMA and GSM
device classes would result in a bunch of code duplication that
we don't want.  There's a better way...

Instead, combine both CDMA and GSM device classes into a generic
"Modem" device class that provides capabilities indicating what
access technology families a modem supports, and what families
it supports immediately without a firmware reload.  (Gobi devices
for example require a firmware reload before they can switch
between GSM and CDMA).  This provides the necessary flexibility
to the client and allows us to keep the API stable when the
same consolidation change is made in ModemManager.

The current code doesn't yet allow multi-mode operation internally,
but the API is now what we want it to be and won't need to be
changed.
2011-02-25 10:16:17 -06:00
Dan Williams
3b61adec74 core: consolidate deactivation methods
deactivate_quickly is misnamed these days; it was originally used
for quickly tearing down a device for sleep and such.  But these
days it's used for the bulk of device deactivation.  Only the wifi
class used the actual deactivate method.  So combine the two and
make device implementations less complicated.
2011-02-24 11:27:42 -06:00
Dan Williams
215306f5a1 core: add AddAndActivate D-Bus method
Given connection details, complete the connection as well as possible
using the given specific object and device, add it to system
settings, and activate it all in one method.
2011-01-10 23:39:12 -06:00
Dan Williams
62a2c34e27 core: simplify secrets handling during activation
Instead of a bizare mechanism of signals back to the manager
object that used to be required because of the user/system settings
split, let each place that needs secrets request those secrets
itself.  This flattens the secrets request process a ton and
the code flow significantly.

Previously the get secrets flow was something like this:

nm_act_request_get_secrets ()
    nm_secrets_provider_interface_get_secrets ()
        emits manager-get-secrets signal
            provider_get_secerts ()
                system_get_secrets ()
                    system_get_secrets_idle_cb ()
                        nm_sysconfig_connection_get_secrets ()
                            system_get_secrets_reply_cb ()
                                nm_secrets_provider_interface_get_secrets_result ()
                                    signal failure or success

now instead we do something like this:

nm_agent_manager_get_secrets ()
    nm_agent_manager_get_secrets ()
        request_start_secrets ()
            nm_sysconfig_connection_get_secrets ()
                return failure or success to callback
2010-12-13 21:14:23 -06:00
Dan Williams
2e92d84ef0 modem: fix WWAN hardware enable state tracking (rh #591622) 2010-05-24 17:07:46 -07:00
Dan Williams
8aef7ef411 core: allow selective failure of IP configuration (rh #567978)
As long as at least one IP config method completes, and as long as
methods that the user required to complete do complete, allow the
connection to complete.
2010-05-03 01:19:54 -07:00
Dan Williams
4bc59be464 mobile-broadband: update logging 2010-04-07 11:08:43 -07:00
Dan Williams
f032e478d8 modem: consolidate common modem code into NMDeviceModem 2010-03-25 13:15:03 -07:00
Dan Williams
c45064ba36 modem: remove debugging printf 2010-03-25 12:21:01 -07:00
Dan Williams
9a1143b337 modem: fix modem type checking for various operations
After the DUN branch merge (I think?) a number of NM_IS_MODEM
calls were left around which now always return FALSE since
NMDeviceCdma and NMDeviceGsm aren't subclasses of NMModem anymore.
But we still need generic "is this a modem subclass" checks in
a few places, so add a modem base class that both the GSM and
CDMA device classes inherit from and use that.

Plus, we want to consolidate a ton of the common code in
nm-device-gsm.c and nm-device-cdma.c into the base class in the
future anyway.
2010-03-25 12:18:26 -07:00