Search Linux Wireless

[PATCH 6/7] brcmfmac: add vendor name in revinfo debugfs file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Upon probe the driver determines the vendor supporting the device.
Expose this information in the revinfo debugfs file.

Reviewed-by: Hante Meuleman <hante.meuleman@xxxxxxxxxxxx>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@xxxxxxxxxxxx>
Reviewed-by: Franky Lin <franky.lin@xxxxxxxxxxxx>
Signed-off-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c  | 3 ++-
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c | 5 +++++
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.h | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index 9a77b100abbb..c2b3525f7103 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -1139,7 +1139,8 @@ static int brcmf_revinfo_read(struct seq_file
*s, void *data)
 	seq_printf(s, "vendorid: 0x%04x\n", ri->vendorid);
 	seq_printf(s, "deviceid: 0x%04x\n", ri->deviceid);
 	seq_printf(s, "radiorev: %s\n", brcmu_dotrev_str(ri->radiorev, drev));
-	seq_printf(s, "chip: %s\n", ri->chipname);
+	seq_printf(s, "chip: %s (%s)\n", ri->chipname,
+		   brcmf_fwvid_vendor_name(bus_if->drvr));
 	seq_printf(s, "chippkg: %u\n", ri->chippkg);
 	seq_printf(s, "corerev: %u\n", ri->corerev);
 	seq_printf(s, "boardid: 0x%04x\n", ri->boardid);
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
index 919c60172e08..d0ba2aba093b 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
@@ -198,3 +198,8 @@ void brcmf_fwvid_detach_ops(struct brcmf_pub *drvr)

 	mutex_unlock(&fwvid_list_lock);
 }
+
+const char *brcmf_fwvid_vendor_name(struct brcmf_pub *drvr)
+{
+	return fwvid_list[drvr->bus_if->fwvid].name;
+}
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.h
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.h
index cc79df8cc428..8344d473a549 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.h
@@ -22,6 +22,7 @@ int brcmf_fwvid_unregister_vendor(enum
brcmf_fwvendor fwvid, struct module *mod)
 /* core driver functions */
 int brcmf_fwvid_attach_ops(struct brcmf_pub *drvr);
 void brcmf_fwvid_detach_ops(struct brcmf_pub *drvr);
+const char *brcmf_fwvid_vendor_name(struct brcmf_pub *drvr);

 static inline int brcmf_fwvid_attach(struct brcmf_pub *drvr)
 {
-- 
2.32.0



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux