Commit Graph

230 Commits

Author SHA1 Message Date
Jeevaka Badrappan 2d0cb92155 src: coding style fixes - rule M6 2010-11-22 05:07:52 -06:00
Pekka Pessi 32b333059b gprs: NULL-safe ofono_gprs_context_remove()
Check for NULL in one place.
2010-11-08 13:03:16 -06:00
Denis Kenzior bbe6eb6d4e gprs-context: Replace TYPE_INVALID with TYPE_ANY 2010-10-27 12:39:46 -05:00
Marcel Holtmann 99bd7d0399 gprs: Use common function for default name of default Internet context 2010-10-27 18:14:50 +02:00
Pekka Pessi de96428ca2 gprs-context: add IMS connection type 2010-10-27 16:57:57 +02:00
Marcel Holtmann 4e72af9b19 gprs: Add host route to the configured MMS proxy 2010-10-27 16:09:27 +02:00
Marcel Holtmann 534d1ccec6 gprs: Set IP address for GPRS contexts of type MMS 2010-10-27 15:25:25 +02:00
Marcel Holtmann 87cd9f57b3 gprs: Add support for exposing proxy information for MMS context 2010-10-27 15:09:33 +02:00
Marcel Holtmann c409dacbc8 gprs: Add support for selecting GPRS context drivers based on types 2010-10-27 14:43:32 +02:00
Marcel Holtmann 8ff5d6d6a9 gprs: Add flag to track usage of GPRS context drivers 2010-10-27 13:56:12 +02:00
Marcel Holtmann c7a5210be6 gprs: Extract GPRS context assignment into separate function 2010-10-27 11:53:37 +02:00
Marcel Holtmann b3d18d5115 gprs: Add support for setting GPRS context type 2010-10-27 11:34:54 +02:00
Marcel Holtmann 6cb86931e3 gprs: Make GPRS context type a public enum 2010-10-27 11:28:52 +02:00
Marcel Holtmann 0df5a60a0c gprs: Load stored MMS Proxy and MMSC settings 2010-10-27 00:51:51 +02:00
Marcel Holtmann 20f3a3adb2 gprs: Use better default name for context creation 2010-10-26 23:19:54 +02:00
Marcel Holtmann 768d02a881 gprs: Add support for storing MMS Proxy and MMSC settings 2010-10-26 23:14:58 +02:00
Marcel Holtmann 483663eeed gprs: Assign GPRS atom to GPRS context atom
If the GPRS atom is not assigned to the GPRS context atom, then possible
network triggered activation crashes.
2010-10-26 14:03:47 +02:00
Denis Kenzior ee4879d196 gprs: Return busy if ops are potentially colliding 2010-10-25 16:32:49 -05:00
Denis Kenzior 180f765ebe gprs: Implement DeactivateAll() 2010-10-25 16:32:49 -05:00
Denis Kenzior d168c35b99 gprs: Support multiple active contexts 2010-10-25 14:45:12 -05:00
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
Denis Kenzior ec7f95de7e Fix: Again, uncross the wires 2009-11-18 10:33:09 -06:00
Denis Kenzior acb4e127c6 Fix: Uncross the wires 2009-11-18 10:00:04 -06:00
Denis Kenzior 9b4e898702 Support Settings property of PrimaryContext 2009-11-17 18:55:32 -06:00
Martin Xu 26413141be Add ofono_gprs_context_get_modem 2009-11-17 15:56:31 -06:00
Denis Kenzior e75fef59f2 Fix: Load GPRS settings before finding netreg
GPRS Settings should be loaded before we try to find netreg atom and
potentially try to make the attach/detach decisions.
2009-11-05 10:25:59 -06:00
Denis Kenzior ac5f67c46d Add ability to restore GPRS contexts from settings 2009-11-02 16:02:09 -06:00
Denis Kenzior 8d7f5245b4 Save GPRS context settings 2009-11-02 16:02:09 -06:00
Denis Kenzior 1ff069be5a Add Basic save/restore code for GPRS setting 2009-11-02 16:02:09 -06:00
Denis Kenzior 3c702b4d99 Limit the number of contexts that we manage 2009-11-02 16:02:09 -06:00
Denis Kenzior 708f7481b0 Update CreateContext API 2009-11-02 16:02:09 -06:00
Denis Kenzior 1f73c18257 Add utility to convert strings to context type 2009-11-02 16:02:09 -06:00
Denis Kenzior bf8e486f02 Fix: Default to type internet 2009-11-02 16:02:09 -06:00
Denis Kenzior 26804de94b Add checking for valid APN format 2009-10-30 15:54:32 -05:00
Denis Kenzior fd6d9f9fc7 Fix: Don't pass ofono_network_operator structures 2009-10-29 15:28:26 -05:00
Denis Kenzior 25ef3f8b18 Fix: Obscure crash when GPRS is not supported 2009-10-27 12:39:20 -05:00
Denis Kenzior 30609627bf Fix: Properly unregister context on exit 2009-10-27 12:39:09 -05:00
Denis Kenzior fa8eb23d3f Fix: Use driver_attached instead of attached 2009-10-26 18:30:41 -05:00
Denis Kenzior e63ea23557 Make netreg_update based on CREG, not CGREG 2009-10-26 17:26:19 -05:00
Denis Kenzior 4f85ee5c97 Simplify logic in netreg_update 2009-10-26 17:25:52 -05:00
Denis Kenzior 078e2bdc2a Fix unused variable warning 2009-10-26 17:00:35 -05:00
Denis Kenzior 4552b0c26a Don't cause an infinite loop 2009-10-26 17:00:18 -05:00
Denis Kenzior ae1192ba99 Get rid of the AFTER_ROAMING stuff 2009-10-26 16:58:24 -05:00
Denis Kenzior c7a113dbd2 Ignore gprs status when not attached/attaching 2009-10-26 16:57:21 -05:00
Denis Kenzior d5fe6dce96 Update attached status when gprs status changes 2009-10-26 16:56:52 -05:00
Denis Kenzior bc72cca91b Fix: notify_attached was only used when detached
The standard only specifies that the context might have been detached by
the network / mobile equipment.  Not attached.
2009-10-26 16:55:03 -05:00
Denis Kenzior e0603f0c68 Add a master function for updating attached state 2009-10-26 16:54:18 -05:00
Denis Kenzior fe974ea4f2 Fixup initialization logic 2009-10-26 16:20:36 -05:00
Denis Kenzior ca4f75ca0b Fix: Initialize registration statuses 2009-10-26 16:19:54 -05:00
Andrzej Zaborowski 939be2adc2 Refactor: Make GPRS use information from netreg 2009-10-26 13:34:41 -05:00
Andrzej Zaborowski 53414483d3 Fix: Don't attach if searching
Don't ask driver to attach GPRS if modem is already searching for an
operator.
2009-10-26 13:32:26 -05:00
Andrzej Zaborowski 4779ed055a Fix interpretation of new GPRS registration status signal. 2009-10-26 13:29:41 -05:00
Denis Kenzior 50ae504bc6 Fix: Fix segfault from improperly initialized data 2009-10-24 12:39:31 -05:00
Andrzej Zaborowski 87f4e3890d Just return success when value already set in SetProperty. 2009-10-24 10:27:06 -05:00
Denis Kenzior 722204ae6c Fix: Connect up gprs and gprs_context 2009-10-23 17:05:56 -05:00
Denis Kenzior 7faa34d235 Fix: Typo in property name 2009-10-23 17:05:56 -05:00
Denis Kenzior 14c116be36 Remove unused code and make compiler happy 2009-10-23 17:05:56 -05:00
Denis Kenzior a3b736afe5 Add implementation of GPRS context atom 2009-10-23 17:05:56 -05:00
Denis Kenzior fa800e5852 Fix: Rename Flag 2009-10-23 17:05:56 -05:00
Denis Kenzior f9a8ea1b08 Deactivate the context for removal if active 2009-10-23 17:05:56 -05:00
Denis Kenzior 08eda615c5 Refactor/Implement basic activate logic
Not yet tested
2009-10-23 17:05:55 -05:00
Denis Kenzior a12d252609 Add stub of gprs context deactivated 2009-10-23 17:05:55 -05:00
Denis Kenzior 7587fe0de3 Fix: Style 2009-10-23 17:05:55 -05:00
Denis Kenzior 46dde73ab2 Remove unused functions 2009-10-23 17:05:55 -05:00
Denis Kenzior 369d9f8f33 Refactor: Deactivate all contexts function 2009-10-23 17:05:55 -05:00
Denis Kenzior 752468b16e Remove unused function 2009-10-23 17:05:55 -05:00
Denis Kenzior 8e0797ca24 Refactor: GPRS Remove Context function 2009-10-23 17:05:55 -05:00
Denis Kenzior b2c2ed5fdd Refactor: GPRS CreateContext function 2009-10-23 17:05:55 -05:00
Denis Kenzior f80df022d4 Remove unused function 2009-10-23 17:05:54 -05:00
Denis Kenzior 87b5d16c14 Refactor: context object path list 2009-10-23 17:05:54 -05:00
Denis Kenzior 58d44f6be9 Refactor: Context set_property function 2009-10-23 17:05:54 -05:00
Denis Kenzior 7409a6761f Refactor: Context get_properties 2009-10-23 17:05:54 -05:00
Denis Kenzior cbaf0aacfc Refactor: context finding by path 2009-10-23 17:05:54 -05:00
Denis Kenzior 6f7ef99759 Remove unused function 2009-10-23 17:05:54 -05:00
Denis Kenzior 65f77b2b3a Add CID range function 2009-10-23 17:05:54 -05:00
Denis Kenzior b745ebcf6f Refactor: Primary Context dbus reg/unreg 2009-10-23 17:05:54 -05:00
Denis Kenzior 7b3ab433eb Refactor: Use ofono_bool_t instead of int 2009-10-23 17:05:54 -05:00
Denis Kenzior 05d7cf9ee1 Refactor: Rename GPRS type enums 2009-10-23 17:05:54 -05:00
Denis Kenzior 0b68ad7e32 Second round of renaming 2009-10-23 17:05:53 -05:00
Denis Kenzior 88c0f77a58 Refactor: First round of renaming 2009-10-23 17:05:53 -05:00
Denis Kenzior b2fd75014a Refactor: rename data-connection to gprs
Keep the name specific to GSM, other implementations will probably
require their own interfaces
2009-10-23 17:05:53 -05:00