quectel: Add Quectel EC21 to known serial modems

This adds the Quectel EC21 to the known modems of the quectel driver and
therefore allows to use it with its serial interface.
This commit is contained in:
Lars Poeschel 2020-05-26 12:16:19 +02:00 committed by Denis Kenzior
parent 48c5ab07af
commit 3c158ceee9
1 changed files with 8 additions and 1 deletions

View File

@ -64,7 +64,7 @@ static const char *cpin_prefix[] = { "+CPIN:", NULL };
static const char *cbc_prefix[] = { "+CBC:", NULL };
static const char *qinistat_prefix[] = { "+QINISTAT:", NULL };
static const char *cgmm_prefix[] = { "UC15", "Quectel_M95", "Quectel_MC60",
NULL };
"EC21", NULL };
static const char *none_prefix[] = { NULL };
static const uint8_t gsm0710_terminate[] = {
@ -83,6 +83,7 @@ enum quectel_model {
QUECTEL_UC15,
QUECTEL_M95,
QUECTEL_MC60,
QUECTEL_EC21,
};
struct quectel_data {
@ -512,6 +513,7 @@ static void dbus_hw_enable(struct ofono_modem *modem)
switch (data->model) {
case QUECTEL_UC15:
case QUECTEL_EC21:
g_at_chat_register(data->aux, "+QIND", qind_notify, FALSE, hw,
NULL);
break;
@ -556,6 +558,7 @@ static void qinistat_cb(gboolean ok, GAtResult *result, gpointer user_data)
switch (data->model) {
case QUECTEL_UC15:
case QUECTEL_EC21:
/* UC15 uses a bitmap of 1 + 2 + 4 = 7 */
ready = 7;
break;
@ -788,6 +791,10 @@ static void cgmm_cb(int ok, GAtResult *result, void *user_data)
DBG("%p model MC60", modem);
data->vendor = OFONO_VENDOR_QUECTEL_SERIAL;
data->model = QUECTEL_MC60;
} else if (strcmp(model, "EC21") == 0) {
DBG("%p model EC21", modem);
data->vendor = OFONO_VENDOR_QUECTEL;
data->model = QUECTEL_EC21;
} else {
ofono_warn("%p unknown model: '%s'", modem, model);
data->vendor = OFONO_VENDOR_QUECTEL;