Skip to content

Commit

Permalink
brcmfmac: Fix p2p bug for older firmwares.
Browse files Browse the repository at this point in the history
Some devices with older firmwares are reporting new p2p device
interface with the wrong type. Accept this type to get p2p
working for these devices.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Hante Meuleman authored and Kalle Valo committed Sep 29, 2015
1 parent d1bb34c commit 35a3cbc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/wireless/brcm80211/brcmfmac/fweh.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,13 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr,
ifevent->action, ifevent->ifidx, ifevent->bssidx,
ifevent->flags, ifevent->role);

/* The P2P Device interface event must not be ignored
* contrary to what firmware tells us.
/* The P2P Device interface event must not be ignored contrary to what
* firmware tells us. Older firmware uses p2p noif, with sta role.
* This should be accepted.
*/
is_p2pdev = (ifevent->flags & BRCMF_E_IF_FLAG_NOIF) &&
ifevent->role == BRCMF_E_IF_ROLE_P2P_CLIENT;
is_p2pdev = ((ifevent->flags & BRCMF_E_IF_FLAG_NOIF) &&
(ifevent->role == BRCMF_E_IF_ROLE_P2P_CLIENT ||
ifevent->role == BRCMF_E_IF_ROLE_STA));
if (!is_p2pdev && (ifevent->flags & BRCMF_E_IF_FLAG_NOIF)) {
brcmf_dbg(EVENT, "event can be ignored\n");
return;
Expand Down

0 comments on commit 35a3cbc

Please sign in to comment.