aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_rate.c
diff options
context:
space:
mode:
authorStefano Brivio <stefano.brivio@polimi.it>2007-12-18 19:26:16 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:59:41 -0500
commitc21b39aca4f8f4975784e54cd3a1b80bab80dcc0 (patch)
treebcf9b8ab5ecdb77fbd7ff7e56bc6474334a5d008 /net/mac80211/ieee80211_rate.c
parentb92edbe0b8a36a833c16b0cbafb6e899b81ffc08 (diff)
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 e495b0998b4..65fc9ad615e 100644
--- a/net/mac80211/ieee80211_rate.c
+++ b/net/mac80211/ieee80211_rate.c
@@ -21,6 +21,11 @@ struct rate_control_alg {
21static LIST_HEAD(rate_ctrl_algs); 21static LIST_HEAD(rate_ctrl_algs);
22static DEFINE_MUTEX(rate_ctrl_mutex); 22static DEFINE_MUTEX(rate_ctrl_mutex);
23 23
24static char *ieee80211_default_rc_algo = CONFIG_MAC80211_RC_DEFAULT;
25module_param(ieee80211_default_rc_algo, charp, 0644);
26MODULE_PARM_DESC(ieee80211_default_rc_algo,
27 "Default rate control algorithm for mac80211 to use");
28
24int ieee80211_rate_control_register(struct rate_control_ops *ops) 29int ieee80211_rate_control_register(struct rate_control_ops *ops)
25{ 30{
26 struct rate_control_alg *alg; 31 struct rate_control_alg *alg;
@@ -89,21 +94,27 @@ ieee80211_try_rate_control_ops_get(const char *name)
89 return ops; 94 return ops;
90} 95}
91 96
92/* Get the rate control algorithm. If `name' is NULL, get the first 97/* Get the rate control algorithm. */
93 * available algorithm. */
94static struct rate_control_ops * 98static struct rate_control_ops *
95ieee80211_rate_control_ops_get(const char *name) 99ieee80211_rate_control_ops_get(const char *name)
96{ 100{
97 struct rate_control_ops *ops; 101 struct rate_control_ops *ops;
102 const char *alg_name;
98 103
99 if (!name) 104 if (!name)
100 name = "simple"; 105 alg_name = ieee80211_default_rc_algo;
106 else
107 alg_name = name;
101 108
102 ops = ieee80211_try_rate_control_ops_get(name); 109 ops = ieee80211_try_rate_control_ops_get(alg_name);
103 if (!ops) { 110 if (!ops) {
104 request_module("rc80211_%s", name); 111 request_module("rc80211_%s", alg_name);
105 ops = ieee80211_try_rate_control_ops_get(name); 112 ops = ieee80211_try_rate_control_ops_get(alg_name);
106 } 113 }
114 if (!ops && name)
115 /* try default if specific alg requested but not found */
116 ops = ieee80211_try_rate_control_ops_get(ieee80211_default_rc_algo);
117
107 return ops; 118 return ops;
108} 119}
109 120
@@ -244,3 +255,4 @@ void rate_control_deinitialize(struct ieee80211_local *local)
244 local->rate_ctrl = NULL; 255 local->rate_ctrl = NULL;
245 rate_control_put(ref); 256 rate_control_put(ref);
246} 257}
258