Эх сурвалжийг харах

qcacld-3.0: Refuse diag event when ml peer or link info is not valid

Currently, Host driver is sending EVENT_WLAN_MLO_LINK_STATUS
even when ml peer or link info is not valid.

This change is to refuse diag event when ml peer or link info is not valid.

Change-Id: Ie6dd16509954811f92b838c3be3d9e0f3a6759c2
CRs-Fixed: 3657297
Aasir Rasheed 1 жил өмнө
parent
commit
8ed2b0c87a

+ 7 - 3
components/cmn_services/logging/src/wlan_connectivity_logging.c

@@ -1091,7 +1091,7 @@ wlan_convert_link_id_to_diag_band(struct qdf_mac_addr *peer_mld,
 	mlpeer = wlan_mlo_get_mlpeer_by_peer_mladdr(peer_mld, &mldev);
 	if (!mlpeer) {
 		logging_err("ml peer not found");
-		goto out;
+		return 0;
 	}
 
 	for (i = 0; i < MAX_MLO_LINK_ID; i++) {
@@ -1099,7 +1099,7 @@ wlan_convert_link_id_to_diag_band(struct qdf_mac_addr *peer_mld,
 			link_info = mlo_mgr_get_ap_link_by_link_id(mldev, i);
 			if (!link_info) {
 				logging_err("link: %d info does not exist", i);
-				continue;
+				return 0;
 			}
 
 			freq = link_info->link_chan_info->ch_freq;
@@ -1111,7 +1111,6 @@ wlan_convert_link_id_to_diag_band(struct qdf_mac_addr *peer_mld,
 		}
 	}
 
-out:
 	return band_bitmap;
 }
 
@@ -1131,9 +1130,14 @@ void wlan_connectivity_mld_link_status_event(struct wlan_objmgr_psoc *psoc,
 	wlan_diag_event.active_link =
 		wlan_convert_link_id_to_diag_band(&src->mld_addr,
 						  src->active_link_bitmap);
+	if (!wlan_diag_event.active_link)
+		return;
 	wlan_diag_event.prev_active_link =
 		wlan_convert_link_id_to_diag_band(&src->mld_addr,
 						  src->prev_link_bitmap);
+	if (!wlan_diag_event.prev_active_link)
+		return;
+
 	wlan_diag_event.reason = src->reason_code;
 	/*
 	 * FW timestamp received from FW in milliseconds and to be sent to