diff options
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r-- | net/mac80211/ieee80211.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index f484ca7ade9c..52ba6ef90685 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -1233,8 +1233,17 @@ static int __init ieee80211_init(void) | |||
1233 | 1233 | ||
1234 | BUILD_BUG_ON(sizeof(struct ieee80211_tx_packet_data) > sizeof(skb->cb)); | 1234 | BUILD_BUG_ON(sizeof(struct ieee80211_tx_packet_data) > sizeof(skb->cb)); |
1235 | 1235 | ||
1236 | #ifdef CONFIG_MAC80211_RCSIMPLE | ||
1237 | ret = ieee80211_rate_control_register(&mac80211_rcsimple); | ||
1238 | if (ret) | ||
1239 | return ret; | ||
1240 | #endif | ||
1241 | |||
1236 | ret = ieee80211_wme_register(); | 1242 | ret = ieee80211_wme_register(); |
1237 | if (ret) { | 1243 | if (ret) { |
1244 | #ifdef CONFIG_MAC80211_RCSIMPLE | ||
1245 | ieee80211_rate_control_unregister(&mac80211_rcsimple); | ||
1246 | #endif | ||
1238 | printk(KERN_DEBUG "ieee80211_init: failed to " | 1247 | printk(KERN_DEBUG "ieee80211_init: failed to " |
1239 | "initialize WME (err=%d)\n", ret); | 1248 | "initialize WME (err=%d)\n", ret); |
1240 | return ret; | 1249 | return ret; |
@@ -1248,6 +1257,10 @@ static int __init ieee80211_init(void) | |||
1248 | 1257 | ||
1249 | static void __exit ieee80211_exit(void) | 1258 | static void __exit ieee80211_exit(void) |
1250 | { | 1259 | { |
1260 | #ifdef CONFIG_MAC80211_RCSIMPLE | ||
1261 | ieee80211_rate_control_unregister(&mac80211_rcsimple); | ||
1262 | #endif | ||
1263 | |||
1251 | ieee80211_wme_unregister(); | 1264 | ieee80211_wme_unregister(); |
1252 | ieee80211_debugfs_netdev_exit(); | 1265 | ieee80211_debugfs_netdev_exit(); |
1253 | } | 1266 | } |