diff mbox series

atmodem: let +COPS: report access technology for SIMCom

Message ID 20241018072737.1343332-1-sean@geanix.com (mailing list archive)
State Accepted, archived
Headers show
Series atmodem: let +COPS: report access technology for SIMCom | expand

Commit Message

Sean Nyekjaer Oct. 18, 2024, 7:27 a.m. UTC
When using the SIMCom A7672E-FASE in gsm mode, gsm is never reported as
access technology.
SIMCom modems is showing the current technology via +COPS.
---
 drivers/atmodem/network-registration.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Denis Kenzior Oct. 24, 2024, 2:23 p.m. UTC | #1
Hi Sean,

On 10/18/24 2:27 AM, Sean Nyekjaer wrote:
> When using the SIMCom A7672E-FASE in gsm mode, gsm is never reported as
> access technology.
> SIMCom modems is showing the current technology via +COPS.
> ---
>   drivers/atmodem/network-registration.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
> index 46b8512a..c841bbf7 100644
> --- a/drivers/atmodem/network-registration.c
> +++ b/drivers/atmodem/network-registration.c
> @@ -353,6 +353,11 @@ static void cops_cb(gboolean ok, GAtResult *result, gpointer user_data)
>   	op.status = 2;
>   	op.tech = tech;
>   
> +	/* SIMCom modems shows the current tech via the +COPS
> +	 * not like other modems where it's shown via +CREG */

doc/coding-style.txt item M2.  I fixed this up for you and applied.

> +	if (nd->vendor == OFONO_VENDOR_SIMCOM_A76XX)
> +		nd->tech = tech;
> +
>   	DBG("cops_cb: %s, %s %s %d", name, nd->mcc, nd->mnc, tech);
>   
>   	cb(&error, &op, cbd->data);

Regards,
-Denis
diff mbox series

Patch

diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index 46b8512a..c841bbf7 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -353,6 +353,11 @@  static void cops_cb(gboolean ok, GAtResult *result, gpointer user_data)
 	op.status = 2;
 	op.tech = tech;
 
+	/* SIMCom modems shows the current tech via the +COPS
+	 * not like other modems where it's shown via +CREG */
+	if (nd->vendor == OFONO_VENDOR_SIMCOM_A76XX)
+		nd->tech = tech;
+
 	DBG("cops_cb: %s, %s %s %d", name, nd->mcc, nd->mnc, tech);
 
 	cb(&error, &op, cbd->data);