From: "Arend van Spriel" <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: "Linux Wireless List" <linux-wireless@vger.kernel.org>,
"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 11/12] brcmfmac: add function to retrieve chip information
Date: Wed, 6 Feb 2013 18:40:46 +0100 [thread overview]
Message-ID: <1360172447-2424-12-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1360172447-2424-1-git-send-email-arend@broadcom.com>
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>
---
drivers/net/wireless/brcm80211/brcmfmac/dhd.h | 1 +
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
index f0e81a8..e17f68a 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);
extern struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, int ifidx,
s32 bssidx, char *name, u8 *mac_addr);
extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx);
+extern u32 brcmf_get_chip_info(struct brcmf_if *ifp);
#endif /* _BRCMF_H_ */
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index a09c077..6202ad2 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)
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)
{
brcmf_debugfs_init();
--
1.7.10.4
next prev parent reply other threads:[~2013-02-06 17:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 17:40 [PATCH 00/12] brcmfmac: cleanup and chip workaround for unsecure AP Arend van Spriel
2013-02-06 17:40 ` [PATCH 01/12] brcmfmac: Remove drvr_up from bus interface Arend van Spriel
2013-02-06 17:40 ` [PATCH 02/12] brcmfmac: Remove copy mac address from drvr at netdev up Arend van Spriel
2013-02-06 17:40 ` [PATCH 03/12] brcmfmac: Use struct brcmf_if in brcmf_configure_opensecurity Arend van Spriel
2013-02-06 17:40 ` [PATCH 04/12] brcmfmac: Track pending 8021x frames per ifp Arend van Spriel
2013-02-06 17:40 ` [PATCH 05/12] brcmfmac: Add logging for FIL int set/get cmds Arend van Spriel
2013-02-06 17:40 ` [PATCH 06/12] brcmfmac: Track statistics per ifp Arend van Spriel
2013-02-06 17:40 ` [PATCH 07/12] brcmfmac: Update tracelogging for multiple netdevs Arend van Spriel
2013-02-06 17:40 ` [PATCH 08/12] brcmfmac: Cleanup function brcmf_notifiy_connect_status_ap Arend van Spriel
2013-02-06 17:40 ` [PATCH 09/12] brcmfmac: Use single function for channel to chanspec Arend van Spriel
2013-02-06 17:40 ` [PATCH 10/12] brcmfmac: add chip information to the bus interface Arend van Spriel
2013-02-06 17:40 ` Arend van Spriel [this message]
2013-02-06 17:40 ` [PATCH 12/12] brcmfmac: fix problem connecting to AP without security Arend van Spriel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360172447-2424-12-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.