The qrtr-ns has been superceded by the in-kernel nameserver since
multiple years. If anybody wants to do archeology, they can find qrtr-ns
with old releases / in the git history. Drop it and remove quite some
code.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
On some older SoCs (older than SDM845) downstream userspace starts a
Sensor Registry service (271) to provide sensor configuration information
to a remote processor (SDSP or ADSP). After receiving registry data, SDSP
or ADSP exposes a Sensor Manager service "SMGR" (256), which allows to
access sensor readings. Add these services to the known list of services.
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
The previous version of `libqrtr` had `libqrtr.so.1` as their SONAME,
while the current version have only `libqrtr.so`. This is problematic as
previously built binaries using this lib will have to be rebuilt for
this new version (or rather, re-linked, which is practically
equivalent).
This change ensures the SONAME is kept by setting the project version
in the top-level `meson.build` and uses this string as the shared
library version.
In practice, the generated library filename is now `libqrtr.so.1.1` with
SONAME still being `libqrtr.so.1`.
The IMS data service is the service responsible for configuring a
connection used by the modem for IMS. Add the service.
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
After building the package, `make clean` doesn't delete the generated
service file. This patch ensures this file is included in the
`$(all-clean)` variable so it is removed when cleaning.
SDM845 and later expose a Snapdragon Sensor Core service (400) to access the sensors
managed by a remoteproc. Add this service to the known list of services.
Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
Valgrind complains that sockaddr_qrtr isn't properly initialized, even
though all fields are initialized. So explicitly clear the
sockaddr_qrtrs.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Currently, offsetof produces an unsigned long, while qmi_elem_info's
offset member is a uint32_t. Since this is not the same type on all
platforms, this change uses a size_t for both. stddef.h is also
included for the standard offsetof definition, which also produces a
size_t.
This change also makes similar modifications to list.h.
With the introduction of the in-kernel nameserver launching the user
space qrtr-ns will fail, but typically other services depends on its
presence. As such, go dormant instead of failing when noticed that the
name service is already present.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Add qrtr-ns.service template and install this into /lib/systemd/system
after modifying it according to $(DESTDIR) and $(prefix)
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Removing entries from an open addressed hash table creates holes in the
collision chains, preventing previous colliding entries to be found. By
inserting tombstones, rather than clearing deleted entries makes it
possible to distinguish the end of a chain from a hole.
Reviewed-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
The dprintf macro shadows a real libc symbol which is called
differently, so we should change it to something else (in this
case LOGD) and change it to use the libqrtr logging facilities.
This also means we should add a minimum priority to the logging
library so we don't log DEBUG-level messages by default.
Additionally there were some warn/warnx calls left over that
have been changed to PLOGW/LOGW respectively.
The DIAG service has its own encoding for the instance number which
is unrelated to the version. This means that the information we
show to the user in the version and instance columns of the table is
parsed incorrectly and often useless. Instead, treat the instance
number as special if the service is a DIAG service and print out a
more meaningful interpretation.
Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
The "instance" id of a service is a composition of the instance id and
the version. In some plaeces in the library I made this two half words
instead of the actually expected 8 bits version + 24 bit instance. Fix
this in the library.
This was not spotted previously because all prior work has dealt with
instance id 0, but with the QRTR support in Diag this is now an issue.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Similar to qmi_decode_message(), qmi_decode_header() doesn't modify the
`struct qrtr_packet' argument. This patch makes qmi_decode_header() to
take a `const struct qrtr_packet' argument like qmi_decode_message()
does.
Contributed by Jacob Rutherford <jruthe@chromium.org>
waiter_wait_timeout() doesn't initialize the 'callback' and 'updated'
fields of the waiter_ticket struct. The 'updated' field may contain some
garbage value, which is later read in waiter_ticket_check().
Signed-off-by: Ben Chan <benchan@chromium.org>
This patch adds an extern "C" guard in libqrtr.h, so that it can be
included in both C and C++ projects.
Signed-off-by: Ben Chan <benchan@chromium.org>