Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144576
b: refs/heads/master
c: d4c4a9a
h: refs/heads/master
v: v3
  • Loading branch information
Alan Jenkins authored and John W. Linville committed Apr 29, 2009
1 parent 5cac01f commit 978165a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b7fcb5c4a4c27da2f6d86cb03d18687e537442cf
refs/heads/master: d4c4a9a1bce1912ed5681251f0037fd4f2364a3e
19 changes: 9 additions & 10 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
if (result < 0)
goto fail_sta_info;

result = ieee80211_wep_init(local);
if (result < 0) {
printk(KERN_DEBUG "%s: Failed to initialize wep: %d\n",
wiphy_name(local->hw.wiphy), result);
goto fail_wep;
}

rtnl_lock();
result = dev_alloc_name(local->mdev, local->mdev->name);
if (result < 0)
Expand All @@ -930,14 +937,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
goto fail_rate;
}

result = ieee80211_wep_init(local);

if (result < 0) {
printk(KERN_DEBUG "%s: Failed to initialize wep: %d\n",
wiphy_name(local->hw.wiphy), result);
goto fail_wep;
}

/* add one default STA interface if supported */
if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) {
result = ieee80211_if_add(local, "wlan%d", NULL,
Expand Down Expand Up @@ -967,13 +966,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)

return 0;

fail_wep:
rate_control_deinitialize(local);
fail_rate:
unregister_netdevice(local->mdev);
local->mdev = NULL;
fail_dev:
rtnl_unlock();
ieee80211_wep_free(local);
fail_wep:
sta_info_stop(local);
fail_sta_info:
debugfs_hw_del(local);
Expand Down

0 comments on commit 978165a

Please sign in to comment.