brcmfmac: only generate random p2p address when needed
authorChi-Hsien Lin <chi-hsien.lin@cypress.com>
Mon, 27 Apr 2020 07:00:02 +0000 (02:00 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 4 May 2020 09:48:44 +0000 (12:48 +0300)
commit053ac9e1438a1415a3b6b11d6e504c7a74ebd2ba
treea10e746e8095fa22891298c9e1aea4897fbb00c6
parentd524d5ce36555bec8b40d4b65f15acd922ac965d
brcmfmac: only generate random p2p address when needed

P2p spec mentioned that the p2p device address should be the globally
administered address with locally administered bit set. Therefore,
follow this guideline by default.

When the primary interface is set to a locally administered address, the
locally administered bit cannot be set again. Generate a random locally
administered address for this case.

Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1587970803-77700-5-git-send-email-chi-hsien.lin@cypress.com
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c