All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] isimodem: add some ss error enums
@ 2010-10-07 12:12 Pekka.Pessi
  2010-10-10 11:58 ` Denis Kenzior
  0 siblings, 1 reply; 3+ messages in thread
From: Pekka.Pessi @ 2010-10-07 12:12 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 drivers/isimodem/debug.c |   57 +++++++++++++++++++++++++++++++++++++++++++++-
 drivers/isimodem/debug.h |    2 +
 drivers/isimodem/ss.h    |   50 +++++++++++++++++++++++++++++++++++++++-
 3 files changed, 107 insertions(+), 2 deletions(-)

diff --git a/drivers/isimodem/debug.c b/drivers/isimodem/debug.c
index d226c51..6d41f3f 100644
--- a/drivers/isimodem/debug.c
+++ b/drivers/isimodem/debug.c
@@ -99,7 +99,62 @@ const char *ss_subblock_name(enum ss_subblock value)
 		_(SS_GSM_ADDITIONAL_INFO);
 		_(SS_GSM_USSD_STRING);
 	}
-	return "SS_<UNKNOWN>";
+	return "SS_<UNKNOWN>_SB";
+}
+
+const char *ss_gsm_error_name(enum ss_gsm_error value)
+{
+	switch (value) {
+	_(SS_GSM_UNKNOWN_SUBSCRIBER);
+	_(SS_GSM_ILLEGAL_SUBSCRIBER);
+	_(SS_GSM_BEARER_SERV_NOT_PROVISION);
+	_(SS_GSM_TELE_SERV_NOT_PROVISION);
+	_(SS_GSM_ILLEGAL_EQUIPMENT);
+	_(SS_GSM_CALL_BARRED);
+	_(SS_GSM_ILLEGEL_SS_OPERATION);
+	_(SS_GSM_SS_ERROR_STATUS);
+	_(SS_GSM_SS_NOT_AVAILABLE);
+	_(SS_GSM_SS_SUBSCRIPTION_VIOLATION);
+	_(SS_GSM_SS_INCOMPATIBILITY);
+	_(SS_GSM_FACILITY_NOT_SUPPORTED);
+	_(SS_GSM_ABSENT_SUBSCRIBER);
+	_(SS_GSM_SHORT_TERM_DENIAL);
+	_(SS_GSM_LONG_TERM_DENIAL);
+	_(SS_GSM_SYSTEM_FAILURE);
+	_(SS_GSM_DATA_MISSING);
+	_(SS_GSM_UNEXPECTED_DATA_VALUE);
+	_(SS_GSM_PASSWORD_REGIS_FAILURE);
+	_(SS_GSM_NEGATIVE_PASSWORD_CHECK);
+	_(SS_GSM_MAXNUM_OF_PW_ATT_VIOLATION);
+	_(SS_GSM_LCS_POSITION_METHOD_FAILURE);
+	_(SS_GSM_UNKNOWN_ALPHABET);
+	_(SS_GSM_USSD_BUSY);
+	_(SS_GSM_NBR_SB_EXCEEDED);
+	_(SS_GSM_MAXNUM_OF_MPTY_PART_EXCEED);
+	_(SS_GSM_RESOURCES_NOT_AVAILABLE);
+	}
+	return "SS_GSM_ERROR_<UNKNOWN>";
+}
+
+const char *ss_other_error_name(enum ss_other_error value)
+{
+	switch ((int)value) {
+		_(SS_SERVICE_BUSY);
+		_(SS_GSM_MM_RELEASE);
+		_(SS_GSM_DATA_ERROR);
+		_(SS_GSM_TIMER_EXPIRED);
+		_(SS_GSM_REQUEST_CANCELLED);
+		_(SS_GSM_INDICATE_DEVICE_PASSWORD);
+		_(SS_GSM_ACTIVATION_DATA_LOST);
+		_(SS_GSM_MM_ERROR);
+		_(SS_GSM_SERVICE_NOT_ON_FDN_LIST);
+		_(SS_SIMATKCC_REJECTED);
+		_(SS_SIMATKCC_MODIFIED);
+		_(SS_CS_INACTIVE);
+		_(SS_GSM_SS_NOT_AVAILABLE);
+		_(SS_GSM_USSD_BUSY);
+	}
+	return "SS_GSM_ERROR_<UNKNOWN>";
 }
 
 const char *mtc_isi_cause_name(enum mtc_isi_cause value)
diff --git a/drivers/isimodem/debug.h b/drivers/isimodem/debug.h
index f03f4ec..7cf74a7 100644
--- a/drivers/isimodem/debug.h
+++ b/drivers/isimodem/debug.h
@@ -35,6 +35,8 @@
 const char *ss_message_id_name(enum ss_message_id value);
 const char *ss_subblock_name(enum ss_subblock value);
 const char *ss_ussd_type_name(enum ss_ussd_type value);
+const char *ss_gsm_error_name(enum ss_gsm_error value);
+const char *ss_other_error_name(enum ss_other_error value);
 
 const char *mtc_isi_cause_name(enum mtc_isi_cause value);
 const char *mtc_message_id_name(enum mtc_message_id value);
diff --git a/drivers/isimodem/ss.h b/drivers/isimodem/ss.h
index 93554db..9c01a5c 100644
--- a/drivers/isimodem/ss.h
+++ b/drivers/isimodem/ss.h
@@ -117,11 +117,59 @@ enum ss_subblock {
 	SS_GSM_USSD_STRING =			0x32
 };
 
-enum ss_isi_cause {
+enum ss_gsm_status {
 	SS_GSM_ACTIVE =				0x01,
 	SS_GSM_REGISTERED =			0x02,
 	SS_GSM_PROVISIONED =			0x04,
 	SS_GSM_QUIESCENT =			0x08
 };
 
+/* Error codes defined in 29.002 */
+enum ss_gsm_error {
+	SS_GSM_UNKNOWN_SUBSCRIBER =		0x01,
+	SS_GSM_ILLEGAL_SUBSCRIBER =		0x09,
+	SS_GSM_BEARER_SERV_NOT_PROVISION =	0x0A,
+	SS_GSM_TELE_SERV_NOT_PROVISION =	0x0B,
+	SS_GSM_ILLEGAL_EQUIPMENT =		0x0C,
+	SS_GSM_CALL_BARRED =			0x0D,
+	SS_GSM_ILLEGEL_SS_OPERATION =		0x10,
+	SS_GSM_SS_ERROR_STATUS =		0x11,
+	SS_GSM_SS_NOT_AVAILABLE =		0x12,
+	SS_GSM_SS_SUBSCRIPTION_VIOLATION =	0x13,
+	SS_GSM_SS_INCOMPATIBILITY =		0x14,
+	SS_GSM_FACILITY_NOT_SUPPORTED =		0x15,
+	SS_GSM_ABSENT_SUBSCRIBER =		0x1B,
+	SS_GSM_SHORT_TERM_DENIAL =		0x1D,
+	SS_GSM_LONG_TERM_DENIAL =		0x1E,
+	SS_GSM_SYSTEM_FAILURE =			0x22,
+	SS_GSM_DATA_MISSING =			0x23,
+	SS_GSM_UNEXPECTED_DATA_VALUE =		0x24,
+	SS_GSM_PASSWORD_REGIS_FAILURE =		0x25,
+	SS_GSM_NEGATIVE_PASSWORD_CHECK =	0x26,
+	SS_GSM_MAXNUM_OF_PW_ATT_VIOLATION =	0x2B,
+	SS_GSM_LCS_POSITION_METHOD_FAILURE =	0x36,
+	SS_GSM_UNKNOWN_ALPHABET =		0x47,
+	SS_GSM_USSD_BUSY =			0x48,
+	SS_GSM_NBR_SB_EXCEEDED =		0x78,
+	SS_GSM_MAXNUM_OF_MPTY_PART_EXCEED =	0x7E,
+	SS_GSM_RESOURCES_NOT_AVAILABLE =	0x7F,
+};
+
+enum ss_other_error {
+	SS_SERVICE_BUSY =			0x00,
+	SS_GSM_MM_RELEASE =			0x01,
+	SS_GSM_DATA_ERROR =			0x02,
+	SS_GSM_TIMER_EXPIRED =			0x03,
+	SS_GSM_REQUEST_CANCELLED =		0x04,
+	SS_GSM_INDICATE_DEVICE_PASSWORD =	0x05,
+	SS_GSM_ACTIVATION_DATA_LOST =		0x09,
+	SS_GSM_MM_ERROR =			0x0B,
+	SS_GSM_SERVICE_NOT_ON_FDN_LIST =	0x0C,
+	SS_SIMATKCC_REJECTED =			0x0D,
+	SS_SIMATKCC_MODIFIED =			0x0E,
+	SS_CS_INACTIVE =			0x0F,
+	/* SS_GSM_SS_NOT_AVAILABLE =		0x12, */
+	/* SS_GSM_USSD_BUSY =			0x48, */
+};
+
 #endif /* __ISIMODEM_SS_H */
-- 
1.7.0.4


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

* Re: [PATCH] isimodem: add some ss error enums
  2010-10-07 12:12 [PATCH] isimodem: add some ss error enums Pekka.Pessi
@ 2010-10-10 11:58 ` Denis Kenzior
  2010-10-12 17:23   ` Pekka Pessi
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Kenzior @ 2010-10-10 11:58 UTC (permalink / raw)
  To: ofono

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

Hi Pekka,

> +const char *ss_gsm_error_name(enum ss_gsm_error value)
> +{
> +	switch (value) {
> +	_(SS_GSM_UNKNOWN_SUBSCRIBER);
> +	_(SS_GSM_ILLEGAL_SUBSCRIBER);
> +	_(SS_GSM_BEARER_SERV_NOT_PROVISION);

<snip>

> +
> +const char *ss_other_error_name(enum ss_other_error value)
> +{
> +	switch ((int)value) {
> +		_(SS_SERVICE_BUSY);
> +		_(SS_GSM_MM_RELEASE);
> +		_(SS_GSM_DATA_ERROR);

Can be consistent with switch/case indentation?

<snip>

> +enum ss_other_error {
> +	SS_SERVICE_BUSY =			0x00,
> +	SS_GSM_MM_RELEASE =			0x01,
> +	SS_GSM_DATA_ERROR =			0x02,
> +	SS_GSM_TIMER_EXPIRED =			0x03,
> +	SS_GSM_REQUEST_CANCELLED =		0x04,
> +	SS_GSM_INDICATE_DEVICE_PASSWORD =	0x05,
> +	SS_GSM_ACTIVATION_DATA_LOST =		0x09,
> +	SS_GSM_MM_ERROR =			0x0B,
> +	SS_GSM_SERVICE_NOT_ON_FDN_LIST =	0x0C,
> +	SS_SIMATKCC_REJECTED =			0x0D,
> +	SS_SIMATKCC_MODIFIED =			0x0E,
> +	SS_CS_INACTIVE =			0x0F,
> +	/* SS_GSM_SS_NOT_AVAILABLE =		0x12, */
> +	/* SS_GSM_USSD_BUSY =			0x48, */

Why are these commented out?

> +};
> +
>  #endif /* __ISIMODEM_SS_H */

Regards,
-Denis

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

* Re: [PATCH] isimodem: add some ss error enums
  2010-10-10 11:58 ` Denis Kenzior
