prop (CR) STA+MHS concurrency mode

Add the code to read the 2nd MAC address from the utag for SAP
    to support STA+SAP concurrency

Change-Id: Ibb884c39a3751569429aabff1f757783eb4f76c8
This commit is contained in:
jmng34 2019-11-12 11:19:40 +05:30 • committed by panyq6
commit a2dd989ad8

View file

@ -61,7 +61,7 @@
#define DEVICE_SERIALNO_BOOTARG "androidboot.serialno="
#define MACSTRLEN 12
#define MACSTRCOLON 58
#define MACADDRESSUSED 1
#define MACADDRESSUSED 2
struct sdesc {
struct shash_desc shash;
@ -518,6 +518,7 @@ QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx)
char *bufferPtr = NULL;
char buffer_temp[MACSTRLEN];
char buffer_mac2[MACSTRLEN];
const char *cmd_line = NULL;
struct device_node *chosen_node = NULL;
char *buffer = NULL;
@ -571,6 +572,17 @@ QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx)
}
bufferPtr++;
}
if( *bufferPtr == ',' || *bufferPtr == '-') {
bufferPtr++;
}
for (iteration = 0; iteration < MACSTRLEN; iteration++) {
if (*bufferPtr != MACSTRCOLON) {
buffer_mac2[iteration] = *bufferPtr;
} else {
iteration = iteration - 1;
}
bufferPtr++;
}
/* Mac address data format used by qcom:
* Intf0MacAddress used for 1 macaddress
* if gp2pdeviceAdmistered is set to 1
@ -581,8 +593,10 @@ QDF_STATUS hdd_update_mac_config(struct hdd_context *hdd_ctx)
*/
macTable[0].name = "Intf0MacAddress";
macTable[0].value = &buffer_temp[0];
macTable[1].value = &buffer_mac2[0];
update_mac_from_string(hdd_ctx, &macTable[0], MACADDRESSUSED);
pHddCtx->num_provisioned_addr = MACADDRESSUSED;
hdd_populate_random_mac_addr(pHddCtx, QDF_MAX_CONCURRENCY_PERSONA - MACADDRESSUSED);
qdf_mem_copy(&customMacAddr,
&pHddCtx->provisioned_mac_addr[0].bytes[0],
sizeof(tSirMacAddr));