]> Pileus Git - ~andy/linux/commitdiff
minstrel: make the rate control ops reusable from another rc implementation
authorFelix Fietkau <nbd@openwrt.org>
Mon, 1 Mar 2010 21:21:40 +0000 (22:21 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 10 Mar 2010 22:44:23 +0000 (17:44 -0500)
This patch makes it possible to reuse the minstrel rate control ops
from another rate control module. This is useful in preparing for the
new 802.11n implementation of minstrel, which will reuse the old code
for legacy stations.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/rc80211_minstrel.c
net/mac80211/rc80211_minstrel.h
net/mac80211/rc80211_minstrel_debugfs.c

index 6e5d68b4e427a232dfeebcfe98f666bb2618bb1c..4926d929fd9f30fc2c1416ef3009c336878bd98e 100644 (file)
@@ -541,7 +541,7 @@ minstrel_free(void *priv)
        kfree(priv);
 }
 
-static struct rate_control_ops mac80211_minstrel = {
+struct rate_control_ops mac80211_minstrel = {
        .name = "minstrel",
        .tx_status = minstrel_tx_status,
        .get_rate = minstrel_get_rate,
index 9372656f3f5ee2a93a7d3355fba94558d5f19d76..0f5a83370aa637f18f854c7469cc21e8a491257c 100644 (file)
@@ -85,7 +85,13 @@ struct minstrel_debugfs_info {
        char buf[];
 };
 
+extern struct rate_control_ops mac80211_minstrel;
 void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
 void minstrel_remove_sta_debugfs(void *priv, void *priv_sta);
 
+/* debugfs */
+int minstrel_stats_open(struct inode *inode, struct file *file);
+ssize_t minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *ppos);
+int minstrel_stats_release(struct inode *inode, struct file *file);
+
 #endif
index 3e83402ece175655e26c0394674b13f8ea41b5d0..56d0f24957d9fb52a5a7cacc5582cde0743b382c 100644 (file)
@@ -52,7 +52,7 @@
 #include <net/mac80211.h>
 #include "rc80211_minstrel.h"
 
-static int
+int
 minstrel_stats_open(struct inode *inode, struct file *file)
 {
        struct minstrel_sta_info *mi = inode->i_private;
@@ -100,7 +100,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
        return 0;
 }
 
-static ssize_t
+ssize_t
 minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *ppos)
 {
        struct minstrel_debugfs_info *ms;
@@ -109,7 +109,7 @@ minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *ppo
        return simple_read_from_buffer(buf, len, ppos, ms->buf, ms->len);
 }
 
-static int
+int
 minstrel_stats_release(struct inode *inode, struct file *file)
 {
        kfree(file->private_data);