aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211.c
diff options
context:
space:
mode:
authorMattias Nissler <mattias.nissler@gmx.de>2007-12-18 19:25:57 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:59:18 -0500
commitad01837593338f13508463fa11c8dbf8109a1e5d (patch)
tree77b521a6b8e7f8357505449fe812a9d41d40afb2 /net/mac80211/ieee80211.c
parent1abbe498e4b5e4f2000dfc30a0fa25be9553530e (diff)
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)
1315#ifdef CONFIG_MAC80211_RCSIMPLE 1315#ifdef CONFIG_MAC80211_RCSIMPLE
1316 ret = ieee80211_rate_control_register(&mac80211_rcsimple); 1316 ret = ieee80211_rate_control_register(&mac80211_rcsimple);
1317 if (ret) 1317 if (ret)
1318 return ret; 1318 goto fail;
1319#endif
1320
1321#ifdef CONFIG_MAC80211_RCPID
1322 ret = ieee80211_rate_control_register(&mac80211_rcpid);
1323 if (ret)
1324 goto fail;
1319#endif 1325#endif
1320 1326
1321 ret = ieee80211_wme_register(); 1327 ret = ieee80211_wme_register();
1322 if (ret) { 1328 if (ret) {
1323#ifdef CONFIG_MAC80211_RCSIMPLE
1324 ieee80211_rate_control_unregister(&mac80211_rcsimple);
1325#endif
1326 printk(KERN_DEBUG "ieee80211_init: failed to " 1329 printk(KERN_DEBUG "ieee80211_init: failed to "
1327 "initialize WME (err=%d)\n", ret); 1330 "initialize WME (err=%d)\n", ret);
1328 return ret; 1331 goto fail;
1329 } 1332 }
1330 1333
1331 ieee80211_debugfs_netdev_init(); 1334 ieee80211_debugfs_netdev_init();
1332 ieee80211_regdomain_init(); 1335 ieee80211_regdomain_init();
1333 1336
1334 return 0; 1337 return 0;
1338
1339fail:
1340
1341#ifdef CONFIG_MAC80211_RCSIMPLE
1342 ieee80211_rate_control_unregister(&mac80211_rcsimple);
1343#endif
1344#ifdef CONFIG_MAC80211_RCPID
1345 ieee80211_rate_control_unregister(&mac80211_rcpid);
1346#endif
1347
1348 return ret;
1335} 1349}
1336 1350
1337static void __exit ieee80211_exit(void) 1351static void __exit ieee80211_exit(void)
@@ -1339,6 +1353,9 @@ static void __exit ieee80211_exit(void)
1339#ifdef CONFIG_MAC80211_RCSIMPLE 1353#ifdef CONFIG_MAC80211_RCSIMPLE
1340 ieee80211_rate_control_unregister(&mac80211_rcsimple); 1354 ieee80211_rate_control_unregister(&mac80211_rcsimple);
1341#endif 1355#endif
1356#ifdef CONFIG_MAC80211_RCPID
1357 ieee80211_rate_control_unregister(&mac80211_rcpid);
1358#endif
1342 1359
1343 ieee80211_wme_unregister(); 1360 ieee80211_wme_unregister();
1344 ieee80211_debugfs_netdev_exit(); 1361 ieee80211_debugfs_netdev_exit();