diff options
author | Arend van Spriel <arend@broadcom.com> | 2012-10-22 10:36:23 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-29 15:28:27 -0400 |
commit | ac24be6fe6593564be99a88e41cddc6c0fc1899f (patch) | |
tree | 972f421bb64ce8c8fe0392c37f7c6efff64e9eb8 /drivers/net/wireless/brcm80211/brcmfmac/fwil.c | |
parent | 6e186166ea0259f7ef9cb2393317126003c13680 (diff) | |
download | lwn-ac24be6fe6593564be99a88e41cddc6c0fc1899f.tar.gz lwn-ac24be6fe6593564be99a88e41cddc6c0fc1899f.zip |
brcmfmac: use struct brcmf_if as interface object for fwil functions
The functions for communicating were given the net_device only because
its private data contained struct brcmf_if object. However, not all
firmware related interfaces will be associated with a net_device. To
accomodate provisioning firmware for such interfaces the struct
brcmf_if object will be passed to the fwil functions.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/fwil.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/fwil.c | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c index f4a6e7135f4b..4b272c3d237c 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c @@ -57,9 +57,8 @@ brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set) } s32 -brcmf_fil_cmd_data_set(struct net_device *ndev, u32 cmd, void *data, u32 len) +brcmf_fil_cmd_data_set(struct brcmf_if *ifp, u32 cmd, void *data, u32 len) { - struct brcmf_if *ifp = netdev_priv(ndev); s32 err; mutex_lock(&ifp->drvr->proto_block); @@ -74,9 +73,8 @@ brcmf_fil_cmd_data_set(struct net_device *ndev, u32 cmd, void *data, u32 len) } s32 -brcmf_fil_cmd_data_get(struct net_device *ndev, u32 cmd, void *data, u32 len) +brcmf_fil_cmd_data_get(struct brcmf_if *ifp, u32 cmd, void *data, u32 len) { - struct brcmf_if *ifp = netdev_priv(ndev); s32 err; mutex_lock(&ifp->drvr->proto_block); @@ -92,9 +90,8 @@ brcmf_fil_cmd_data_get(struct net_device *ndev, u32 cmd, void *data, u32 len) s32 -brcmf_fil_cmd_int_set(struct net_device *ndev, u32 cmd, u32 data) +brcmf_fil_cmd_int_set(struct brcmf_if *ifp, u32 cmd, u32 data) { - struct brcmf_if *ifp = netdev_priv(ndev); s32 err; __le32 data_le = cpu_to_le32(data); @@ -106,9 +103,8 @@ brcmf_fil_cmd_int_set(struct net_device *ndev, u32 cmd, u32 data) } s32 -brcmf_fil_cmd_int_get(struct net_device *ndev, u32 cmd, u32 *data) +brcmf_fil_cmd_int_get(struct brcmf_if *ifp, u32 cmd, u32 *data) { - struct brcmf_if *ifp = netdev_priv(ndev); s32 err; __le32 data_le = cpu_to_le32(*data); @@ -141,10 +137,9 @@ brcmf_create_iovar(char *name, char *data, u32 datalen, char *buf, u32 buflen) s32 -brcmf_fil_iovar_data_set(struct net_device *ndev, char *name, void *data, +brcmf_fil_iovar_data_set(struct brcmf_if *ifp, char *name, void *data, u32 len) { - struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_pub *drvr = ifp->drvr; s32 err; u32 buflen; @@ -169,10 +164,9 @@ brcmf_fil_iovar_data_set(struct net_device *ndev, char *name, void *data, } s32 -brcmf_fil_iovar_data_get(struct net_device *ndev, char *name, void *data, +brcmf_fil_iovar_data_get(struct brcmf_if *ifp, char *name, void *data, u32 len) { - struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_pub *drvr = ifp->drvr; s32 err; u32 buflen; @@ -199,20 +193,20 @@ brcmf_fil_iovar_data_get(struct net_device *ndev, char *name, void *data, } s32 -brcmf_fil_iovar_int_set(struct net_device *ndev, char *name, u32 data) +brcmf_fil_iovar_int_set(struct brcmf_if *ifp, char *name, u32 data) { __le32 data_le = cpu_to_le32(data); - return brcmf_fil_iovar_data_set(ndev, name, &data_le, sizeof(data_le)); + return brcmf_fil_iovar_data_set(ifp, name, &data_le, sizeof(data_le)); } s32 -brcmf_fil_iovar_int_get(struct net_device *ndev, char *name, u32 *data) +brcmf_fil_iovar_int_get(struct brcmf_if *ifp, char *name, u32 *data) { __le32 data_le = cpu_to_le32(*data); s32 err; - err = brcmf_fil_iovar_data_get(ndev, name, &data_le, sizeof(data_le)); + err = brcmf_fil_iovar_data_get(ifp, name, &data_le, sizeof(data_le)); if (err == 0) *data = le32_to_cpu(data_le); return err; @@ -264,10 +258,9 @@ brcmf_create_bsscfg(s32 bssidx, char *name, char *data, u32 datalen, char *buf, } s32 -brcmf_fil_bsscfg_data_set(struct net_device *ndev, char *name, +brcmf_fil_bsscfg_data_set(struct brcmf_if *ifp, char *name, void *data, u32 len) { - struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_pub *drvr = ifp->drvr; s32 err; u32 buflen; @@ -292,10 +285,9 @@ brcmf_fil_bsscfg_data_set(struct net_device *ndev, char *name, } s32 -brcmf_fil_bsscfg_data_get(struct net_device *ndev, char *name, +brcmf_fil_bsscfg_data_get(struct brcmf_if *ifp, char *name, void *data, u32 len) { - struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_pub *drvr = ifp->drvr; s32 err; u32 buflen; @@ -322,21 +314,21 @@ brcmf_fil_bsscfg_data_get(struct net_device *ndev, char *name, } s32 -brcmf_fil_bsscfg_int_set(struct net_device *ndev, char *name, u32 data) +brcmf_fil_bsscfg_int_set(struct brcmf_if *ifp, char *name, u32 data) { __le32 data_le = cpu_to_le32(data); - return brcmf_fil_bsscfg_data_set(ndev, name, &data_le, + return brcmf_fil_bsscfg_data_set(ifp, name, &data_le, sizeof(data_le)); } s32 -brcmf_fil_bsscfg_int_get(struct net_device *ndev, char *name, u32 *data) +brcmf_fil_bsscfg_int_get(struct brcmf_if *ifp, char *name, u32 *data) { __le32 data_le = cpu_to_le32(*data); s32 err; - err = brcmf_fil_bsscfg_data_get(ndev, name, &data_le, + err = brcmf_fil_bsscfg_data_get(ifp, name, &data_le, sizeof(data_le)); if (err == 0) *data = le32_to_cpu(data_le); |