[PATCH v4 4/4] wifi: ath12k: Connect to the QMI server belonging to the device owned by this driver
Jeff Johnson
jeff.johnson at oss.qualcomm.com
Mon Oct 26 14:34:49 PDT 2026
On 10/22/2026 10:43 AM, Manivannan Sadhasivam via B4 Relay wrote:
> diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c
> index 6441927b5382..9b6108c1abdc 100644
> --- a/drivers/net/wireless/ath/ath12k/pci.c
> +++ b/drivers/net/wireless/ath/ath12k/pci.c
> @@ -10,6 +10,7 @@
> #include <linux/pci.h>
> #include <linux/time.h>
> #include <linux/vmalloc.h>
> +#include <net/qrtr.h>
>
> #include "pci.h"
> #include "core.h"
> @@ -1491,6 +1492,13 @@ static int ath12k_pci_panic_handler(struct ath12k_base *ab)
> return NOTIFY_OK;
> }
>
> +static unsigned int ath12k_pci_get_qrtr_node_id(struct ath12k_base *ab)
> +{
> + struct ath12k_pci *ab_pci = ath12k_pci_priv(ab);
> +
> + return qrtr_host_node_id(ab_pci->mhi_ctrl->index);
> +}
> +
note this hunk has a trivial conflict with current ath12k that landed during
the merge window since the ath12k_pci_panic_handler() that is part of the
context has been removed
> static const struct ath12k_hif_ops ath12k_pci_hif_ops = {
> .start = ath12k_pci_start,
> .stop = ath12k_pci_stop,
...
> diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
> index 280e50a1f31d..507062068f8e 100644
> --- a/drivers/net/wireless/ath/ath12k/qmi.c
> +++ b/drivers/net/wireless/ath/ath12k/qmi.c
> @@ -9,6 +9,7 @@
> #include "qmi.h"
> #include "core.h"
> #include "debug.h"
> +#include "hif.h"
> #include <linux/of.h>
> #include <linux/firmware.h>
> #include <linux/of_address.h>
> @@ -3940,8 +3941,18 @@ static int ath12k_qmi_ops_new_server(struct qmi_handle *qmi_hdl,
> struct ath12k_qmi *qmi = container_of(qmi_hdl, struct ath12k_qmi, handle);
> struct ath12k_base *ab = qmi->ab;
> struct sockaddr_qrtr *sq = &qmi->sq;
> + unsigned int node_id;
> int ret;
>
> + /* Identical devices advertise the same QMI services, so connect only to
note that networking code no longer uses this block comment style, so it is
preferred to have /* on a line by itself
> + * the QMI server on this device's node. A node id of 0 means the
> + * transport has not assigned a unique node id, so accept the server
> + * unfiltered.
> + */
> + node_id = ath12k_hif_get_qrtr_node_id(ab);
> + if (node_id && service->node != node_id)
> + return -EINVAL;
> +
> sq->sq_family = AF_QIPCRTR;
> sq->sq_node = service->node;
> sq->sq_port = service->port;
>
Since the requested merge strategy is for netdev to take the entire series:
Acked-by: Jeff Johnson <jeff.johnson at oss.qualcomm.com>
More information about the ath11k
mailing list