Browse Source

qcacld-3.0: update mld address when provisioned mac address is used

currently mld address is getting updated only when firmware sends
a default mac address in init events, add support to update the
mld address when mac address are retrieved through the platform
driver.

Change-Id: If94368f26204767c95f083043b6508c412ac89dc
CRs-Fixed: 3192847
Arun Kumar Khandavalli 2 years ago
parent
commit
32f21a221c
1 changed files with 10 additions and 0 deletions
  1. 10 0
      core/hdd/src/wlan_hdd_main.c

+ 10 - 0
core/hdd/src/wlan_hdd_main.c

@@ -14268,6 +14268,7 @@ static int hdd_platform_wlan_mac(struct hdd_context *hdd_ctx)
 	struct device *dev = hdd_ctx->parent_dev;
 	tSirMacAddr mac_addr;
 	QDF_STATUS status;
+	struct qdf_mac_addr hw_macaddr;
 
 	addr = hdd_get_platform_wlan_mac_buff(dev, &no_of_mac_addr);
 
@@ -14288,6 +14289,10 @@ static int hdd_platform_wlan_mac(struct hdd_context *hdd_ctx)
 		qdf_mem_copy(buf, addr, QDF_MAC_ADDR_SIZE);
 		hdd_info("provisioned MAC Addr [%d] "QDF_MAC_ADDR_FMT, iter,
 			 QDF_MAC_ADDR_REF(buf));
+		if (iter == 0) {
+			qdf_mem_copy(&hw_macaddr.bytes, buf, QDF_MAC_ADDR_SIZE);
+			hdd_update_mld_mac_addr(hdd_ctx, hw_macaddr);
+		}
 	}
 
 
@@ -14310,6 +14315,11 @@ static int hdd_platform_wlan_mac(struct hdd_context *hdd_ctx)
 			qdf_mem_copy(buf, addr, QDF_MAC_ADDR_SIZE);
 			hdd_debug("derived MAC Addr [%d] "QDF_MAC_ADDR_FMT, iter,
 				  QDF_MAC_ADDR_REF(buf));
+			if (iter == 0) {
+				qdf_mem_copy(&hw_macaddr.bytes, buf,
+					     QDF_MAC_ADDR_SIZE);
+				hdd_update_mld_mac_addr(hdd_ctx, hw_macaddr);
+			}
 		}
 		hdd_ctx->num_derived_addr = no_of_mac_addr;
 	}