Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

Conflicts:
	drivers/net/wireless/ath/ath5k/base.c
	net/mac80211/main.c
This commit is contained in:
John W. Linville
2010-09-24 15:52:34 -04:00
14 changed files with 52 additions and 20 deletions

View File

@ -480,12 +480,10 @@ int wiphy_register(struct wiphy *wiphy)
mutex_lock(&cfg80211_mutex);
res = device_add(&rdev->wiphy.dev);
if (res)
goto out_unlock;
res = rfkill_register(rdev->rfkill);
if (res)
goto out_rm_dev;
if (res) {
mutex_unlock(&cfg80211_mutex);
return res;
}
/* set up regulatory info */
wiphy_update_regulatory(wiphy, NL80211_REGDOM_SET_BY_CORE);
@ -514,13 +512,18 @@ int wiphy_register(struct wiphy *wiphy)
cfg80211_debugfs_rdev_add(rdev);
mutex_unlock(&cfg80211_mutex);
/*
* due to a locking dependency this has to be outside of the
* cfg80211_mutex lock
*/
res = rfkill_register(rdev->rfkill);
if (res)
goto out_rm_dev;
return 0;
out_rm_dev:
device_del(&rdev->wiphy.dev);
out_unlock:
mutex_unlock(&cfg80211_mutex);
return res;
}
EXPORT_SYMBOL(wiphy_register);