aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211.c
diff options
context:
space:
mode:
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)
1323 1323
1324 BUILD_BUG_ON(sizeof(struct ieee80211_tx_packet_data) > sizeof(skb->cb)); 1324 BUILD_BUG_ON(sizeof(struct ieee80211_tx_packet_data) > sizeof(skb->cb));
1325 1325
1326#ifdef CONFIG_MAC80211_RC_SIMPLE 1326 ret = rc80211_simple_init();
1327 ret = ieee80211_rate_control_register(&mac80211_rcsimple);
1328 if (ret) 1327 if (ret)
1329 goto fail; 1328 goto fail;
1330#endif
1331 1329
1332#ifdef CONFIG_MAC80211_RC_PID 1330 ret = rc80211_pid_init();
1333 ret = ieee80211_rate_control_register(&mac80211_rcpid);
1334 if (ret) 1331 if (ret)
1335 goto fail; 1332 goto fail_simple;
1336#endif
1337 1333
1338 ret = ieee80211_wme_register(); 1334 ret = ieee80211_wme_register();
1339 if (ret) { 1335 if (ret) {
1340 printk(KERN_DEBUG "ieee80211_init: failed to " 1336 printk(KERN_DEBUG "ieee80211_init: failed to "
1341 "initialize WME (err=%d)\n", ret); 1337 "initialize WME (err=%d)\n", ret);
1342 goto fail; 1338 goto fail_pid;
1343 } 1339 }
1344 1340
1345 ieee80211_debugfs_netdev_init(); 1341 ieee80211_debugfs_netdev_init();
@@ -1347,26 +1343,18 @@ static int __init ieee80211_init(void)
1347 1343
1348 return 0; 1344 return 0;
1349 1345
1350fail: 1346 fail_pid:
1351 1347 rc80211_simple_exit();
1352#ifdef CONFIG_MAC80211_RC_SIMPLE 1348 fail_simple:
1353 ieee80211_rate_control_unregister(&mac80211_rcsimple); 1349 rc80211_pid_exit();
1354#endif 1350 fail:
1355#ifdef CONFIG_MAC80211_RC_PID
1356 ieee80211_rate_control_unregister(&mac80211_rcpid);
1357#endif
1358
1359 return ret; 1351 return ret;
1360} 1352}
1361 1353
1362static void __exit ieee80211_exit(void) 1354static void __exit ieee80211_exit(void)
1363{ 1355{
1364#ifdef CONFIG_MAC80211_RC_SIMPLE 1356 rc80211_simple_exit();
1365 ieee80211_rate_control_unregister(&mac80211_rcsimple); 1357 rc80211_pid_exit();
1366#endif
1367#ifdef CONFIG_MAC80211_RC_PID
1368 ieee80211_rate_control_unregister(&mac80211_rcpid);
1369#endif
1370 1358
1371 ieee80211_wme_unregister(); 1359 ieee80211_wme_unregister();
1372 ieee80211_debugfs_netdev_exit(); 1360 ieee80211_debugfs_netdev_exit();