Commit Graph

707 Commits

Author SHA1 Message Date
Marcel Holtmann 82d0720f53 Update D-Bus configuration options and check for udev 2009-09-01 18:41:16 -07:00
Denis Kenzior 5ce0de14dc Add ofono_modem_get_powered 2009-09-01 20:10:31 -05:00
Denis Kenzior 5cbb665823 Add proposed data connection manager API 2009-09-01 18:14:59 -05:00
Denis Kenzior 31a3d489d5 Add stub vendor.h file 2009-09-01 18:14:59 -05:00
Denis Kenzior 4064f4ba73 Add vendor flag capability to voicecalls 2009-09-01 18:14:59 -05:00
Denis Kenzior e5577046f0 Add vendor flag capability to ussd 2009-09-01 18:14:58 -05:00
Denis Kenzior afb0e2b854 Add vendor flag capability to ssn 2009-09-01 18:14:58 -05:00
Denis Kenzior 8d380f8fa0 Add vendor flag capability for sms 2009-09-01 18:14:58 -05:00
Denis Kenzior aecf42646e Add vendor flag capability to sim 2009-09-01 18:14:58 -05:00
Denis Kenzior 1fb9ecca46 Add vendor flag capability to phonebook 2009-09-01 18:14:58 -05:00
Denis Kenzior 271b042488 Add vendor flag capability to netreg 2009-09-01 18:14:58 -05:00
Denis Kenzior c7d35dd039 Add vendor flag capability to devinfo 2009-09-01 18:14:58 -05:00
Denis Kenzior 933f803967 Add vendor flag to call-settings 2009-09-01 18:14:58 -05:00
Denis Kenzior 390bd82109 Add vendor parameter to call-meter 2009-09-01 18:14:57 -05:00
Denis Kenzior 7ee954b28a Add vendor flag to call-forwarding 2009-09-01 18:14:57 -05:00
Denis Kenzior 15b1a733b0 Introduce vendor parameter to call-barring 2009-09-01 18:14:57 -05:00
Ismo Puustinen 3f5851f4e9 gisi: Getter function for pipe handle 2009-09-01 13:42:15 +03:00
Denis Kenzior a4e5c27e1a Fix being able to set powered after failure
If enable failed, subsequent attempts will also fail.
2009-08-31 23:03:37 -05:00
Denis Kenzior c9d704955c Add PDU listing support 2009-08-31 23:03:35 -05:00
Denis Kenzior aeebbfa67e Don't return sdn numbers until ready 2009-08-31 15:12:38 -05:00
Denis Kenzior d1ab58479d Simplify EFsdn reading code 2009-08-31 15:12:38 -05:00
Denis Kenzior a7202d8d83 Rename MNCLength to MobileNetworkCodeLength 2009-08-31 15:12:37 -05:00
Denis Kenzior 37deaa6651 Refactor sim mnc length 2009-08-31 15:12:37 -05:00
Denis Kenzior 526e1a6164 Style Fix 2009-08-31 15:12:37 -05:00
Denis Kenzior efdf84b62c Simplify nested ifs 2009-08-31 15:12:37 -05:00
Denis Kenzior a96fde1362 Simplify overly complicated code 2009-08-31 15:12:37 -05:00
Andrzej Zaborowski 7ecebc9a31 Expose service dialling numbers stored on SIM through SimManager. 2009-08-31 15:12:37 -05:00
Andrzej Zaborowski f21930f04e Decode and encode alpha-identifier fields
Add identifier argument to sim_adn_parse and sim_adn_build.

Also fix the number length passed to extract_bcd_number in sim_adn_parse.
2009-08-31 15:12:37 -05:00
Andrzej Zaborowski 6552bc668d Read EFad and expose the IMSI MNC length (2-3) 2009-08-31 15:12:37 -05:00
Denis Kenzior 9967c407fa Reformat comments a little 2009-08-30 15:32:08 -05:00
Andres Salomon 34b73ace78 driver callback naming
On Sun, 30 Aug 2009 13:45:45 -0500
Denis Kenzior <denkenz@gmail.com> wrote:

> Hi Andres,
>
> > static struct ofono_modem_driver g1_driver = {
> >         .name = "HTC G1",
> >         .probe = g1_probe,
> >         .enable = g1_enable,
> >         .disable = g1_disable,
> >         .remove = g1_remove,
> >         .populate = g1_populate,
> > };
> >
>
> So the current intention:
> .probe - Detect whether device is really supported by the plugin,
> initialize any data structures specific to the device
> .remove - Destroy data structures
> .enable - Perform power up
> .disable - Perform power down
> .populate - Populate the atoms supported by this device (e.g. netreg,
> voicecall, etc)  This is called by the core after every power cycle,
> when the device is brought up.
>

