mirror of
https://github.com/clockworkpi/Kernel.git
synced 2025-12-12 15:48:50 +01:00
79 lines
2.2 KiB
Diff
79 lines
2.2 KiB
Diff
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
|
index f7961b22e051..c3f51e123990 100644
|
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
|
@@ -4431,6 +4431,55 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus)
|
|
return fwreq;
|
|
}
|
|
|
|
+static char brcmf_fw_name[BRCMF_FW_NAME_LEN];
|
|
+
|
|
+#ifdef CONFIG_PROC_FS
|
|
+#include <linux/proc_fs.h>
|
|
+
|
|
+static int brcmf_sdio_proc_show(struct seq_file *m, void *v)
|
|
+{
|
|
+ seq_printf(m, "brcmf_sdio\n");
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+static int brcmf_sdio_proc_open(struct inode *inode, struct file *file)
|
|
+{
|
|
+ return single_open(file, brcmf_sdio_proc_show, NULL);
|
|
+}
|
|
+
|
|
+static ssize_t brcmf_sdio_proc_read(struct file * file, char __user * buf, size_t size, loff_t * loff)
|
|
+{
|
|
+ int len;
|
|
+ len = strlen(brcmf_fw_name);
|
|
+ return simple_read_from_buffer(buf, size, loff, brcmf_fw_name, len);
|
|
+}
|
|
+
|
|
+static ssize_t brcmf_sdio_proc_write(struct file * file, const char __user * buf, size_t size, loff_t * loff)
|
|
+{
|
|
+ return size;
|
|
+}
|
|
+
|
|
+static const struct proc_ops brcmf_sdio_proc_fops = {
|
|
+ .proc_open = brcmf_sdio_proc_open,
|
|
+ .proc_read = brcmf_sdio_proc_read,
|
|
+ .proc_write = brcmf_sdio_proc_write,
|
|
+ .proc_lseek = seq_lseek,
|
|
+ .proc_release = single_release,
|
|
+};
|
|
+
|
|
+static int __init brcmf_sdio_proc_init(void)
|
|
+{
|
|
+ struct proc_dir_entry *r;
|
|
+
|
|
+ r = proc_create("driver/brcmf_fw", S_IRWXUGO, NULL, &brcmf_sdio_proc_fops);
|
|
+ if (!r)
|
|
+ return -ENOMEM;
|
|
+ return 0;
|
|
+}
|
|
+#else
|
|
+static inline int brcmf_sdio_proc_init(void) { return 0; }
|
|
+#endif /* CONFIG_PROC_FS */
|
|
+
|
|
struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
|
{
|
|
int ret;
|
|
@@ -4439,6 +4488,7 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
|
struct brcmf_fw_request *fwreq;
|
|
|
|
brcmf_dbg(TRACE, "Enter\n");
|
|
+ msleep(1000);
|
|
|
|
/* Allocate private bus interface state */
|
|
bus = kzalloc(sizeof(struct brcmf_sdio), GFP_ATOMIC);
|
|
@@ -4533,6 +4583,9 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
|
goto fail;
|
|
}
|
|
|
|
+ sprintf(brcmf_fw_name, "%s\n", sdiodev->fw_name);
|
|
+ brcmf_sdio_proc_init();
|
|
+
|
|
return bus;
|
|
|
|
fail:
|