summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211.c
diff options
context:
space:
mode:
authorJohannes Berg2008-01-02 15:17:03 +0100
committerDavid S. Miller2008-01-29 00:01:02 +0100
commit4b475898ec9dc6e62cebcb8fc0b3495c986a4590 (patch)
tree8409a6865f3d83965228fd8f6fae3b05e1e106ed /net/mac80211/ieee80211.c
parentmac80211: A-MPDU Rx handling DELBA requests (diff)
downloadkernel-qcow2-linux-4b475898ec9dc6e62cebcb8fc0b3495c986a4590.tar.gz
kernel-qcow2-linux-4b475898ec9dc6e62cebcb8fc0b3495c986a4590.tar.xz
kernel-qcow2-linux-4b475898ec9dc6e62cebcb8fc0b3495c986a4590.zip
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.c')
-rw-r--r--net/mac80211/ieee80211.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 2011c726f2b1..8ba69ae676ca 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -1323,23 +1323,19 @@ static int __init ieee80211_init(void)
BUILD_BUG_ON(sizeof(struct ieee80211_tx_packet_data) > sizeof(skb->cb));
-#ifdef CONFIG_MAC80211_RC_SIMPLE
- ret = ieee80211_rate_control_register(&mac80211_rcsimple);
+ ret = rc80211_simple_init();
if (ret)
goto fail;
-#endif
-#ifdef CONFIG_MAC80211_RC_PID
- ret = ieee80211_rate_control_register(&mac80211_rcpid);
+ ret = rc80211_pid_init();
if (ret)
- goto fail;
-#endif
+ goto fail_simple;
ret = ieee80211_wme_register();
if (ret) {
printk(KERN_DEBUG "ieee80211_init: failed to "
"initialize WME (err=%d)\n", ret);
- goto fail;
+ goto fail_pid;
}
ieee80211_debugfs_netdev_init();
@@ -1347,26 +1343,18 @@ static int __init ieee80211_init(void)
return 0;
-fail:
-
-#ifdef CONFIG_MAC80211_RC_SIMPLE
- ieee80211_rate_control_unregister(&mac80211_rcsimple);
-#endif
-#ifdef CONFIG_MAC80211_RC_PID
- ieee80211_rate_control_unregister(&mac80211_rcpid);
-#endif
-
+ fail_pid:
+ rc80211_simple_exit();
+ fail_simple:
+ rc80211_pid_exit();
+ fail:
return ret;
}
static void __exit ieee80211_exit(void)
{
-#ifdef CONFIG_MAC80211_RC_SIMPLE
- ieee80211_rate_control_unregister(&mac80211_rcsimple);
-#endif
-#ifdef CONFIG_MAC80211_RC_PID
- ieee80211_rate_control_unregister(&mac80211_rcpid);
-#endif
+ rc80211_simple_exit();
+ rc80211_pid_exit();
ieee80211_wme_unregister();
ieee80211_debugfs_netdev_exit();