qcacld-3.0: Toggle MSB to avoid MAC address collision

Toggle the MSB of last byte while deriving the link MAC address to
increase the MAC address range and avoid deriving duplicate MAC
addresses.

Change-Id: I2ba1d8bcfaa95fd5291202316106d9b0dd74766b
CRs-Fixed: 3499105
This commit is contained in:
Vinod Kumar Pirla
2023-05-15 23:26:00 -07:00
committed by Madan Koyyalamudi
parent a265a33e91
commit 487b917705

View File

@@ -292,6 +292,7 @@ QDF_STATUS hdd_derive_link_address_from_mld(struct qdf_mac_addr *mld_addr,
temp_byte = ((last_byte >> 4 & INTF_MACADDR_MASK) + idx) & temp_byte = ((last_byte >> 4 & INTF_MACADDR_MASK) + idx) &
INTF_MACADDR_MASK; INTF_MACADDR_MASK;
new_addr.bytes[5] = last_byte + temp_byte; new_addr.bytes[5] = last_byte + temp_byte;
new_addr.bytes[5] ^= (1 << 7);
qdf_copy_macaddr(link_addr, &new_addr); qdf_copy_macaddr(link_addr, &new_addr);
link_addr++; link_addr++;