diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2010-04-09 08:50:52 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-15 16:49:43 -0500 |
commit | 14bcca32c0d2d28741a101a42d72af40d2e430ba (patch) | |
tree | f09c281e8dfd1ff66003d54bf0b1d30b20e4544b /plugins | |
parent | f1b61640f7c4b4e9d25b74c66a70810b19842c59 (diff) | |
download | ofono-14bcca32c0d2d28741a101a42d72af40d2e430ba.tar.bz2 |
Implement STATUS polling in atmodem driver.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/atgen.c | 8 | ||||
-rw-r--r-- | plugins/phonesim.c | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/plugins/atgen.c b/plugins/atgen.c index 262d32fa..4a0e315b 100644 --- a/plugins/atgen.c +++ b/plugins/atgen.c @@ -49,6 +49,8 @@ #include <ofono/ussd.h> #include <ofono/voicecall.h> +#include <drivers/atmodem/sim-poll.h> + static const char *tty_opts[] = { "Baud", "Read", @@ -157,17 +159,15 @@ static int atgen_disable(struct ofono_modem *modem) static void atgen_pre_sim(struct ofono_modem *modem) { GAtChat *chat = ofono_modem_get_data(modem); - struct ofono_sim *sim; DBG("%p", modem); ofono_devinfo_create(modem, 0, "atmodem", chat); - sim = ofono_sim_create(modem, 0, "atmodem", chat); + ofono_sim_create(modem, 0, "atmodem", chat); ofono_voicecall_create(modem, 0, "atmodem", chat); ofono_stk_create(modem, 0, "atmodem", chat); - if (sim) - ofono_sim_inserted_notify(sim, TRUE); + ofono_atmodem_poll_enable(modem, chat); } static void atgen_post_sim(struct ofono_modem *modem) diff --git a/plugins/phonesim.c b/plugins/phonesim.c index 9153e1b8..5685820e 100644 --- a/plugins/phonesim.c +++ b/plugins/phonesim.c @@ -59,6 +59,7 @@ #include <ofono/gprs-context.h> #include <drivers/atmodem/vendor.h> +#include <drivers/atmodem/sim-poll.h> struct phonesim_data { GAtMux *mux; @@ -292,7 +293,9 @@ static void phonesim_pre_sim(struct ofono_modem *modem) ofono_stk_create(modem, 0, "atmodem", data->chat); - if (sim) + if (!data->calypso) + ofono_atmodem_poll_enable(modem, data->chat); + else if (sim) ofono_sim_inserted_notify(sim, TRUE); } |