aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-02-21 00:04:21 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:52:55 -0500
commita1794390f1afc3631ac056e0f1677b7ab6f7ee74 (patch)
tree0c5ff752ba69c6b002369e340e931ce5ef9df0d3 /net/wireless/reg.c
parent85fd129a721e6e892dbaaf05203baf819730f699 (diff)
cfg80211: rename cfg80211_drv_mutex to cfg80211_mutex
cfg80211_drv_mutex is protecting more than the driver list, this renames it and documents what its currently supposed to protect. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 2323644330cd..ba823120d245 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1116,7 +1116,7 @@ static int ignore_request(struct wiphy *wiphy, enum reg_set_by set_by,
1116 return -EINVAL; 1116 return -EINVAL;
1117} 1117}
1118 1118
1119/* Caller must hold &cfg80211_drv_mutex */ 1119/* Caller must hold &cfg80211_mutex */
1120int __regulatory_hint(struct wiphy *wiphy, enum reg_set_by set_by, 1120int __regulatory_hint(struct wiphy *wiphy, enum reg_set_by set_by,
1121 const char *alpha2, 1121 const char *alpha2,
1122 u32 country_ie_checksum, 1122 u32 country_ie_checksum,
@@ -1188,13 +1188,13 @@ void regulatory_hint(struct wiphy *wiphy, const char *alpha2)
1188 int r; 1188 int r;
1189 BUG_ON(!alpha2); 1189 BUG_ON(!alpha2);
1190 1190
1191 mutex_lock(&cfg80211_drv_mutex); 1191 mutex_lock(&cfg80211_mutex);
1192 r = __regulatory_hint(wiphy, REGDOM_SET_BY_DRIVER, 1192 r = __regulatory_hint(wiphy, REGDOM_SET_BY_DRIVER,
1193 alpha2, 0, ENVIRON_ANY); 1193 alpha2, 0, ENVIRON_ANY);
1194 /* This is required so that the orig_* parameters are saved */ 1194 /* This is required so that the orig_* parameters are saved */
1195 if (r == -EALREADY && wiphy->strict_regulatory) 1195 if (r == -EALREADY && wiphy->strict_regulatory)
1196 wiphy_update_regulatory(wiphy, REGDOM_SET_BY_DRIVER); 1196 wiphy_update_regulatory(wiphy, REGDOM_SET_BY_DRIVER);
1197 mutex_unlock(&cfg80211_drv_mutex); 1197 mutex_unlock(&cfg80211_mutex);
1198} 1198}
1199EXPORT_SYMBOL(regulatory_hint); 1199EXPORT_SYMBOL(regulatory_hint);
1200 1200
@@ -1225,7 +1225,7 @@ void regulatory_hint_11d(struct wiphy *wiphy,
1225 if (!last_request) 1225 if (!last_request)
1226 return; 1226 return;
1227 1227
1228 mutex_lock(&cfg80211_drv_mutex); 1228 mutex_lock(&cfg80211_mutex);
1229 1229
1230 /* IE len must be evenly divisible by 2 */ 1230 /* IE len must be evenly divisible by 2 */
1231 if (country_ie_len & 0x01) 1231 if (country_ie_len & 0x01)
@@ -1307,7 +1307,7 @@ void regulatory_hint_11d(struct wiphy *wiphy,
1307 country_ie_regdomain->alpha2, checksum, env); 1307 country_ie_regdomain->alpha2, checksum, env);
1308 1308
1309out: 1309out:
1310 mutex_unlock(&cfg80211_drv_mutex); 1310 mutex_unlock(&cfg80211_mutex);
1311} 1311}
1312EXPORT_SYMBOL(regulatory_hint_11d); 1312EXPORT_SYMBOL(regulatory_hint_11d);
1313 1313
@@ -1562,7 +1562,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
1562 1562
1563/* Use this call to set the current regulatory domain. Conflicts with 1563/* Use this call to set the current regulatory domain. Conflicts with
1564 * multiple drivers can be ironed out later. Caller must've already 1564 * multiple drivers can be ironed out later. Caller must've already
1565 * kmalloc'd the rd structure. Caller must hold cfg80211_drv_mutex */ 1565 * kmalloc'd the rd structure. Caller must hold cfg80211_mutex */
1566int set_regdom(const struct ieee80211_regdomain *rd) 1566int set_regdom(const struct ieee80211_regdomain *rd)
1567{ 1567{
1568 int r; 1568 int r;
@@ -1586,7 +1586,7 @@ int set_regdom(const struct ieee80211_regdomain *rd)
1586 return r; 1586 return r;
1587} 1587}
1588 1588
1589/* Caller must hold cfg80211_drv_mutex */ 1589/* Caller must hold cfg80211_mutex */
1590void reg_device_remove(struct wiphy *wiphy) 1590void reg_device_remove(struct wiphy *wiphy)
1591{ 1591{
1592 kfree(wiphy->regd); 1592 kfree(wiphy->regd);
@@ -1633,7 +1633,7 @@ int regulatory_init(void)
1633 1633
1634void regulatory_exit(void) 1634void regulatory_exit(void)
1635{ 1635{
1636 mutex_lock(&cfg80211_drv_mutex); 1636 mutex_lock(&cfg80211_mutex);
1637 1637
1638 reset_regdomains(); 1638 reset_regdomains();
1639 1639
@@ -1644,5 +1644,5 @@ void regulatory_exit(void)
1644 1644
1645 platform_device_unregister(reg_pdev); 1645 platform_device_unregister(reg_pdev);
1646 1646
1647 mutex_unlock(&cfg80211_drv_mutex); 1647 mutex_unlock(&cfg80211_mutex);
1648} 1648}