From 6a2c5953c12302ace6d34cca068898f87642a88a Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Fri, 27 Mar 2020 12:44:51 -0700 Subject: [PATCH] qcacld-3.0: Change check for wma_is_vdev_started() to WLAN_VDEV_S_UP When running WHUNT test case for SET NUD STATS vendor command, wma_set_arp_req_stats is supposed to be sent to FW but it fails to send due to the check in wma_is_vdev_started(), which is currently checking if the vdev state is WLAN_VDEV_S_START, instead of WLAN_VDEV_S_UP, thus allowing vdev state WLAN_VDEV_S_UP to still continue when it is not started. Hence, change the check to WLAN_VDEV_S_UP to provide proper check. Change-Id: Ifae00ff26a27df92cd4d09047c326bcccfdbf602 CRs-Fixed: 2651406 --- core/wma/inc/wma_internal.h | 10 ---------- core/wma/src/wma_dev_if.c | 8 -------- core/wma/src/wma_main.c | 2 +- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h index 90fa4e789f66..93a0c51dfda6 100644 --- a/core/wma/inc/wma_internal.h +++ b/core/wma/inc/wma_internal.h @@ -1809,16 +1809,6 @@ int wma_fill_beacon_interval_reset_req(tp_wma_handle wma, uint8_t vdev_id, */ bool wma_is_vdev_valid(uint32_t vdev_id); -/* - * wma_is_vdev_started() - check whether vdev is started or not - * @vdev: pointer to vdev object - * - * This function verifies the vdev is started nor not - * - * Return: 'true' if vdev is started else 'false' - */ -bool wma_is_vdev_started(struct wlan_objmgr_vdev *vdev); - /** * wma_vdev_obss_detection_info_handler - event handler to handle obss detection * @handle: the wma handle diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 3a015ebbc77e..683351507a95 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -1356,14 +1356,6 @@ bool wma_is_vdev_valid(uint32_t vdev_id) return wma_handle->interfaces[vdev_id].vdev_active; } -bool wma_is_vdev_started(struct wlan_objmgr_vdev *vdev) -{ - if (WLAN_VDEV_S_START == wlan_vdev_mlme_get_state(vdev)) - return true; - else - return false; -} - /** * wma_vdev_set_param() - set per vdev params in fw * @wmi_handle: wmi handle diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 0158725d4386..4ca56a3973f5 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -7619,7 +7619,7 @@ static void wma_set_arp_req_stats(WMA_HANDLE handle, return; } - if (!wma_is_vdev_started(vdev)) { + if (!wma_is_vdev_up(req_buf->vdev_id)) { WMA_LOGD("vdev id:%d is not started", req_buf->vdev_id); goto release_ref; }