From 09d14aa8fc5a3c7346c86fb9d40494fad859cb5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sun, 21 Jun 2015 20:08:11 +0000 Subject: mac80211: backport some brcmfmac patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are two important patches in this patchset: updating read pointer quicker & rework of .get_station(). There are few more upstream patches that are p2p-related and weren't backported in this commit. Signed-off-by: Rafał Miłecki Backport of r46084 git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@46100 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...e-debugfs_create_devm_seqfile-helper-func.patch | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 package/kernel/mac80211/patches/388-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch (limited to 'package/kernel/mac80211/patches/388-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch') diff --git a/package/kernel/mac80211/patches/388-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch b/package/kernel/mac80211/patches/388-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch new file mode 100644 index 0000000000..756fbb2cb7 --- /dev/null +++ b/package/kernel/mac80211/patches/388-brcmfmac-use-debugfs_create_devm_seqfile-helper-func.patch @@ -0,0 +1,69 @@ +From: Arend van Spriel +Date: Mon, 8 Jun 2015 14:38:35 +0200 +Subject: [PATCH] brcmfmac: use debugfs_create_devm_seqfile() helper + function + +Some time ago the function debugfs_create_devm_seqfile() was +introduced in debugfs. The caller simply needs to provide a +device pointer and read function. The function brcmf_debugfs_add_entry() +is now simply a wrapper only doing the work for CONFIG_BRCMDBG. + +Reviewed-by: Hante Meuleman +Reviewed-by: Franky (Zhenhui) Lin +Reviewed-by: Daniel (Deognyoun) Kim +Reviewed-by: Pieter-Paul Giesberts +Signed-off-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + +--- a/drivers/net/wireless/brcm80211/brcmfmac/debug.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/debug.c +@@ -64,44 +64,12 @@ struct dentry *brcmf_debugfs_get_devdir( + return drvr->dbgfs_dir; + } + +-struct brcmf_debugfs_entry { +- int (*read)(struct seq_file *seq, void *data); +- struct brcmf_pub *drvr; +-}; +- +-static int brcmf_debugfs_entry_open(struct inode *inode, struct file *f) +-{ +- struct brcmf_debugfs_entry *entry = inode->i_private; +- +- return single_open(f, entry->read, entry->drvr->bus_if->dev); +-} +- +-static const struct file_operations brcmf_debugfs_def_ops = { +- .owner = THIS_MODULE, +- .open = brcmf_debugfs_entry_open, +- .release = single_release, +- .read = seq_read, +- .llseek = seq_lseek +-}; +- + int brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn, + int (*read_fn)(struct seq_file *seq, void *data)) + { +- struct dentry *dentry = drvr->dbgfs_dir; +- struct brcmf_debugfs_entry *entry; +- +- if (IS_ERR_OR_NULL(dentry)) +- return -ENOENT; +- +- entry = devm_kzalloc(drvr->bus_if->dev, sizeof(*entry), GFP_KERNEL); +- if (!entry) +- return -ENOMEM; +- +- entry->read = read_fn; +- entry->drvr = drvr; +- +- dentry = debugfs_create_file(fn, S_IRUGO, dentry, entry, +- &brcmf_debugfs_def_ops); ++ struct dentry *e; + +- return PTR_ERR_OR_ZERO(dentry); ++ e = debugfs_create_devm_seqfile(drvr->bus_if->dev, fn, ++ drvr->dbgfs_dir, read_fn); ++ return PTR_ERR_OR_ZERO(e); + } -- cgit v1.2.3