Sfoglia il codice sorgente

qcacld-3.0: Update vdev self mac address after roaming

When roam from legacy to MLO/SLO, need change vdev self mac to link addr.
When roam from MLO/SLO to legacy,  need change vdev self mac to mld/net
addr.

Change-Id: Ife17fd0a79a9f067eb72ac510dbf437b6d3649d8
CRs-Fixed: 3351027
Jianmin Zhu 2 anni fa
parent
commit
6a88b4a711
1 ha cambiato i file con 29 aggiunte e 0 eliminazioni
  1. 29 0
      components/umac/mlme/mlo_mgr/src/wlan_mlo_mgr_roam.c

+ 29 - 0
components/umac/mlme/mlo_mgr/src/wlan_mlo_mgr_roam.c

@@ -201,12 +201,39 @@ mlo_roam_abort_req(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_E_NOSUPPORT;
 }
 #endif
+
+static void mlo_roam_update_vdev_macaddr(struct wlan_objmgr_psoc *psoc,
+					 uint8_t vdev_id,
+					 bool is_non_ml_connection)
+{
+	struct wlan_objmgr_vdev *vdev;
+
+	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc,
+						    vdev_id,
+						    WLAN_MLO_MGR_ID);
+	if (!vdev) {
+		mlo_err("VDEV is null");
+		return;
+	}
+
+	mlme_debug("Update vdev self mac");
+	if (is_non_ml_connection)
+		wlan_vdev_mlme_set_macaddr(vdev,
+					   wlan_vdev_mlme_get_mldaddr(vdev));
+	else
+		wlan_vdev_mlme_set_macaddr(vdev,
+					   wlan_vdev_mlme_get_linkaddr(vdev));
+
+	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLO_MGR_ID);
+}
+
 QDF_STATUS mlo_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 				void *event, uint32_t event_data_len)
 {
 	struct roam_offload_synch_ind *sync_ind;
 	QDF_STATUS status;
 	uint8_t i;
+	bool is_non_mlo_ap = false;
 
 	sync_ind = (struct roam_offload_synch_ind *)event;
 	if (!sync_ind)
@@ -218,6 +245,7 @@ QDF_STATUS mlo_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 
 	if (!sync_ind->num_setup_links) {
 		mlo_debug("MLO_ROAM: Roamed to Legacy");
+		is_non_mlo_ap = true;
 	} else if (sync_ind->num_setup_links == 1) {
 		mlo_debug("MLO_ROAM: Roamed to single link MLO");
 		mlo_set_single_link_ml_roaming(psoc, vdev_id, sync_ind, true);
@@ -225,6 +253,7 @@ QDF_STATUS mlo_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 		mlo_debug("MLO_ROAM: Roamed to MLO");
 	}
 
+	mlo_roam_update_vdev_macaddr(psoc, vdev_id, is_non_mlo_ap);
 	status = cm_fw_roam_sync_req(psoc, vdev_id, event, event_data_len);
 
 	if (QDF_IS_STATUS_ERROR(status))