summaryrefslogtreecommitdiff
path: root/net/mac80211/ieee80211_rate.c
diff options
context:
space:
mode:
authorStefano Brivio <stefano.brivio@polimi.it>2007-12-19 03:26:16 +0300
committerDavid S. Miller <davem@davemloft.net>2008-01-29 01:59:41 +0300
commitc21b39aca4f8f4975784e54cd3a1b80bab80dcc0 (patch)
treebcf9b8ab5ecdb77fbd7ff7e56bc6474334a5d008 /net/mac80211/ieee80211_rate.c
parentb92edbe0b8a36a833c16b0cbafb6e899b81ffc08 (diff)
downloadlinux-c21b39aca4f8f4975784e54cd3a1b80bab80dcc0.tar.xz
mac80211: make PID rate control algorithm the default
This makes the new PID TX rate control algorithm the default instead of the rc80211_simple rate control algorithm. The simple algorithm was flawed in several ways: it wasn't responsive at all and didn't age the information it was relying on properly. The PID algorithm allows us to tune characteristics such as responsiveness by adjusting parameters and was found to generally behave better. The default algorithm can be overridden to select simple instead. Which ever algorithm is the default is included as part of the mac80211 module automatically. The other algorithm (simple vs. pid) can be selected for inclusion as well. If EMBEDDED is selected then the choice is available to have no default specified and neither algorithm included in mac80211. The default algorithm can be set through a modparam. While at it, mark rc80211-simple as deprecated, and schedule it for removal. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/ieee80211_rate.c')
-rw-r--r--net/mac80211/ieee80211_rate.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
index e495b0998b4d..65fc9ad615e9 100644
--- a/net/mac80211/ieee80211_rate.c
+++ b/net/mac80211/ieee80211_rate.c
@@ -21,6 +21,11 @@ struct rate_control_alg {
static LIST_HEAD(rate_ctrl_algs);
static DEFINE_MUTEX(rate_ctrl_mutex);
+static char *ieee80211_default_rc_algo = CONFIG_MAC80211_RC_DEFAULT;
+module_param(ieee80211_default_rc_algo, charp, 0644);
+MODULE_PARM_DESC(ieee80211_default_rc_algo,
+ "Default rate control algorithm for mac80211 to use");
+
int ieee80211_rate_control_register(struct rate_control_ops *ops)
{
struct rate_control_alg *alg;
@@ -89,21 +94,27 @@ ieee80211_try_rate_control_ops_get(const char *name)
return ops;
}
-/* Get the rate control algorithm. If `name' is NULL, get the first
- * available algorithm. */
+/* Get the rate control algorithm. */
static struct rate_control_ops *
ieee80211_rate_control_ops_get(const char *name)
{
struct rate_control_ops *ops;
+ const char *alg_name;
if (!name)
- name = "simple";
+ alg_name = ieee80211_default_rc_algo;
+ else
+ alg_name = name;
- ops = ieee80211_try_rate_control_ops_get(name);
+ ops = ieee80211_try_rate_control_ops_get(alg_name);
if (!ops) {
- request_module("rc80211_%s", name);
- ops = ieee80211_try_rate_control_ops_get(name);
+ request_module("rc80211_%s", alg_name);
+ ops = ieee80211_try_rate_control_ops_get(alg_name);
}
+ if (!ops && name)
+ /* try default if specific alg requested but not found */
+ ops = ieee80211_try_rate_control_ops_get(ieee80211_default_rc_algo);
+
return ops;
}
@@ -244,3 +255,4 @@ void rate_control_deinitialize(struct ieee80211_local *local)
local->rate_ctrl = NULL;
rate_control_put(ref);
}
+