aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_rate.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-01-02 09:17:03 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:01:02 -0500
commit4b475898ec9dc6e62cebcb8fc0b3495c986a4590 (patch)
tree8409a6865f3d83965228fd8f6fae3b05e1e106ed /net/mac80211/ieee80211_rate.h
parent688b88a4886834d7e3457711cd4feef6611d3232 (diff)
mac80211: better rate control algorithm selection
This patch changes mac80211's Kconfig/Makefile to: * select between the PID and the SIMPLE rate control algorithm as default * always allow tri-state for the rate control algorithms, building those that are selected 'y' into the mac80211 module (if that is a module, otherwise all into the kernel) * force the default rate control algorithm to be built into mac80211 It also makes both rate control algorithms proper modules again with MODULE_LICENSE etc. Only if EMBEDDED is the user allowed to select "NONE" as default which will cause no algorithm to be selected, this will work only when the driver brings one itself (e.g. iwlwifi drivers). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> 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.h')
-rw-r--r--net/mac80211/ieee80211_rate.h38
1 files changed, 32 insertions, 6 deletions
diff --git a/net/mac80211/ieee80211_rate.h b/net/mac80211/ieee80211_rate.h
index 3eb0696f375..73f19e8aa51 100644
--- a/net/mac80211/ieee80211_rate.h
+++ b/net/mac80211/ieee80211_rate.h
@@ -58,12 +58,6 @@ struct rate_control_ref {
58 struct kref kref; 58 struct kref kref;
59}; 59};
60 60
61/* default 'simple' algorithm */
62extern struct rate_control_ops mac80211_rcsimple;
63
64/* 'PID' algorithm */
65extern struct rate_control_ops mac80211_rcpid;
66
67int ieee80211_rate_control_register(struct rate_control_ops *ops); 61int ieee80211_rate_control_register(struct rate_control_ops *ops);
68void ieee80211_rate_control_unregister(struct rate_control_ops *ops); 62void ieee80211_rate_control_unregister(struct rate_control_ops *ops);
69 63
@@ -170,4 +164,36 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
170 const char *name); 164 const char *name);
171void rate_control_deinitialize(struct ieee80211_local *local); 165void rate_control_deinitialize(struct ieee80211_local *local);
172 166
167
168/* Rate control algorithms */
169#if defined(RC80211_SIMPLE_COMPILE) || \
170 (defined(CONFIG_MAC80211_RC_SIMPLE) && \
171 !defined(CONFIG_MAC80211_RC_SIMPLE_MODULE))
172extern int rc80211_simple_init(void);
173extern void rc80211_simple_exit(void);
174#else
175static inline int rc80211_simple_init(void)
176{
177 return 0;
178}
179static inline void rc80211_simple_exit(void)
180{
181}
182#endif
183
184#if defined(RC80211_PID_COMPILE) || \
185 (defined(CONFIG_MAC80211_RC_PID) && \
186 !defined(CONFIG_MAC80211_RC_PID_MODULE))
187extern int rc80211_pid_init(void);
188extern void rc80211_pid_exit(void);
189#else
190static inline int rc80211_pid_init(void)
191{
192 return 0;
193}
194static inline void rc80211_pid_exit(void)
195{
196}
197#endif
198
173#endif /* IEEE80211_RATE_H */ 199#endif /* IEEE80211_RATE_H */