]> git.hungrycats.org Git - linux/commit
brcmfmac: fix P2P_DEVICE ethernet address generation
authorArend Van Spriel <arend.vanspriel@broadcom.com>
Wed, 28 Feb 2018 20:15:20 +0000 (21:15 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 16 Jun 2018 21:22:33 +0000 (22:22 +0100)
commitae113a12239ddb3f30d134dc34b4586a5c05171a
treef876af58c4f2a9c4acbe17e61d1320232edddb32
parent792074e039eec26cd1b9f9652b8668cce25f5bda
brcmfmac: fix P2P_DEVICE ethernet address generation

commit 455f3e76cfc0d893585a5f358b9ddbe9c1e1e53b upstream.

The firmware has a requirement that the P2P_DEVICE address should
be different from the address of the primary interface. When not
specified by user-space, the driver generates the MAC address for
the P2P_DEVICE interface using the MAC address of the primary
interface and setting the locally administered bit. However, the MAC
address of the primary interface may already have that bit set causing
the creation of the P2P_DEVICE interface to fail with -EBUSY. Fix this
by using a random address instead to determine the P2P_DEVICE address.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/brcm80211/brcmfmac/p2p.c