Commit Graph

110 Commits

Author SHA1 Message Date
Marcel Holtmann 3342af770a gprs: Handle failure of GPRS context atom drivers
The GRPS context atom drivers can return an error from their probe
callbacks. In that case gc->driver is NULL and will cause a crash
when trying to activate a context. So check that there is actually
a driver attached to that GPRS context.
2010-10-24 17:14:16 +02:00
Jeevaka Badrappan 4196182770 Fix multi-line comment style issues 2010-09-21 21:16:01 -05:00
Mika Liljeberg 1e139eb1ce gprs: add Suspended property 2010-09-10 10:51:53 -05:00
Pekka Pessi 4aa442d36f gprs: add debug info 2010-08-26 10:38:14 -05:00
Marcel Holtmann 7838503458 gprs: Default value for RoamingAllowed should be FALSE 2010-08-20 11:22:47 +02:00
Marcel Holtmann 335ec6f3ea gprs: Use "Internet" for default PDP context name 2010-08-19 22:36:18 +02:00
Denis Kenzior 18d8584adb gprs: Automatically add a context if none defined 2010-08-19 15:10:30 -05:00
Denis Kenzior 256e01c8c4 gprs: Add support for GetContexts 2010-08-19 14:20:06 -05:00
Denis Kenzior a9a54c0933 gprs: Tweak context object path naming
And support loading of legacy context names
2010-08-19 14:20:06 -05:00
Denis Kenzior 473e34db66 gprs: Break out writing of gprs context settings 2010-08-19 14:20:06 -05:00
Denis Kenzior 323874790b gprs: Add ContextRemoved signal 2010-08-19 14:20:06 -05:00
Denis Kenzior fb4aa43a5d gprs: Emit the ContextAdded signal 2010-08-19 14:20:06 -05:00
Denis Kenzior d1a2875a7e gprs: minor style fix 2010-08-19 14:20:06 -05:00
Denis Kenzior 62b598f704 gprs: Break out context properties append function 2010-08-19 14:20:06 -05:00
Denis Kenzior 4f57fef81b gprs: Get rid of PrimaryContexts property 2010-08-19 14:20:06 -05:00
Denis Kenzior 8f0796ff4f gprs: Update CreateContext to AddContext 2010-08-19 14:20:05 -05:00
Denis Kenzior b73ebe3c83 gprs: Update GPRS related DBus interface names 2010-08-19 14:20:05 -05:00
Denis Kenzior 06f56000ff gprs: Update Attached when Auto-Attached succeded 2010-08-18 20:56:00 -05:00
Denis Kenzior d6f81ef17a gprs: Fix up some attach/detach logic issues
Parts of it are related to Meego bug 5193, namely that we don't properly
signal the Attached status when powering down.

