124 Commits

Author SHA1 Message Date
Konrad Dybcio
a38e9afbe7 Merge pull request #38 from linux-msm/topic/lunar_eol
ci: Drop EOL Ubuntu Lunar
2025-12-08 13:17:23 +01:00
Konrad Dybcio
76a7663d7d ci: Drop EOL Ubuntu Lunar
Signed-off-by: Konrad Dybcio <konradybcio@kernel.org>
2025-12-08 13:13:46 +01:00
Konrad Dybcio
cd069ad7ed Merge pull request #37 from z3ntu/drop-ns
ns: Drop qrtr-ns
2025-12-08 13:10:50 +01:00
Konrad Dybcio
b51ffaf227 meson.build: Tag v1.2 v1.2 2025-12-08 13:02:58 +01:00
Luca Weiss
3edda0ebec ns: Drop qrtr-ns
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>
2025-11-21 13:16:29 +01:00
Luca Weiss
6d950d26e5 meson.build: Remove unused hash.c from qrtr-cfg compilation
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
2025-11-21 13:15:55 +01:00
Luca Weiss
ab378a18f4 lookup: Remove unused header
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
2025-11-21 13:10:13 +01:00
Dmitry Baryshkov
5923eea973 Merge pull request #35 from minlexx/lookup-new-smgr-ids
lookup: add Sensor Manager (SMGR) service IDs
2025-03-01 23:06:36 +02:00
Alexey Min
305b4615d1 lookup: add Sensor Manager (SMGR) service IDs
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>
2025-02-14 15:36:50 +03:00
Dylan Van Assche
ef44ad10f2 qrtr.py: adding missing buffer size arg to recvfrom
qrtr_recvfrom needs to know the size of the buffer, add this missing argument.
2024-08-21 17:51:52 +02:00
Konrad Dybcio
daf7f4cc32 treewide: Include libqrtr.h as a global header
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2024-05-21 11:10:11 +02:00
Arnaud Ferraris
b6b586f3d0 lib: meson.build: restore libqrtr SONAME
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`.
2024-04-30 23:51:42 +02:00
Konrad Dybcio
8f9b2bc3b6 meson.build: Make building qrtr-ns opt-in
It's been moved to the kernel since forever..

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
v1.1
2024-04-09 20:08:09 +02:00
Konrad Dybcio
d9e0ddf06a Add github CI (yanked from cdba) 2024-04-09 19:31:56 +02:00
Konrad Dybcio
26d69ebc13 meson.build: Allow skipping the systemd service 2024-04-09 19:31:56 +02:00
Konrad Dybcio
bc35b65b36 meson.build: Remove faux vesion req 2024-04-09 19:31:56 +02:00
Konrad Dybcio
415736c850 meson.build: Enable more warnings 2024-04-09 13:14:34 +02:00
Konrad Dybcio
baee896ad0 qmi: fix format warnings 2024-04-09 13:14:34 +02:00
Konrad Dybcio
520d10f554 ns: fix format warnings 2024-04-09 13:14:34 +02:00
Konrad Dybcio
ed513e627b lib: generate pkgconfig 2024-04-09 13:14:34 +02:00
Konrad Dybcio
140f46d4ed lookup: fix format warnings 2024-04-09 13:14:34 +02:00
Konrad Dybcio
dece9315ea treewide: meson
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2024-04-09 13:14:34 +02:00
Konrad Dybcio
20d1f78be8 lookup: Add more services
42667c34e2/sec_config
2024-04-08 22:30:02 +02:00
Konrad Dybcio
2d7962efff Merge pull request #24 from a-wai/clean-service
Makefile: remove generated service file when cleaning
2024-04-08 22:25:25 +02:00
Konrad Dybcio
7777177772 Merge pull request #25 from Ristovski/patch-1
lookup: Add several new services
2024-04-08 22:24:32 +02:00
Konrad Dybcio
df4a4cbed5 Merge pull request #26 from flamingradian/ims-data-service
lookup: add IMS data service
2024-04-08 22:12:37 +02:00
Richard Acayan
22a69b4f5e lookup: add IMS data service
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>
2024-03-25 21:48:37 -04:00
Rafael Ristovski
d81b7a377c lookup: Add several new services 2023-11-01 17:14:40 +01:00
Arnaud Ferraris
936c1978d5 Makefile: remove generated service file when cleaning
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.
2023-08-17 12:16:03 +02:00
Dylan Van Assche
d0d471c96e lookup: add Snapdragon Sensor Core service
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>
2023-01-17 22:59:41 -06:00
Jami Kettunen
a4398c8bf2 Makefile: allow $(CFLAGS), $(LDFLAGS) override
The caller might have specified CFLAGS or LDFLAGS. Let's respect those.
Additionally drop LDFLAGS var definition as it is empty.
2023-01-05 11:00:29 -06:00
Bjorn Andersson
9dc7a88548 libqrtr: Zero-initialize sockaddr_qrtr
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>
v1.0
2020-12-07 08:44:31 -08:00
Bjorn Andersson
983b223423 lookup: Add TFTP to known services list
Service 4096 is a QRTR based implementation of the TFTP RFCs.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-11-16 10:38:14 -06:00
Loic Poulain
cb1a6476e6 qrtr-lookup: Add DPM service name
Data Port Mapper service is ID 47.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2020-11-06 22:09:30 -08:00
Adam Serbinski
47e48a8d93 Android: Disable "treat warnings as errors". 2020-09-28 10:21:36 -05:00
Adam Serbinski
33bf949e4f Clang: fix for arithmetic disallowed on void pointers 2020-09-28 10:21:21 -05:00
Alex Khouderchah
fef484babd libqrtr: Use size_t for offsets
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.
2020-09-28 10:18:59 -05:00
Julien Massot
2ed52a30f6 qrtr-ns.service: do not install as executable
Fix
systemd[1]: Configuration file /lib/systemd/system/qrtr-ns.service is marked executable. Please remove executable permission bits. Proceeding anyway.
2020-09-28 10:17:11 -05:00
Bjorn Andersson
7bd5cf3024 ns: Go dormant when exsting name server is found
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>
2020-03-01 18:05:04 -08:00
Amit Pundir
2afd6f87b3 ANDROID: Add Android.bp makefile
Add Android.bp makefile to build libqrtr.so, qrtr-ns,
qrtr-cfg and qrtr-lookup targets for AOSP.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-02-03 09:17:15 -08:00
Bjorn Andersson
cd6bedd5d0 qrtr-ns.service: Add systemd service
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>
2019-07-24 23:25:16 -07:00
Bjorn Andersson
111403fe72 map: Fix removal of entries from the table
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>
2019-04-18 17:29:11 -07:00
Eric Caruso
c1bdfb37db logging: add min priority and other cleanup
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.
2018-12-10 16:03:04 -08:00
Eric Caruso
c9c4a3cdbd qrtr-lookup: print better information about DIAG service
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>
2018-12-10 15:59:56 -08:00
Bjorn Andersson
a1694a1c93 libqrtr: Correct "instance" composition
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>
2018-08-03 22:01:48 -07:00
Ben Chan
f9b5b38b50 qmi: pass `const struct qrtr_packet' to qmi_decode_header()
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>
2018-07-26 06:15:57 -07:00
Arun Kumar Neelakantam
4c4987ba7d libqrtr : Add support for signed one byte enum.
Add support to encode/decode one BYTE signed enum data type.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-07-16 09:03:29 -07:00
Ben Chan
eb666db04e qrtr-ns: initialize waiter_ticket struct in waiter_wait_timeout()
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>
2018-07-05 06:58:25 -07:00
Ben Chan
0ba75091ab libqrtr: add extern "C" guard in libqrtr.h
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>
2018-06-29 12:32:29 -07:00
Bjorn Andersson
a9c50b634f qrtr-lookup: Add description of service 52
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-06-25 16:36:04 -07:00