aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmfmac
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2013-02-06 12:40:46 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-08 14:51:34 -0500
commit371830eafeb742e973964b38a55f17b69ea714d0 (patch)
tree4f9918948e03437b97e4c341b3fcd2b3c9165b03 /drivers/net/wireless/brcm80211/brcmfmac
parent75d907d3ee835f8759fe291023aa609dccebe504 (diff)
brcmfmac: add function to retrieve chip information
Added function to obtain chip information for chip specific code. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd.h1
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
index f0e81a880fb6..e17f68aaba9e 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
@@ -552,5 +552,6 @@ extern int brcmf_net_attach(struct brcmf_if *ifp);
552extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx, 552extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx,
553 s32 bssidx, char *name, u8 *mac_addr); 553 s32 bssidx, char *name, u8 *mac_addr);
554extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx); 554extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx);
555extern u32 brcmf_get_chip_info(struct brcmf_if *ifp);
555 556
556#endif /* _BRCMF_H_ */ 557#endif /* _BRCMF_H_ */
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index a09c0775d1c8..6202ad20c28d 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -895,6 +895,16 @@ int brcmf_netdev_wait_pend8021x(struct net_device *ndev)
895 return !err; 895 return !err;
896} 896}
897 897
898/*
899 * return chip id and rev of the device encoded in u32.
900 */
901u32 brcmf_get_chip_info(struct brcmf_if *ifp)
902{
903 struct brcmf_bus *bus = ifp->drvr->bus_if;
904
905 return bus->chip << 4 | bus->chiprev;
906}
907
898static void brcmf_driver_init(struct work_struct *work) 908static void brcmf_driver_init(struct work_struct *work)
899{ 909{
900 brcmf_debugfs_init(); 910 brcmf_debugfs_init();