diff options
author | Zhao, Gang <gamerh2o@gmail.com> | 2014-04-21 00:53:03 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-25 11:33:04 -0400 |
commit | f26cbf401be935eec13da6fca7088b50d797d78b (patch) | |
tree | de83a716467102d1b674805ad94879a779c1683f /net/wireless/sme.c | |
parent | 1b8ec87aa077c527c9e3525e16098ca7efbc853d (diff) |
cfg80211: change wiphy_to_dev function name
Name wiphy_to_rdev is more accurate to describe what the function
does, i.e., return a pointer pointing to struct
cfg80211_registered_device.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r-- | net/wireless/sme.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 998674f9cc80..e2923a3f2e5c 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -59,7 +59,7 @@ static void cfg80211_sme_free(struct wireless_dev *wdev) | |||
59 | 59 | ||
60 | static int cfg80211_conn_scan(struct wireless_dev *wdev) | 60 | static int cfg80211_conn_scan(struct wireless_dev *wdev) |
61 | { | 61 | { |
62 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 62 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
63 | struct cfg80211_scan_request *request; | 63 | struct cfg80211_scan_request *request; |
64 | int n_channels, err; | 64 | int n_channels, err; |
65 | 65 | ||
@@ -130,7 +130,7 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) | |||
130 | 130 | ||
131 | static int cfg80211_conn_do_work(struct wireless_dev *wdev) | 131 | static int cfg80211_conn_do_work(struct wireless_dev *wdev) |
132 | { | 132 | { |
133 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 133 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
134 | struct cfg80211_connect_params *params; | 134 | struct cfg80211_connect_params *params; |
135 | struct cfg80211_assoc_request req = {}; | 135 | struct cfg80211_assoc_request req = {}; |
136 | int err; | 136 | int err; |
@@ -245,7 +245,7 @@ void cfg80211_conn_work(struct work_struct *work) | |||
245 | /* Returned bss is reference counted and must be cleaned up appropriately. */ | 245 | /* Returned bss is reference counted and must be cleaned up appropriately. */ |
246 | static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev) | 246 | static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev) |
247 | { | 247 | { |
248 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 248 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
249 | struct cfg80211_bss *bss; | 249 | struct cfg80211_bss *bss; |
250 | u16 capa = WLAN_CAPABILITY_ESS; | 250 | u16 capa = WLAN_CAPABILITY_ESS; |
251 | 251 | ||
@@ -275,7 +275,7 @@ static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev) | |||
275 | static void __cfg80211_sme_scan_done(struct net_device *dev) | 275 | static void __cfg80211_sme_scan_done(struct net_device *dev) |
276 | { | 276 | { |
277 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 277 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
278 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 278 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
279 | struct cfg80211_bss *bss; | 279 | struct cfg80211_bss *bss; |
280 | 280 | ||
281 | ASSERT_WDEV_LOCK(wdev); | 281 | ASSERT_WDEV_LOCK(wdev); |
@@ -306,7 +306,7 @@ void cfg80211_sme_scan_done(struct net_device *dev) | |||
306 | void cfg80211_sme_rx_auth(struct wireless_dev *wdev, const u8 *buf, size_t len) | 306 | void cfg80211_sme_rx_auth(struct wireless_dev *wdev, const u8 *buf, size_t len) |
307 | { | 307 | { |
308 | struct wiphy *wiphy = wdev->wiphy; | 308 | struct wiphy *wiphy = wdev->wiphy; |
309 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 309 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); |
310 | struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; | 310 | struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; |
311 | u16 status_code = le16_to_cpu(mgmt->u.auth.status_code); | 311 | u16 status_code = le16_to_cpu(mgmt->u.auth.status_code); |
312 | 312 | ||
@@ -352,7 +352,7 @@ void cfg80211_sme_rx_auth(struct wireless_dev *wdev, const u8 *buf, size_t len) | |||
352 | 352 | ||
353 | bool cfg80211_sme_rx_assoc_resp(struct wireless_dev *wdev, u16 status) | 353 | bool cfg80211_sme_rx_assoc_resp(struct wireless_dev *wdev, u16 status) |
354 | { | 354 | { |
355 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 355 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
356 | 356 | ||
357 | if (!wdev->conn) | 357 | if (!wdev->conn) |
358 | return false; | 358 | return false; |
@@ -386,7 +386,7 @@ void cfg80211_sme_deauth(struct wireless_dev *wdev) | |||
386 | 386 | ||
387 | void cfg80211_sme_auth_timeout(struct wireless_dev *wdev) | 387 | void cfg80211_sme_auth_timeout(struct wireless_dev *wdev) |
388 | { | 388 | { |
389 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 389 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
390 | 390 | ||
391 | if (!wdev->conn) | 391 | if (!wdev->conn) |
392 | return; | 392 | return; |
@@ -397,7 +397,7 @@ void cfg80211_sme_auth_timeout(struct wireless_dev *wdev) | |||
397 | 397 | ||
398 | void cfg80211_sme_disassoc(struct wireless_dev *wdev) | 398 | void cfg80211_sme_disassoc(struct wireless_dev *wdev) |
399 | { | 399 | { |
400 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 400 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
401 | 401 | ||
402 | if (!wdev->conn) | 402 | if (!wdev->conn) |
403 | return; | 403 | return; |
@@ -408,7 +408,7 @@ void cfg80211_sme_disassoc(struct wireless_dev *wdev) | |||
408 | 408 | ||
409 | void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev) | 409 | void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev) |
410 | { | 410 | { |
411 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 411 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
412 | 412 | ||
413 | if (!wdev->conn) | 413 | if (!wdev->conn) |
414 | return; | 414 | return; |
@@ -421,7 +421,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev, | |||
421 | struct cfg80211_connect_params *connect, | 421 | struct cfg80211_connect_params *connect, |
422 | const u8 *prev_bssid) | 422 | const u8 *prev_bssid) |
423 | { | 423 | { |
424 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 424 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
425 | struct cfg80211_bss *bss; | 425 | struct cfg80211_bss *bss; |
426 | int err; | 426 | int err; |
427 | 427 | ||
@@ -505,7 +505,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev, | |||
505 | 505 | ||
506 | static int cfg80211_sme_disconnect(struct wireless_dev *wdev, u16 reason) | 506 | static int cfg80211_sme_disconnect(struct wireless_dev *wdev, u16 reason) |
507 | { | 507 | { |
508 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 508 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
509 | int err; | 509 | int err; |
510 | 510 | ||
511 | if (!wdev->conn) | 511 | if (!wdev->conn) |
@@ -593,7 +593,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | |||
593 | return; | 593 | return; |
594 | } | 594 | } |
595 | 595 | ||
596 | nl80211_send_connect_result(wiphy_to_dev(wdev->wiphy), dev, | 596 | nl80211_send_connect_result(wiphy_to_rdev(wdev->wiphy), dev, |
597 | bssid, req_ie, req_ie_len, | 597 | bssid, req_ie, req_ie_len, |
598 | resp_ie, resp_ie_len, | 598 | resp_ie, resp_ie_len, |
599 | status, GFP_KERNEL); | 599 | status, GFP_KERNEL); |
@@ -624,7 +624,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | |||
624 | #endif | 624 | #endif |
625 | 625 | ||
626 | if (!bss && (status == WLAN_STATUS_SUCCESS)) { | 626 | if (!bss && (status == WLAN_STATUS_SUCCESS)) { |
627 | WARN_ON_ONCE(!wiphy_to_dev(wdev->wiphy)->ops->connect); | 627 | WARN_ON_ONCE(!wiphy_to_rdev(wdev->wiphy)->ops->connect); |
628 | bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid, | 628 | bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid, |
629 | wdev->ssid, wdev->ssid_len, | 629 | wdev->ssid, wdev->ssid_len, |
630 | WLAN_CAPABILITY_ESS, | 630 | WLAN_CAPABILITY_ESS, |
@@ -686,7 +686,7 @@ void cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | |||
686 | u16 status, gfp_t gfp) | 686 | u16 status, gfp_t gfp) |
687 | { | 687 | { |
688 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 688 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
689 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 689 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
690 | struct cfg80211_event *ev; | 690 | struct cfg80211_event *ev; |
691 | unsigned long flags; | 691 | unsigned long flags; |
692 | 692 | ||
@@ -741,7 +741,8 @@ void __cfg80211_roamed(struct wireless_dev *wdev, | |||
741 | cfg80211_hold_bss(bss_from_pub(bss)); | 741 | cfg80211_hold_bss(bss_from_pub(bss)); |
742 | wdev->current_bss = bss_from_pub(bss); | 742 | wdev->current_bss = bss_from_pub(bss); |
743 | 743 | ||
744 | nl80211_send_roamed(wiphy_to_dev(wdev->wiphy), wdev->netdev, bss->bssid, | 744 | nl80211_send_roamed(wiphy_to_rdev(wdev->wiphy), |
745 | wdev->netdev, bss->bssid, | ||
745 | req_ie, req_ie_len, resp_ie, resp_ie_len, | 746 | req_ie, req_ie_len, resp_ie, resp_ie_len, |
746 | GFP_KERNEL); | 747 | GFP_KERNEL); |
747 | 748 | ||
@@ -800,7 +801,7 @@ void cfg80211_roamed_bss(struct net_device *dev, | |||
800 | size_t resp_ie_len, gfp_t gfp) | 801 | size_t resp_ie_len, gfp_t gfp) |
801 | { | 802 | { |
802 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 803 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
803 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 804 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
804 | struct cfg80211_event *ev; | 805 | struct cfg80211_event *ev; |
805 | unsigned long flags; | 806 | unsigned long flags; |
806 | 807 | ||
@@ -833,7 +834,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie, | |||
833 | size_t ie_len, u16 reason, bool from_ap) | 834 | size_t ie_len, u16 reason, bool from_ap) |
834 | { | 835 | { |
835 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 836 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
836 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 837 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
837 | int i; | 838 | int i; |
838 | #ifdef CONFIG_CFG80211_WEXT | 839 | #ifdef CONFIG_CFG80211_WEXT |
839 | union iwreq_data wrqu; | 840 | union iwreq_data wrqu; |
@@ -879,7 +880,7 @@ void cfg80211_disconnected(struct net_device *dev, u16 reason, | |||
879 | u8 *ie, size_t ie_len, gfp_t gfp) | 880 | u8 *ie, size_t ie_len, gfp_t gfp) |
880 | { | 881 | { |
881 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 882 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
882 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | 883 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
883 | struct cfg80211_event *ev; | 884 | struct cfg80211_event *ev; |
884 | unsigned long flags; | 885 | unsigned long flags; |
885 | 886 | ||