Browse Source

qcacld-3.0: Update link address in dynamic MAC update

For associating to a ML capable AP, driver will use link address.
During dynamic MAC address update the link address in VDEV MLME
is not updated, so leading to sending the auth request with
older link address.

Update the link address as well during dynamic MAC address update.
Copy MLD address in the hdd_adapter only for ML adapter type.

Change-Id: I534e075bb26efeb3c035652cddc5d8d665604089
CRs-Fixed: 3287245
Vinod Kumar Pirla 2 years ago
parent
commit
a38838b29f
2 changed files with 5 additions and 2 deletions
  1. 4 2
      core/hdd/src/wlan_hdd_main.c
  2. 1 0
      core/sme/src/common/sme_api.c

+ 4 - 2
core/hdd/src/wlan_hdd_main.c

@@ -5872,7 +5872,6 @@ hdd_alloc_station_adapter(struct hdd_context *hdd_ctx, tSirMacAddr mac_addr,
 
 	qdf_mem_copy(dev->dev_addr, mac_addr, sizeof(tSirMacAddr));
 	qdf_mem_copy(adapter->mac_addr.bytes, mac_addr, sizeof(tSirMacAddr));
-	qdf_mem_copy(adapter->mld_addr.bytes, mac_addr, sizeof(tSirMacAddr));
 	dev->watchdog_timeo = HDD_TX_TIMEOUT;
 
 	if (wlan_hdd_is_session_type_monitor(session_type)) {
@@ -7523,8 +7522,11 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx,
 		return NULL;
 	}
 
-	if (params->is_ml_adapter)
+	if (params->is_ml_adapter) {
 		hdd_adapter_set_ml_adapter(adapter);
+		qdf_mem_copy(adapter->mld_addr.bytes, adapter->mac_addr.bytes,
+			     QDF_MAC_ADDR_SIZE);
+	}
 	status = hdd_adapter_feature_update_work_init(adapter);
 	if (QDF_IS_STATUS_ERROR(status))
 		goto err_cleanup_adapter;

+ 1 - 0
core/sme/src/common/sme_api.c

@@ -16331,6 +16331,7 @@ QDF_STATUS sme_update_vdev_mac_addr(struct wlan_objmgr_psoc *psoc,
 		wlan_vdev_mlme_set_mldaddr(vdev, mac_addr.bytes);
 	} else {
 		wlan_vdev_mlme_set_macaddr(vdev, mac_addr.bytes);
+		wlan_vdev_mlme_set_linkaddr(vdev, mac_addr.bytes);
 	}
 
 p2p_self_peer_create: