Commit 151751ec authored by Winnie Chang's avatar Winnie Chang Committed by Greg Kroah-Hartman
Browse files

brcmfmac: fix brcmf_wiphy_wowl_params() NULL pointer dereference



[ Upstream commit 27a8aea1 ]

The kernel BUG happens when wowl is enabled from firmware. In
brcmf_wiphy_wowl_params(), cfg is a NULL pointer because it is
drvr->config returned from wiphy_to_cfg(), and drvr->config is not set
yet. To fix it, set drvr->config before brcmf_setup_wiphy() which
calls brcmf_wiphy_wowl_params().

Fixes: 856d5a01 ("brcmfmac: allocate struct brcmf_pub instance using wiphy_new()")
Signed-off-by: default avatarWinnie Chang <winnie.chang@cypress.com>
Signed-off-by: default avatarChi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d0e21e43
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment