aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-04-29 23:30:35 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-29 23:30:35 -0400
commitaba7453037c3a90714caae77a622dceaf1173786 (patch)
treebf07f9f432b0d8e9db9486f1f32ad065c0aa7c5c /net/mac80211/main.c
parenta4fe91ee711f4e955ea85ab05b092cfe384b073e (diff)
parent93af7aca44f0e82e67bda10a0fb73d383edcc8bd (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: Documentation/isdn/00-INDEX drivers/net/wireless/iwlwifi/iwl-scan.c drivers/net/wireless/rndis_wlan.c net/mac80211/main.c
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 5320e08434ac..5ca62ea15079 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -779,6 +779,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
779 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; 779 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long;
780 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; 780 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short;
781 local->hw.conf.radio_enabled = true; 781 local->hw.conf.radio_enabled = true;
782 local->user_power_level = -1;
782 783
783 INIT_LIST_HEAD(&local->interfaces); 784 INIT_LIST_HEAD(&local->interfaces);
784 mutex_init(&local->iflist_mtx); 785 mutex_init(&local->iflist_mtx);
@@ -981,6 +982,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
981 if (result < 0) 982 if (result < 0)
982 goto fail_sta_info; 983 goto fail_sta_info;
983 984
985 result = ieee80211_wep_init(local);
986 if (result < 0) {
987 printk(KERN_DEBUG "%s: Failed to initialize wep: %d\n",
988 wiphy_name(local->hw.wiphy), result);
989 goto fail_wep;
990 }
991
984 rtnl_lock(); 992 rtnl_lock();
985 result = dev_alloc_name(local->mdev, local->mdev->name); 993 result = dev_alloc_name(local->mdev, local->mdev->name);
986 if (result < 0) 994 if (result < 0)
@@ -1002,14 +1010,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
1002 goto fail_rate; 1010 goto fail_rate;
1003 } 1011 }
1004 1012
1005 result = ieee80211_wep_init(local);
1006
1007 if (result < 0) {
1008 printk(KERN_DEBUG "%s: Failed to initialize wep: %d\n",
1009 wiphy_name(local->hw.wiphy), result);
1010 goto fail_wep;
1011 }
1012
1013 /* add one default STA interface if supported */ 1013 /* add one default STA interface if supported */
1014 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) { 1014 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) {
1015 result = ieee80211_if_add(local, "wlan%d", NULL, 1015 result = ieee80211_if_add(local, "wlan%d", NULL,
@@ -1052,13 +1052,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
1052 fail_pm_qos: 1052 fail_pm_qos:
1053 ieee80211_led_exit(local); 1053 ieee80211_led_exit(local);
1054 ieee80211_remove_interfaces(local); 1054 ieee80211_remove_interfaces(local);
1055 fail_wep:
1056 rate_control_deinitialize(local);
1057 fail_rate: 1055 fail_rate:
1058 unregister_netdevice(local->mdev); 1056 unregister_netdevice(local->mdev);
1059 local->mdev = NULL; 1057 local->mdev = NULL;
1060 fail_dev: 1058 fail_dev:
1061 rtnl_unlock(); 1059 rtnl_unlock();
1060 ieee80211_wep_free(local);
1061 fail_wep:
1062 sta_info_stop(local); 1062 sta_info_stop(local);
1063 fail_sta_info: 1063 fail_sta_info:
1064 debugfs_hw_del(local); 1064 debugfs_hw_del(local);