Skip to contentSkip to conversation

atmodem/sms: added Gemalto vendor for CNMI command

PATCH Applied Giacinto Cifelli 3 participants 5 messages Oct 23, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atmodem/sms: added Gemalto vendor for CNMI command

---
 drivers/atmodem/sms.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/atmodem/sms.c +11 -1
index 7638885e..380cd763 100644
@@ -858,8 +858,18 @@ static gboolean build_cnmi_string(char *buf, int *cnmi_opts,
 					data->cnma_enabled ? "21" : "1", FALSE))
 		return FALSE;
 
+	switch (data->vendor) {
+	case OFONO_VENDOR_GEMALTO:
+		mode = "0";
+		break;
+	default:
+		/* Sounds like 2 is the sanest mode */
+		mode = "20";
+		break;
+	}
+
 	/* Always deliver CB via +CBM, otherwise don't deliver at all */
-	if (!append_cnmi_element(buf, &len, cnmi_opts[2], "20", FALSE))
+	if (!append_cnmi_element(buf, &len, cnmi_opts[2], mode, FALSE))
 		return FALSE;
 
 	/*
Signature · 1 line
2.17.1
#1 lore raw

Hi,

Quoted 9 lines · Giacinto Cifelli
---
  drivers/atmodem/sms.c | 12 +++++++++++-
  1 file changed, 11 insertions(+), 1 deletion(-)
drivers/atmodem/sms.c +0 -0
index 7638885e..380cd763 100644

drivers/atmodem/sms.c static gboolean build_cnmi_string(char *buf, int *cnmi_opts, · line 866

Quoted 9 lines
drivers/atmodem/sms.c +6 -0
@@ -858,8 +858,18 @@ static gboolean build_cnmi_string(char *buf, int *cnmi_opts,
  					data->cnma_enabled ? "21" : "1", FALSE))
  		return FALSE;
 
+	switch (data->vendor) {
+	case OFONO_VENDOR_GEMALTO:
+		mode = "0";
+		break;
+	default:
+		/* Sounds like 2 is the sanest mode */

This particular comment doesn't add anything useful so just drop it.

/Jonas

Quoted 11 lines
drivers/atmodem/sms.c +5 -1
+		mode = "20";
+		break;
+	}
+
  	/* Always deliver CB via +CBM, otherwise don't deliver at all */
-	if (!append_cnmi_element(buf, &len, cnmi_opts[2], "20", FALSE))
+	if (!append_cnmi_element(buf, &len, cnmi_opts[2], mode, FALSE))
  		return FALSE;
 
  	/*
#2 lore raw

Hi,

Quoted 16 lines · Jonas Bonn

Hi,

Quoted 12 lines · Giacinto Cifelli
---
  drivers/atmodem/sms.c | 12 +++++++++++-
  1 file changed, 11 insertions(+), 1 deletion(-)
drivers/atmodem/sms.c +0 -0
index 7638885e..380cd763 100644
@@ -858,8 +858,18 @@ static gboolean build_cnmi_string(char *buf, int *cnmi_opts,
                                      data->cnma_enabled ? "21" : "1", FALSE))
              return FALSE;
 
Quoted 8 lines

drivers/atmodem/sms.c static gboolean build_cnmi_string(char *buf, int *cnmi_opts, · line 866

Quoted 6 lines
drivers/atmodem/sms.c +6 -0
+     switch (data->vendor) {
+     case OFONO_VENDOR_GEMALTO:
+             mode = "0";
+             break;
+     default:
+             /* Sounds like 2 is the sanest mode */

This particular comment doesn't add anything useful so just drop it.

Not mine... I didn't want my patch rejected because I changed 2 things at the same time (add vendor and remove comment).
From the choice of word (sane), I think this comment is from Denis. without even checking with git blame.

Quoted 2 lines

/Jonas

Giacinto

#3 lore raw
Quoted 7 lines · Giacinto Cifelli

Hi,

On Tue, Oct 23, 2018 at 10:29 AM Jonas Bonn <[email protected]> wrote:
+ break;

Quoted 3 lines
Quoted 2 lines
drivers/atmodem/sms.c +2 -0
+     default:
+             /* Sounds like 2 is the sanest mode */
Quoted 6 lines
Quoted 1 line

This particular comment doesn't add anything useful so just drop it.

Not mine... I didn't want my patch rejected because I changed 2 things at the same time (add vendor and remove comment).
From the choice of word (sane), I think this comment is from Denis.
without even checking with git blame.

:)

/Jonas

#4 lore raw
In reply to Giacinto Cifelli

Hi Giacinto,

Quoted 4 lines · Giacinto Cifelli
---
  drivers/atmodem/sms.c | 12 +++++++++++-
  1 file changed, 11 insertions(+), 1 deletion(-)

Applied, thanks.

Regards,
-denis