1 From da472385a29f1fddcac7cfa0499482704310bd16 Mon Sep 17 00:00:00 2001
2 From: Arend Van Spriel <arend.vanspriel@broadcom.com>
3 Date: Tue, 20 Feb 2018 00:14:18 +0100
4 Subject: [PATCH] brcmfmac: move brcmf_bus_preinit() call just after changing
7 Moving the brcmf_bus_preinit() call allows the bus code to do some
8 required initialization before handling firmware control messages.
10 Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
11 Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
12 Reviewed-by: Franky Lin <franky.lin@broadcom.com>
13 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
14 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 3 ---
17 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 5 +++++
18 2 files changed, 5 insertions(+), 3 deletions(-)
20 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
21 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
22 @@ -215,9 +215,6 @@ int brcmf_c_preinit_dcmds(struct brcmf_i
24 /* Enable tx beamforming, errors can be ignored (not supported) */
25 (void)brcmf_fil_iovar_int_set(ifp, "txbf", 1);
27 - /* do bus specific preinit here */
28 - err = brcmf_bus_preinit(ifp->drvr->bus_if);
32 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
33 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
34 @@ -1058,6 +1058,11 @@ int brcmf_bus_started(struct device *dev
35 /* signal bus ready */
36 brcmf_bus_change_state(bus_if, BRCMF_BUS_UP);
38 + /* do bus specific preinit here */
39 + ret = brcmf_bus_preinit(ifp->drvr->bus_if);
43 /* Bus is ready, do any initialization */
44 ret = brcmf_c_preinit_dcmds(ifp);