Another part of the fix is that we automatically detach in case our
conditions are not fulfilled if the modem attaches automatically (e.g.
Auto-Attach is enabled)
2010-08-13 18:17:04 -05:00
Zhenhua Zhang 6556eda51c gprs: Fix release cid in gprs_deactive_for_remove
Similiar to pri_deactive_callback, we should release the context id in
gprs_deactive_for_remove() as well.
2010-08-09 09:07:30 -05:00
Denis Kenzior a3b694672d gprs: Minor style fixes 2010-07-19 13:51:00 -05:00
Denis Kenzior d4cae8dd56 gprs: Add Protocol property with IPv6/IPv4 2010-07-19 13:50:37 -05:00
Denis Kenzior f3e0e466c7 gprs: Fix to attachment race condition
Sometimes we get unsolicited attachment status before our query
finishes.  If the client is fast enough they can attempt to attach
and get the AttachInProgress error
2010-06-25 14:19:08 -05:00
Marcel Holtmann 9a72d2566d Move data connection manager interface constants into common include 2010-06-09 20:38:50 -07:00
Denis Kenzior 7972f844c7 Refactor: Simplify the internal GPRS API
We no longer expose lac/ci/tech attributes obtained from CGREG
(some modems, like ISI, do not even report them for GPRS separately).
Simplify the internal gprs driver api to only report the registration
status (e.g. home, roaming, searching, not registered, etc)
2010-03-26 23:00:28 -05:00
Denis Kenzior 88994bbe81 Refactor: Get rid of DCM properties
Be conformant with the API changes from the previous commit
2010-03-26 23:00:28 -05:00
Denis Kenzior ea771ec186 Fix: Tweak gprs attach logic
We use driver_attached to track whether the driver is attached /
attaching.  Unfortunately we only set it when set_attached succeeds.
Instead we should set it right away when calling set_attached, so we
cover pending attaches as well.
2010-02-08 15:33:17 -06:00
Denis Kenzior d11505f751 Fix: Add recheck flag to gprs
When a powered is toggled quickly, we ignore the second request.  This
flag tells us that we should recheck what the attach status should be
once the current operation finishes
2010-02-08 15:32:04 -06:00
Denis Kenzior 87ca1b0c8f Fix: Don't use ofono_debug directly in the core
Use DBG macro which is integrated with the new debug framework.
2010-02-08 11:54:03 -06:00
Denis Kenzior 20db731484 Make primary context ids persistent 2010-01-07 14:43:21 -06:00
Denis Kenzior bf209425e5 Use idmap to allocate primary context ids 2010-01-07 14:07:52 -06:00
Denis Kenzior 0ed5c70010 Fix: Fail if no driver or id range set 2010-01-07 13:25:32 -06:00
Denis Kenzior cdfe6dd342 Use the new from_range idmap constructor 2010-01-07 13:25:10 -06:00
Denis Kenzior 6051d0bdde Refactor: Use idmap to allocate CIDs 2010-01-07 13:01:12 -06:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Marcel Holtmann 0b359e89db Use error label instead of err or err_out 2009-12-24 07:09:09 -08:00
Denis Kenzior 955e6a61ee Style: Fix a few more occurences of if/else
See Linux coding style document for details
2009-12-17 21:45:39 -06:00
Denis Kenzior 70e1d47baa Add context-id allocation / deallocation code
This also disables attempts to use multiple active contexts.  The code
isn't setup to do this yet.
2009-12-09 21:02:47 -06:00
Denis Kenzior 8495e047e6 Refactor: use unsigned ints for cids 2009-12-09 21:02:47 -06:00
Denis Kenzior 58c8a33adf Fix: Reset active contexts if gprs is detached
When we lose network registration or are forcefully detached from the
network we must reset all active contexts to inactive.
2009-12-08 17:19:40 -06:00
Denis Kenzior 2ac70c7f27 Reset context settings when context is deactivated 2009-12-08 17:19:23 -06:00
Denis Kenzior a1ea26cd9d Style: Remove extra blank line 2009-12-08 17:11:35 -06:00
Denis Kenzior 55572b6e69 Style: Use unsigned int instead of unsigned 2009-12-01 12:42:23 -06:00
Marcel Holtmann 231aca4a69 Get rid of the pointless checks before g_free in GPRS engine 2009-11-24 00:27:22 +01:00
Marcel Holtmann 5253d82057 Add support bringing GPRS interfaces up and down as needed 2009-11-24 00:26:09 +01:00
Martin Xu 040d660d41 Emit settings signal before active signal 2009-11-23 09:07:57 +01:00
Denis Kenzior 9777d244ec Report AttachInProgress Error
If one tries to activate a context and we're currently attaching or
detaching from GPRS, report the AttachInProgress error
2009-11-18 13:24:20 -06:00
Denis Kenzior e1e44e772a Refactor: Send NotAttached error
If one tries to activate the context and we're currently not attached to
GPRS, report a NotAttached error instead of a failure
2009-11-18 13:23:13 -06:00
Denis Kenzior 41050ef7b1 Implement CGREG query
Some modems do not properly send CGREG notifications when the context is
attached / detached.  We manually query the registration state of GPRS
to make sure that if the modem is indeed attached, the state is
reflected properly
2009-11-18 10:34:23 -06:00
Denis Kenzior d111fc3cee Refactor: Move functions up to avoid declaration 2009-11-18 10:34:00 -06:00