nmhw21: Patch modemanager to make it work with private APN
This commit is contained in:
parent
fb714ec0c2
commit
2bb2ea7c20
|
|
@ -0,0 +1,68 @@
|
||||||
|
From 66d04a3003f5974dbf1acd5b03b4fa7e50a1ccb0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexandre Bard <alexandre.bard@netmodule.com>
|
||||||
|
Date: Wed, 12 Dec 2018 15:25:11 +0100
|
||||||
|
Subject: [PATCH] Use default PDP ctx(4) with LTE and don't try to authenticate
|
||||||
|
on it
|
||||||
|
|
||||||
|
---
|
||||||
|
plugins/ublox/mm-broadband-bearer-ublox.c | 2 +-
|
||||||
|
src/mm-broadband-bearer.c | 14 +++++++++++++-
|
||||||
|
2 files changed, 14 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/ublox/mm-broadband-bearer-ublox.c b/plugins/ublox/mm-broadband-bearer-ublox.c
|
||||||
|
index 1adcaa2..37338de 100644
|
||||||
|
--- a/plugins/ublox/mm-broadband-bearer-ublox.c
|
||||||
|
+++ b/plugins/ublox/mm-broadband-bearer-ublox.c
|
||||||
|
@@ -530,7 +530,7 @@ check_supported_authentication_methods (GTask *task)
|
||||||
|
|
||||||
|
/* Flag whether authentication is required. If it isn't, we won't fail
|
||||||
|
* connection attempt if the +UAUTHREQ command fails */
|
||||||
|
- ctx->auth_required = (user && password && allowed_auth != MM_BEARER_ALLOWED_AUTH_NONE);
|
||||||
|
+ ctx->auth_required = (ctx->cid != 4 && user && password && allowed_auth != MM_BEARER_ALLOWED_AUTH_NONE);
|
||||||
|
|
||||||
|
/* If we already cached the support, not do it again */
|
||||||
|
if (self->priv->allowed_auths != MM_UBLOX_BEARER_ALLOWED_AUTH_UNKNOWN) {
|
||||||
|
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c
|
||||||
|
index 779cd9a..db570bd 100644
|
||||||
|
--- a/src/mm-broadband-bearer.c
|
||||||
|
+++ b/src/mm-broadband-bearer.c
|
||||||
|
@@ -773,6 +773,7 @@ parse_cid_range (MMBaseModem *modem,
|
||||||
|
gchar *ip_family_str;
|
||||||
|
|
||||||
|
ip_family_str = mm_bearer_ip_family_build_string_from_mask (format->pdp_type);
|
||||||
|
+ if (ctx->max_cid == 3) ctx->max_cid = 4;
|
||||||
|
if (ctx->max_cid < format->max_cid) {
|
||||||
|
cid = ctx->max_cid + 1;
|
||||||
|
mm_dbg ("Using empty CID %u with PDP type '%s'", cid, ip_family_str);
|
||||||
|
@@ -810,6 +811,7 @@ parse_pdp_list (MMBaseModem *modem,
|
||||||
|
GList *pdp_list;
|
||||||
|
GList *l;
|
||||||
|
guint cid;
|
||||||
|
+ gboolean lte_dflt_cid_detected = FALSE;
|
||||||
|
|
||||||
|
/* If cancelled, set result error */
|
||||||
|
if (g_cancellable_is_cancelled (ctx->cancellable)) {
|
||||||
|
@@ -862,9 +864,19 @@ parse_pdp_list (MMBaseModem *modem,
|
||||||
|
g_free (ip_family_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Look for the exact PDP context we want */
|
||||||
|
+ /* Check if PDP context 4 is present */
|
||||||
|
for (l = pdp_list; l; l = g_list_next (l)) {
|
||||||
|
MM3gppPdpContext *pdp = l->data;
|
||||||
|
+ if(pdp->cid == 4){
|
||||||
|
+ lte_dflt_cid_detected = TRUE;
|
||||||
|
+ ctx->use_existing_cid = TRUE;
|
||||||
|
+ cid = 4;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /* Look for the exact PDP context we want */
|
||||||
|
+ for (l = pdp_list; l && !lte_dflt_cid_detected; l = g_list_next (l)) {
|
||||||
|
+ MM3gppPdpContext *pdp = l->data;
|
||||||
|
|
||||||
|
if (pdp->pdp_type == ctx->ip_family) {
|
||||||
|
const gchar *apn;
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
SRC_URI_append_am335x-nmhw21 = " \
|
||||||
|
file://0001-Use-default-PDP-ctx-4-with-LTE-and-don-t-try-to-auth.patch \
|
||||||
|
"
|
||||||
Loading…
Reference in New Issue