Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH 3/3] Add SMS support for Palm Pre with a vendor quirk
@ 2009-11-10  6:30 Andrzej Zaborowski
  2009-11-10  8:17 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Andrzej Zaborowski @ 2009-11-10  6:30 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

---
 drivers/atmodem/sms.c |    7 ++++---
 plugins/palmpre.c     |    2 ++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c
index b3d6ff5..20ab47a 100644
--- a/drivers/atmodem/sms.c
+++ b/drivers/atmodem/sms.c
@@ -680,9 +680,10 @@ static gboolean build_cnmi_string(char *buf, int *cnmi_opts,
 	const char *mode;
 	int len = sprintf(buf, "AT+CNMI=");
 
-	if (data->vendor == OFONO_VENDOR_HTC_G1)
-		/* The G1 advertises support for mode 2, but returns an error
-		 * if we attempt to actually use it. */
+	if (data->vendor == OFONO_VENDOR_HTC_G1 ||
+			data->vendor == OFONO_VENDOR_MSM)
+		/* These devices advertise support for mode 2, but return
+		 * an error if we attempt to actually use it. */
 		mode = "1";
 	else
 		/* Sounds like 2 is the sanest mode */
diff --git a/plugins/palmpre.c b/plugins/palmpre.c
index 37cb7b6..12add93 100644
--- a/plugins/palmpre.c
+++ b/plugins/palmpre.c
@@ -42,6 +42,7 @@
 #include <ofono/voicecall.h>
 #include <ofono/gprs.h>
 #include <ofono/gprs-context.h>
+#include <ofono/sms.h>
 
 #include <drivers/atmodem/vendor.h>
 
@@ -182,6 +183,7 @@ static void palmpre_post_sim(struct ofono_modem *modem)
 	DBG("%p", modem);
 
 	ofono_netreg_create(modem, 0, "atmodem", data->chat);
+	ofono_sms_create(modem, OFONO_VENDOR_MSM, "atmodem", data->chat);
 	ofono_phonebook_create(modem, 0, "atmodem", data->chat);
 
 	gprs = ofono_gprs_create(modem, 0, "atmodem", data->chat);
-- 
1.6.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-10  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-10  6:30 [PATCH 3/3] Add SMS support for Palm Pre with a vendor quirk Andrzej Zaborowski
2009-11-10  8:17 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox