Explorar o código

qcacld-3.0: Set peer frequency after peer setup in wma_roam_update_vdev

In api wma_roam_update_vdev(), peer frequency is set before
peer setup which results in band info to be missing in
Datapath connectivity logs after roaming.

Modify api wma_roam_update_vdev() to set peer frequency
after peer setup in order to print band info for
datapath connectivity logs after roaming.

Change-Id: Idc2d6c1cda072f576c26964a0fc0c418760608f4
CRs-Fixed: 3629093
Vijay Raj hai 1 ano
pai
achega
163a4c5b5b

+ 21 - 2
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -6890,6 +6890,22 @@ cm_roam_btm_req_event(struct wmi_roam_btm_trigger_data *btm_data,
 	return status;
 }
 
+static enum wlan_diag_wifi_band
+wlan_convert_bitmap_to_band(uint8_t bitmap)
+{
+	uint8_t i;
+	enum wlan_diag_wifi_band band = WLAN_INVALID_BAND;
+
+	for (i = WLAN_24GHZ_BAND; i <= WLAN_6GHZ_BAND; i++) {
+		if (qdf_test_bit(i, (unsigned long *)&bitmap)) {
+			band = i;
+			break;
+		}
+	}
+
+	return band;
+}
+
 QDF_STATUS
 cm_roam_mgmt_frame_event(struct wlan_objmgr_vdev *vdev,
 			 struct roam_frame_info *frame_data,
@@ -6938,18 +6954,21 @@ cm_roam_mgmt_frame_event(struct wlan_objmgr_vdev *vdev,
 		}
 	}
 
-	wlan_diag_event.supported_links = frame_data->band;
-
 	if (frame_data->type == ROAM_FRAME_INFO_FRAME_TYPE_EXT) {
 		wlan_diag_event.subtype =
 			(uint8_t)cm_roam_get_eapol_tag(frame_data->subtype);
 		diag_event = EVENT_WLAN_CONN_DP;
+		wlan_diag_event.supported_links =
+			wlan_convert_bitmap_to_band(frame_data->band);
+
 	} else {
 		wlan_diag_event.subtype =
 		(uint8_t)cm_roam_get_tag(frame_data->subtype,
 					 !frame_data->is_rsp);
 		diag_event = EVENT_WLAN_MGMT;
 
+		wlan_diag_event.supported_links = frame_data->band;
+
 		status =
 			wlan_populate_mlo_mgmt_event_param(vdev,
 							   &wlan_diag_event,

+ 6 - 6
core/wma/src/wma_scan_roam.c

@@ -754,12 +754,6 @@ wma_roam_update_vdev(tp_wma_handle wma,
 		return;
 	}
 
-	if (wlan_vdev_mlme_get_opmode(wma->interfaces[vdev_id].vdev) ==
-								QDF_STA_MODE)
-		wlan_cdp_set_peer_freq(wma->psoc, bssid,
-				       wma->interfaces[vdev_id].ch_freq,
-				       vdev_id);
-
 	is_assoc_peer = wlan_vdev_mlme_get_is_mlo_vdev(wma->psoc, vdev_id);
 	if (is_multi_link_roam(roam_synch_ind_ptr)) {
 		wma_create_peer(wma, mac_addr.bytes,
@@ -780,6 +774,12 @@ wma_roam_update_vdev(tp_wma_handle wma,
 					 vdev_id,
 					 mac_addr.bytes);
 
+	if (wlan_vdev_mlme_get_opmode(wma->interfaces[vdev_id].vdev) ==
+								QDF_STA_MODE)
+		wlan_cdp_set_peer_freq(wma->psoc, mac_addr.bytes,
+				       wma->interfaces[vdev_id].ch_freq,
+				       vdev_id);
+
 	/* Update new peer's uc cipher */
 	uc_cipher = wlan_crypto_get_param(wma->interfaces[vdev_id].vdev,
 					   WLAN_CRYPTO_PARAM_UCAST_CIPHER);