@@ -554,21 +554,23 @@ static int qmi_gprs_context_probev(struct ofono_gprs_context *gc,
unsigned int vendor, va_list args)
{
int mux_id = va_arg(args, int);
- _auto_(qmi_service_free) struct qmi_service *wds =
+ _auto_(qmi_service_free) struct qmi_service *ipv4 =
+ va_arg(args, struct qmi_service *);
+ _auto_(qmi_service_free) struct qmi_service *ipv6 =
va_arg(args, struct qmi_service *);
struct gprs_context_data *data;
DBG("");
if (mux_id != -1) {
- int r = qmi_gprs_context_bind_mux(gc, wds, mux_id);
+ int r = qmi_gprs_context_bind_mux(gc, ipv4, mux_id);
if (r < 0)
return r;
}
data = l_new(struct gprs_context_data, 1);
- data->wds = l_steal_ptr(wds);
+ data->wds = l_steal_ptr(ipv4);
data->mux_id = mux_id;
qmi_service_register(data->wds, QMI_WDS_PACKET_SERVICE_STATUS,
@@ -803,10 +803,14 @@ static void gobi_setup_gprs(struct ofono_modem *modem)
/* Simple case of 802.3 interface, no QMAP */
if (data->n_premux == 0) {
+ struct qmi_service *ipv4 = data->context_services[0].wds_ipv4;
+ struct qmi_service *ipv6 = data->context_services[0].wds_ipv6;
+
interface = ofono_modem_get_string(modem, "NetworkInterface");
gc = ofono_gprs_context_create(modem, 0, "qmimodem", -1,
- qmi_service_clone(data->wds));
+ qmi_service_clone(ipv4),
+ qmi_service_clone(ipv6));
if (!gc) {
ofono_warn("Unable to create gprs-context for: %s",
ofono_modem_get_path(modem));
@@ -826,13 +830,16 @@ static void gobi_setup_gprs(struct ofono_modem *modem)
DBG("max_aggregation_size: %u", data->max_aggregation_size);
for (i = 0; i < data->n_premux; i++) {
+ struct qmi_service *ipv4 = data->context_services[i].wds_ipv4;
+ struct qmi_service *ipv6 = data->context_services[i].wds_ipv6;
int mux_id;
sprintf(buf, "PremuxInterface%dMuxId", i + 1);
mux_id = ofono_modem_get_integer(modem, buf);
gc = ofono_gprs_context_create(modem, 0, "qmimodem", mux_id,
- qmi_service_clone(data->wds));
+ qmi_service_clone(ipv4),
+ qmi_service_clone(ipv6));
if (!gc) {
ofono_warn("gprs-context creation failed for [%d] %s",
@@ -324,10 +324,13 @@ static int setup_gprs_context(uint8_t mux_id, const char *interface,
struct ofono_modem *modem = ofono_gprs_get_modem(gprs);
struct qrtrqmi_data *data = ofono_modem_get_data(modem);
struct qmi_qrtr_node *node = data->node;
+ struct qmi_service *ipv4 = qmi_qrtr_node_get_dedicated_service(node,
+ QMI_SERVICE_WDS);
+ struct qmi_service *ipv6 = qmi_qrtr_node_get_dedicated_service(node,
+ QMI_SERVICE_WDS);
struct ofono_gprs_context *gc;
- gc = ofono_gprs_context_create(modem, 0, "qmimodem", mux_id,
- qmi_qrtr_node_get_service(node, QMI_SERVICE_WDS));
+ gc = ofono_gprs_context_create(modem, 0, "qmimodem", mux_id, ipv4, ipv6);
if (!gc) {
ofono_warn("Unable to create gprs-context for: %s, %s[%u]",
ofono_modem_get_path(modem), interface, mux_id);