qmi/sms: require WMS version >= 1.2 for bearer calls

I've never seen a major 0 service. The gobi2000 comes with
WMS 1.0 and doesn't support the bearer command. Guessing
it's 1.2 required.
This commit is contained in:
Alexander Couzens 2017-08-22 14:25:43 +02:00 committed by Denis Kenzior
parent d9b2dbbd0b
commit fb17995721
1 changed files with 2 additions and 2 deletions

View File

@ -277,7 +277,7 @@ static void qmi_bearer_query(struct ofono_sms *sms,
DBG("");
if (data->major < 1 && data->minor < 2)
if (data->major < 1 || (data->major == 1 && data->minor < 2))
goto error;
if (qmi_service_send(data->wms, QMI_WMS_GET_DOMAIN_PREF, NULL,
@ -315,7 +315,7 @@ static void qmi_bearer_set(struct ofono_sms *sms, int bearer,
DBG("bearer %d", bearer);
if (data->major < 1 && data->minor < 2)
if (data->major < 1 || (data->major == 1 && data->minor < 2))
goto error;
domain = bearer_to_domain(bearer);