[PATCH 5/6] gobi: Introduce "LTE" modem property
Ivaylo Dimitrov <[email protected]> Fri, 25 Jul 2025 15:19:53 +0300
| Newsgroups | dev.linux.lists.ofono |
|---|---|
| Message-ID | <[email protected]> |
There are modems that are not LTE capable, allow them to announce that
---
plugins/gobi.c | 10 ++++++++--
plugins/udevng.c | 1 +
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/plugins/gobi.c b/plugins/gobi.c
index f908f935..7864e192 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -57,6 +57,7 @@
#define GOBI_UIM (1 << 5)
#define GOBI_VOICE (1 << 6)
#define GOBI_WDA (1 << 7)
+#define GOBI_LTE (1 << 8)
#define MAX_CONTEXTS 4
#define DEFAULT_MTU 1400
@@ -262,8 +263,13 @@ static int gobi_probe(struct ofono_modem *modem)
/* See drivers/net/ethernet/qualcomm/rmnet/rmnet_private.h */
data->max_aggregation_size = 16384;
+ if (ofono_modem_get_boolean(modem, "LTE"))
+ data->features |= GOBI_LTE;
+
ofono_modem_set_data(modem, data);
- ofono_modem_set_capabilities(modem, OFONO_MODEM_CAPABILITY_LTE);
+
+ if (data->features & GOBI_LTE)
+ ofono_modem_set_capabilities(modem, OFONO_MODEM_CAPABILITY_LTE);
return 0;
}
@@ -1144,7 +1150,7 @@ static void gobi_post_sim(struct ofono_modem *modem)
DBG("%p", modem);
- if (data->features & GOBI_WDS)
+ if (data->features & GOBI_WDS && data->features & GOBI_LTE)
ofono_lte_create(modem, 0, "qmimodem",
qmi_service_clone(data->wds));
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 320cd3a6..5627f1ec 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -255,6 +255,7 @@ static int setup_qmi_qmux(struct modem_info *modem,
ofono_modem_set_string(modem->modem, "InterfaceNumber", net->number);
ofono_modem_set_string(modem->modem, "Bus", "usb");
+ ofono_modem_set_boolean(modem->modem, "LTE", true);
return setup_qmi_netdev(modem, net);
}
--
2.25.1