Jelajahi Sumber

qcacld-3.0: Check if vdev is created before LL stats query

qcacld-2.0 to qcacld-3.0 propagation

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).
Link Layer(LL) stats query is received in host driver in a corner/race
condition between the events "change iface" and "start ap" which 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.

Git-commit: cf7bf99eb9a71b1043cd230aee704c44c62c98ff
Change-Id: Ifcc986c3352e4e66da35b8d6c489d98dbe61401d
CRs-Fixed: 987734
(cherry picked from commit b82c03d8686a57b120f991ffbb9b9801c908aac8)
Selvaraj, Sridhar 8 tahun lalu
induk
melakukan
171e225474
3 mengubah file dengan 9 tambahan dan 0 penghapusan
  1. 1 0
      core/wma/inc/wma.h
  2. 3 0
      core/wma/src/wma_dev_if.c
  3. 5 0
      core/wma/src/wma_utils.c

+ 1 - 0
core/wma/inc/wma.h

@@ -930,6 +930,7 @@ struct wma_txrx_node {
 	uint8_t ht_capable;
 	A_UINT32 mhz;
 	enum phy_ch_width chan_width;
+	bool vdev_active;
 	bool vdev_up;
 	uint64_t tsfadjust;
 	void *addBssStaContext;

+ 3 - 0
core/wma/src/wma_dev_if.c

@@ -632,6 +632,7 @@ QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
 		return status;
 	}
 
+	iface->vdev_active = false;
 	/* P2P Device */
 	if ((iface->type == WMI_VDEV_TYPE_AP) &&
 	    (iface->sub_type == WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE)) {
@@ -1537,6 +1538,8 @@ ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
 					     self_sta_req->session_id);
 		goto end;
 	}
+	wma_handle->interfaces[self_sta_req->session_id].vdev_active = true;
+
 	wma_handle->interfaces[self_sta_req->session_id].handle =
 		txrx_vdev_handle;
 

+ 5 - 0
core/wma/src/wma_utils.c

@@ -880,6 +880,11 @@ QDF_STATUS wma_process_ll_stats_get_req
 		return QDF_STATUS_E_FAILURE;
 	}
 
+	if (!wma->interfaces[getReq->staId].vdev_active) {
+		WMA_LOGE("%s: vdev not created yet", __func__);
+		return QDF_STATUS_E_FAILURE;
+	}
+
 	cmd.req_id = getReq->reqId;
 	cmd.param_id_mask = getReq->paramIdMask;
 	cmd.sta_id = getReq->staId;