mac80211: add the minstrel_ht rate control algorithm
PATCH 1/1 mac80211: add the minstrel_ht rate control algorithm
Signed-off-by Felix Fietkau <[email protected]>
---
changes since rfc v3:
- various fixes by christian lamparter
- tune sampling for better aggregation length
- added kconfig option
- enables 3 streams (ath9k supports it now)
net/mac80211/Makefile +4 -0
@@ -50,7 +50,11 @@ rc80211_pid-$(CONFIG_MAC80211_DEBUGFS) + rc80211_minstrel-y := rc80211_minstrel.o rc80211_minstrel-$(CONFIG_MAC80211_DEBUGFS) += rc80211_minstrel_debugfs.o +rc80211_minstrel_ht-y := rc80211_minstrel_ht.o +rc80211_minstrel_ht-$(CONFIG_MAC80211_DEBUGFS) += rc80211_minstrel_ht_debugfs.o + mac80211-$(CONFIG_MAC80211_RC_PID) += $(rc80211_pid-y) mac80211-$(CONFIG_MAC80211_RC_MINSTREL) += $(rc80211_minstrel-y) +mac80211-$(CONFIG_MAC80211_RC_MINSTREL_HT) += $(rc80211_minstrel_ht-y) ccflags-y += -D__CHECK_ENDIAN__
net/mac80211/main.c +7 -0
@@ -716,6 +716,10 @@ static int __init ieee80211_init(void)if (ret)return ret; + ret =rc80211_minstrel_ht_init (); +if (ret) + goto err_minstrel; + ret =rc80211_pid_init ();if (ret) goto err_pid;
@@ -728,6 +732,8 @@ static int __init ieee80211_init(void) err_netdev:rc80211_pid_exit (); err_pid: +rc80211_minstrel_ht_exit (); + err_minstrel:rc80211_minstrel_exit ();return ret;
@@ -736,6 +742,7 @@ static int __init ieee80211_init(void) static void __exit ieee80211_exit(void) {rc80211_pid_exit (); +rc80211_minstrel_ht_exit ();rc80211_minstrel_exit ();/*
net/mac80211/rate.h +13 -0
@@ -147,5 +147,18 @@ static inline void rc80211_minstrel_exit }#endif +#ifdef CONFIG_MAC80211_RC_MINSTREL_HT +extern int rc80211_minstrel_ht_init (void ); +extern void rc80211_minstrel_ht_exit (void ); +#else +static inline int rc80211_minstrel_ht_init (void ) +{ +return 0 ; +} +static inline void rc80211_minstrel_ht_exit (void ) +{ +} +#endif +#endif /* IEEE80211_RATE_H */
net/mac80211/rc80211_minstrel_ht.c new file +824 -0
824 lines not on this page · raw message
net/mac80211/rc80211_minstrel_ht.h new file +128 -0
128 lines not on this page · raw message
net/mac80211/rc80211_minstrel_ht_debugfs.c new file +120 -0
120 lines not on this page · raw message
net/mac80211/Kconfig +7 -0
@@ -33,6 +33,13 @@ config MAC80211_RC_MINSTREL ---help--- This option enables the 'minstrel' TX rate control algorithm +config MAC80211_RC_MINSTREL_HT + bool "Minstrel 802.11n support" if EMBEDDED + depends on MAC80211_RC_MINSTREL + default y + ---help--- + This option enables the 'minstrel_ht' TX rate control algorithm + choice prompt "Default rate control algorithm" depends on MAC80211_HAS_RC