mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacld-3.0: Populate the remaining addresses from tha wlan_mac.bin address
Currently if only one address is provided in wlan_mac.bin, it is updated for interface wlan0. It will be copied to interface p2p0 if a specific configuration is present. softap0 retains its mac address either generated from serial number or given through Firmware ready event. This doesn't guarentee a unique mac address to both these interfaces. Regardless of configuration Both softap0 and p2p0 should have a unique mac address with locally administered bit set. Change-Id: I64299f5c2e2376c8dbdb26ea34ba0187d5d1f28d CRs-Fixed: 2066086
This commit is contained in:
parent
36b61839c1
commit
e4d8644dac
3 changed files with 6 additions and 1 deletions
|
|
@ -2226,6 +2226,7 @@ int hdd_wlan_start_modules(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
|
|||
bool reinit);
|
||||
int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx, bool ftm_mode);
|
||||
int hdd_start_adapter(hdd_adapter_t *adapter);
|
||||
void hdd_populate_random_mac_addr(hdd_context_t *hdd_ctx, uint32_t num);
|
||||
|
||||
/**
|
||||
* hdd_get_bss_entry() - Get the bss entry matching the chan, bssid and ssid
|
||||
|
|
|
|||
|
|
@ -6154,6 +6154,7 @@ QDF_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)
|
|||
char *line, *buffer = NULL;
|
||||
char *temp = NULL;
|
||||
char *name, *value;
|
||||
int max_mac_addr = QDF_MAX_CONCURRENCY_PERSONA;
|
||||
tCfgIniEntry macTable[QDF_MAX_CONCURRENCY_PERSONA];
|
||||
tSirMacAddr customMacAddr;
|
||||
|
||||
|
|
@ -6229,6 +6230,9 @@ QDF_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)
|
|||
}
|
||||
|
||||
update_mac_from_string(pHddCtx, &macTable[0], i);
|
||||
hdd_debug("Populating remaining %d Mac addreses",
|
||||
max_mac_addr - i);
|
||||
hdd_populate_random_mac_addr(pHddCtx, max_mac_addr - i);
|
||||
|
||||
qdf_mem_copy(&customMacAddr,
|
||||
&pHddCtx->config->intfMacAddr[0].bytes[0],
|
||||
|
|
|
|||
|
|
@ -8453,7 +8453,7 @@ static uint8_t *hdd_get_platform_wlan_mac_buff(struct device *dev,
|
|||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void hdd_populate_random_mac_addr(hdd_context_t *hdd_ctx, uint32_t num)
|
||||
void hdd_populate_random_mac_addr(hdd_context_t *hdd_ctx, uint32_t num)
|
||||
{
|
||||
uint32_t start_idx = QDF_MAX_CONCURRENCY_PERSONA - num;
|
||||
uint32_t iter;
|
||||
|
|
|
|||
Loading…
Reference in a new issue