Commit 371830ea authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcmfmac: add function to retrieve chip information

Added function to obtain chip information for chip specific
code.
Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarPiotr Haber <phaber@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 75d907d3
...@@ -552,5 +552,6 @@ extern int brcmf_net_attach(struct brcmf_if *ifp); ...@@ -552,5 +552,6 @@ extern int brcmf_net_attach(struct brcmf_if *ifp);
extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx, extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx,
s32 bssidx, char *name, u8 *mac_addr); s32 bssidx, char *name, u8 *mac_addr);
extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx); extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx);
extern u32 brcmf_get_chip_info(struct brcmf_if *ifp);
#endif /* _BRCMF_H_ */ #endif /* _BRCMF_H_ */
...@@ -895,6 +895,16 @@ int brcmf_netdev_wait_pend8021x(struct net_device *ndev) ...@@ -895,6 +895,16 @@ int brcmf_netdev_wait_pend8021x(struct net_device *ndev)
return !err; return !err;
} }
/*
* return chip id and rev of the device encoded in u32.
*/
u32 brcmf_get_chip_info(struct brcmf_if *ifp)
{
struct brcmf_bus *bus = ifp->drvr->bus_if;
return bus->chip << 4 | bus->chiprev;
}
static void brcmf_driver_init(struct work_struct *work) static void brcmf_driver_init(struct work_struct *work)
{ {
brcmf_debugfs_init(); brcmf_debugfs_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment