/* P2P needs mac addresses for P2P device and interface. If no device address it specified, these are derived from the primary net device, ie. the permanent ethernet address of the device.  */
static void brcmf_p2p_generate_bss_mac(struct brcmf_p2p_info *p2p, u8 *dev_addr)
/* P2P needs mac addresses for P2P device and interface. If no device address it specified, these are derived from the primary net device, ie. the permanent ethernet address of the device.  */
static void brcmf_p2p_generate_bss_mac(struct brcmf_p2p_info *p2p, u8 *dev_addr)
{
	struct brcmf_if *pri_ifp = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp;
	bool local_admin = false;
	if (!dev_addr || is_zero_ether_addr(dev_addr)) {
		dev_addr = pri_ifp->mac_addr;
		local_admin = true;
	}
	memcpy(p2p->dev_addr, dev_addr, ETH_ALEN);
	if (local_admin)
		p2p->dev_addr[0] |= 0x02;
	memcpy(p2p->int_addr, p2p->dev_addr, ETH_ALEN);
	p2p->int_addr[0] |= 0x02;
	p2p->int_addr[4] ^= 0x80;
}