Add a vendor OFONO_VENDOR_QUECTEL_EC2X

The distinction between OFONO_VENDOR_QUECTEL and
OFONO_VENDOR_QUECTEL_SERIAL does not suffice for EC21/EC25 in some
places, so introduce and use a new vendor:
OFONO_VENDOR_QUECTEL_EC2X
This commit is contained in:
Lars Poeschel 2020-08-11 13:42:15 +02:00 committed by Denis Kenzior
parent 446a5ae394
commit 3401d9e29c
5 changed files with 7 additions and 2 deletions

View File

@ -1213,6 +1213,7 @@ static void at_pin_retries_query(struct ofono_sim *sim,
return;
break;
case OFONO_VENDOR_QUECTEL:
case OFONO_VENDOR_QUECTEL_EC2X:
if (g_at_chat_send(sd->chat, "AT+QPINC?", qpinc_prefix,
at_qpinc_cb, cbd, g_free) > 0)
return;

View File

@ -337,6 +337,7 @@ static inline void at_ack_delivery(struct ofono_sms *sms)
if (data->cnma_ack_pdu) {
switch (data->vendor) {
case OFONO_VENDOR_GEMALTO:
case OFONO_VENDOR_QUECTEL_EC2X:
snprintf(buf, sizeof(buf), "AT+CNMA=1");
break;
case OFONO_VENDOR_QUECTEL_SERIAL:
@ -845,6 +846,7 @@ static gboolean build_cnmi_string(char *buf, int *cnmi_opts,
case OFONO_VENDOR_ZTE:
case OFONO_VENDOR_SIMCOM:
case OFONO_VENDOR_QUECTEL:
case OFONO_VENDOR_QUECTEL_EC2X:
/* MSM devices advertise support for mode 2, but return an
* error if we attempt to actually use it. */
mode = "1";

View File

@ -44,6 +44,7 @@ enum ofono_vendor {
OFONO_VENDOR_WAVECOM_Q2XXX,
OFONO_VENDOR_ALCATEL,
OFONO_VENDOR_QUECTEL,
OFONO_VENDOR_QUECTEL_EC2X,
OFONO_VENDOR_QUECTEL_SERIAL,
OFONO_VENDOR_UBLOX,
OFONO_VENDOR_XMM,

View File

@ -1114,7 +1114,8 @@ static int at_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor,
g_at_chat_send(vd->chat, "AT+CLIP=1", NULL, NULL, NULL, NULL);
g_at_chat_send(vd->chat, "AT+CDIP=1", NULL, NULL, NULL, NULL);
if (vd->vendor != OFONO_VENDOR_QUECTEL)
if (vd->vendor != OFONO_VENDOR_QUECTEL &&
vd->vendor != OFONO_VENDOR_QUECTEL_EC2X)
g_at_chat_send(vd->chat, "AT+CNAP=1", NULL, NULL, NULL, NULL);
switch (vd->vendor) {

View File

@ -1032,7 +1032,7 @@ static void cgmm_cb(int ok, GAtResult *result, void *user_data)
data->model = QUECTEL_MC60;
} else if (strcmp(model, "EC21") == 0) {
DBG("%p model EC21", modem);
data->vendor = OFONO_VENDOR_QUECTEL;
data->vendor = OFONO_VENDOR_QUECTEL_EC2X;
data->model = QUECTEL_EC21;
} else {
ofono_warn("%p unknown model: '%s'", modem, model);