Browse Source

qcacmn: Handle failure during wmi event handler registration

For legacy targets, MLO-specific event-handlers are not
supported.As this is not fatal, the caller of the
wmi_event_handler_register API should not treat this as
failure.

Change-Id: Ic6a36c933b46cfcbe860f573af290cac4667de44
CRs-Fixed: 3181774
Debasis Das 3 năm trước cách đây
mục cha
commit
c5d3129015

+ 12 - 4
target_if/mgmt_txrx/src/target_if_mgmt_txrx_rx_reo.c

@@ -116,8 +116,12 @@ target_if_mgmt_rx_reo_register_event_handlers(struct wlan_objmgr_psoc *psoc)
 			target_if_mgmt_rx_reo_fw_consumed_event_handler,
 			WMI_RX_UMAC_CTX);
 
-	if (QDF_IS_STATUS_ERROR(status))
-		mgmt_rx_reo_err("Registering for MGMT Rx FW consumed event failed");
+	if (QDF_IS_STATUS_ERROR(status)) {
+		mgmt_rx_reo_err("Register Rx FW consumed event cb errcode %d",
+				status);
+		if (status ==  QDF_STATUS_E_NOSUPPORT)
+			status = QDF_STATUS_SUCCESS;
+	}
 
 	return status;
 }
@@ -138,8 +142,12 @@ target_if_mgmt_rx_reo_unregister_event_handlers(struct wlan_objmgr_psoc *psoc)
 			wmi_handle,
 			wmi_mgmt_rx_fw_consumed_eventid);
 
-	if (QDF_IS_STATUS_ERROR(status))
-		mgmt_rx_reo_err("Unregistering for MGMT Rx FW consumed event failed");
+	if (QDF_IS_STATUS_ERROR(status)) {
+		mgmt_rx_reo_err("Unregister Rx FW consumed event cb errcode %d",
+				status);
+		if (status ==  QDF_STATUS_E_NOSUPPORT)
+			status = QDF_STATUS_SUCCESS;
+	}
 
 	return status;
 }

+ 7 - 3
target_if/mlo_mgr/src/target_if_mlo_mgr.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -106,8 +106,12 @@ target_if_mlo_register_event_handler(struct wlan_objmgr_psoc *psoc)
 			wmi_mlo_link_set_active_resp_eventid,
 			target_if_mlo_link_set_active_resp_handler,
 			WMI_RX_WORK_CTX);
-	if (QDF_IS_STATUS_ERROR(status))
-		target_if_err("Failed to register mlo link set active resp cb");
+	if (QDF_IS_STATUS_ERROR(status)) {
+		target_if_err("Register mlo link set active resp cb errcode %d",
+			      status);
+		if (status ==  QDF_STATUS_E_NOSUPPORT)
+			status = QDF_STATUS_SUCCESS;
+	}
 
 	return status;
 }