Thanks!  See patch below.

> >
> > Of course, I'm also wondering why there needs to be two separate
> > layers of calls in the first place.  Why not have drivers register
> > everything from within probe, call ofono_set_powered(modem, TRUE)
> > once the device is ready, and be done with it?
>
> The reason for this is e.g. airplane mode, where you physically want
> to turn off the device.  Another case is for battery / power reasons,
> e.g. a netbook with a USB modem that is not being used.
>

Fair enough.  In the kernel, we have callbacks named suspend/resume
to handle that.

> > The only reason why this doesn't blow up in the generic_at plugin is
> > because the driver_data is leaked.  If one were to free it from
> > generic_at_exit in the wrong place (since it's allocated from
> > generic_at_init, it would make sense to free it in generic_at_exit),
> > one would see the same SEGV/SIGBUS/SIGILL errors upon ctrl-c.
>
> So the leak has now been fixed.
>
> I think you're being unnecessarily harsh here.  To be fair, the
> generic_at driver does something like this at init:

My criticism is simply w/ the naming.  'enable'/'disable' doesn't imply
anything about power.  powerup/powerdown, poweron/poweroff,
suspend/resume would all imply power state changes (at least the latter
would be familiar to those who do kernel stuff).  Having comments that
describe what the callbacks do would also work, though.

>From 80a7b54d52201dfd7d8b590457450ae0a4f72888 Mon Sep 17 00:00:00 2001
From: Andres Salomon <dilinger@collabora.co.uk>
Date: Sun, 30 Aug 2009 15:56:16 -0400
Subject: [PATCH] Add comments to ofono_modem_driver struct

Document what all the callbacks do.
2009-08-30 15:29:59 -05:00
Denis Kenzior ecde57eeba Fix memory leak in generic_at driver 2009-08-30 13:29:44 -05:00
Denis Kenzior 45e03f4173 Add debug to modem_create 2009-08-30 13:29:44 -05:00
Denis Kenzior 96dc40b107 Make history drivers work again 2009-08-29 10:47:26 -05:00
Denis Kenzior 789610389e Fix a problem with CtrlZ echo
When a PDU is submitted and echoed by the modem, the CtrlZ character
is also echoed back.  Fix the parser to handle this case appropriately.
2009-08-29 10:47:16 -05:00
Rémi Denis-Courmont aef72327c2 gisi: return GPRS interface index/name 2009-08-28 15:20:27 +03:00
Aki Niemi 373665cdd0 gisi: Fix indication debugging 2009-08-25 18:26:24 +03:00
Aki Niemi 74782318bd Rename all files under drivers/isimodem/ 2009-08-25 14:04:42 +03:00
Aki Niemi 4148f82e4e Fix typo in technology name 2009-08-25 10:47:19 +03:00
Marcel Holtmann 70aab2a826 Convert to fully non-recursive build system 2009-08-24 23:49:40 -07:00
Marcel Holtmann 7d3d52009d Use script to generate list of builtin plugin symbols 2009-08-24 19:05:41 -07:00
Marcel Holtmann d9a2bb1337 Use proper variables for various commands 2009-08-24 18:51:39 -07:00
Aki Niemi 70440bcd0b Add straw-man for rest of ISI modem driver 2009-08-24 15:47:17 +03:00
Rémi Denis-Courmont 484af7eec2 Fix broken dependency on include/ofono/*.h files
The fact that the directory exists does not prove that (all of) the
header file symbolic links have been created. This is particularly
annoying when a new header file gets added.
2009-08-24 13:35:54 +03:00
Aki Niemi 03d4dad98d Fix build warning 2009-08-24 13:34:53 +03:00
Aki Niemi bc71ac101f Fix typos 2009-08-24 13:14:52 +03:00
Aki Niemi 5086088458 gisi: Fix warning in g_isi_subscribe()
Save the GIsiModem instance in GIsiClient, so that calling
g_isi_subscribe() doesn't throw a warning.
2009-08-23 23:19:03 +03:00
Aki Niemi 5562438c5c Fix memory leak in ISI phonebook driver 2009-08-23 23:16:46 +03:00
Aki Niemi 197cefbba5 gisi: Add debugging hooks 2009-08-22 18:01:24 +03:00
Aki Niemi 53e575bd5c Fix memory leak in isimodem.c 2009-08-22 18:00:58 +03:00