]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
brcmfmac: initialize struct brcmf_fws_info fields before iovar
authorArend van Spriel <arend@broadcom.com>
Wed, 3 Apr 2013 10:40:45 +0000 (12:40 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 3 Apr 2013 19:07:07 +0000 (15:07 -0400)
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 <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c

index 314aedc0f9b3405c1542aab207ee255b64ddd61e..6d036b7e8a4490d695334964fd313eba6f21e381 100644 (file)
@@ -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);