From 844d0c7af8de256c7ad9f86dc564dd9931b3fa02 Mon Sep 17 00:00:00 2001 From: Rakesh Pillai Date: Wed, 31 May 2023 03:55:39 -0700 Subject: [PATCH] qcacmn: Remove self peer creation for vdev Currently there is a self peer created for a vdev created in station mode, which is not necessary for kiwi target. Add support to disable self peer creation for vdev. Change-Id: Ib9d63aef392be66bd0675960a0abfc73c6462d2c CRs-Fixed: 3517791 --- dp/wifi3.0/dp_main.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 5c0a12723e..c3728a389e 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -3674,6 +3674,23 @@ dp_tx_vdev_traffic_end_indication_detach(struct dp_vdev *vdev) {} #endif +#ifdef WLAN_DP_VDEV_NO_SELF_PEER +static inline bool dp_vdev_self_peer_required(struct dp_soc *soc, + struct dp_vdev *vdev) +{ + return false; +} +#else +static inline bool dp_vdev_self_peer_required(struct dp_soc *soc, + struct dp_vdev *vdev) +{ + if (wlan_op_mode_sta == vdev->opmode) + return true; + + return false; +} +#endif + /** * dp_vdev_attach_wifi3() - attach txrx vdev * @cdp_soc: CDP SoC context @@ -3828,7 +3845,7 @@ static QDF_STATUS dp_vdev_attach_wifi3(struct cdp_soc_t *cdp_soc, if (QDF_IS_STATUS_ERROR(soc->arch_ops.txrx_vdev_attach(soc, vdev))) goto fail0; - if (wlan_op_mode_sta == vdev->opmode) + if (dp_vdev_self_peer_required(soc, vdev)) dp_peer_create_wifi3((struct cdp_soc_t *)soc, vdev_id, vdev->mac_addr.raw, CDP_LINK_PEER_TYPE);