diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-02-21 00:04:21 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:52:55 -0500 |
commit | a1794390f1afc3631ac056e0f1677b7ab6f7ee74 (patch) | |
tree | 0c5ff752ba69c6b002369e340e931ce5ef9df0d3 /net/wireless/nl80211.c | |
parent | 85fd129a721e6e892dbaaf05203baf819730f699 (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/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b176bb800100..88a530f707e6 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -256,7 +256,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) | |||
256 | int start = cb->args[0]; | 256 | int start = cb->args[0]; |
257 | struct cfg80211_registered_device *dev; | 257 | struct cfg80211_registered_device *dev; |
258 | 258 | ||
259 | mutex_lock(&cfg80211_drv_mutex); | 259 | mutex_lock(&cfg80211_mutex); |
260 | list_for_each_entry(dev, &cfg80211_drv_list, list) { | 260 | list_for_each_entry(dev, &cfg80211_drv_list, list) { |
261 | if (++idx <= start) | 261 | if (++idx <= start) |
262 | continue; | 262 | continue; |
@@ -267,7 +267,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) | |||
267 | break; | 267 | break; |
268 | } | 268 | } |
269 | } | 269 | } |
270 | mutex_unlock(&cfg80211_drv_mutex); | 270 | mutex_unlock(&cfg80211_mutex); |
271 | 271 | ||
272 | cb->args[0] = idx; | 272 | cb->args[0] = idx; |
273 | 273 | ||
@@ -470,7 +470,7 @@ static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback * | |||
470 | struct cfg80211_registered_device *dev; | 470 | struct cfg80211_registered_device *dev; |
471 | struct wireless_dev *wdev; | 471 | struct wireless_dev *wdev; |
472 | 472 | ||
473 | mutex_lock(&cfg80211_drv_mutex); | 473 | mutex_lock(&cfg80211_mutex); |
474 | list_for_each_entry(dev, &cfg80211_drv_list, list) { | 474 | list_for_each_entry(dev, &cfg80211_drv_list, list) { |
475 | if (wp_idx < wp_start) { | 475 | if (wp_idx < wp_start) { |
476 | wp_idx++; | 476 | wp_idx++; |
@@ -497,7 +497,7 @@ static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback * | |||
497 | wp_idx++; | 497 | wp_idx++; |
498 | } | 498 | } |
499 | out: | 499 | out: |
500 | mutex_unlock(&cfg80211_drv_mutex); | 500 | mutex_unlock(&cfg80211_mutex); |
501 | 501 | ||
502 | cb->args[0] = wp_idx; | 502 | cb->args[0] = wp_idx; |
503 | cb->args[1] = if_idx; | 503 | cb->args[1] = if_idx; |
@@ -1916,9 +1916,9 @@ static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info) | |||
1916 | if (is_world_regdom(data)) | 1916 | if (is_world_regdom(data)) |
1917 | return -EINVAL; | 1917 | return -EINVAL; |
1918 | #endif | 1918 | #endif |
1919 | mutex_lock(&cfg80211_drv_mutex); | 1919 | mutex_lock(&cfg80211_mutex); |
1920 | r = __regulatory_hint(NULL, REGDOM_SET_BY_USER, data, 0, ENVIRON_ANY); | 1920 | r = __regulatory_hint(NULL, REGDOM_SET_BY_USER, data, 0, ENVIRON_ANY); |
1921 | mutex_unlock(&cfg80211_drv_mutex); | 1921 | mutex_unlock(&cfg80211_mutex); |
1922 | /* This means the regulatory domain was already set, however | 1922 | /* This means the regulatory domain was already set, however |
1923 | * we don't want to confuse userspace with a "successful error" | 1923 | * we don't want to confuse userspace with a "successful error" |
1924 | * message so lets just treat it as a success */ | 1924 | * message so lets just treat it as a success */ |
@@ -2112,7 +2112,7 @@ static int nl80211_get_reg(struct sk_buff *skb, struct genl_info *info) | |||
2112 | unsigned int i; | 2112 | unsigned int i; |
2113 | int err = -EINVAL; | 2113 | int err = -EINVAL; |
2114 | 2114 | ||
2115 | mutex_lock(&cfg80211_drv_mutex); | 2115 | mutex_lock(&cfg80211_mutex); |
2116 | 2116 | ||
2117 | if (!cfg80211_regdomain) | 2117 | if (!cfg80211_regdomain) |
2118 | goto out; | 2118 | goto out; |
@@ -2175,7 +2175,7 @@ nla_put_failure: | |||
2175 | genlmsg_cancel(msg, hdr); | 2175 | genlmsg_cancel(msg, hdr); |
2176 | err = -EMSGSIZE; | 2176 | err = -EMSGSIZE; |
2177 | out: | 2177 | out: |
2178 | mutex_unlock(&cfg80211_drv_mutex); | 2178 | mutex_unlock(&cfg80211_mutex); |
2179 | return err; | 2179 | return err; |
2180 | } | 2180 | } |
2181 | 2181 | ||
@@ -2234,9 +2234,9 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info) | |||
2234 | 2234 | ||
2235 | BUG_ON(rule_idx != num_rules); | 2235 | BUG_ON(rule_idx != num_rules); |
2236 | 2236 | ||
2237 | mutex_lock(&cfg80211_drv_mutex); | 2237 | mutex_lock(&cfg80211_mutex); |
2238 | r = set_regdom(rd); | 2238 | r = set_regdom(rd); |
2239 | mutex_unlock(&cfg80211_drv_mutex); | 2239 | mutex_unlock(&cfg80211_mutex); |
2240 | return r; | 2240 | return r; |
2241 | 2241 | ||
2242 | bad_reg: | 2242 | bad_reg: |