Browse Source

qcacld-3.0: Return failure if mac provision failed

In current code, if mac_provision is enabled, the
checking for return value of hdd_platform_wlan_mac
will be bypassed, this is not the intention.

Change as:
   when mac_provision is enabled, it returns
   only when getting mac address from platform failed.

Change-Id: I76aca9e4560c914a165f2042818746b6a2bb3661
CRs-Fixed: 2529981
Jingxiang Ge 5 years ago
parent
commit
c2ac79b53a
1 changed files with 4 additions and 1 deletions
  1. 4 1
      core/hdd/src/wlan_hdd_main.c

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

@@ -10877,9 +10877,12 @@ static int hdd_initialize_mac_address(struct hdd_context *hdd_ctx)
 	bool update_mac_addr_to_fw = true;
 
 	ret = hdd_platform_wlan_mac(hdd_ctx);
-	if (hdd_ctx->config->mac_provision || !ret) {
+	if (!ret) {
 		hdd_info("using MAC address from platform driver");
 		return ret;
+	} else if (hdd_ctx->config->mac_provision) {
+		hdd_err("getting MAC address from platform driver failed");
+		return ret;
 	}
 
 	status = hdd_update_mac_config(hdd_ctx);