Add SMS support for Palm Pre with a vendor quirk
PATCH 3/3 Add SMS support for Palm Pre with a vendor quirk
--- drivers/atmodem/sms.c | 7 ++++--- plugins/palmpre.c | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-)
drivers/atmodem/sms.c +4 -3
@@ -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 */
plugins/palmpre.c +2 -0
@@ -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);
Signature · 1 line
1.6.1
Hi Andrzej,
Quoted 35 lines
drivers/atmodem/sms.c | 7 ++++--- plugins/palmpre.c | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-)drivers/atmodem/sms.c +4
-3@@ -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 */ plugins/palmpre.c +1
-0@@ -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>
plugins/palmpre.c static void palmpre_post_sim(struct ofono_modem *modem) · line 186
Quoted 4 lines
plugins/palmpre.c +1
-0@@ -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);
just use OFONO_VENDOR_HTC_G1 here. There is no point in using a quirk name twice. And yes, at some point we find better names for it, but right now we need more data and the brokeness of modems to worry too much.
Regards
Marcel