Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203736
b: refs/heads/master
c: 5a65205
h: refs/heads/master
v: v3
  • Loading branch information
Maxime Bizon authored and John W. Linville committed Jul 21, 2010
1 parent c8ac1be commit e34732c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: acd82aa868c2133149370c18d85f8005fbf5611e
refs/heads/master: 5a652052fedbd7869572c757dd2ffc2ed420c69d
14 changes: 8 additions & 6 deletions trunk/net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,24 +472,22 @@ int wiphy_register(struct wiphy *wiphy)
/* check and set up bitrates */
ieee80211_set_bitrate_flags(wiphy);

mutex_lock(&cfg80211_mutex);

res = device_add(&rdev->wiphy.dev);
if (res)
return res;
goto out_unlock;

res = rfkill_register(rdev->rfkill);
if (res)
goto out_rm_dev;

mutex_lock(&cfg80211_mutex);

/* set up regulatory info */
wiphy_update_regulatory(wiphy, NL80211_REGDOM_SET_BY_CORE);

list_add_rcu(&rdev->list, &cfg80211_rdev_list);
cfg80211_rdev_list_generation++;

mutex_unlock(&cfg80211_mutex);

/* add to debugfs */
rdev->wiphy.debugfsdir =
debugfs_create_dir(wiphy_name(&rdev->wiphy),
Expand All @@ -509,11 +507,15 @@ int wiphy_register(struct wiphy *wiphy)
}

cfg80211_debugfs_rdev_add(rdev);
mutex_unlock(&cfg80211_mutex);

return 0;

out_rm_dev:
out_rm_dev:
device_del(&rdev->wiphy.dev);

out_unlock:
mutex_unlock(&cfg80211_mutex);
return res;
}
EXPORT_SYMBOL(wiphy_register);
Expand Down

0 comments on commit e34732c

Please sign in to comment.