* [PATCH 1/1] isimodem: fix operator name reading with old ISI modems
[not found] <[PATCH 0/1] fix operator name reading with old ISI modems>
@ 2011-03-29 7:54 ` Mika Liljeberg
2011-03-30 3:27 ` Denis Kenzior
0 siblings, 1 reply; 5+ messages in thread
From: Mika Liljeberg @ 2011-03-29 7:54 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2461 bytes --]
---
drivers/isimodem/debug.c | 2 ++
drivers/isimodem/network-registration.c | 8 ++++++--
drivers/isimodem/network.h | 2 ++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/isimodem/debug.c b/drivers/isimodem/debug.c
index 6fb451f..b48dd95 100644
--- a/drivers/isimodem/debug.c
+++ b/drivers/isimodem/debug.c
@@ -1035,6 +1035,8 @@ const char *net_message_id_name(enum net_message_id value)
_(NET_AVAILABLE_GET_RESP);
_(NET_OPER_NAME_READ_REQ);
_(NET_OPER_NAME_READ_RESP);
+ _(NET_OLD_OPER_NAME_READ_REQ);
+ _(NET_OLD_OPER_NAME_READ_RESP);
_(NET_COMMON_MESSAGE);
}
return "NET_<UNKNOWN>";
diff --git a/drivers/isimodem/network-registration.c b/drivers/isimodem/network-registration.c
index 8bf2423..f8a91ec 100644
--- a/drivers/isimodem/network-registration.c
+++ b/drivers/isimodem/network-registration.c
@@ -466,7 +466,8 @@ static void name_get_resp_cb(const GIsiMessage *msg, void *data)
memset(&op, 0, sizeof(struct ofono_network_operator));
- if (!check_response_status(msg, NET_OPER_NAME_READ_RESP))
+ if (!check_response_status(msg, NET_OPER_NAME_READ_RESP) &&
+ !check_response_status(msg, NET_OLD_OPER_NAME_READ_RESP))
goto error;
for (g_isi_sb_iter_init(&iter, msg, 6);
@@ -513,7 +514,7 @@ static void isi_current_operator(struct ofono_netreg *netreg,
struct netreg_data *nd = ofono_netreg_get_data(netreg);
struct isi_cb_data *cbd = isi_cb_data_new(netreg, cb, data);
- const uint8_t msg[] = {
+ uint8_t msg[] = {
NET_OPER_NAME_READ_REQ,
NET_HARDCODED_LATIN_OPER_NAME,
OFONO_MAX_OPERATOR_NAME_LENGTH,
@@ -525,6 +526,9 @@ static void isi_current_operator(struct ofono_netreg *netreg,
if (cbd == NULL || nd == NULL)
goto error;
+ if (nd->version.major < 14)
+ msg[0] = NET_OLD_OPER_NAME_READ_REQ;
+
if (g_isi_client_send(nd->client, msg, sizeof(msg), name_get_resp_cb,
cbd, g_free))
return;
diff --git a/drivers/isimodem/network.h b/drivers/isimodem/network.h
index ee1fbf2..57c92ac 100644
--- a/drivers/isimodem/network.h
+++ b/drivers/isimodem/network.h
@@ -45,6 +45,8 @@ enum net_message_id {
NET_RSSI_IND = 0x1E,
NET_CIPHERING_IND = 0x20,
NET_TIME_IND = 0x27,
+ NET_OLD_OPER_NAME_READ_REQ = 0x28,
+ NET_OLD_OPER_NAME_READ_RESP = 0x29,
NET_CHANNEL_INFO_IND = 0x2C,
NET_RAT_IND = 0x35,
NET_RAT_REQ = 0x36,
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] isimodem: fix operator name reading with old ISI modems
2011-03-29 7:54 ` Mika Liljeberg
@ 2011-03-30 3:27 ` Denis Kenzior
0 siblings, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2011-03-30 3:27 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 484 bytes --]
Hi Mika,
> @@ -466,7 +466,8 @@ static void name_get_resp_cb(const GIsiMessage *msg, void *data)
>
> memset(&op, 0, sizeof(struct ofono_network_operator));
>
> - if (!check_response_status(msg, NET_OPER_NAME_READ_RESP))
> + if (!check_response_status(msg, NET_OPER_NAME_READ_RESP) &&
> + !check_response_status(msg, NET_OLD_OPER_NAME_READ_RESP))
doc/coding-style.txt item M4
> goto error;
>
> for (g_isi_sb_iter_init(&iter, msg, 6);
Regards,
-Denis
^ permalink raw reply [flat|nested] 5+ messages in thread
* [TAKE 2] isimodem: fix operator name reading with old ISI modems
@ 2011-03-31 8:35 Mika Liljeberg
2011-03-31 8:35 ` [PATCH 1/1] " Mika Liljeberg
0 siblings, 1 reply; 5+ messages in thread
From: Mika Liljeberg @ 2011-03-31 8:35 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 115 bytes --]
Hi,
Coding style fixed.
MikaL
[PATCH 1/1] isimodem: fix operator name reading with old ISI modems
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] isimodem: fix operator name reading with old ISI modems
2011-03-31 8:35 [TAKE 2] isimodem: fix operator name reading with old ISI modems Mika Liljeberg
@ 2011-03-31 8:35 ` Mika Liljeberg
2011-03-31 15:27 ` Denis Kenzior
0 siblings, 1 reply; 5+ messages in thread
From: Mika Liljeberg @ 2011-03-31 8:35 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2462 bytes --]
---
drivers/isimodem/debug.c | 2 ++
drivers/isimodem/network-registration.c | 8 ++++++--
drivers/isimodem/network.h | 2 ++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/isimodem/debug.c b/drivers/isimodem/debug.c
index 6fb451f..b48dd95 100644
--- a/drivers/isimodem/debug.c
+++ b/drivers/isimodem/debug.c
@@ -1035,6 +1035,8 @@ const char *net_message_id_name(enum net_message_id value)
_(NET_AVAILABLE_GET_RESP);
_(NET_OPER_NAME_READ_REQ);
_(NET_OPER_NAME_READ_RESP);
+ _(NET_OLD_OPER_NAME_READ_REQ);
+ _(NET_OLD_OPER_NAME_READ_RESP);
_(NET_COMMON_MESSAGE);
}
return "NET_<UNKNOWN>";
diff --git a/drivers/isimodem/network-registration.c b/drivers/isimodem/network-registration.c
index 8bf2423..78e55ed 100644
--- a/drivers/isimodem/network-registration.c
+++ b/drivers/isimodem/network-registration.c
@@ -466,7 +466,8 @@ static void name_get_resp_cb(const GIsiMessage *msg, void *data)
memset(&op, 0, sizeof(struct ofono_network_operator));
- if (!check_response_status(msg, NET_OPER_NAME_READ_RESP))
+ if (!check_response_status(msg, NET_OLD_OPER_NAME_READ_RESP) &&
+ !check_response_status(msg, NET_OPER_NAME_READ_RESP))
goto error;
for (g_isi_sb_iter_init(&iter, msg, 6);
@@ -513,7 +514,7 @@ static void isi_current_operator(struct ofono_netreg *netreg,
struct netreg_data *nd = ofono_netreg_get_data(netreg);
struct isi_cb_data *cbd = isi_cb_data_new(netreg, cb, data);
- const uint8_t msg[] = {
+ uint8_t msg[] = {
NET_OPER_NAME_READ_REQ,
NET_HARDCODED_LATIN_OPER_NAME,
OFONO_MAX_OPERATOR_NAME_LENGTH,
@@ -525,6 +526,9 @@ static void isi_current_operator(struct ofono_netreg *netreg,
if (cbd == NULL || nd == NULL)
goto error;
+ if (nd->version.major < 14)
+ msg[0] = NET_OLD_OPER_NAME_READ_REQ;
+
if (g_isi_client_send(nd->client, msg, sizeof(msg), name_get_resp_cb,
cbd, g_free))
return;
diff --git a/drivers/isimodem/network.h b/drivers/isimodem/network.h
index ee1fbf2..57c92ac 100644
--- a/drivers/isimodem/network.h
+++ b/drivers/isimodem/network.h
@@ -45,6 +45,8 @@ enum net_message_id {
NET_RSSI_IND = 0x1E,
NET_CIPHERING_IND = 0x20,
NET_TIME_IND = 0x27,
+ NET_OLD_OPER_NAME_READ_REQ = 0x28,
+ NET_OLD_OPER_NAME_READ_RESP = 0x29,
NET_CHANNEL_INFO_IND = 0x2C,
NET_RAT_IND = 0x35,
NET_RAT_REQ = 0x36,
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] isimodem: fix operator name reading with old ISI modems
2011-03-31 8:35 ` [PATCH 1/1] " Mika Liljeberg
@ 2011-03-31 15:27 ` Denis Kenzior
0 siblings, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2011-03-31 15:27 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 347 bytes --]
Hi Mika,
On 03/31/2011 03:35 AM, Mika Liljeberg wrote:
> ---
> drivers/isimodem/debug.c | 2 ++
> drivers/isimodem/network-registration.c | 8 ++++++--
> drivers/isimodem/network.h | 2 ++
> 3 files changed, 10 insertions(+), 2 deletions(-)
>
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-31 15:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-31 8:35 [TAKE 2] isimodem: fix operator name reading with old ISI modems Mika Liljeberg
2011-03-31 8:35 ` [PATCH 1/1] " Mika Liljeberg
2011-03-31 15:27 ` Denis Kenzior
[not found] <[PATCH 0/1] fix operator name reading with old ISI modems>
2011-03-29 7:54 ` Mika Liljeberg
2011-03-30 3:27 ` Denis Kenzior
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.