[PATCH v3 2/4] net: qrtr: Assign unique node id for MHI endpoints
Manivannan Sadhasivam
mani at kernel.org
Tue Sep 29 12:32:27 PDT 2026
On Tue, Sep 29, 2026 at 07:05:31PM +0200, Marcel Holtmann wrote:
> Hi Deepak,
>
> >> Now that the QRTR driver allows using the unique node id for each device,
> >> which is different from the node id received from the remote node, compute
> >> a unique node id using a new API, qrtr_host_node_id().
> >>
> >> This API takes the 'index' parameter and adds it to QRTR_NODE_HOST_BASE,
> >> whose value is outside of the node id range used by the remote nodes (0 to
> >> 0xffff).
> >>
> >> Finally, call the new API from MHI endpoint driver by passing the MHI
> >> controller index as the parameter. The MHI controller index is unique for
> >> each controller, thereby for each MHI endpoint device.
> >>
> >> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at oss.qualcomm.com>
> >> ---
> >> MAINTAINERS | 1 +
> >> include/net/qrtr.h | 21 +++++++++++++++++++++
> >> net/qrtr/mhi.c | 4 +++-
> >> 3 files changed, 25 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/MAINTAINERS b/MAINTAINERS
> >> index df8ab9b82402..9c8bb086be28 100644
> >> --- a/MAINTAINERS
> >> +++ b/MAINTAINERS
> >> @@ -22511,6 +22511,7 @@ QUALCOMM IPC ROUTER (QRTR) DRIVER
> >> M: Manivannan Sadhasivam <mani at kernel.org>
> >> L: linux-arm-msm at vger.kernel.org
> >> S: Maintained
> >> +F: include/net/qrtr.h
> >> F: include/trace/events/qrtr.h
> >> F: include/uapi/linux/qrtr.h
> >> F: net/qrtr/
> >> diff --git a/include/net/qrtr.h b/include/net/qrtr.h
> >> new file mode 100644
> >> index 000000000000..745d51b4a6ba
> >> --- /dev/null
> >> +++ b/include/net/qrtr.h
> >> @@ -0,0 +1,21 @@
> >> +/* SPDX-License-Identifier: GPL-2.0 */
> >> +
> >> +#ifndef _NET_QRTR_H
> >> +#define _NET_QRTR_H
> >> +
> >> +#include <linux/types.h>
> >> +
> >> +/* The offset is chosen carefully to not collide with the node ids allocated by
> >> + * the remote nodes. All the remote nodes use node ids in range 0 to 0xffff.
> >> + */
> >> +#define QRTR_NODE_HOST_BASE 0x10000u
> >
> > Can it be exposed with include/uapi/linux/qrtr.h also. There are user space clients like modem manager
> > which need to calculate modified node id to distinguish same service from multi modem over mhi.
> > This is same as wlan use case.
>
> did anybody actually looked at the proposal that Denis and I came up with. It was exactly addressing this properly.
>
I did review the proposal from Juha and shared my review feedback.
> It seems you guys came up with some hot fix and want to run with it. After month and month of silence and not bothering to review the proposal, you are trying to push your thing?
>
I aplologized for the very late review. But the series I shared was not just
some hot fix, but a proper solution (without userspace ABI though as I didn't
forsee the requirement) that works for the multi-WLAN setups.
> If you don’t support userspace, your proposal is broken. Plain and simple.
>
Small correction: broken for some setups, not all. But I do get the point. I'll
incorporate this ABI in next version.
Thanks for the review!
- Mani
--
மணிவண்ணன் சதாசிவம்
More information about the ath12k
mailing list