mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
: Rework reading MAC address from UTAG
In WLAN driver for Helium family, QC has updated hdd_context_t structure and removed intfMacAddr variable. As a result, with Motorola MAC address changes, compilation was failing. Replaced intfMacAddr with new provisioned and derived variables to read and use MAC address from UTAG properly. Updated the MOT OUI with latest MOT OUI values. Change-Id: I78e942aefc5b802e6297402c796d5d002b6d955a Reviewed-on: https://gerrit.mot.com/1196122 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Prashanth Chakravarthy <a19110@motorola.com> Submit-Approved: Yun Ma <yunma@motorola.com>
This commit is contained in:
parent
96ee88b19b
commit
9683861d89
2 changed files with 8 additions and 6 deletions
|
|
@ -120,8 +120,9 @@ QDF_STATUS hdd_update_mac_serial(struct hdd_context *hdd_ctx)
|
|||
qdf_status = QDF_STATUS_E_FAILURE;
|
||||
goto config_exit;
|
||||
}
|
||||
qdf_mem_copy(&hdd_ctx->config->intfMacAddr[0].bytes[0],
|
||||
qdf_mem_copy(&pHddCtx->derived_mac_addr[0].bytes,
|
||||
(uint8_t *)computedMac, QDF_MAC_ADDR_SIZE);
|
||||
pHddCtx->num_derived_addr++;
|
||||
|
||||
config_exit:
|
||||
qdf_mem_free(computedMac);
|
||||
|
|
@ -140,9 +141,9 @@ QDF_STATUS hdd_generate_random_mac_from_serialno(char *serialNo, int serialnoLen
|
|||
hashBuf = (char*)qdf_mem_malloc(16);
|
||||
|
||||
/*Motorola OUI*/
|
||||
macAddr[0] = 0xA4;
|
||||
macAddr[1] = 0x07;
|
||||
macAddr[2] = 0xd6;
|
||||
macAddr[0] = 0x38;
|
||||
macAddr[1] = 0x80;
|
||||
macAddr[2] = 0xDF;
|
||||
|
||||
md5 = crypto_alloc_shash("md5", 0, 0);
|
||||
if (IS_ERR(md5)) {
|
||||
|
|
@ -581,8 +582,9 @@ QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx)
|
|||
macTable[0].name = "Intf0MacAddress";
|
||||
macTable[0].value = &buffer_temp[0];
|
||||
update_mac_from_string(hdd_ctx, &macTable[0], MACADDRESSUSED);
|
||||
pHddCtx->num_provisioned_addr = MACADDRESSUSED;
|
||||
qdf_mem_copy(&customMacAddr,
|
||||
&hdd_ctx->config->intfMacAddr[0].bytes[0],
|
||||
&pHddCtx->provisioned_mac_addr[0].bytes[0],
|
||||
sizeof(tSirMacAddr));
|
||||
sme_set_custom_mac_addr(customMacAddr);
|
||||
|
||||
|
|
|
|||
|
|
@ -13862,7 +13862,7 @@ static int hdd_initialize_mac_address(struct hdd_context *hdd_ctx)
|
|||
|
||||
status = hdd_update_mac_serial(hdd_ctx);
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
return;
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
hdd_info("using default MAC address");
|
||||
|
|
|
|||
Loading…
Reference in a new issue