summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211.c
diff options
context:
space:
mode:
authorMattias Nissler <mattias.nissler@gmx.de>2007-12-19 01:25:57 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-28 23:59:18 +0100
commitad01837593338f13508463fa11c8dbf8109a1e5d (patch)
tree77b521a6b8e7f8357505449fe812a9d41d40afb2 /net/mac80211/ieee80211.c
parentmac80211: clean up rate selection (diff)
downloadlinux-ad01837593338f13508463fa11c8dbf8109a1e5d.tar.xz
linux-ad01837593338f13508463fa11c8dbf8109a1e5d.zip
mac80211: add PID controller based rate control algorithm
Add a new rate control algorithm based on a PID controller. It samples the percentage of failed frames over time, feeds the result into the controller and uses its output to control the TX rate. Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r--net/mac80211/ieee80211.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 5bf7a5bebfc9..3d7b4341914e 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -1315,23 +1315,37 @@ static int __init ieee80211_init(void)
#ifdef CONFIG_MAC80211_RCSIMPLE
ret = ieee80211_rate_control_register(&mac80211_rcsimple);
if (ret)
- return ret;
+ goto fail;
+#endif
+
+#ifdef CONFIG_MAC80211_RCPID
+ ret = ieee80211_rate_control_register(&mac80211_rcpid);
+ if (ret)
+ goto fail;
#endif
ret = ieee80211_wme_register();
if (ret) {
-#ifdef CONFIG_MAC80211_RCSIMPLE
- ieee80211_rate_control_unregister(&mac80211_rcsimple);
-#endif
printk(KERN_DEBUG "ieee80211_init: failed to "
"initialize WME (err=%d)\n", ret);
- return ret;
+ goto fail;
}
ieee80211_debugfs_netdev_init();
ieee80211_regdomain_init();
return 0;
+
+fail:
+
+#ifdef CONFIG_MAC80211_RCSIMPLE
+ ieee80211_rate_control_unregister(&mac80211_rcsimple);
+#endif
+#ifdef CONFIG_MAC80211_RCPID
+ ieee80211_rate_control_unregister(&mac80211_rcpid);
+#endif
+
+ return ret;
}
static void __exit ieee80211_exit(void)
@@ -1339,6 +1353,9 @@ static void __exit ieee80211_exit(void)
#ifdef CONFIG_MAC80211_RCSIMPLE
ieee80211_rate_control_unregister(&mac80211_rcsimple);
#endif
+#ifdef CONFIG_MAC80211_RCPID
+ ieee80211_rate_control_unregister(&mac80211_rcpid);
+#endif
ieee80211_wme_unregister();
ieee80211_debugfs_netdev_exit();