Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150825
b: refs/heads/master
c: 2f0accc
h: refs/heads/master
i:
  150823: c8955a6
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jun 10, 2009
1 parent 8f6f29a commit f88cfed
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: 4e751843d406a4d0471c207872b9e24957de8357
refs/heads/master: 2f0accc13520b2644b85f80aedce10d10d88b0ca
19 changes: 9 additions & 10 deletions trunk/net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,21 +395,23 @@ int wiphy_register(struct wiphy *wiphy)
/* check and set up bitrates */
ieee80211_set_bitrate_flags(wiphy);

mutex_lock(&cfg80211_mutex);

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

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

res = rfkill_register(drv->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(&drv->list, &cfg80211_drv_list);

mutex_unlock(&cfg80211_mutex);

/* add to debugfs */
drv->wiphy.debugfsdir =
debugfs_create_dir(wiphy_name(&drv->wiphy),
Expand All @@ -430,13 +432,10 @@ int wiphy_register(struct wiphy *wiphy)

cfg80211_debugfs_drv_add(drv);

res = 0;
goto out_unlock;
return 0;

out_rm_dev:
device_del(&drv->wiphy.dev);
out_unlock:
mutex_unlock(&cfg80211_mutex);
return res;
}
EXPORT_SYMBOL(wiphy_register);
Expand Down

0 comments on commit f88cfed

Please sign in to comment.