Hi Denis,

This patch is fine, with one little fix below.

Patch message:

All QMI devices are currently piggy-backing on the 'gobi' driver to set up the QMI atoms. For the SARA R4, this works with the addition of a quirk.

This patch adds the handling of a SARA R4 quirk to the 'gobi' driver.

On 12/05/2021 09:40, Bing Jupiter wrote:
---
  plugins/gobi.c | 11 ++++++++++-
  1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/plugins/gobi.c b/plugins/gobi.c
index 9b5d7cff..5472dd83 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -47,6 +47,7 @@
  #include <ofono/location-reporting.h>
  #include <ofono/log.h>
  #include <ofono/message-waiting.h>
+#include <drivers/atmodem/vendor.h>
#include <drivers/qmimodem/qmi.h>
  #include <drivers/qmimodem/dms.h>
@@ -496,9 +497,17 @@ static void gobi_post_online(struct ofono_modem *modem)
        struct gobi_data *data = ofono_modem_get_data(modem);
        struct ofono_gprs *gprs;
        struct ofono_gprs_context *gc;
+    const char* quirk;
+    unsigned int vendor = 0;
DBG("%p", modem); + quirk = ofono_modem_get_string(modem, "Quirk");
+    if (quirk) {

Probably should have done:

if (quirk && !strcmp(quirk, "SARAR4")) {

/Jonas


+           DBG("Debug: vendor = OFONO_VENDOR_UBLOX_SARA_R4");
+        vendor = OFONO_VENDOR_UBLOX_SARA_R4;
+    }
+
        if (data->features & GOBI_NAS) {
                ofono_netreg_create(modem, 0, "qmimodem", data->device);
                ofono_netmon_create(modem, 0, "qmimodem", data->device);
@@ -508,7 +517,7 @@ static void gobi_post_online(struct ofono_modem *modem)
                ofono_ussd_create(modem, 0, "qmimodem", data->device);
if (data->features & GOBI_WDS) {
-               gprs = ofono_gprs_create(modem, 0, "qmimodem", data->device);
+               gprs = ofono_gprs_create(modem, vendor, "qmimodem", 
data->device);
                gc = ofono_gprs_context_create(modem, 0, "qmimodem",
                                                        data->device);
_______________________________________________
ofono mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to