Skip to contentSkip to conversation

isimodem: parse extra details from REG_STATUS_IND

PATCH In review Sicelo A. Mhlongo 2 participants 2 messages Nov 25, 2023 – Nov 29, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 isimodem: parse extra details from REG_STATUS_IND

Extract additional operator information available in REG_STATUS_IND messages. These include mnc, mnc, and different variations of operator name.

Additionally, in case NET_OPER_NAME_READ_RESP is an error result, which happens with some operators, report the extracted information to core instead.
---
Changes in v2:
- use l_strlcpy in place of strncpy
- replace early return statements with break in reg_status_ind_cb
- check abbrev, fn, and an for NULL
- add alt_method label for alternative operator name method in order to resolve compilation issue involving nested ifs

---
 drivers/isimodem/debug.c                |  1 +
 drivers/isimodem/network-registration.c | 78 ++++++++++++++++++++++++-
 drivers/isimodem/network.h              |  1 +
 3 files changed, 77 insertions(+), 3 deletions(-)
drivers/isimodem/debug.c +1 -0
index 18055791..8edcd972 100644
@@ -1190,6 +1190,7 @@ const char *net_subblock_name(enum net_subblock value)
 		_(NET_REGISTRATION_CONF1_INFO);
 		_(NET_ROAMING_CONF1_INFO);
 		_(NET_AVAIL_NETWORK_INFO_COMMON);
+		_(NET_REG_STATUS_IND_OPER_NAME);
 		_(NET_OPER_NAME_INFO);
 	}
 	return "NET_<UNKNOWN>";
drivers/isimodem/network-registration.c +75 -3

132 lines not on this page · raw message

drivers/isimodem/network.h +1 -0
index 7449a1d0..3282b383 100644
@@ -90,6 +90,7 @@ enum net_subblock {
 	NET_REGISTRATION_CONF1_INFO =			0x59,
 	NET_ROAMING_CONF1_INFO =			0x5A,
 	NET_AVAIL_NETWORK_INFO_COMMON =			0xE1,
+	NET_REG_STATUS_IND_OPER_NAME =                  0xE3,
 	NET_OPER_NAME_INFO =				0xE7,
 };
 
Signature · 1 line
2.42.0
#1 lore raw

Hi Sicelo,

Quoted 12 lines · Sicelo A. Mhlongo

Extract additional operator information available in REG_STATUS_IND messages. These include mnc, mnc, and different variations of operator name.

Additionally, in case NET_OPER_NAME_READ_RESP is an error result, which happens with some operators, report the extracted information to core instead.
---
Changes in v2:
- use l_strlcpy in place of strncpy
- replace early return statements with break in reg_status_ind_cb
- check abbrev, fn, and an for NULL
- add alt_method label for alternative operator name method in order to resolve compilation issue involving nested ifs

Quoted 6 lines
---
  drivers/isimodem/debug.c                |  1 +
  drivers/isimodem/network-registration.c | 78 ++++++++++++++++++++++++-
  drivers/isimodem/network.h              |  1 +
  3 files changed, 77 insertions(+), 3 deletions(-)

I re-flowed the commit description a bit just to make it look nicer in git log. Applied, thanks.

Regards,
-Denis