@ 2010-10-12 17:23   ` Pekka Pessi
  0 siblings, 0 replies; 3+ messages in thread
From: Pekka Pessi @ 2010-10-12 17:23 UTC (permalink / raw)
  To: ofono

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

Hi Denis,

2010/10/10 Denis Kenzior <denkenz@gmail.com>:
>> +enum ss_other_error {
>> +     SS_SERVICE_BUSY =                       0x00,
>> +     SS_GSM_MM_RELEASE =                     0x01,
>> +     SS_GSM_DATA_ERROR =                     0x02,
>> +     SS_GSM_TIMER_EXPIRED =                  0x03,
>> +     SS_GSM_REQUEST_CANCELLED =              0x04,
>> +     SS_GSM_INDICATE_DEVICE_PASSWORD =       0x05,
>> +     SS_GSM_ACTIVATION_DATA_LOST =           0x09,
>> +     SS_GSM_MM_ERROR =                       0x0B,
>> +     SS_GSM_SERVICE_NOT_ON_FDN_LIST =        0x0C,
>> +     SS_SIMATKCC_REJECTED =                  0x0D,
>> +     SS_SIMATKCC_MODIFIED =                  0x0E,
>> +     SS_CS_INACTIVE =                        0x0F,
>> +     /* SS_GSM_SS_NOT_AVAILABLE =            0x12, */
>> +     /* SS_GSM_USSD_BUSY =                   0x48, */
>
> Why are these commented out?

The isimodem supplementary service API designer have decided to save a
couple of code points and reused the MAP error enums in as error codes
generated internally.

I'll check the indenting, add a comment clarifying the comments and resubmit.

-- 
Pekka.Pessi mail at nokia.com

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

end of thread, other threads:[~2010-10-12 17:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07 12:12 [PATCH] isimodem: add some ss error enums Pekka.Pessi
2010-10-10 11:58 ` Denis Kenzior
2010-10-12 17:23   ` Pekka Pessi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.