Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/modem-manager:verizon-lp1675062 into ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:modem-manager/xenial/1.6.2

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Simon Fels
Approved revision: 2f4a05b706f21ed59618639ba61fbdf436bc7dd4
Merged at revision: 81009ee7aab034184042f704f0f5b4a0c0164ee0
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/modem-manager:verizon-lp1675062
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:modem-manager/xenial/1.6.2
Diff against target: 90 lines (+59/-0)
1 file modified
src/mm-bearer-mbim.c (+59/-0)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Simon Fels Approve
Konrad Zapałowicz (community) code Approve
Review via email: mp+322342@code.launchpad.net

Commit message

Send +CGACT for Sierra HL7588 on connection

Sent AT+CGACT=1,3 command for Sierra HL7588 on connection as a
workaround for buggy modem firmware. This makes sure vzwinternet
is activated. Fix for LP: #1675062.

Description of the change

Send +CGACT for Sierra HL7588 on connection

Sent AT+CGACT=1,3 command for Sierra HL7588 on connection as a
workaround for buggy modem firmware. This makes sure vzwinternet
is activated. Fix for LP: #1675062.

To post a comment you must log in.
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

just a small comment

review: Needs Fixing (code)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

ack

review: Approve (code)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

One question in line, worth submitting this upstream?

review: Needs Information
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@morphis, no not really, they said they will fix this in the next firmware release, so upstream can live without this (and probably happy without it).

Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
2index 5db5f32..af5dd20 100644
3--- a/src/mm-bearer-mbim.c
4+++ b/src/mm-bearer-mbim.c
5@@ -31,6 +31,10 @@
6 #include "mm-port-enums-types.h"
7 #include "mm-bearer-mbim.h"
8 #include "mm-log.h"
9+#include "mm-base-modem-at.h"
10+
11+#define VID_SIERRA_HL7588 0x413C
12+#define PID_SIERRA_HL7588 0x81C8
13
14 G_DEFINE_TYPE (MMBearerMbim, mm_bearer_mbim, MM_TYPE_BASE_BEARER)
15
16@@ -218,6 +222,7 @@ reload_stats (MMBaseBearer *self,
17
18 typedef enum {
19 CONNECT_STEP_FIRST,
20+ CONNECT_STEP_SEND_SIERRA_WORKAROUND,
21 CONNECT_STEP_PACKET_SERVICE,
22 CONNECT_STEP_PROVISIONED_CONTEXTS,
23 CONNECT_STEP_CONNECT,
24@@ -760,6 +765,29 @@ packet_service_set_ready (MbimDevice *device,
25 }
26
27 static void
28+workaround_done (MMBaseModem *modem,
29+ GAsyncResult *res,
30+ ConnectContext *ctx)
31+{
32+ /* Not really worth checking for errors here */
33+ mm_dbg ("Sierra HL7588 workaround command finished");
34+
35+ /* Keep on */
36+ ctx->step++;
37+ connect_context_step (ctx);
38+}
39+
40+static unsigned
41+get_uint_property (GObject *obj, const gchar *property_name)
42+{
43+ GValue value = G_VALUE_INIT;
44+
45+ g_value_init (&value, G_TYPE_UINT);
46+ g_object_get_property (obj, property_name, &value);
47+ return g_value_get_uint (&value);
48+}
49+
50+static void
51 connect_context_step (ConnectContext *ctx)
52 {
53 MbimMessage *message;
54@@ -779,6 +807,37 @@ connect_context_step (ConnectContext *ctx)
55 /* Fall down */
56 ctx->step++;
57
58+ case CONNECT_STEP_SEND_SIERRA_WORKAROUND: {
59+ MMBaseModem *modem = NULL;
60+ unsigned vid, pid;
61+
62+ g_object_get (ctx->self,
63+ MM_BASE_BEARER_MODEM, &modem,
64+ NULL);
65+ g_assert (modem);
66+
67+ vid = get_uint_property (G_OBJECT (modem), MM_BASE_MODEM_VENDOR_ID);
68+ pid = get_uint_property (G_OBJECT (modem), MM_BASE_MODEM_PRODUCT_ID);
69+
70+ mm_dbg ("Checking if Sierra HL7588: %x:%x", vid, pid);
71+
72+ if (vid == VID_SIERRA_HL7588 && pid == PID_SIERRA_HL7588) {
73+
74+ mm_dbg ("Sending workaround AT command for Sierra HL7588...");
75+ mm_base_modem_at_command (modem,
76+ "AT+CGACT=1,3",
77+ 10,
78+ FALSE,
79+ (GAsyncReadyCallback)workaround_done,
80+ ctx);
81+ g_object_unref (modem);
82+ return;
83+ }
84+
85+ g_object_unref (modem);
86+ /* Fall down */
87+ ctx->step++;
88+ }
89 case CONNECT_STEP_PACKET_SERVICE: {
90 GError *error = NULL;
91

Subscribers

People subscribed via source and target branches