aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/mlme.c
diff options
context:
space:
mode:
authorZhao, Gang <gamerh2o@gmail.com>2014-04-21 00:53:03 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-04-25 11:33:04 -0400
commitf26cbf401be935eec13da6fca7088b50d797d78b (patch)
treede83a716467102d1b674805ad94879a779c1683f /net/wireless/mlme.c
parent1b8ec87aa077c527c9e3525e16098ca7efbc853d (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/mlme.c')
-rw-r--r--net/wireless/mlme.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 4b4ba707fab9..266766b8d80b 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -23,7 +23,7 @@ void cfg80211_rx_assoc_resp(struct net_device *dev, struct cfg80211_bss *bss,
23{ 23{
24 struct wireless_dev *wdev = dev->ieee80211_ptr; 24 struct wireless_dev *wdev = dev->ieee80211_ptr;
25 struct wiphy *wiphy = wdev->wiphy; 25 struct wiphy *wiphy = wdev->wiphy;
26 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 26 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
27 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; 27 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf;
28 u8 *ie = mgmt->u.assoc_resp.variable; 28 u8 *ie = mgmt->u.assoc_resp.variable;
29 int ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable); 29 int ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
@@ -54,7 +54,7 @@ EXPORT_SYMBOL(cfg80211_rx_assoc_resp);
54static void cfg80211_process_auth(struct wireless_dev *wdev, 54static void cfg80211_process_auth(struct wireless_dev *wdev,
55 const u8 *buf, size_t len) 55 const u8 *buf, size_t len)
56{ 56{
57 struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); 57 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
58 58
59 nl80211_send_rx_auth(rdev, wdev->netdev, buf, len, GFP_KERNEL); 59 nl80211_send_rx_auth(rdev, wdev->netdev, buf, len, GFP_KERNEL);
60 cfg80211_sme_rx_auth(wdev, buf, len); 60 cfg80211_sme_rx_auth(wdev, buf, len);
@@ -63,7 +63,7 @@ static void cfg80211_process_auth(struct wireless_dev *wdev,
63static void cfg80211_process_deauth(struct wireless_dev *wdev, 63static void cfg80211_process_deauth(struct wireless_dev *wdev,
64 const u8 *buf, size_t len) 64 const u8 *buf, size_t len)
65{ 65{
66 struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); 66 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
67 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; 67 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf;
68 const u8 *bssid = mgmt->bssid; 68 const u8 *bssid = mgmt->bssid;
69 u16 reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); 69 u16 reason_code = le16_to_cpu(mgmt->u.deauth.reason_code);
@@ -82,7 +82,7 @@ static void cfg80211_process_deauth(struct wireless_dev *wdev,
82static void cfg80211_process_disassoc(struct wireless_dev *wdev, 82static void cfg80211_process_disassoc(struct wireless_dev *wdev,
83 const u8 *buf, size_t len) 83 const u8 *buf, size_t len)
84{ 84{
85 struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); 85 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
86 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; 86 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf;
87 const u8 *bssid = mgmt->bssid; 87 const u8 *bssid = mgmt->bssid;
88 u16 reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); 88 u16 reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code);
@@ -123,7 +123,7 @@ void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr)
123{ 123{
124 struct wireless_dev *wdev = dev->ieee80211_ptr; 124 struct wireless_dev *wdev = dev->ieee80211_ptr;
125 struct wiphy *wiphy = wdev->wiphy; 125 struct wiphy *wiphy = wdev->wiphy;
126 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 126 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
127 127
128 trace_cfg80211_send_auth_timeout(dev, addr); 128 trace_cfg80211_send_auth_timeout(dev, addr);
129 129
@@ -136,7 +136,7 @@ void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss)
136{ 136{
137 struct wireless_dev *wdev = dev->ieee80211_ptr; 137 struct wireless_dev *wdev = dev->ieee80211_ptr;
138 struct wiphy *wiphy = wdev->wiphy; 138 struct wiphy *wiphy = wdev->wiphy;
139 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 139 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
140 140
141 trace_cfg80211_send_assoc_timeout(dev, bss->bssid); 141 trace_cfg80211_send_assoc_timeout(dev, bss->bssid);
142 142
@@ -172,7 +172,7 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
172 const u8 *tsc, gfp_t gfp) 172 const u8 *tsc, gfp_t gfp)
173{ 173{
174 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 174 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
175 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 175 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
176#ifdef CONFIG_CFG80211_WEXT 176#ifdef CONFIG_CFG80211_WEXT
177 union iwreq_data wrqu; 177 union iwreq_data wrqu;
178 char *buf = kmalloc(128, gfp); 178 char *buf = kmalloc(128, gfp);
@@ -402,7 +402,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid,
402 int match_len) 402 int match_len)
403{ 403{
404 struct wiphy *wiphy = wdev->wiphy; 404 struct wiphy *wiphy = wdev->wiphy;
405 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 405 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
406 struct cfg80211_mgmt_registration *reg, *nreg; 406 struct cfg80211_mgmt_registration *reg, *nreg;
407 int err = 0; 407 int err = 0;
408 u16 mgmt_type; 408 u16 mgmt_type;
@@ -461,7 +461,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid,
461void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid) 461void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid)
462{ 462{
463 struct wiphy *wiphy = wdev->wiphy; 463 struct wiphy *wiphy = wdev->wiphy;
464 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 464 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
465 struct cfg80211_mgmt_registration *reg, *tmp; 465 struct cfg80211_mgmt_registration *reg, *tmp;
466 466
467 spin_lock_bh(&wdev->mgmt_registrations_lock); 467 spin_lock_bh(&wdev->mgmt_registrations_lock);
@@ -608,7 +608,7 @@ bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm,
608 const u8 *buf, size_t len, u32 flags, gfp_t gfp) 608 const u8 *buf, size_t len, u32 flags, gfp_t gfp)
609{ 609{
610 struct wiphy *wiphy = wdev->wiphy; 610 struct wiphy *wiphy = wdev->wiphy;
611 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 611 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
612 struct cfg80211_mgmt_registration *reg; 612 struct cfg80211_mgmt_registration *reg;
613 const struct ieee80211_txrx_stypes *stypes = 613 const struct ieee80211_txrx_stypes *stypes =
614 &wiphy->mgmt_stypes[wdev->iftype]; 614 &wiphy->mgmt_stypes[wdev->iftype];
@@ -727,7 +727,7 @@ void cfg80211_radar_event(struct wiphy *wiphy,
727 struct cfg80211_chan_def *chandef, 727 struct cfg80211_chan_def *chandef,
728 gfp_t gfp) 728 gfp_t gfp)
729{ 729{
730 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 730 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
731 unsigned long timeout; 731 unsigned long timeout;
732 732
733 trace_cfg80211_radar_event(wiphy, chandef); 733 trace_cfg80211_radar_event(wiphy, chandef);
@@ -752,7 +752,7 @@ void cfg80211_cac_event(struct net_device *netdev,
752{ 752{
753 struct wireless_dev *wdev = netdev->ieee80211_ptr; 753 struct wireless_dev *wdev = netdev->ieee80211_ptr;
754 struct wiphy *wiphy = wdev->wiphy; 754 struct wiphy *wiphy = wdev->wiphy;
755 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 755 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
756 unsigned long timeout; 756 unsigned long timeout;
757 757
758 trace_cfg80211_cac_event(netdev, event); 758 trace_cfg80211_cac_event(netdev, event);