From 2e488c37938fbdfc793bb516d1e7f4bc57a3af8f Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Mon, 22 May 2023 14:25:31 +0530 Subject: [PATCH] qcacld-3.0: Enable 11d on different vdev Currently host enables 11d on different available vdev before it sends the vdev delete command to the FW. Since 11d is already enabled on existing vdev, FW, do not enable the 11d on this command on different vdev. For example in current issue, when host driver creates vdev0, it enables 11d on vdev0. Now it creates vdev1. when host drivers tries to delete vdev0, it sends 11d start command on vdev1 before it sends vdev delete for vdev0. Since 11d is already enabled on vdev0, fw do not enable 11d on vdev1. Now host driver deletes vdev0. Since FW rejects 11d start on vdev1, 11d algorithm does not run after vdev0 deletion. To fix this issue, enable 11d on different vdev, once host deletes the current 11d vdev. Change-Id: If49a0ad62fb67a93b9f4049340a26e6f6b335f5c CRs-Fixed: 3457642 --- core/hdd/src/wlan_hdd_main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 7a470ee7f5..09f7bccdf5 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -6880,7 +6880,6 @@ static inline void hdd_vdev_deinit_components(struct wlan_objmgr_vdev *vdev) { ucfg_pmo_del_wow_pattern(vdev); - ucfg_reg_11d_vdev_delete_update(vdev); ucfg_son_disable_cbs(vdev); } @@ -6898,6 +6897,8 @@ int hdd_vdev_destroy(struct wlan_hdd_link_info *link_info) uint8_t vdev_id; struct hdd_context *hdd_ctx; struct wlan_objmgr_vdev *vdev; + struct wlan_objmgr_psoc *psoc; + enum QDF_OPMODE op_mode; vdev_id = link_info->vdev_id; hdd_nofl_debug("destroying vdev %d", vdev_id); @@ -6913,6 +6914,13 @@ int hdd_vdev_destroy(struct wlan_hdd_link_info *link_info) if (!vdev) return -EINVAL; + psoc = wlan_vdev_get_psoc(vdev); + if (!psoc) { + hdd_err("invalid psoc"); + return -EINVAL; + } + op_mode = wlan_vdev_mlme_get_opmode(vdev); + hdd_stop_last_active_connection(hdd_ctx, vdev); hdd_check_wait_for_hw_mode_completion(hdd_ctx); ucfg_scan_vdev_set_disable(vdev, REASON_VDEV_DOWN); @@ -6932,6 +6940,8 @@ int hdd_vdev_destroy(struct wlan_hdd_link_info *link_info) ret = hdd_vdev_destroy_event_wait(hdd_ctx, vdev); + ucfg_reg_11d_vdev_delete_update(psoc, op_mode, vdev_id); + qdf_runtime_pm_allow_suspend(&hdd_ctx->runtime_context.vdev_destroy); return ret; }