diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-03-26 22:36:12 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-03-26 22:36:12 +0000 |
commit | de79b64c198be679fdc84e131822e18cb72e7729 (patch) | |
tree | c6e44c9f6d604fb71a4c520908e0bd0feaa99547 /package/mac80211/patches/540-minstrel_debugfs_cleanup.patch | |
parent | 249a5e63b3cc178feff1a91ebfc4b3dcfd1dab0e (diff) |
mac80211: update to wireless-testing 2010-03-24
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20497 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/540-minstrel_debugfs_cleanup.patch')
-rw-r--r-- | package/mac80211/patches/540-minstrel_debugfs_cleanup.patch | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/package/mac80211/patches/540-minstrel_debugfs_cleanup.patch b/package/mac80211/patches/540-minstrel_debugfs_cleanup.patch deleted file mode 100644 index 9a13bae70b..0000000000 --- a/package/mac80211/patches/540-minstrel_debugfs_cleanup.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- a/net/mac80211/rc80211_minstrel.h -+++ b/net/mac80211/rc80211_minstrel.h -@@ -80,6 +80,11 @@ struct minstrel_priv { - unsigned int lookaround_rate_mrr; - }; - -+struct minstrel_debugfs_info { -+ size_t len; -+ char buf[]; -+}; -+ - void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir); - void minstrel_remove_sta_debugfs(void *priv, void *priv_sta); - ---- a/net/mac80211/rc80211_minstrel_debugfs.c -+++ b/net/mac80211/rc80211_minstrel_debugfs.c -@@ -52,21 +52,15 @@ - #include <net/mac80211.h> - #include "rc80211_minstrel.h" - --struct minstrel_stats_info { -- struct minstrel_sta_info *mi; -- char buf[4096]; -- size_t len; --}; -- - static int - minstrel_stats_open(struct inode *inode, struct file *file) - { - struct minstrel_sta_info *mi = inode->i_private; -- struct minstrel_stats_info *ms; -+ struct minstrel_debugfs_info *ms; - unsigned int i, tp, prob, eprob; - char *p; - -- ms = kmalloc(sizeof(*ms), GFP_KERNEL); -+ ms = kmalloc(sizeof(*ms) + 4096, GFP_KERNEL); - if (!ms) - return -ENOMEM; - -@@ -107,35 +101,18 @@ minstrel_stats_open(struct inode *inode, - } - - static ssize_t --minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *o) -+minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *ppos) - { -- struct minstrel_stats_info *ms; -- char *src; -+ struct minstrel_debugfs_info *ms; - - ms = file->private_data; -- src = ms->buf; -- -- len = min(len, ms->len); -- if (len <= *o) -- return 0; -- -- src += *o; -- len -= *o; -- *o += len; -- -- if (copy_to_user(buf, src, len)) -- return -EFAULT; -- -- return len; -+ return simple_read_from_buffer(buf, len, ppos, ms->buf, ms->len); - } - - static int - minstrel_stats_release(struct inode *inode, struct file *file) - { -- struct minstrel_stats_info *ms = file->private_data; -- -- kfree(ms); -- -+ kfree(file->private_data); - return 0; - } - |