From 04a1c99c32ab35fda42419c007f626f96194bbce Mon Sep 17 00:00:00 2001 From: Ravi Joshi Date: Sun, 11 Jun 2017 19:47:54 -0700 Subject: [PATCH] qcacld-3.0: Set LA bit and reset multicast bit in the mac addr Locally administered bit needs to be set and multicast bit needs to be reset in the interface/vdev mac address. Change-Id: Ifdc39a8137617ebf2d09434deba13767f0c7cf34 CRs-Fixed: 2059150 --- core/hdd/src/wlan_hdd_nan_datapath.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/hdd/src/wlan_hdd_nan_datapath.c b/core/hdd/src/wlan_hdd_nan_datapath.c index 3b3c1eacd819..16eed61348c7 100644 --- a/core/hdd/src/wlan_hdd_nan_datapath.c +++ b/core/hdd/src/wlan_hdd_nan_datapath.c @@ -292,20 +292,21 @@ static int hdd_get_random_nan_mac_addr(hdd_context_t *hdd_ctx, { hdd_adapter_t *adapter; uint8_t i, attempts, max_attempt = 16; - struct qdf_mac_addr bcast_mac_addr = QDF_MAC_ADDR_BROADCAST_INITIALIZER; for (attempts = 0; attempts < max_attempt; attempts++) { cds_rand_get_bytes(0, (uint8_t *)mac_addr, sizeof(*mac_addr)); - WLAN_HDD_RESET_LOCALLY_ADMINISTERED_BIT(mac_addr->bytes); + + /* + * Reset multicast bit (bit-0) and set locally-administered bit + */ + mac_addr->bytes[0] = 0x2; + /* * to avoid potential conflict with FW's generated NMI mac addr, * host sets LSB if 6th byte to 0 */ mac_addr->bytes[5] &= 0xFE; - if (!qdf_mem_cmp(mac_addr, &bcast_mac_addr, sizeof(*mac_addr))) - continue; - for (i = 0; i < QDF_MAX_CONCURRENCY_PERSONA; i++) { if (!qdf_mem_cmp(hdd_ctx->config->intfMacAddr[i].bytes, mac_addr, sizeof(*mac_addr)))