Skip to contentSkip to conversation

Speedup ussd driver

PATCH In review Nicolas Bertrand 3 participants 7 messages Apr 16, 2012 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Speedup ussd driver

Speedup is using its own way to handle USSD strings, so the implementation of this driver avoid some specific code in atmodem.

Nicolas Bertrand (3):
Speedup: Add speedup driver to handle USSD
Speedup: Use speedup specific driver for ussd
Makefile: Add speedup modem target

 Makefile.am                         |    6 +
 drivers/speedupmodem/speedupmodem.c |   49 ++++++++
 drivers/speedupmodem/speedupmodem.h |   25 ++++
 drivers/speedupmodem/ussd.c         |  225 +++++++++++++++++++++++++++++++++++
 plugins/speedup.c                   |    4 +-
 5 files changed, 307 insertions(+), 2 deletions(-)
 create mode 100644 drivers/speedupmodem/speedupmodem.c
 create mode 100644 drivers/speedupmodem/speedupmodem.h
 create mode 100644 drivers/speedupmodem/ussd.c
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/3 Speedup: Add speedup driver to handle USSD

---
 drivers/speedupmodem/speedupmodem.c |   49 ++++++++
 drivers/speedupmodem/speedupmodem.h |   25 ++++
 drivers/speedupmodem/ussd.c         |  224 +++++++++++++++++++++++++++++++++++
 3 files changed, 298 insertions(+), 0 deletions(-)
 create mode 100644 drivers/speedupmodem/speedupmodem.c
 create mode 100644 drivers/speedupmodem/speedupmodem.h
 create mode 100644 drivers/speedupmodem/ussd.c
drivers/speedupmodem/speedupmodem.c new file +49 -0
new file mode 100644
index 0000000..d31c324
@@ -0,0 +1,49 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2008-2012  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
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <gatchat.h>
+
+#define OFONO_API_SUBJECT_TO_CHANGE
+#include <ofono/plugin.h>
+#include <ofono/types.h>
+
+#include "speedupmodem.h"
+
+static int speedupmodem_init(void)
+{
+	speedup_ussd_init();
+
+	return 0;
+}
+
+static void speedupmodem_exit(void)
+{
+	speedup_ussd_exit();
+}
+
+OFONO_PLUGIN_DEFINE(speedupmodem, "SpeedUp modem driver", VERSION,
+			OFONO_PLUGIN_PRIORITY_DEFAULT,
+			speedupmodem_init, speedupmodem_exit)
drivers/speedupmodem/speedupmodem.h new file +25 -0
new file mode 100644
index 0000000..38ad013
@@ -0,0 +1,25 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2008-2011  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
+ *
+ */
+
+#include <drivers/atmodem/atutil.h>
+
+extern void speedup_ussd_init(void);
+extern void speedup_ussd_exit(void);
drivers/speedupmodem/ussd.c new file +224 -0

224 lines not on this page · raw message

Signature · 1 line
1.7.5.4
#2 lore raw

Re: [PATCH 1/3] Speedup: Add speedup driver to handle USSD

Hi Nicolas,

Quoted 9 lines · Nicolas Bertrand
---
 drivers/speedupmodem/speedupmodem.c |   49 ++++++++
 drivers/speedupmodem/speedupmodem.h |   25 ++++
 drivers/speedupmodem/ussd.c         |  224 +++++++++++++++++++++++++++++++++++
 3 files changed, 298 insertions(+), 0 deletions(-)
 create mode 100644 drivers/speedupmodem/speedupmodem.c
 create mode 100644 drivers/speedupmodem/speedupmodem.h
 create mode 100644 drivers/speedupmodem/ussd.c

Patch has been applied, thanks. I made a few tiny fixes afterwards.

Regards,
-Denis

#3 lore raw

PATCH 2/3 Speedup: Use speedup specific driver for ussd

In reply to Nicolas Bertrand
---
 plugins/speedup.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
plugins/speedup.c +3 -3
index ca6ed13..8b95286 100644
@@ -2,7 +2,7 @@
  *
  *  oFono - Open Source Telephony
  *
- *  Copyright (C) 2008-2011  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2008-2012  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
@@ -282,8 +282,8 @@ static void speedup_post_online(struct ofono_modem *modem)
 
 	ofono_cbs_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
 						"atmodem", data->aux);
-	ofono_ussd_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
-						"atmodem", data->aux);
+	ofono_ussd_create(modem, OFONO_VENDOR_SPEEDUP,
+						"speedupmodem", data->aux);
 }
 
 static struct ofono_modem_driver speedup_driver = {
Signature · 1 line
1.7.5.4
#4 lore raw

Re: [PATCH 2/3] Speedup: Use speedup specific driver for ussd

Hi Nicolas,

Quoted 17 lines
 plugins/speedup.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
plugins/speedup.c +1 -1
index ca6ed13..8b95286 100644
@@ -2,7 +2,7 @@
  *
  *  oFono - Open Source Telephony
  *
- *  Copyright (C) 2008-2011  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2008-2012  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

plugins/speedup.c static void speedup_post_online(struct ofono_modem *modem) · line 286

Quoted 7 lines
plugins/speedup.c +2 -2
@@ -282,8 +282,8 @@ static void speedup_post_online(struct ofono_modem *modem)
 
 	ofono_cbs_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
 						"atmodem", data->aux);
-	ofono_ussd_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
-						"atmodem", data->aux);
+	ofono_ussd_create(modem, OFONO_VENDOR_SPEEDUP,
+						"speedupmodem", data->aux);

you do not need both here. Either "speedupmodem" or OFONO_VENDOR_SPEEDUP quirk.

Regards

Marcel

#5 lore raw

PATCH 3/3 Makefile: Add speedup modem target

In reply to Nicolas Bertrand
---
 Makefile.am |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
Makefile.am +6 -0
index a28198b..b80f501 100644
@@ -272,6 +272,12 @@ builtin_sources += drivers/atmodem/atutil.h \
 			drivers/hfpmodem/devinfo.c \
 			drivers/hfpmodem/handsfree.c
 
+builtin_modules += speedupmodem
+builtin_sources += drivers/atmodem/atutil.h \
+			drivers/speedupmodem/speedupmodem.h \
+			drivers/speedupmodem/speedupmodem.c \
+			drivers/speedupmodem/ussd.c
+
 if PHONESIM
 builtin_modules += phonesim
 builtin_sources += plugins/phonesim.c
Signature · 1 line
1.7.5.4
#6 lore raw

Re: [PATCH 3/3] Makefile: Add speedup modem target

Hi Nicolas,

Quoted 3 lines · Nicolas Bertrand
---
 Makefile.am |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis