Browse Source

qcacld-3.0: Cleanup DP intf for link adapter

On mode switch to SAP on primary interface, the
DP interface of associated link adapter is cleaned up.
However due to STA mode check, the DP interface of
unassociated link adapter is not removed from the list.

Instead of STA mode check to cleanup DP interface
in MLO interface unregister, cleanup the link adapter's
DP interface incase of unequal MAC and MLD address.

Change-Id: I0df46822cfa8ab7b9df5c20d1abb703a271a9038
CRs-Fixed: 3430112
Vinod Kumar Pirla 2 years ago
parent
commit
6ccfa85732
1 changed files with 4 additions and 2 deletions
  1. 4 2
      core/hdd/src/wlan_hdd_mlo.c

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

@@ -138,7 +138,8 @@ QDF_STATUS hdd_wlan_unregister_mlo_interfaces(struct hdd_adapter *adapter,
 	mlo_adapter_info = &adapter->mlo_adapter_info;
 
 	if (mlo_adapter_info->is_link_adapter) {
-		if (adapter->device_mode == QDF_STA_MODE) {
+		if (!qdf_is_macaddr_equal(&adapter->mac_addr,
+					  &adapter->mld_addr)) {
 			ucfg_dp_destroy_intf(adapter->hdd_ctx->psoc,
 					     &adapter->mac_addr);
 		}
@@ -150,7 +151,8 @@ QDF_STATUS hdd_wlan_unregister_mlo_interfaces(struct hdd_adapter *adapter,
 		link_adapter = mlo_adapter_info->link_adapter[i];
 		if (!link_adapter)
 			continue;
-		if (adapter->device_mode == QDF_STA_MODE) {
+		if (!qdf_is_macaddr_equal(&link_adapter->mac_addr,
+					  &link_adapter->mld_addr)) {
 			ucfg_dp_destroy_intf(link_adapter->hdd_ctx->psoc,
 					     &link_adapter->mac_addr);
 		}