From: Arend van Spriel Date: Wed, 3 Apr 2013 10:40:45 +0000 (+0200) Subject: brcmfmac: initialize struct brcmf_fws_info fields before iovar X-Git-Tag: Ubuntu-5.0.0-8.9~13828^2~170^2^2~33 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=bfc8bbf91f861815d0382a26b4bbc825f5531bfa;p=mirror_ubuntu-disco-kernel.git brcmfmac: initialize struct brcmf_fws_info fields before iovar If iovar to the firmware fails the firmware-signalling module does a cleanup for which it needs pointer to struct brcmf_pub, which it gets from struct brcmf_fws_info::drvr. Assign this field before doing the tlv iovar. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Piotr Haber Reviewed-by: Hante Meuleman Signed-off-by: Arend van Spriel Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c index 314aedc0f9b3..6d036b7e8a44 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c @@ -919,6 +919,10 @@ int brcmf_fws_init(struct brcmf_pub *drvr) goto fail; } + /* set linkage back */ + drvr->fws->drvr = drvr; + drvr->fws->fcmode = fcmode; + /* enable proptxtstatus signaling by default */ rc = brcmf_fil_iovar_int_set(drvr->iflist[0], "tlv", tlv); if (rc < 0) { @@ -937,10 +941,6 @@ int brcmf_fws_init(struct brcmf_pub *drvr) /* create debugfs file for statistics */ brcmf_debugfs_create_fws_stats(drvr, &drvr->fws->stats); - /* set linkage back */ - drvr->fws->drvr = drvr; - drvr->fws->fcmode = fcmode; - /* TODO: remove upon feature delivery */ brcmf_err("%s bdcv2 tlv signaling [%x]\n", drvr->fw_signals ? "enabled" : "disabled", tlv);