Browse Source

qcacld-3.0: Register latency level event call back handler

Issue : Host fails to register the event call back handler
again in case Wi-Fi is turned on and triggered a reboot.

Because even after reboot, at a point of time when the host
is registering event callback handler, the host does not
receive FW capability flags yet in mlme context and this
results in FW caps check failure every time while call back
registration.

The fix is to allow the host to register to call back handler
irrespective of FW flags and add capability check in callback
handler.

Change-Id: I1dd66279097db6a68885b0416076428b73eefb9c
CRs-Fixed: 3196030
abhinav kumar 2 years ago
parent
commit
e55b348ab0
3 changed files with 18 additions and 14 deletions
  1. 1 1
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 5 13
      core/sme/src/common/sme_api.c
  3. 12 0
      core/wma/src/wma_utils.c

+ 1 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -9108,7 +9108,7 @@ QDF_STATUS wlan_hdd_set_wlm_latency_level(struct hdd_adapter *adapter,
 
 	ret = osif_request_wait_for_response(request);
 	if (ret) {
-		hdd_err("Timedout while retrieving oem get data");
+		hdd_err("SME timed out while retrieving latency level");
 		status = qdf_status_from_os_return(ret);
 		goto err;
 	}

+ 5 - 13
core/sme/src/common/sme_api.c

@@ -7424,20 +7424,12 @@ QDF_STATUS sme_multi_client_ll_rsp_register_callback(mac_handle_t mac_handle,
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	bool multi_client_ll_support, multi_client_ll_caps;
 
-	multi_client_ll_support =
-		mac->mlme_cfg->wlm_config.multi_client_ll_support;
-	multi_client_ll_caps =
-		wlan_mlme_get_wlm_multi_client_ll_caps(mac->psoc);
-
-	if (multi_client_ll_support  && multi_client_ll_caps) {
-		status = sme_acquire_global_lock(&mac->sme);
-		if (QDF_IS_STATUS_SUCCESS(status)) {
-			mac->sme.latency_level_event_handler_cb =
-					latency_level_event_handler_cb;
-			sme_release_global_lock(&mac->sme);
-		}
+	status = sme_acquire_global_lock(&mac->sme);
+	if (QDF_IS_STATUS_SUCCESS(status)) {
+		mac->sme.latency_level_event_handler_cb =
+				latency_level_event_handler_cb;
+		sme_release_global_lock(&mac->sme);
 	}
 
 	return status;

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

@@ -4912,12 +4912,24 @@ int wma_latency_level_event_handler(void *wma_ctx, uint8_t *event_buff,
 		(struct mac_context *)cds_get_context(QDF_MODULE_ID_PE);
 	wmi_vdev_latency_event_fixed_param *event;
 	struct latency_level_data event_data;
+	bool multi_client_ll_support, multi_client_ll_caps;
 
 	if (!pmac) {
 		wma_err("NULL mac handle");
 		return -EINVAL;
 	}
 
+	multi_client_ll_support =
+		pmac->mlme_cfg->wlm_config.multi_client_ll_support;
+	multi_client_ll_caps =
+		wlan_mlme_get_wlm_multi_client_ll_caps(pmac->psoc);
+
+	wma_debug("multi client ll INI:%d, caps:%d", multi_client_ll_support,
+		  multi_client_ll_caps);
+
+	if ((!multi_client_ll_support) || (!multi_client_ll_caps))
+		return -EINVAL;
+
 	if (!pmac->sme.latency_level_event_handler_cb) {
 		wma_err("latency level data handler cb is not registered");
 		return -EINVAL;