Skip to content

Commit eae4475

Browse files
Felix Fietkaulinvjw
authored andcommitted
minstrel: make the rate control ops reusable from another rc implementation
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent 44ac91e commit eae4475

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

net/mac80211/rc80211_minstrel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ minstrel_free(void *priv)
541541
kfree(priv);
542542
}
543543

544-
static struct rate_control_ops mac80211_minstrel = {
544+
struct rate_control_ops mac80211_minstrel = {
545545
.name = "minstrel",
546546
.tx_status = minstrel_tx_status,
547547
.get_rate = minstrel_get_rate,

net/mac80211/rc80211_minstrel.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,13 @@ struct minstrel_debugfs_info {
8585
char buf[];
8686
};
8787

88+
extern struct rate_control_ops mac80211_minstrel;
8889
void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
8990
void minstrel_remove_sta_debugfs(void *priv, void *priv_sta);
9091

92+
/* debugfs */
93+
int minstrel_stats_open(struct inode *inode, struct file *file);
94+
ssize_t minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *ppos);
95+
int minstrel_stats_release(struct inode *inode, struct file *file);
96+
9197
#endif

net/mac80211/rc80211_minstrel_debugfs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#include <net/mac80211.h>
5353
#include "rc80211_minstrel.h"
5454

55-
static int
55+
int
5656
minstrel_stats_open(struct inode *inode, struct file *file)
5757
{
5858
struct minstrel_sta_info *mi = inode->i_private;
@@ -100,7 +100,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
100100
return 0;
101101
}
102102

103-
static ssize_t
103+
ssize_t
104104
minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *ppos)
105105
{
106106
struct minstrel_debugfs_info *ms;
@@ -109,7 +109,7 @@ minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *ppo
109109
return simple_read_from_buffer(buf, len, ppos, ms->buf, ms->len);
110110
}
111111

112-
static int
112+
int
113113
minstrel_stats_release(struct inode *inode, struct file *file)
114114
{
115115
kfree(file->private_data);

0 commit comments

Comments
 (0)