Skip to content

Commit

Permalink
mac80211: add the 'minstrel' rate control algorithm
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Felix Fietkau authored and linvjw committed Oct 6, 2008
1 parent 2f7fe87 commit cccf129
Show file tree
Hide file tree
Showing 7 changed files with 868 additions and 0 deletions.
13 changes: 13 additions & 0 deletions net/mac80211/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ config MAC80211_RC_PID
mac80211 that uses a PID controller to select the TX
rate.

config MAC80211_RC_MINSTREL
bool "Minstrel"
---help---
This option enables the 'minstrel' TX rate control algorithm

choice
prompt "Default rate control algorithm"
default MAC80211_RC_DEFAULT_PID
Expand All @@ -39,11 +44,19 @@ config MAC80211_RC_DEFAULT_PID
default rate control algorithm. You should choose
this unless you know what you are doing.

config MAC80211_RC_DEFAULT_MINSTREL
bool "Minstrel"
depends on MAC80211_RC_MINSTREL
---help---
Select Minstrel as the default rate control algorithm.


endchoice

config MAC80211_RC_DEFAULT
string
default "pid" if MAC80211_RC_DEFAULT_PID
default "minstrel" if MAC80211_RC_DEFAULT_MINSTREL
default ""

endmenu
Expand Down
4 changes: 4 additions & 0 deletions net/mac80211/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ mac80211-$(CONFIG_MAC80211_MESH) += \
rc80211_pid-y := rc80211_pid_algo.o
rc80211_pid-$(CONFIG_MAC80211_DEBUGFS) += rc80211_pid_debugfs.o

rc80211_minstrel-y := rc80211_minstrel.o
rc80211_minstrel-$(CONFIG_MAC80211_DEBUGFS) += rc80211_minstrel_debugfs.o

mac80211-$(CONFIG_MAC80211_RC_PID) += $(rc80211_pid-y)
mac80211-$(CONFIG_MAC80211_RC_MINSTREL) += $(rc80211_minstrel-y)
5 changes: 5 additions & 0 deletions net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,10 @@ static int __init ieee80211_init(void)
BUILD_BUG_ON(offsetof(struct ieee80211_tx_info, driver_data) +
IEEE80211_TX_INFO_DRIVER_DATA_SIZE > sizeof(skb->cb));

ret = rc80211_minstrel_init();
if (ret)
return ret;

ret = rc80211_pid_init();
if (ret)
return ret;
Expand All @@ -1027,6 +1031,7 @@ static int __init ieee80211_init(void)
static void __exit ieee80211_exit(void)
{
rc80211_pid_exit();
rc80211_minstrel_exit();

/*
* For key todo, it'll be empty by now but the work
Expand Down
14 changes: 14 additions & 0 deletions net/mac80211/rate.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,18 @@ static inline void rc80211_pid_exit(void)
}
#endif

#ifdef CONFIG_MAC80211_RC_MINSTREL
extern int rc80211_minstrel_init(void);
extern void rc80211_minstrel_exit(void);
#else
static inline int rc80211_minstrel_init(void)
{
return 0;
}
static inline void rc80211_minstrel_exit(void)
{
}
#endif


#endif /* IEEE80211_RATE_H */
Loading

0 comments on commit cccf129

Please sign in to comment.