mirror of git://git.sysmocom.de/ofono
qmi: use shared services
Apparently it's not legal to create a QMI service multiple times for a device. I've been testing with a Quectel EC21 and here it works fine to do so, but the general case would require "shared" services across atoms. This patch switches the users of the NAS and WDS services over to using a "shared" service instead of each instatiating their own instance.
This commit is contained in:
parent
81cb808daf
commit
ea7691f04b
|
@ -421,7 +421,7 @@ static void get_data_format_cb(struct qmi_result *result, void *user_data)
|
|||
}
|
||||
|
||||
done:
|
||||
qmi_service_create(data->dev, QMI_SERVICE_WDS, create_wds_cb, gc,
|
||||
qmi_service_create_shared(data->dev, QMI_SERVICE_WDS, create_wds_cb, gc,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@ -444,7 +444,7 @@ static void create_wda_cb(struct qmi_service *service, void *user_data)
|
|||
return;
|
||||
|
||||
error:
|
||||
qmi_service_create(data->dev, QMI_SERVICE_WDS, create_wds_cb, gc,
|
||||
qmi_service_create_shared(data->dev, QMI_SERVICE_WDS, create_wds_cb, gc,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -201,7 +201,8 @@ static int qmi_gprs_probe(struct ofono_gprs *gprs,
|
|||
|
||||
ofono_gprs_set_data(gprs, data);
|
||||
|
||||
qmi_service_create(device, QMI_SERVICE_NAS, create_nas_cb, gprs, NULL);
|
||||
qmi_service_create_shared(device, QMI_SERVICE_NAS,
|
||||
create_nas_cb, gprs, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -542,7 +542,7 @@ static int qmi_netreg_probe(struct ofono_netreg *netreg,
|
|||
|
||||
ofono_netreg_set_data(netreg, data);
|
||||
|
||||
qmi_service_create(device, QMI_SERVICE_NAS,
|
||||
qmi_service_create_shared(device, QMI_SERVICE_NAS,
|
||||
create_nas_cb, netreg, NULL);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -74,7 +74,8 @@ static int qmi_radio_settings_probe(struct ofono_radio_settings *rs,
|
|||
|
||||
ofono_radio_settings_set_data(rs, data);
|
||||
|
||||
qmi_service_create(device, QMI_SERVICE_NAS, create_nas_cb, rs, NULL);
|
||||
qmi_service_create_shared(device, QMI_SERVICE_NAS,
|
||||
create_nas_cb, rs, NULL);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue