OSDN Git Service

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)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 7 Mar 2018 14:36:41 +0000 (16:36 +0200)
commit455f3e76cfc0d893585a5f358b9ddbe9c1e1e53b
tree0d9111eec5461ee829c56d19b030f344ac6b2989
parent933897342d0714ae1c10729cbaeecea0c6178db5
brcmfmac: fix P2P_DEVICE ethernet address generation

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.

Cc: stable@vger.kernel.org # 3.10.y
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>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c