Hello community, here is the log from the commit of package ofono for openSUSE:Factory checked in at 2018-03-12 12:13:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ofono (Old) and /work/SRC/openSUSE:Factory/.ofono.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ofono" Mon Mar 12 12:13:24 2018 rev:8 rq:585775 version:1.23 Changes: -------- --- /work/SRC/openSUSE:Factory/ofono/ofono.changes 2018-01-28 20:33:46.317912639 +0100 +++ /work/SRC/openSUSE:Factory/.ofono.new/ofono.changes 2018-03-12 12:13:41.271263862 +0100 @@ -1,0 +2,8 @@ +Sun Mar 11 09:11:35 UTC 2018 - [email protected] + +- Update to version 1.23: + * Fix issue with handling SIM AID sessions. + * Add support for QMI LTE bearer handling. + * Add support for memory location dialing. + +------------------------------------------------------------------- Old: ---- ofono-1.22.tar.xz ofono-1.22.tar.xz.sig New: ---- ofono-1.23.tar.xz ofono-1.23.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ofono.spec ++++++ --- /var/tmp/diff_new_pack.rotMLr/_old 2018-03-12 12:13:42.331226043 +0100 +++ /var/tmp/diff_new_pack.rotMLr/_new 2018-03-12 12:13:42.335225900 +0100 @@ -19,10 +19,10 @@ Name: ofono -Version: 1.22 +Version: 1.23 Release: 0 Summary: Mobile telephony application development framework -License: GPL-2.0 +License: GPL-2.0-only Group: Productivity/Telephony/Utilities Url: https://01.org/ofono Source0: https://www.kernel.org/pub/linux/network/ofono/%{name}-%{version}.tar.xz ++++++ ofono-1.22.tar.xz -> ofono-1.23.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/ChangeLog new/ofono-1.23/ChangeLog --- old/ofono-1.22/ChangeLog 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/ChangeLog 2018-03-10 17:16:16.000000000 +0100 @@ -1,3 +1,8 @@ +ver 1.23: + Fix issue with handling SIM AID sessions. + Add support for QMI LTE bearer handling. + Add support for memory location dialing. + ver 1.22: Fix issue with GPIO handling and Nokia modems. Fix issue with SIM state callback and AT modems. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/Makefile.am new/ofono-1.23/Makefile.am --- old/ofono-1.22/Makefile.am 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/Makefile.am 2018-03-10 17:16:16.000000000 +0100 @@ -234,6 +234,7 @@ drivers/qmimodem/ussd.c \ drivers/qmimodem/gprs.c \ drivers/qmimodem/gprs-context.c \ + drivers/qmimodem/lte.c \ drivers/qmimodem/radio-settings.c \ drivers/qmimodem/location-reporting.c \ drivers/qmimodem/netmon.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/Makefile.in new/ofono-1.23/Makefile.in --- old/ofono-1.22/Makefile.in 2018-01-21 19:00:18.000000000 +0100 +++ new/ofono-1.23/Makefile.in 2018-03-10 17:16:55.000000000 +0100 @@ -156,6 +156,7 @@ @QMIMODEM_TRUE@ drivers/qmimodem/sim.c drivers/qmimodem/sms.c \ @QMIMODEM_TRUE@ drivers/qmimodem/ussd.c drivers/qmimodem/gprs.c \ @QMIMODEM_TRUE@ drivers/qmimodem/gprs-context.c \ +@QMIMODEM_TRUE@ drivers/qmimodem/lte.c \ @QMIMODEM_TRUE@ drivers/qmimodem/radio-settings.c \ @QMIMODEM_TRUE@ drivers/qmimodem/location-reporting.c \ @QMIMODEM_TRUE@ drivers/qmimodem/netmon.c plugins/gobi.c @@ -560,7 +561,7 @@ drivers/qmimodem/sim-legacy.c drivers/qmimodem/sim.c \ drivers/qmimodem/sms.c drivers/qmimodem/ussd.c \ drivers/qmimodem/gprs.c drivers/qmimodem/gprs-context.c \ - drivers/qmimodem/radio-settings.c \ + drivers/qmimodem/lte.c drivers/qmimodem/radio-settings.c \ drivers/qmimodem/location-reporting.c \ drivers/qmimodem/netmon.c plugins/gobi.c \ drivers/atmodem/atmodem.h drivers/atmodem/atmodem.c \ @@ -766,6 +767,7 @@ @QMIMODEM_TRUE@ drivers/qmimodem/ussd.$(OBJEXT) \ @QMIMODEM_TRUE@ drivers/qmimodem/gprs.$(OBJEXT) \ @QMIMODEM_TRUE@ drivers/qmimodem/gprs-context.$(OBJEXT) \ +@QMIMODEM_TRUE@ drivers/qmimodem/lte.$(OBJEXT) \ @QMIMODEM_TRUE@ drivers/qmimodem/radio-settings.$(OBJEXT) \ @QMIMODEM_TRUE@ drivers/qmimodem/location-reporting.$(OBJEXT) \ @QMIMODEM_TRUE@ drivers/qmimodem/netmon.$(OBJEXT) \ @@ -2451,6 +2453,8 @@ drivers/qmimodem/gprs-context.$(OBJEXT): \ drivers/qmimodem/$(am__dirstamp) \ drivers/qmimodem/$(DEPDIR)/$(am__dirstamp) +drivers/qmimodem/lte.$(OBJEXT): drivers/qmimodem/$(am__dirstamp) \ + drivers/qmimodem/$(DEPDIR)/$(am__dirstamp) drivers/qmimodem/radio-settings.$(OBJEXT): \ drivers/qmimodem/$(am__dirstamp) \ drivers/qmimodem/$(DEPDIR)/$(am__dirstamp) @@ -3379,6 +3383,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@drivers/qmimodem/$(DEPDIR)/gprs-context.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@drivers/qmimodem/$(DEPDIR)/gprs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@drivers/qmimodem/$(DEPDIR)/location-reporting.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@drivers/qmimodem/$(DEPDIR)/lte.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@drivers/qmimodem/$(DEPDIR)/nas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@drivers/qmimodem/$(DEPDIR)/netmon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@drivers/qmimodem/$(DEPDIR)/network-registration.Po@am__quote@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/configure new/ofono-1.23/configure --- old/ofono-1.22/configure 2018-01-21 19:00:14.000000000 +0100 +++ new/ofono-1.23/configure 2018-03-10 17:16:51.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ofono 1.22. +# Generated by GNU Autoconf 2.69 for ofono 1.23. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='ofono' PACKAGE_TARNAME='ofono' -PACKAGE_VERSION='1.22' -PACKAGE_STRING='ofono 1.22' +PACKAGE_VERSION='1.23' +PACKAGE_STRING='ofono 1.23' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1406,7 +1406,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ofono 1.22 to adapt to many kinds of systems. +\`configure' configures ofono 1.23 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1476,7 +1476,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ofono 1.22:";; + short | recursive ) echo "Configuration of ofono 1.23:";; esac cat <<\_ACEOF @@ -1630,7 +1630,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ofono configure 1.22 +ofono configure 1.23 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1908,7 +1908,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ofono $as_me 1.22, which was +It was created by ofono $as_me 1.23, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2772,7 +2772,7 @@ # Define the identity of the package. PACKAGE='ofono' - VERSION='1.22' + VERSION='1.23' cat >>confdefs.h <<_ACEOF @@ -14053,7 +14053,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ofono $as_me 1.22, which was +This file was extended by ofono $as_me 1.23, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14119,7 +14119,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ofono config.status 1.22 +ofono config.status 1.23 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/configure.ac new/ofono-1.23/configure.ac --- old/ofono-1.22/configure.ac 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/configure.ac 2018-03-10 17:16:16.000000000 +0100 @@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT(ofono, 1.22) +AC_INIT(ofono, 1.23) AM_INIT_AUTOMAKE([foreign subdir-objects color-tests]) AC_CONFIG_HEADERS(config.h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/doc/modem-api.txt new/ofono-1.23/doc/modem-api.txt --- old/ofono-1.22/doc/modem-api.txt 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/doc/modem-api.txt 2018-03-10 17:16:16.000000000 +0100 @@ -95,6 +95,13 @@ String representing the software version number of the modem device. + string SystemPath [readonly, optional] + + String representing the system path for the modem + device. + For modems detected by udev events, this corresponds to + the modem sysfs path. + array{string} Features [readonly] List of currently enabled features. It uses simple diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/doc/voicecallmanager-api.txt new/ofono-1.23/doc/voicecallmanager-api.txt --- old/ofono-1.22/doc/voicecallmanager-api.txt 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/doc/voicecallmanager-api.txt 2018-03-10 17:16:16.000000000 +0100 @@ -69,6 +69,17 @@ [service].Error.NotImplemented [service].Error.Failed + object DialMemory(string memory position, string hide_callerid) + + Initiates a new outgoing call to the number in the given memory + position/favourite. For callerid see the Dial method. + + Possible Errors: [service].Error.InProgress + [service].Error.InvalidArguments + [service].Error.InvalidFormat + [service].Error.NotImplemented + [service].Error.Failed + void Transfer() Joins the currently Active (or Outgoing, depending diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/drivers/hfpmodem/voicecall.c new/ofono-1.23/drivers/hfpmodem/voicecall.c --- old/ofono-1.22/drivers/hfpmodem/voicecall.c 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/drivers/hfpmodem/voicecall.c 2018-03-10 17:16:16.000000000 +0100 @@ -422,6 +422,28 @@ CALLBACK_WITH_FAILURE(cb, data); } + +static void hfp_dial_memory(struct ofono_voicecall *vc, + unsigned int memory_location, + ofono_voicecall_cb_t cb, void *data) +{ + struct voicecall_data *vd = ofono_voicecall_get_data(vc); + struct cb_data *cbd = cb_data_new(cb, data); + char buf[256]; + + cbd->user = vc; + DBG("Calling memory location %d\n", memory_location); + snprintf(buf, sizeof(buf), "ATD>%d;", memory_location); + + if (g_at_chat_send(vd->chat, buf, none_prefix, + atd_cb, cbd, g_free) > 0) + return; + + g_free(cbd); + DBG("at_chat_failed"); + CALLBACK_WITH_FAILURE(cb, data); +} + static void hfp_template(const char *cmd, struct ofono_voicecall *vc, GAtResultFunc result_cb, unsigned int affected_types, ofono_voicecall_cb_t cb, void *data) @@ -1287,6 +1309,7 @@ .remove = hfp_voicecall_remove, .dial = hfp_dial, .dial_last = hfp_dial_last, + .dial_memory = hfp_dial_memory, .answer = hfp_answer, .hangup_active = hfp_hangup, .hold_all_active = hfp_hold_all_active, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/drivers/qmimodem/gprs.c new/ofono-1.23/drivers/qmimodem/gprs.c --- old/ofono-1.22/drivers/qmimodem/gprs.c 2017-05-05 08:22:20.000000000 +0200 +++ new/ofono-1.23/drivers/qmimodem/gprs.c 2018-03-10 17:16:16.000000000 +0100 @@ -29,12 +29,16 @@ #include "qmi.h" #include "nas.h" +#include "wds.h" #include "src/common.h" #include "qmimodem.h" struct gprs_data { + struct qmi_device *dev; struct qmi_service *nas; + struct qmi_service *wds; + unsigned int last_auto_context_id; }; static bool extract_ss_info(struct qmi_result *result, int *status, int *tech) @@ -64,8 +68,124 @@ return true; } +static void get_lte_attach_param_cb(struct qmi_result *result, void *user_data) +{ + struct ofono_gprs *gprs = user_data; + struct gprs_data *data = ofono_gprs_get_data(gprs); + char *apn = NULL; + uint16_t error; + uint8_t iptype; + + DBG(""); + + if (qmi_result_set_error(result, &error)) { + ofono_error("Failed to query LTE attach params: %hd", error); + goto noapn; + } + + /* APN */ + apn = qmi_result_get_string(result, 0x10); + if (!apn) { + DBG("Default profile has no APN setting"); + goto noapn; + } + + if (qmi_result_get_uint8(result, 0x11, &iptype)) + ofono_info("LTE attach IP type: %hhd", iptype); + + ofono_gprs_cid_activated(gprs, data->last_auto_context_id, apn); + g_free(apn); + + return; + +noapn: + data->last_auto_context_id = 0; + ofono_error("LTE bearer established but APN not set"); +} + +static void get_default_profile_cb(struct qmi_result *result, void *user_data) +{ + struct ofono_gprs* gprs = user_data; + struct gprs_data *data = ofono_gprs_get_data(gprs); + uint16_t error; + uint8_t index; + + DBG(""); + + if (qmi_result_set_error(result, &error)) { + ofono_error("Get default profile error: %hd", error); + goto error; + } + + /* Profile index */ + if (!qmi_result_get_uint8(result, 0x01, &index)) { + ofono_error("Failed query default profile"); + goto error; + } + + DBG("Default profile index: %hhd", index); + + data->last_auto_context_id = index; + + /* Get LTE Attach Parameters */ + if (qmi_service_send(data->wds, 0x85, NULL, + get_lte_attach_param_cb, gprs, NULL) > 0) + return; + +error: + data->last_auto_context_id = 0; + ofono_error("LTE bearer established but APN not set"); +} + +/* + * Query the settings in effect on the default bearer. These may be + * implicit or may even be something other than requested as the gateway + * is allowed to override whatever was requested by the user. + */ +static void get_lte_attach_params(struct ofono_gprs* gprs) +{ + struct gprs_data *data = ofono_gprs_get_data(gprs); + struct { + uint8_t type; + uint8_t family; + } __attribute((packed)) p = { + .type = 0, /* 3GPP */ + .family = 0, /* embedded */ + }; + struct qmi_param *param; + + DBG(""); + + if (data->last_auto_context_id != 0) + return; /* Established or in progress */ + + /* Set query in progress */ + data->last_auto_context_id = -1; + + /* First we query the default profile in order to find out which + * context the modem has activated. + */ + param = qmi_param_new(); + if (!param) + goto error; + + /* Profile type */ + qmi_param_append(param, 0x1, sizeof(p), &p); + + /* Get default profile */ + if (qmi_service_send(data->wds, 0x49, param, + get_default_profile_cb, gprs, NULL) > 0) + return; + + qmi_param_free(param); + +error: + ofono_warn("Unable to query LTE APN... will not activate context"); +} + static int handle_ss_info(struct qmi_result *result, struct ofono_gprs *gprs) { + struct gprs_data *data = ofono_gprs_get_data(gprs); int status; int tech; @@ -74,17 +194,20 @@ if (!extract_ss_info(result, &status, &tech)) return -1; - if (status == NETWORK_REGISTRATION_STATUS_REGISTERED) + if (status == NETWORK_REGISTRATION_STATUS_REGISTERED) { if (tech == ACCESS_TECHNOLOGY_EUTRAN) { /* On LTE we are effectively always attached; and * the default bearer is established as soon as the - * network is joined. - */ - /* FIXME: query default profile number and APN - * instead of assuming profile 1 and "" + * network is joined. We just need to query the + * parameters in effect on the default bearer and + * let the ofono core know about the activated + * context. */ - ofono_gprs_cid_activated(gprs, 1 , "automatic"); + get_lte_attach_params(gprs); } + } else { + data->last_auto_context_id = 0; + } return status; } @@ -198,7 +321,7 @@ g_free(cbd); } -static void create_nas_cb(struct qmi_service *service, void *user_data) +static void create_wds_cb(struct qmi_service *service, void *user_data) { struct ofono_gprs *gprs = user_data; struct gprs_data *data = ofono_gprs_get_data(gprs); @@ -206,12 +329,12 @@ DBG(""); if (!service) { - ofono_error("Failed to request NAS service"); + ofono_error("Failed to request WDS service"); ofono_gprs_remove(gprs); return; } - data->nas = qmi_service_ref(service); + data->wds = qmi_service_ref(service); /* * First get the SS info - the modem may already be connected, @@ -228,6 +351,25 @@ ofono_gprs_register(gprs); } +static void create_nas_cb(struct qmi_service *service, void *user_data) +{ + struct ofono_gprs *gprs = user_data; + struct gprs_data *data = ofono_gprs_get_data(gprs); + + DBG(""); + + if (!service) { + ofono_error("Failed to request NAS service"); + ofono_gprs_remove(gprs); + return; + } + + data->nas = qmi_service_ref(service); + + qmi_service_create_shared(data->dev, QMI_SERVICE_WDS, + create_wds_cb, gprs, NULL); +} + static int qmi_gprs_probe(struct ofono_gprs *gprs, unsigned int vendor, void *user_data) { @@ -240,6 +382,8 @@ ofono_gprs_set_data(gprs, data); + data->dev = device; + qmi_service_create_shared(device, QMI_SERVICE_NAS, create_nas_cb, gprs, NULL); @@ -254,6 +398,9 @@ ofono_gprs_set_data(gprs, NULL); + qmi_service_unregister_all(data->wds); + qmi_service_unref(data->wds); + qmi_service_unregister_all(data->nas); qmi_service_unref(data->nas); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/drivers/qmimodem/lte.c new/ofono-1.23/drivers/qmimodem/lte.c --- old/ofono-1.22/drivers/qmimodem/lte.c 1970-01-01 01:00:00.000000000 +0100 +++ new/ofono-1.23/drivers/qmimodem/lte.c 2018-03-10 17:16:16.000000000 +0100 @@ -0,0 +1,264 @@ +/* + * + * oFono - Open Source Telephony + * + * Copyright (C) 2018 Jonas Bonn. All rights reserved. + * Copyright (C) 2018 Norrbonn AB. All rights reserved. + * Copyright (C) 2018 Data Respons ASA. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#define _GNU_SOURCE +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <errno.h> + +#include <glib.h> + +#include <ofono/modem.h> +#include <ofono/gprs-context.h> +#include <ofono/log.h> +#include <ofono/lte.h> + +#include "qmi.h" +#include "wds.h" + +#include "qmimodem.h" + +struct lte_data { + struct qmi_service *wds; + uint8_t default_profile; +}; + +static void modify_profile_cb(struct qmi_result *result, void *user_data) +{ + struct cb_data *cbd = user_data; + ofono_lte_cb_t cb = cbd->cb; + uint16_t error; + + DBG(""); + + if (qmi_result_set_error(result, &error)) { + DBG("Failed to modify profile: %d", error); + CALLBACK_WITH_FAILURE(cb, cbd->data); + return; + } + + CALLBACK_WITH_SUCCESS(cb, cbd->data); +} + +static void qmimodem_lte_set_default_attach_info(const struct ofono_lte *lte, + const struct ofono_lte_default_attach_info *info, + ofono_lte_cb_t cb, void *data) +{ + struct lte_data *ldd = ofono_lte_get_data(lte); + struct cb_data *cbd = cb_data_new(cb, data); + struct qmi_param* param; + struct { + uint8_t type; + uint8_t index; + } __attribute__((packed)) p = { + .type = 0, /* 3GPP */ + }; + + DBG(""); + + p.index = ldd->default_profile; + + param = qmi_param_new(); + if (!param) + goto error; + + /* Profile selector */ + qmi_param_append(param, 0x01, sizeof(p), &p); + + /* WDS APN Name */ + qmi_param_append(param, QMI_WDS_PARAM_APN, + strlen(info->apn), info->apn); + + /* Modify profile */ + if (qmi_service_send(ldd->wds, 0x28, param, + modify_profile_cb, cbd, g_free) > 0) + return; + + qmi_param_free(param); + +error: + CALLBACK_WITH_FAILURE(cb, cbd->data); +} + +static void reset_profile_cb(struct qmi_result *result, void *user_data) +{ + struct ofono_lte *lte = user_data; + uint16_t error; + + DBG(""); + + if (qmi_result_set_error(result, &error)) + ofono_error("Reset profile error: %hd", error); + + ofono_lte_register(lte); +} + +static void get_default_profile_cb(struct qmi_result *result, void *user_data) +{ + struct ofono_lte *lte = user_data; + struct lte_data *ldd = ofono_lte_get_data(lte); + uint16_t error; + uint8_t index; + struct qmi_param *param; + struct { + uint8_t type; + uint8_t index; + } __attribute__((packed)) p = { + .type = 0, /* 3GPP */ + }; + + DBG(""); + + if (qmi_result_set_error(result, &error)) { + ofono_error("Get default profile error: %hd", error); + goto error; + } + + /* Profile index */ + if (!qmi_result_get_uint8(result, 0x01, &index)) { + ofono_error("Failed query default profile"); + goto error; + } + + DBG("Default profile index: %hhd", index); + + ldd->default_profile = index; + + p.index = index; + + param = qmi_param_new(); + if (!param) + goto error; + + /* Profile selector */ + qmi_param_append(param, 0x01, sizeof(p), &p); + + /* Reset profile */ + if (qmi_service_send(ldd->wds, 0x4b, param, + reset_profile_cb, lte, NULL) > 0) + return; + + qmi_param_free(param); + +error: + ofono_error("Failed to reset profile %hhd", index); + ofono_lte_remove(lte); +} + +static void create_wds_cb(struct qmi_service *service, void *user_data) +{ + struct ofono_lte *lte = user_data; + struct lte_data *ldd = ofono_lte_get_data(lte); + struct qmi_param *param; + struct { + uint8_t type; + uint8_t family; + } __attribute((packed)) p = { + .type = 0, /* 3GPP */ + .family = 0, /* embedded */ + }; + + DBG(""); + + if (!service) { + ofono_error("Failed to request WDS service"); + ofono_lte_remove(lte); + return; + } + + ldd->wds = qmi_service_ref(service); + + /* Query the default profile */ + param = qmi_param_new(); + if (!param) + goto error; + + /* Profile type */ + qmi_param_append(param, 0x1, sizeof(p), &p); + + /* Get default profile */ + if (qmi_service_send(ldd->wds, 0x49, param, + get_default_profile_cb, lte, NULL) > 0) + return; + + qmi_param_free(param); + +error: + ofono_error("Failed to query default profile"); + ofono_lte_register(lte); +} + +static int qmimodem_lte_probe(struct ofono_lte *lte, void *data) +{ + struct qmi_device *device = data; + struct lte_data *ldd; + + DBG("qmimodem lte probe"); + + ldd = g_try_new0(struct lte_data, 1); + if (!ldd) + return -ENOMEM; + + ofono_lte_set_data(lte, ldd); + + qmi_service_create_shared(device, QMI_SERVICE_WDS, + create_wds_cb, lte, NULL); + + return 0; +} + +static void qmimodem_lte_remove(struct ofono_lte *lte) +{ + struct lte_data *ldd = ofono_lte_get_data(lte); + + DBG(""); + + ofono_lte_set_data(lte, NULL); + + qmi_service_unregister_all(ldd->wds); + + qmi_service_unref(ldd->wds); + + g_free(ldd); +} + +static struct ofono_lte_driver driver = { + .name = "qmimodem", + .probe = qmimodem_lte_probe, + .remove = qmimodem_lte_remove, + .set_default_attach_info = qmimodem_lte_set_default_attach_info, +}; + +void qmi_lte_init(void) +{ + ofono_lte_driver_register(&driver); +} + +void qmi_lte_exit(void) +{ + ofono_lte_driver_unregister(&driver); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/drivers/qmimodem/qmimodem.c new/ofono-1.23/drivers/qmimodem/qmimodem.c --- old/ofono-1.22/drivers/qmimodem/qmimodem.c 2017-10-05 16:32:37.000000000 +0200 +++ new/ofono-1.23/drivers/qmimodem/qmimodem.c 2018-03-10 17:16:16.000000000 +0100 @@ -39,6 +39,7 @@ qmi_ussd_init(); qmi_gprs_init(); qmi_gprs_context_init(); + qmi_lte_init(); qmi_radio_settings_init(); qmi_location_reporting_init(); qmi_netmon_init(); @@ -51,6 +52,7 @@ qmi_netmon_exit(); qmi_location_reporting_exit(); qmi_radio_settings_exit(); + qmi_lte_exit(); qmi_gprs_context_exit(); qmi_gprs_exit(); qmi_ussd_exit(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/drivers/qmimodem/qmimodem.h new/ofono-1.23/drivers/qmimodem/qmimodem.h --- old/ofono-1.22/drivers/qmimodem/qmimodem.h 2017-10-05 16:32:37.000000000 +0200 +++ new/ofono-1.23/drivers/qmimodem/qmimodem.h 2018-03-10 17:16:16.000000000 +0100 @@ -48,6 +48,9 @@ extern void qmi_gprs_context_init(void); extern void qmi_gprs_context_exit(void); +extern void qmi_lte_init(void); +extern void qmi_lte_exit(void); + extern void qmi_radio_settings_init(void); extern void qmi_radio_settings_exit(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/drivers/qmimodem/radio-settings.c new/ofono-1.23/drivers/qmimodem/radio-settings.c --- old/ofono-1.22/drivers/qmimodem/radio-settings.c 2017-10-05 16:32:37.000000000 +0200 +++ new/ofono-1.23/drivers/qmimodem/radio-settings.c 2018-03-10 17:16:16.000000000 +0100 @@ -277,6 +277,9 @@ ofono_radio_settings_set_data(rs, NULL); + qmi_service_unregister_all(data->dms); + qmi_service_unref(data->dms); + qmi_service_unregister_all(data->nas); qmi_service_unref(data->nas); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/include/voicecall.h new/ofono-1.23/include/voicecall.h --- old/ofono-1.22/include/voicecall.h 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/include/voicecall.h 2018-03-10 17:16:16.000000000 +0100 @@ -61,6 +61,10 @@ const struct ofono_phone_number *number, enum ofono_clir_option clir, ofono_voicecall_cb_t cb, void *data); + /* dials a number at a given memory location */ + void (*dial_memory)(struct ofono_voicecall *vc, + unsigned int memory_location, ofono_voicecall_cb_t cb, + void *data); /* Dials the last number again, this handles the hfp profile last number * dialing with the +BLDN AT command */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/plugins/gobi.c new/ofono-1.23/plugins/gobi.c --- old/ofono-1.22/plugins/gobi.c 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/plugins/gobi.c 2018-03-10 17:16:16.000000000 +0100 @@ -43,6 +43,7 @@ #include <ofono/ussd.h> #include <ofono/gprs.h> #include <ofono/gprs-context.h> +#include <ofono/lte.h> #include <ofono/radio-settings.h> #include <ofono/location-reporting.h> #include <ofono/log.h> @@ -483,6 +484,8 @@ DBG("%p", modem); + ofono_lte_create(modem, "qmimodem", data->device); + if (data->features & GOBI_CAT) ofono_stk_create(modem, 0, "qmimodem", data->device); else if (data->features & GOBI_CAT_OLD) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/plugins/udevng.c new/ofono-1.23/plugins/udevng.c --- old/ofono-1.22/plugins/udevng.c 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/plugins/udevng.c 2018-03-10 17:16:16.000000000 +0100 @@ -1732,6 +1732,8 @@ continue; if (driver_list[i].setup(modem) == TRUE) { + ofono_modem_set_string(modem->modem, "SystemPath", + syspath); ofono_modem_register(modem->modem); return FALSE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/src/modem.c new/ofono-1.23/src/modem.c --- old/ofono-1.22/src/modem.c 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/src/modem.c 2018-03-10 17:16:16.000000000 +0100 @@ -792,6 +792,7 @@ struct ofono_devinfo *info; dbus_bool_t emergency = ofono_modem_get_emergency_mode(modem); const char *strtype; + const char *system_path; ofono_dbus_dict_append(dict, "Online", DBUS_TYPE_BOOLEAN, &modem->online); @@ -832,6 +833,11 @@ &info->svn); } + system_path = ofono_modem_get_string(modem, "SystemPath"); + if (system_path) + ofono_dbus_dict_append(dict, "SystemPath", DBUS_TYPE_STRING, + &system_path); + interfaces = g_new0(char *, g_slist_length(modem->interface_list) + 1); for (i = 0, l = modem->interface_list; l; l = l->next, i++) interfaces[i] = l->data; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/src/phonebook.c new/ofono-1.23/src/phonebook.c --- old/ofono-1.22/src/phonebook.c 2017-10-05 16:32:37.000000000 +0200 +++ new/ofono-1.23/src/phonebook.c 2018-03-10 17:16:16.000000000 +0100 @@ -428,7 +428,6 @@ g_slist_foreach(phonebook->merge_list, print_merged_entry, phonebook->vcards); g_slist_free_full(phonebook->merge_list, destroy_merged_entry); - g_slist_free(phonebook->merge_list); phonebook->merge_list = NULL; phonebook->storage_index++; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/src/sim-auth.c new/ofono-1.23/src/sim-auth.c --- old/ofono-1.22/src/sim-auth.c 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/src/sim-auth.c 2018-03-10 17:16:16.000000000 +0100 @@ -139,8 +139,17 @@ struct ofono_sim_auth *sa = __ofono_atom_get_data(atom); free_apps(sa); + g_free(sa->nai); - g_free(sa->pending); + if (sa->pending) { + __ofono_dbus_pending_reply(&sa->pending->msg, + __ofono_error_sim_not_ready(sa->pending->msg)); + + __ofono_sim_remove_session_watch(sa->pending->session, + sa->pending->watch_id); + g_free(sa->pending); + sa->pending = NULL; + } } static void sim_auth_remove(struct ofono_atom *atom) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/src/sim.c new/ofono-1.23/src/sim.c --- old/ofono-1.22/src/sim.c 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/src/sim.c 2018-03-10 17:16:16.000000000 +0100 @@ -2601,8 +2601,16 @@ if (sim->impi) g_free(sim->impi); - if (sim->aid_sessions) + if (sim->aid_list) { + g_slist_free_full(sim->aid_list, + (GDestroyNotify) sim_app_record_free); + sim->aid_list = NULL; + } + + if (sim->aid_sessions) { g_slist_free_full(sim->aid_sessions, aid_session_free); + sim->aid_sessions = NULL; + } sim->initialized = false; sim->wait_initialized = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/src/simutil.c new/ofono-1.23/src/simutil.c --- old/ofono-1.22/src/simutil.c 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/src/simutil.c 2018-03-10 17:16:16.000000000 +0100 @@ -1549,6 +1549,12 @@ return ((cphs[index / 4] >> ((index % 4) * 2)) & 3) == 3; } +void sim_app_record_free(struct sim_app_record *app) +{ + g_free(app->label); + g_free(app); +} + GSList *sim_parse_app_template_entries(const unsigned char *buffer, int len) { GSList *ret = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/src/simutil.h new/ofono-1.23/src/simutil.h --- old/ofono-1.22/src/simutil.h 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/src/simutil.h 2018-03-10 17:16:16.000000000 +0100 @@ -517,6 +517,7 @@ gboolean sim_cphs_is_active(unsigned char *service_cphs, enum sim_cphs_service index); +void sim_app_record_free(struct sim_app_record *app); GSList *sim_parse_app_template_entries(const unsigned char *buffer, int len); int sim_build_umts_authenticate(unsigned char *buffer, int len, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/src/voicecall.c new/ofono-1.23/src/voicecall.c --- old/ofono-1.22/src/voicecall.c 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/src/voicecall.c 2018-03-10 17:16:16.000000000 +0100 @@ -1577,7 +1577,7 @@ return __ofono_error_failed(msg); } -static void manager_dial_last_callback(const struct ofono_error *error, +static void manager_dial_hfp_callback(const struct ofono_error *error, void *data) { struct ofono_voicecall *vc = data; @@ -1606,8 +1606,8 @@ __ofono_error_failed(vc->pending)); } -static int voicecall_dial_last(struct ofono_voicecall *vc, - ofono_voicecall_cb_t cb, void *data) +static int voicecall_dial_hfp(struct ofono_voicecall *vc, unsigned int position, + ofono_voicecall_cb_t cb, void *data) { struct ofono_modem *modem = __ofono_atom_get_modem(vc->atom); @@ -1617,9 +1617,6 @@ if (ofono_modem_get_online(modem) == FALSE) return -ENETDOWN; - if (vc->driver->dial_last == NULL) - return -ENOTSUP; - if (voicecalls_have_incoming(vc)) return -EBUSY; @@ -1630,7 +1627,18 @@ if (voicecalls_have_active(vc) && voicecalls_have_held(vc)) return -EBUSY; - vc->driver->dial_last(vc, cb, vc); + /* when position is not given we dial the last called number */ + if (position == 0) { + if (vc->driver->dial_last == NULL) + return -ENOTSUP; + + vc->driver->dial_last(vc, cb, vc); + } else { + if (vc->driver->dial_memory == NULL ) + return -ENOTSUP; + + vc->driver->dial_memory(vc, position, cb, vc); + } return 0; } @@ -1646,7 +1654,7 @@ vc->pending = dbus_message_ref(msg); - err = voicecall_dial_last(vc, manager_dial_last_callback, vc); + err = voicecall_dial_hfp(vc, 0, manager_dial_hfp_callback, vc); if (err >= 0) return NULL; @@ -1668,6 +1676,44 @@ return __ofono_error_failed(msg); } +static DBusMessage *manager_dial_memory(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + struct ofono_voicecall *vc = data; + int memory_location; + int err; + + if (vc->pending || vc->dial_req || vc->pending_em) + return __ofono_error_busy(msg); + + if (dbus_message_get_args(msg, NULL, DBUS_TYPE_UINT32, &memory_location, + DBUS_TYPE_INVALID) == FALSE) + return __ofono_error_invalid_args(msg); + + vc->pending = dbus_message_ref(msg); + + err = voicecall_dial_hfp(vc, memory_location, + manager_dial_hfp_callback, vc); + if (err >= 0) + return NULL; + + vc->pending = NULL; + dbus_message_unref(msg); + + switch (err) { + case -EINVAL: + return __ofono_error_invalid_format(msg); + + case -ENETDOWN: + return __ofono_error_not_available(msg); + + case -ENOTSUP: + return __ofono_error_not_implemented(msg); + } + + return __ofono_error_failed(msg); +} + static DBusMessage *manager_transfer(DBusConnection *conn, DBusMessage *msg, void *data) { @@ -2225,6 +2271,9 @@ GDBUS_ARGS({ "path", "o" }), manager_dial) }, { GDBUS_ASYNC_METHOD("DialLast", NULL, NULL, manager_dial_last)}, + { GDBUS_ASYNC_METHOD("DialMemory", + GDBUS_ARGS({"memory_location", "u" }), NULL, + manager_dial_memory) }, { GDBUS_ASYNC_METHOD("Transfer", NULL, NULL, manager_transfer) }, { GDBUS_ASYNC_METHOD("SwapCalls", NULL, NULL, manager_swap_calls) }, { GDBUS_ASYNC_METHOD("ReleaseAndAnswer", NULL, NULL, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ofono-1.22/unit/test-simutil.c new/ofono-1.23/unit/test-simutil.c --- old/ofono-1.22/unit/test-simutil.c 2018-01-21 18:59:31.000000000 +0100 +++ new/ofono-1.23/unit/test-simutil.c 2018-03-10 17:16:16.000000000 +0100 @@ -471,6 +471,7 @@ g_assert(app[1]->label != NULL); g_assert(!strcmp(app[1]->label, "MIDPfiles")); + g_slist_free_full(entries, (GDestroyNotify) sim_app_record_free); g_free(ef_dir); } ++++++ ofono-1.22.tar.xz.sig -> ofono-1.23.tar.xz.sig ++++++ --- /work/SRC/openSUSE:Factory/ofono/ofono-1.22.tar.xz.sig 2018-01-28 20:33:46.305913200 +0100 +++ /work/SRC/openSUSE:Factory/.ofono.new/ofono-1.23.tar.xz.sig 2018-03-12 12:13:40.863278419 +0100 @@ -283,20 +283,22 @@ a6b021cda0b444b772897cd637d5f455857fb5819b62c279a8302b44f9c7f2c3 ofono-1.21.tar.xz 8af95b444e8e7b39ef40c4ad5e6b228d3275446278c45a98525f62cc3f07682b ofono-1.22.tar.gz 8e34a6696c300c9841b55e8dff640bd3096e49f5dbe55bbebaa69a71676f687e ofono-1.22.tar.xz +1d26f61325bd9a026db4bf4e3847c7b98850a3f9d3d342687c2f3fe0893c5ea4 ofono-1.23.tar.gz +4dacdc61571aad7ce8b4412ed51d03bec3d4060b93ee68f8c69b26b223bdc975 ofono-1.23.tar.xz -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iQIcBAEBCAAGBQJaZNxZAAoJEGMtOgZYnaaxuxwP/30f1iWcVA0xgbAMm8thuQ3i -cyDuat+DqvRuhjHIB5pc+YvAcnoo3LZdJgWajldxiPyw5ce29a8+dx2iO7fOKiw3 -57QcopnVfcWb9Nf3ydkQtF9UH6y6rYLKeNhkIUd0KYBKyGu+yfvGkD0cI4iZI0xw -VZMGm3nBLUiKn0B6xCWveCq3seo2Wn6UFj//NVueZ6Hc5JmK3huRGnkKC0p92wpR -2XKzIp4rsO7Hh527udBi1OOmeNKaCva9f9NwGExAAvfkEhObs6Ts56jh6/SCMndP -oc4GqVec+E5tdQbAcfOOobKv41rom58Q35D4j95lhUtHMmroN4e+8t0evF8edLX/ -GZk8jAnmWMMrAc6z6pl10g5lz6YsZxYovD8nukZry05V2hjzty8tlchfXQR/OiB6 -VeDjJVta8oJmLvkglYyBFZk8uCJpChT666uegfW6lYiG2zTtG9j9P86lND3AbSUv -fQ4IbVB9Y+1Q8Qh7QxxjaKmt/O34PHguq7ZHWM520m+Z9VJcmCwXLfjoCfrLL3kr -wOxd453FwmaO7UP1kHNwnu7d9XkLn+krR1nNTyFAN9NsX0S+PA2FVZY+KT8jSxxr -LlnqCvStBCFTTw+RsPFp8Hlt5q7EjnZYcryVX1Naarse3K4IRVVCGdyxaJcZVqWc -7xFJ4BxO4QxInO58Uwsq -=jv7K +iQIcBAEBCAAGBQJapAllAAoJEGMtOgZYnaaxDRQP/14sINKfsG93ERZ718+FTDkd +ZvUf16mh+oARkGoMmU/2/Cp6MuttlQvtvMyPtnOfAnOfYPBrp6Uw1IUsdg1pnkmU +Kl0wgGxmyedc8KGXRzTwPKR/KFnhanzoKnUIK9Ubw4WN9HbxeCAU5bjGcgfleKVN +fTfh+zWahXQe9QMrIjpp1RPVHNUuXQeJdk7QmThxOVDXZXh/u3V+KwhAYpkkgyo8 +TJH4zYqhXgc9frUQF/5hNtAmMKbEq6zTDxSmBYg7LDEpuz/1NIrbEQmNbcybmplS +PgHooBAPQzlDX+i+BTs73/fq+AwCf/R1yMZ8p1SGuk5sjWQF1IIKRJ5LyJv9mf9z +ZTL1yHVOzK44gdiiQAWhBEPsgxecvHHa8sl7XRPtQNwi0EY7tiw6Weplmph3Lfpt +PQ66PYRiFtsEHkdai8QCD1DF5SvLEG9lqy3iXlyBOqXBEI0EO50bwe5Y0vPu54Fg +25ZT52743vGGc6cSo5wMNhwbTYaptn83rnfXNNMN0ToqOYDhCxpbC9vCQw1PdXtQ +AapRGwcEjUZvp7JAuIcCF8O7IX2hwHjMSpZ+RJg3xu/W+mSl9c8Z+hoNxKBN6x/A +NTI8dlyjykrHM6x5IT0eah08r9faHAa/SlasU0dBTUiSEyzJ1TeUuFsmSB/jq7YJ +RoZGBzufO8GTUDmv8KJ0 +=svOQ -----END PGP SIGNATURE-----
