Implement STATUS polling in atmodem driver.
PATCH 8/8 Implement STATUS polling in atmodem driver.
--- Makefile.am | 2 + drivers/atmodem/sim-poll.c | 319 ++++++++++++++++++++++++++++++++++++++++++++ drivers/atmodem/sim-poll.h | 22 +++ plugins/atgen.c | 8 +- plugins/phonesim.c | 5 +- 5 files changed, 350 insertions(+), 5 deletions(-) create mode 100644 drivers/atmodem/sim-poll.c create mode 100644 drivers/atmodem/sim-poll.h
Makefile.am +2 -0
@@ -125,6 +125,8 @@ builtin_sources += $(gatchat_sources) \ drivers/atmodem/network-registration.c \ drivers/atmodem/sim.c \ drivers/atmodem/stk.c \ + drivers/atmodem/sim-poll.c \ + drivers/atmodem/sim-poll.h \ drivers/atmodem/ussd.c \ drivers/atmodem/voicecall.c \ drivers/atmodem/call-barring.c \
drivers/atmodem/sim-poll.c new file +319 -0
319 lines not on this page · raw message
drivers/atmodem/sim-poll.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* +* oFono - Open Source Telephony +* +* Copyright (C) 2008-2010 Intel Corporation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +* +*/ + +void ofono_atmodem_poll_enable (struct ofono_modem *modem,GAtChat *chat);
plugins/atgen.c +4 -4
@@ -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)
plugins/phonesim.c +4 -1
@@ -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); }
Signature · 1 line
1.6.1
Hi Andrew,
Quoted 4 lines
--- Makefile.am | 2 + drivers/atmodem/sim-poll.c | 319++++++++++++++++++++++++++++++++++++++++++++
drivers/atmodem/sim-poll.h
|
Quoted 6 lines
22 +++
plugins/atgen.c | 8 +- plugins/phonesim.c | 5 +- 5 files changed, 350 insertions(+), 5 deletions(-) create mode 100644 drivers/atmodem/sim-poll.c create mode 100644 drivers/atmodem/sim-poll.h
This patch has now been applied. Thanks.
Regards,
-Denis