diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-07-06 21:56:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:02:32 -0400 |
commit | 4d0c8aead32ecdbe1310ad473b3637991f560865 (patch) | |
tree | 6d7bbfc1676e5cf4d21dd61fc5ace1c041622c2c /net/wireless/nl80211.c | |
parent | c1e6fb1aad0d4d4f032d46b6bab093a41c6c82bf (diff) |
cfg80211: properly name driver locking
Currently we call that cfg80211_put_dev(), but that is
misleading. With the new convention of using 'rdev' for
registered_device variables, also call that function
cfg80211_unlock_rdev().
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 44c520c264fc..df22048419e3 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -411,14 +411,14 @@ static int nl80211_get_wiphy(struct sk_buff *skb, struct genl_info *info) | |||
411 | if (nl80211_send_wiphy(msg, info->snd_pid, info->snd_seq, 0, dev) < 0) | 411 | if (nl80211_send_wiphy(msg, info->snd_pid, info->snd_seq, 0, dev) < 0) |
412 | goto out_free; | 412 | goto out_free; |
413 | 413 | ||
414 | cfg80211_put_dev(dev); | 414 | cfg80211_unlock_rdev(dev); |
415 | 415 | ||
416 | return genlmsg_unicast(msg, info->snd_pid); | 416 | return genlmsg_unicast(msg, info->snd_pid); |
417 | 417 | ||
418 | out_free: | 418 | out_free: |
419 | nlmsg_free(msg); | 419 | nlmsg_free(msg); |
420 | out_err: | 420 | out_err: |
421 | cfg80211_put_dev(dev); | 421 | cfg80211_unlock_rdev(dev); |
422 | return -ENOBUFS; | 422 | return -ENOBUFS; |
423 | } | 423 | } |
424 | 424 | ||
@@ -737,7 +737,7 @@ static int nl80211_get_interface(struct sk_buff *skb, struct genl_info *info) | |||
737 | goto out_free; | 737 | goto out_free; |
738 | 738 | ||
739 | dev_put(netdev); | 739 | dev_put(netdev); |
740 | cfg80211_put_dev(dev); | 740 | cfg80211_unlock_rdev(dev); |
741 | 741 | ||
742 | return genlmsg_unicast(msg, info->snd_pid); | 742 | return genlmsg_unicast(msg, info->snd_pid); |
743 | 743 | ||
@@ -745,7 +745,7 @@ static int nl80211_get_interface(struct sk_buff *skb, struct genl_info *info) | |||
745 | nlmsg_free(msg); | 745 | nlmsg_free(msg); |
746 | out_err: | 746 | out_err: |
747 | dev_put(netdev); | 747 | dev_put(netdev); |
748 | cfg80211_put_dev(dev); | 748 | cfg80211_unlock_rdev(dev); |
749 | return -ENOBUFS; | 749 | return -ENOBUFS; |
750 | } | 750 | } |
751 | 751 | ||
@@ -853,7 +853,7 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info) | |||
853 | 853 | ||
854 | unlock: | 854 | unlock: |
855 | dev_put(dev); | 855 | dev_put(dev); |
856 | cfg80211_put_dev(drv); | 856 | cfg80211_unlock_rdev(drv); |
857 | unlock_rtnl: | 857 | unlock_rtnl: |
858 | rtnl_unlock(); | 858 | rtnl_unlock(); |
859 | return err; | 859 | return err; |
@@ -906,7 +906,7 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info) | |||
906 | type, err ? NULL : &flags, ¶ms); | 906 | type, err ? NULL : &flags, ¶ms); |
907 | 907 | ||
908 | unlock: | 908 | unlock: |
909 | cfg80211_put_dev(drv); | 909 | cfg80211_unlock_rdev(drv); |
910 | unlock_rtnl: | 910 | unlock_rtnl: |
911 | rtnl_unlock(); | 911 | rtnl_unlock(); |
912 | return err; | 912 | return err; |
@@ -934,7 +934,7 @@ static int nl80211_del_interface(struct sk_buff *skb, struct genl_info *info) | |||
934 | err = drv->ops->del_virtual_intf(&drv->wiphy, ifindex); | 934 | err = drv->ops->del_virtual_intf(&drv->wiphy, ifindex); |
935 | 935 | ||
936 | out: | 936 | out: |
937 | cfg80211_put_dev(drv); | 937 | cfg80211_unlock_rdev(drv); |
938 | unlock_rtnl: | 938 | unlock_rtnl: |
939 | rtnl_unlock(); | 939 | rtnl_unlock(); |
940 | return err; | 940 | return err; |
@@ -1037,7 +1037,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
1037 | err = -ENOBUFS; | 1037 | err = -ENOBUFS; |
1038 | nlmsg_free(msg); | 1038 | nlmsg_free(msg); |
1039 | out: | 1039 | out: |
1040 | cfg80211_put_dev(drv); | 1040 | cfg80211_unlock_rdev(drv); |
1041 | dev_put(dev); | 1041 | dev_put(dev); |
1042 | unlock_rtnl: | 1042 | unlock_rtnl: |
1043 | rtnl_unlock(); | 1043 | rtnl_unlock(); |
@@ -1097,7 +1097,7 @@ static int nl80211_set_key(struct sk_buff *skb, struct genl_info *info) | |||
1097 | #endif | 1097 | #endif |
1098 | 1098 | ||
1099 | out: | 1099 | out: |
1100 | cfg80211_put_dev(drv); | 1100 | cfg80211_unlock_rdev(drv); |
1101 | dev_put(dev); | 1101 | dev_put(dev); |
1102 | 1102 | ||
1103 | unlock_rtnl: | 1103 | unlock_rtnl: |
@@ -1163,7 +1163,7 @@ static int nl80211_new_key(struct sk_buff *skb, struct genl_info *info) | |||
1163 | err = drv->ops->add_key(&drv->wiphy, dev, key_idx, mac_addr, ¶ms); | 1163 | err = drv->ops->add_key(&drv->wiphy, dev, key_idx, mac_addr, ¶ms); |
1164 | 1164 | ||
1165 | out: | 1165 | out: |
1166 | cfg80211_put_dev(drv); | 1166 | cfg80211_unlock_rdev(drv); |
1167 | dev_put(dev); | 1167 | dev_put(dev); |
1168 | unlock_rtnl: | 1168 | unlock_rtnl: |
1169 | rtnl_unlock(); | 1169 | rtnl_unlock(); |
@@ -1211,7 +1211,7 @@ static int nl80211_del_key(struct sk_buff *skb, struct genl_info *info) | |||
1211 | #endif | 1211 | #endif |
1212 | 1212 | ||
1213 | out: | 1213 | out: |
1214 | cfg80211_put_dev(drv); | 1214 | cfg80211_unlock_rdev(drv); |
1215 | dev_put(dev); | 1215 | dev_put(dev); |
1216 | 1216 | ||
1217 | unlock_rtnl: | 1217 | unlock_rtnl: |
@@ -1306,7 +1306,7 @@ static int nl80211_addset_beacon(struct sk_buff *skb, struct genl_info *info) | |||
1306 | err = call(&drv->wiphy, dev, ¶ms); | 1306 | err = call(&drv->wiphy, dev, ¶ms); |
1307 | 1307 | ||
1308 | out: | 1308 | out: |
1309 | cfg80211_put_dev(drv); | 1309 | cfg80211_unlock_rdev(drv); |
1310 | dev_put(dev); | 1310 | dev_put(dev); |
1311 | unlock_rtnl: | 1311 | unlock_rtnl: |
1312 | rtnl_unlock(); | 1312 | rtnl_unlock(); |
@@ -1338,7 +1338,7 @@ static int nl80211_del_beacon(struct sk_buff *skb, struct genl_info *info) | |||
1338 | err = drv->ops->del_beacon(&drv->wiphy, dev); | 1338 | err = drv->ops->del_beacon(&drv->wiphy, dev); |
1339 | 1339 | ||
1340 | out: | 1340 | out: |
1341 | cfg80211_put_dev(drv); | 1341 | cfg80211_unlock_rdev(drv); |
1342 | dev_put(dev); | 1342 | dev_put(dev); |
1343 | unlock_rtnl: | 1343 | unlock_rtnl: |
1344 | rtnl_unlock(); | 1344 | rtnl_unlock(); |
@@ -1572,7 +1572,7 @@ static int nl80211_dump_station(struct sk_buff *skb, | |||
1572 | cb->args[1] = sta_idx; | 1572 | cb->args[1] = sta_idx; |
1573 | err = skb->len; | 1573 | err = skb->len; |
1574 | out_err: | 1574 | out_err: |
1575 | cfg80211_put_dev(dev); | 1575 | cfg80211_unlock_rdev(dev); |
1576 | out_rtnl: | 1576 | out_rtnl: |
1577 | rtnl_unlock(); | 1577 | rtnl_unlock(); |
1578 | 1578 | ||
@@ -1624,7 +1624,7 @@ static int nl80211_get_station(struct sk_buff *skb, struct genl_info *info) | |||
1624 | out_free: | 1624 | out_free: |
1625 | nlmsg_free(msg); | 1625 | nlmsg_free(msg); |
1626 | out: | 1626 | out: |
1627 | cfg80211_put_dev(drv); | 1627 | cfg80211_unlock_rdev(drv); |
1628 | dev_put(dev); | 1628 | dev_put(dev); |
1629 | out_rtnl: | 1629 | out_rtnl: |
1630 | rtnl_unlock(); | 1630 | rtnl_unlock(); |
@@ -1760,7 +1760,7 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info) | |||
1760 | out: | 1760 | out: |
1761 | if (params.vlan) | 1761 | if (params.vlan) |
1762 | dev_put(params.vlan); | 1762 | dev_put(params.vlan); |
1763 | cfg80211_put_dev(drv); | 1763 | cfg80211_unlock_rdev(drv); |
1764 | dev_put(dev); | 1764 | dev_put(dev); |
1765 | out_rtnl: | 1765 | out_rtnl: |
1766 | rtnl_unlock(); | 1766 | rtnl_unlock(); |
@@ -1865,7 +1865,7 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info) | |||
1865 | out: | 1865 | out: |
1866 | if (params.vlan) | 1866 | if (params.vlan) |
1867 | dev_put(params.vlan); | 1867 | dev_put(params.vlan); |
1868 | cfg80211_put_dev(drv); | 1868 | cfg80211_unlock_rdev(drv); |
1869 | dev_put(dev); | 1869 | dev_put(dev); |
1870 | out_rtnl: | 1870 | out_rtnl: |
1871 | rtnl_unlock(); | 1871 | rtnl_unlock(); |
@@ -1904,7 +1904,7 @@ static int nl80211_del_station(struct sk_buff *skb, struct genl_info *info) | |||
1904 | err = drv->ops->del_station(&drv->wiphy, dev, mac_addr); | 1904 | err = drv->ops->del_station(&drv->wiphy, dev, mac_addr); |
1905 | 1905 | ||
1906 | out: | 1906 | out: |
1907 | cfg80211_put_dev(drv); | 1907 | cfg80211_unlock_rdev(drv); |
1908 | dev_put(dev); | 1908 | dev_put(dev); |
1909 | out_rtnl: | 1909 | out_rtnl: |
1910 | rtnl_unlock(); | 1910 | rtnl_unlock(); |
@@ -2035,7 +2035,7 @@ static int nl80211_dump_mpath(struct sk_buff *skb, | |||
2035 | cb->args[1] = path_idx; | 2035 | cb->args[1] = path_idx; |
2036 | err = skb->len; | 2036 | err = skb->len; |
2037 | out_err: | 2037 | out_err: |
2038 | cfg80211_put_dev(dev); | 2038 | cfg80211_unlock_rdev(dev); |
2039 | out_rtnl: | 2039 | out_rtnl: |
2040 | rtnl_unlock(); | 2040 | rtnl_unlock(); |
2041 | 2041 | ||
@@ -2093,7 +2093,7 @@ static int nl80211_get_mpath(struct sk_buff *skb, struct genl_info *info) | |||
2093 | out_free: | 2093 | out_free: |
2094 | nlmsg_free(msg); | 2094 | nlmsg_free(msg); |
2095 | out: | 2095 | out: |
2096 | cfg80211_put_dev(drv); | 2096 | cfg80211_unlock_rdev(drv); |
2097 | dev_put(dev); | 2097 | dev_put(dev); |
2098 | out_rtnl: | 2098 | out_rtnl: |
2099 | rtnl_unlock(); | 2099 | rtnl_unlock(); |
@@ -2142,7 +2142,7 @@ static int nl80211_set_mpath(struct sk_buff *skb, struct genl_info *info) | |||
2142 | err = drv->ops->change_mpath(&drv->wiphy, dev, dst, next_hop); | 2142 | err = drv->ops->change_mpath(&drv->wiphy, dev, dst, next_hop); |
2143 | 2143 | ||
2144 | out: | 2144 | out: |
2145 | cfg80211_put_dev(drv); | 2145 | cfg80211_unlock_rdev(drv); |
2146 | dev_put(dev); | 2146 | dev_put(dev); |
2147 | out_rtnl: | 2147 | out_rtnl: |
2148 | rtnl_unlock(); | 2148 | rtnl_unlock(); |
@@ -2190,7 +2190,7 @@ static int nl80211_new_mpath(struct sk_buff *skb, struct genl_info *info) | |||
2190 | err = drv->ops->add_mpath(&drv->wiphy, dev, dst, next_hop); | 2190 | err = drv->ops->add_mpath(&drv->wiphy, dev, dst, next_hop); |
2191 | 2191 | ||
2192 | out: | 2192 | out: |
2193 | cfg80211_put_dev(drv); | 2193 | cfg80211_unlock_rdev(drv); |
2194 | dev_put(dev); | 2194 | dev_put(dev); |
2195 | out_rtnl: | 2195 | out_rtnl: |
2196 | rtnl_unlock(); | 2196 | rtnl_unlock(); |
@@ -2222,7 +2222,7 @@ static int nl80211_del_mpath(struct sk_buff *skb, struct genl_info *info) | |||
2222 | err = drv->ops->del_mpath(&drv->wiphy, dev, dst); | 2222 | err = drv->ops->del_mpath(&drv->wiphy, dev, dst); |
2223 | 2223 | ||
2224 | out: | 2224 | out: |
2225 | cfg80211_put_dev(drv); | 2225 | cfg80211_unlock_rdev(drv); |
2226 | dev_put(dev); | 2226 | dev_put(dev); |
2227 | out_rtnl: | 2227 | out_rtnl: |
2228 | rtnl_unlock(); | 2228 | rtnl_unlock(); |
@@ -2278,7 +2278,7 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info) | |||
2278 | err = drv->ops->change_bss(&drv->wiphy, dev, ¶ms); | 2278 | err = drv->ops->change_bss(&drv->wiphy, dev, ¶ms); |
2279 | 2279 | ||
2280 | out: | 2280 | out: |
2281 | cfg80211_put_dev(drv); | 2281 | cfg80211_unlock_rdev(drv); |
2282 | dev_put(dev); | 2282 | dev_put(dev); |
2283 | out_rtnl: | 2283 | out_rtnl: |
2284 | rtnl_unlock(); | 2284 | rtnl_unlock(); |
@@ -2444,7 +2444,7 @@ static int nl80211_get_mesh_params(struct sk_buff *skb, | |||
2444 | err = -EMSGSIZE; | 2444 | err = -EMSGSIZE; |
2445 | out: | 2445 | out: |
2446 | /* Cleanup */ | 2446 | /* Cleanup */ |
2447 | cfg80211_put_dev(drv); | 2447 | cfg80211_unlock_rdev(drv); |
2448 | dev_put(dev); | 2448 | dev_put(dev); |
2449 | out_rtnl: | 2449 | out_rtnl: |
2450 | rtnl_unlock(); | 2450 | rtnl_unlock(); |
@@ -2550,7 +2550,7 @@ static int nl80211_set_mesh_params(struct sk_buff *skb, struct genl_info *info) | |||
2550 | 2550 | ||
2551 | out: | 2551 | out: |
2552 | /* cleanup */ | 2552 | /* cleanup */ |
2553 | cfg80211_put_dev(drv); | 2553 | cfg80211_unlock_rdev(drv); |
2554 | dev_put(dev); | 2554 | dev_put(dev); |
2555 | out_rtnl: | 2555 | out_rtnl: |
2556 | rtnl_unlock(); | 2556 | rtnl_unlock(); |
@@ -2890,7 +2890,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
2890 | kfree(request); | 2890 | kfree(request); |
2891 | } | 2891 | } |
2892 | out: | 2892 | out: |
2893 | cfg80211_put_dev(drv); | 2893 | cfg80211_unlock_rdev(drv); |
2894 | dev_put(dev); | 2894 | dev_put(dev); |
2895 | out_rtnl: | 2895 | out_rtnl: |
2896 | rtnl_unlock(); | 2896 | rtnl_unlock(); |
@@ -3007,7 +3007,7 @@ static int nl80211_dump_scan(struct sk_buff *skb, | |||
3007 | 3007 | ||
3008 | cb->args[1] = idx; | 3008 | cb->args[1] = idx; |
3009 | err = skb->len; | 3009 | err = skb->len; |
3010 | cfg80211_put_dev(dev); | 3010 | cfg80211_unlock_rdev(dev); |
3011 | out_put_netdev: | 3011 | out_put_netdev: |
3012 | dev_put(netdev); | 3012 | dev_put(netdev); |
3013 | 3013 | ||
@@ -3112,7 +3112,7 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info) | |||
3112 | ssid, ssid_len, ie, ie_len); | 3112 | ssid, ssid_len, ie, ie_len); |
3113 | 3113 | ||
3114 | out: | 3114 | out: |
3115 | cfg80211_put_dev(drv); | 3115 | cfg80211_unlock_rdev(drv); |
3116 | dev_put(dev); | 3116 | dev_put(dev); |
3117 | unlock_rtnl: | 3117 | unlock_rtnl: |
3118 | rtnl_unlock(); | 3118 | rtnl_unlock(); |
@@ -3259,7 +3259,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) | |||
3259 | &crypto); | 3259 | &crypto); |
3260 | 3260 | ||
3261 | out: | 3261 | out: |
3262 | cfg80211_put_dev(rdev); | 3262 | cfg80211_unlock_rdev(rdev); |
3263 | dev_put(dev); | 3263 | dev_put(dev); |
3264 | unlock_rtnl: | 3264 | unlock_rtnl: |
3265 | rtnl_unlock(); | 3265 | rtnl_unlock(); |
@@ -3321,7 +3321,7 @@ static int nl80211_deauthenticate(struct sk_buff *skb, struct genl_info *info) | |||
3321 | err = cfg80211_mlme_deauth(drv, dev, bssid, ie, ie_len, reason_code); | 3321 | err = cfg80211_mlme_deauth(drv, dev, bssid, ie, ie_len, reason_code); |
3322 | 3322 | ||
3323 | out: | 3323 | out: |
3324 | cfg80211_put_dev(drv); | 3324 | cfg80211_unlock_rdev(drv); |
3325 | dev_put(dev); | 3325 | dev_put(dev); |
3326 | unlock_rtnl: | 3326 | unlock_rtnl: |
3327 | rtnl_unlock(); | 3327 | rtnl_unlock(); |
@@ -3383,7 +3383,7 @@ static int nl80211_disassociate(struct sk_buff *skb, struct genl_info *info) | |||
3383 | err = cfg80211_mlme_disassoc(drv, dev, bssid, ie, ie_len, reason_code); | 3383 | err = cfg80211_mlme_disassoc(drv, dev, bssid, ie, ie_len, reason_code); |
3384 | 3384 | ||
3385 | out: | 3385 | out: |
3386 | cfg80211_put_dev(drv); | 3386 | cfg80211_unlock_rdev(drv); |
3387 | dev_put(dev); | 3387 | dev_put(dev); |
3388 | unlock_rtnl: | 3388 | unlock_rtnl: |
3389 | rtnl_unlock(); | 3389 | rtnl_unlock(); |
@@ -3464,7 +3464,7 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) | |||
3464 | err = cfg80211_join_ibss(drv, dev, &ibss); | 3464 | err = cfg80211_join_ibss(drv, dev, &ibss); |
3465 | 3465 | ||
3466 | out: | 3466 | out: |
3467 | cfg80211_put_dev(drv); | 3467 | cfg80211_unlock_rdev(drv); |
3468 | dev_put(dev); | 3468 | dev_put(dev); |
3469 | unlock_rtnl: | 3469 | unlock_rtnl: |
3470 | rtnl_unlock(); | 3470 | rtnl_unlock(); |
@@ -3501,7 +3501,7 @@ static int nl80211_leave_ibss(struct sk_buff *skb, struct genl_info *info) | |||
3501 | err = cfg80211_leave_ibss(drv, dev, false); | 3501 | err = cfg80211_leave_ibss(drv, dev, false); |
3502 | 3502 | ||
3503 | out: | 3503 | out: |
3504 | cfg80211_put_dev(drv); | 3504 | cfg80211_unlock_rdev(drv); |
3505 | dev_put(dev); | 3505 | dev_put(dev); |
3506 | unlock_rtnl: | 3506 | unlock_rtnl: |
3507 | rtnl_unlock(); | 3507 | rtnl_unlock(); |
@@ -3538,7 +3538,7 @@ static int nl80211_testmode_do(struct sk_buff *skb, struct genl_info *info) | |||
3538 | rdev->testmode_info = NULL; | 3538 | rdev->testmode_info = NULL; |
3539 | } | 3539 | } |
3540 | 3540 | ||
3541 | cfg80211_put_dev(rdev); | 3541 | cfg80211_unlock_rdev(rdev); |
3542 | 3542 | ||
3543 | unlock_rtnl: | 3543 | unlock_rtnl: |
3544 | rtnl_unlock(); | 3544 | rtnl_unlock(); |
@@ -3707,7 +3707,7 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) | |||
3707 | err = cfg80211_connect(drv, dev, &connect); | 3707 | err = cfg80211_connect(drv, dev, &connect); |
3708 | 3708 | ||
3709 | out: | 3709 | out: |
3710 | cfg80211_put_dev(drv); | 3710 | cfg80211_unlock_rdev(drv); |
3711 | dev_put(dev); | 3711 | dev_put(dev); |
3712 | unlock_rtnl: | 3712 | unlock_rtnl: |
3713 | rtnl_unlock(); | 3713 | rtnl_unlock(); |
@@ -3748,7 +3748,7 @@ static int nl80211_disconnect(struct sk_buff *skb, struct genl_info *info) | |||
3748 | err = cfg80211_disconnect(drv, dev, reason, true); | 3748 | err = cfg80211_disconnect(drv, dev, reason, true); |
3749 | 3749 | ||
3750 | out: | 3750 | out: |
3751 | cfg80211_put_dev(drv); | 3751 | cfg80211_unlock_rdev(drv); |
3752 | dev_put(dev); | 3752 | dev_put(dev); |
3753 | unlock_rtnl: | 3753 | unlock_rtnl: |
3754 | rtnl_unlock(); | 3754 | rtnl_unlock(); |