summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelvaraj, Sridhar <sselvara@qti.qualcomm.com>2016-03-18 15:16:49 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-03-22 18:31:21 +0530
commitcf7bf99eb9a71b1043cd230aee704c44c62c98ff (patch)
tree963fa0950d023b32a58cce7ae004e47a0241981d
parentbc0e53d04e76a21ff5ce781b930f229cae19052e (diff)
qcacld-2.0: Check if vdev is created before LL stats query
Link Layer(LL) stats query is received in host in a corner/race condition between the events "change iface" and "start ap" in HDD where vdev is not created yet ie.as part of "change iface" in HDD, host does close session (VDEV DELETE) and as part of start ap, host invokes open session(VDEV CREATE). It leads to an exception issue in firmware since FW receives REQUEST_LINK_STATS WMI for a deleted VDEV. This fix adds a boolean variable vdev_active to vdev structure(wma_txrx_node), which is set to true once vdev is created. vdev_active is checked for TRUE before sending LL stats query to FW with WMI command. Change-Id: Ifcc986c3352e4e66da35b8d6c489d98dbe61401d CRs-Fixed: 987734
-rw-r--r--CORE/SERVICES/WMA/wma.c7
-rw-r--r--CORE/SERVICES/WMA/wma.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index e35aa11af9c3..8ddc796addcf 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -8265,6 +8265,8 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
self_sta_req->sessionId);
goto end;
}
+
+ wma_handle->interfaces[self_sta_req->sessionId].vdev_active = TRUE;
wma_handle->interfaces[self_sta_req->sessionId].handle = txrx_vdev_handle;
wma_handle->interfaces[self_sta_req->sessionId].ptrn_match_enable =
@@ -25736,6 +25738,11 @@ static VOS_STATUS wma_process_ll_stats_getReq
return VOS_STATUS_E_FAILURE;
}
+ if (!wma->interfaces[getReq->staId].vdev_active) {
+ WMA_LOGE("%s: vdev not created yet", __func__);
+ return VOS_STATUS_E_FAILURE;
+ }
+
len = sizeof(*cmd);
buf = wmi_buf_alloc(wma->wmi_handle, len);
diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h
index 3f5329e94d4c..5c12ae14a1df 100644
--- a/CORE/SERVICES/WMA/wma.h
+++ b/CORE/SERVICES/WMA/wma.h
@@ -534,6 +534,7 @@ struct wma_txrx_node {
tANI_U8 vht_capable;
tANI_U8 ht_capable;
A_UINT32 mhz; /* channel frequency in KHZ */
+ bool vdev_active;
v_BOOL_t vdev_up;
u_int64_t tsfadjust;
void *addBssStaContext;