Commit f26cbf40 authored by Zhao, Gang's avatar Zhao, Gang Committed by Johannes Berg

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: default avatarZhao, Gang <gamerh2o@gmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 1b8ec87a
...@@ -777,7 +777,7 @@ bool cfg80211_reg_can_beacon(struct wiphy *wiphy, ...@@ -777,7 +777,7 @@ bool cfg80211_reg_can_beacon(struct wiphy *wiphy,
struct cfg80211_chan_def *chandef, struct cfg80211_chan_def *chandef,
enum nl80211_iftype iftype) enum nl80211_iftype iftype)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
bool res; bool res;
u32 prohibited_flags = IEEE80211_CHAN_DISABLED | u32 prohibited_flags = IEEE80211_CHAN_DISABLED |
IEEE80211_CHAN_RADAR; IEEE80211_CHAN_RADAR;
......
...@@ -69,7 +69,7 @@ struct cfg80211_registered_device *cfg80211_rdev_by_wiphy_idx(int wiphy_idx) ...@@ -69,7 +69,7 @@ struct cfg80211_registered_device *cfg80211_rdev_by_wiphy_idx(int wiphy_idx)
int get_wiphy_idx(struct wiphy *wiphy) int get_wiphy_idx(struct wiphy *wiphy)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
return rdev->wiphy_idx; return rdev->wiphy_idx;
} }
...@@ -475,7 +475,7 @@ static int wiphy_verify_combinations(struct wiphy *wiphy) ...@@ -475,7 +475,7 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
int wiphy_register(struct wiphy *wiphy) int wiphy_register(struct wiphy *wiphy)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
int res; int res;
enum ieee80211_band band; enum ieee80211_band band;
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
...@@ -656,7 +656,7 @@ EXPORT_SYMBOL(wiphy_register); ...@@ -656,7 +656,7 @@ EXPORT_SYMBOL(wiphy_register);
void wiphy_rfkill_start_polling(struct wiphy *wiphy) void wiphy_rfkill_start_polling(struct wiphy *wiphy)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
if (!rdev->ops->rfkill_poll) if (!rdev->ops->rfkill_poll)
return; return;
...@@ -667,7 +667,7 @@ EXPORT_SYMBOL(wiphy_rfkill_start_polling); ...@@ -667,7 +667,7 @@ EXPORT_SYMBOL(wiphy_rfkill_start_polling);
void wiphy_rfkill_stop_polling(struct wiphy *wiphy) void wiphy_rfkill_stop_polling(struct wiphy *wiphy)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
rfkill_pause_polling(rdev->rfkill); rfkill_pause_polling(rdev->rfkill);
} }
...@@ -675,7 +675,7 @@ EXPORT_SYMBOL(wiphy_rfkill_stop_polling); ...@@ -675,7 +675,7 @@ EXPORT_SYMBOL(wiphy_rfkill_stop_polling);
void wiphy_unregister(struct wiphy *wiphy) void wiphy_unregister(struct wiphy *wiphy)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
wait_event(rdev->dev_wait, ({ wait_event(rdev->dev_wait, ({
int __count; int __count;
...@@ -748,7 +748,7 @@ EXPORT_SYMBOL(wiphy_free); ...@@ -748,7 +748,7 @@ EXPORT_SYMBOL(wiphy_free);
void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool blocked) void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool blocked)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
if (rfkill_set_hw_state(rdev->rfkill, blocked)) if (rfkill_set_hw_state(rdev->rfkill, blocked))
schedule_work(&rdev->rfkill_sync); schedule_work(&rdev->rfkill_sync);
...@@ -757,7 +757,7 @@ EXPORT_SYMBOL(wiphy_rfkill_set_hw_state); ...@@ -757,7 +757,7 @@ EXPORT_SYMBOL(wiphy_rfkill_set_hw_state);
void cfg80211_unregister_wdev(struct wireless_dev *wdev) void cfg80211_unregister_wdev(struct wireless_dev *wdev)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
ASSERT_RTNL(); ASSERT_RTNL();
...@@ -841,7 +841,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb, ...@@ -841,7 +841,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
if (!wdev) if (!wdev)
return NOTIFY_DONE; return NOTIFY_DONE;
rdev = wiphy_to_dev(wdev->wiphy); rdev = wiphy_to_rdev(wdev->wiphy);
WARN_ON(wdev->iftype == NL80211_IFTYPE_UNSPECIFIED); WARN_ON(wdev->iftype == NL80211_IFTYPE_UNSPECIFIED);
......
...@@ -90,7 +90,7 @@ struct cfg80211_registered_device { ...@@ -90,7 +90,7 @@ struct cfg80211_registered_device {
}; };
static inline static inline
struct cfg80211_registered_device *wiphy_to_dev(struct wiphy *wiphy) struct cfg80211_registered_device *wiphy_to_rdev(struct wiphy *wiphy)
{ {
BUG_ON(!wiphy); BUG_ON(!wiphy);
return container_of(wiphy, struct cfg80211_registered_device, wiphy); return container_of(wiphy, struct cfg80211_registered_device, wiphy);
......
...@@ -43,7 +43,7 @@ static void cfg80211_get_ringparam(struct net_device *dev, ...@@ -43,7 +43,7 @@ static void cfg80211_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *rp) struct ethtool_ringparam *rp)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
memset(rp, 0, sizeof(*rp)); memset(rp, 0, sizeof(*rp));
...@@ -56,7 +56,7 @@ static int cfg80211_set_ringparam(struct net_device *dev, ...@@ -56,7 +56,7 @@ static int cfg80211_set_ringparam(struct net_device *dev,
struct ethtool_ringparam *rp) struct ethtool_ringparam *rp)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
if (rp->rx_mini_pending != 0 || rp->rx_jumbo_pending != 0) if (rp->rx_mini_pending != 0 || rp->rx_jumbo_pending != 0)
return -EINVAL; return -EINVAL;
...@@ -70,7 +70,7 @@ static int cfg80211_set_ringparam(struct net_device *dev, ...@@ -70,7 +70,7 @@ static int cfg80211_set_ringparam(struct net_device *dev,
static int cfg80211_get_sset_count(struct net_device *dev, int sset) static int cfg80211_get_sset_count(struct net_device *dev, int sset)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
if (rdev->ops->get_et_sset_count) if (rdev->ops->get_et_sset_count)
return rdev_get_et_sset_count(rdev, dev, sset); return rdev_get_et_sset_count(rdev, dev, sset);
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -80,7 +80,7 @@ static void cfg80211_get_stats(struct net_device *dev, ...@@ -80,7 +80,7 @@ static void cfg80211_get_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 *data) struct ethtool_stats *stats, u64 *data)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
if (rdev->ops->get_et_stats) if (rdev->ops->get_et_stats)
rdev_get_et_stats(rdev, dev, stats, data); rdev_get_et_stats(rdev, dev, stats, data);
} }
...@@ -88,7 +88,7 @@ static void cfg80211_get_stats(struct net_device *dev, ...@@ -88,7 +88,7 @@ static void cfg80211_get_stats(struct net_device *dev,
static void cfg80211_get_strings(struct net_device *dev, u32 sset, u8 *data) static void cfg80211_get_strings(struct net_device *dev, u32 sset, u8 *data)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
if (rdev->ops->get_et_strings) if (rdev->ops->get_et_strings)
rdev_get_et_strings(rdev, dev, sset, data); rdev_get_et_strings(rdev, dev, sset, data);
} }
......
...@@ -45,7 +45,7 @@ void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, ...@@ -45,7 +45,7 @@ void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
cfg80211_upload_connect_keys(wdev); cfg80211_upload_connect_keys(wdev);
nl80211_send_ibss_bssid(wiphy_to_dev(wdev->wiphy), dev, bssid, nl80211_send_ibss_bssid(wiphy_to_rdev(wdev->wiphy), dev, bssid,
GFP_KERNEL); GFP_KERNEL);
#ifdef CONFIG_CFG80211_WEXT #ifdef CONFIG_CFG80211_WEXT
memset(&wrqu, 0, sizeof(wrqu)); memset(&wrqu, 0, sizeof(wrqu));
...@@ -58,7 +58,7 @@ void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, ...@@ -58,7 +58,7 @@ void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
struct ieee80211_channel *channel, gfp_t gfp) struct ieee80211_channel *channel, gfp_t gfp)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_event *ev; struct cfg80211_event *ev;
unsigned long flags; unsigned long flags;
...@@ -156,7 +156,7 @@ int cfg80211_join_ibss(struct cfg80211_registered_device *rdev, ...@@ -156,7 +156,7 @@ int cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
static void __cfg80211_clear_ibss(struct net_device *dev, bool nowext) static void __cfg80211_clear_ibss(struct net_device *dev, bool nowext)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
int i; int i;
ASSERT_WDEV_LOCK(wdev); ASSERT_WDEV_LOCK(wdev);
...@@ -311,7 +311,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev, ...@@ -311,7 +311,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
struct iw_freq *wextfreq, char *extra) struct iw_freq *wextfreq, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct ieee80211_channel *chan = NULL; struct ieee80211_channel *chan = NULL;
int err, freq; int err, freq;
...@@ -396,7 +396,7 @@ int cfg80211_ibss_wext_siwessid(struct net_device *dev, ...@@ -396,7 +396,7 @@ int cfg80211_ibss_wext_siwessid(struct net_device *dev,
struct iw_point *data, char *ssid) struct iw_point *data, char *ssid)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
size_t len = data->length; size_t len = data->length;
int err; int err;
...@@ -463,7 +463,7 @@ int cfg80211_ibss_wext_siwap(struct net_device *dev, ...@@ -463,7 +463,7 @@ int cfg80211_ibss_wext_siwap(struct net_device *dev,
struct sockaddr *ap_addr, char *extra) struct sockaddr *ap_addr, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
u8 *bssid = ap_addr->sa_data; u8 *bssid = ap_addr->sa_data;
int err; int err;
......
...@@ -23,7 +23,7 @@ void cfg80211_rx_assoc_resp(struct net_device *dev, struct cfg80211_bss *bss, ...@@ -23,7 +23,7 @@ void cfg80211_rx_assoc_resp(struct net_device *dev, struct cfg80211_bss *bss,
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf;
u8 *ie = mgmt->u.assoc_resp.variable; u8 *ie = mgmt->u.assoc_resp.variable;
int ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable); int ieoffs = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
...@@ -54,7 +54,7 @@ EXPORT_SYMBOL(cfg80211_rx_assoc_resp); ...@@ -54,7 +54,7 @@ EXPORT_SYMBOL(cfg80211_rx_assoc_resp);
static void cfg80211_process_auth(struct wireless_dev *wdev, static void cfg80211_process_auth(struct wireless_dev *wdev,
const u8 *buf, size_t len) const u8 *buf, size_t len)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
nl80211_send_rx_auth(rdev, wdev->netdev, buf, len, GFP_KERNEL); nl80211_send_rx_auth(rdev, wdev->netdev, buf, len, GFP_KERNEL);
cfg80211_sme_rx_auth(wdev, buf, len); cfg80211_sme_rx_auth(wdev, buf, len);
...@@ -63,7 +63,7 @@ static void cfg80211_process_auth(struct wireless_dev *wdev, ...@@ -63,7 +63,7 @@ static void cfg80211_process_auth(struct wireless_dev *wdev,
static void cfg80211_process_deauth(struct wireless_dev *wdev, static void cfg80211_process_deauth(struct wireless_dev *wdev,
const u8 *buf, size_t len) const u8 *buf, size_t len)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf;
const u8 *bssid = mgmt->bssid; const u8 *bssid = mgmt->bssid;
u16 reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); u16 reason_code = le16_to_cpu(mgmt->u.deauth.reason_code);
...@@ -82,7 +82,7 @@ static void cfg80211_process_deauth(struct wireless_dev *wdev, ...@@ -82,7 +82,7 @@ static void cfg80211_process_deauth(struct wireless_dev *wdev,
static void cfg80211_process_disassoc(struct wireless_dev *wdev, static void cfg80211_process_disassoc(struct wireless_dev *wdev,
const u8 *buf, size_t len) const u8 *buf, size_t len)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf;
const u8 *bssid = mgmt->bssid; const u8 *bssid = mgmt->bssid;
u16 reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); 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,7 +123,7 @@ void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
trace_cfg80211_send_auth_timeout(dev, addr); trace_cfg80211_send_auth_timeout(dev, addr);
...@@ -136,7 +136,7 @@ void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss) ...@@ -136,7 +136,7 @@ void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
trace_cfg80211_send_assoc_timeout(dev, bss->bssid); trace_cfg80211_send_assoc_timeout(dev, bss->bssid);
...@@ -172,7 +172,7 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, ...@@ -172,7 +172,7 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
const u8 *tsc, gfp_t gfp) const u8 *tsc, gfp_t gfp)
{ {
struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
#ifdef CONFIG_CFG80211_WEXT #ifdef CONFIG_CFG80211_WEXT
union iwreq_data wrqu; union iwreq_data wrqu;
char *buf = kmalloc(128, gfp); char *buf = kmalloc(128, gfp);
...@@ -402,7 +402,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, ...@@ -402,7 +402,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid,
int match_len) int match_len)
{ {
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct cfg80211_mgmt_registration *reg, *nreg; struct cfg80211_mgmt_registration *reg, *nreg;
int err = 0; int err = 0;
u16 mgmt_type; u16 mgmt_type;
...@@ -461,7 +461,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, ...@@ -461,7 +461,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid,
void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid) void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid)
{ {
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct cfg80211_mgmt_registration *reg, *tmp; struct cfg80211_mgmt_registration *reg, *tmp;
spin_lock_bh(&wdev->mgmt_registrations_lock); 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,7 +608,7 @@ bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm,
const u8 *buf, size_t len, u32 flags, gfp_t gfp) const u8 *buf, size_t len, u32 flags, gfp_t gfp)
{ {
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct cfg80211_mgmt_registration *reg; struct cfg80211_mgmt_registration *reg;
const struct ieee80211_txrx_stypes *stypes = const struct ieee80211_txrx_stypes *stypes =
&wiphy->mgmt_stypes[wdev->iftype]; &wiphy->mgmt_stypes[wdev->iftype];
...@@ -727,7 +727,7 @@ void cfg80211_radar_event(struct wiphy *wiphy, ...@@ -727,7 +727,7 @@ void cfg80211_radar_event(struct wiphy *wiphy,
struct cfg80211_chan_def *chandef, struct cfg80211_chan_def *chandef,
gfp_t gfp) gfp_t gfp)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
unsigned long timeout; unsigned long timeout;
trace_cfg80211_radar_event(wiphy, chandef); trace_cfg80211_radar_event(wiphy, chandef);
...@@ -752,7 +752,7 @@ void cfg80211_cac_event(struct net_device *netdev, ...@@ -752,7 +752,7 @@ void cfg80211_cac_event(struct net_device *netdev,
{ {
struct wireless_dev *wdev = netdev->ieee80211_ptr; struct wireless_dev *wdev = netdev->ieee80211_ptr;
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
unsigned long timeout; unsigned long timeout;
trace_cfg80211_cac_event(netdev, event); trace_cfg80211_cac_event(netdev, event);
......
This diff is collapsed.
...@@ -238,11 +238,11 @@ void __cfg80211_scan_done(struct work_struct *wk) ...@@ -238,11 +238,11 @@ void __cfg80211_scan_done(struct work_struct *wk)
void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted) void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted)
{ {
trace_cfg80211_scan_done(request, aborted); trace_cfg80211_scan_done(request, aborted);
WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req); WARN_ON(request != wiphy_to_rdev(request->wiphy)->scan_req);
request->aborted = aborted; request->aborted = aborted;
request->notified = true; request->notified = true;
queue_work(cfg80211_wq, &wiphy_to_dev(request->wiphy)->scan_done_wk); queue_work(cfg80211_wq, &wiphy_to_rdev(request->wiphy)->scan_done_wk);
} }
EXPORT_SYMBOL(cfg80211_scan_done); EXPORT_SYMBOL(cfg80211_scan_done);
...@@ -278,15 +278,15 @@ void cfg80211_sched_scan_results(struct wiphy *wiphy) ...@@ -278,15 +278,15 @@ void cfg80211_sched_scan_results(struct wiphy *wiphy)
{ {
trace_cfg80211_sched_scan_results(wiphy); trace_cfg80211_sched_scan_results(wiphy);
/* ignore if we're not scanning */ /* ignore if we're not scanning */
if (wiphy_to_dev(wiphy)->sched_scan_req) if (wiphy_to_rdev(wiphy)->sched_scan_req)
queue_work(cfg80211_wq, queue_work(cfg80211_wq,
&wiphy_to_dev(wiphy)->sched_scan_results_wk); &wiphy_to_rdev(wiphy)->sched_scan_results_wk);
} }
EXPORT_SYMBOL(cfg80211_sched_scan_results); EXPORT_SYMBOL(cfg80211_sched_scan_results);
void cfg80211_sched_scan_stopped(struct wiphy *wiphy) void cfg80211_sched_scan_stopped(struct wiphy *wiphy)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
trace_cfg80211_sched_scan_stopped(wiphy); trace_cfg80211_sched_scan_stopped(wiphy);
...@@ -526,7 +526,7 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy, ...@@ -526,7 +526,7 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
const u8 *ssid, size_t ssid_len, const u8 *ssid, size_t ssid_len,
u16 capa_mask, u16 capa_val) u16 capa_mask, u16 capa_val)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct cfg80211_internal_bss *bss, *res = NULL; struct cfg80211_internal_bss *bss, *res = NULL;
unsigned long now = jiffies; unsigned long now = jiffies;
...@@ -919,7 +919,7 @@ cfg80211_inform_bss_width(struct wiphy *wiphy, ...@@ -919,7 +919,7 @@ cfg80211_inform_bss_width(struct wiphy *wiphy,
rcu_assign_pointer(tmp.pub.beacon_ies, ies); rcu_assign_pointer(tmp.pub.beacon_ies, ies);
rcu_assign_pointer(tmp.pub.ies, ies); rcu_assign_pointer(tmp.pub.ies, ies);
res = cfg80211_bss_update(wiphy_to_dev(wiphy), &tmp, res = cfg80211_bss_update(wiphy_to_rdev(wiphy), &tmp,
rx_channel == channel); rx_channel == channel);
if (!res) if (!res)
return NULL; return NULL;
...@@ -991,7 +991,7 @@ cfg80211_inform_bss_width_frame(struct wiphy *wiphy, ...@@ -991,7 +991,7 @@ cfg80211_inform_bss_width_frame(struct wiphy *wiphy,
tmp.pub.beacon_interval = le16_to_cpu(mgmt->u.probe_resp.beacon_int); tmp.pub.beacon_interval = le16_to_cpu(mgmt->u.probe_resp.beacon_int);
tmp.pub.capability = le16_to_cpu(mgmt->u.probe_resp.capab_info); tmp.pub.capability = le16_to_cpu(mgmt->u.probe_resp.capab_info);
res = cfg80211_bss_update(wiphy_to_dev(wiphy), &tmp, res = cfg80211_bss_update(wiphy_to_rdev(wiphy), &tmp,
rx_channel == channel); rx_channel == channel);
if (!res) if (!res)
return NULL; return NULL;
...@@ -1007,7 +1007,7 @@ EXPORT_SYMBOL(cfg80211_inform_bss_width_frame); ...@@ -1007,7 +1007,7 @@ EXPORT_SYMBOL(cfg80211_inform_bss_width_frame);
void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *pub) void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct cfg80211_internal_bss *bss; struct cfg80211_internal_bss *bss;
if (!pub) if (!pub)
...@@ -1023,7 +1023,7 @@ EXPORT_SYMBOL(cfg80211_ref_bss); ...@@ -1023,7 +1023,7 @@ EXPORT_SYMBOL(cfg80211_ref_bss);
void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *pub) void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct cfg80211_internal_bss *bss; struct cfg80211_internal_bss *bss;
if (!pub) if (!pub)
...@@ -1039,7 +1039,7 @@ EXPORT_SYMBOL(cfg80211_put_bss); ...@@ -1039,7 +1039,7 @@ EXPORT_SYMBOL(cfg80211_put_bss);
void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub) void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct cfg80211_internal_bss *bss; struct cfg80211_internal_bss *bss;
if (WARN_ON(!pub)) if (WARN_ON(!pub))
...@@ -1069,7 +1069,7 @@ cfg80211_get_dev_from_ifindex(struct net *net, int ifindex) ...@@ -1069,7 +1069,7 @@ cfg80211_get_dev_from_ifindex(struct net *net, int ifindex)
if (!dev) if (!dev)
return ERR_PTR(-ENODEV); return ERR_PTR(-ENODEV);
if (dev->ieee80211_ptr) if (dev->ieee80211_ptr)
rdev = wiphy_to_dev(dev->ieee80211_ptr->wiphy); rdev = wiphy_to_rdev(dev->ieee80211_ptr->wiphy);
else else
rdev = ERR_PTR(-ENODEV); rdev = ERR_PTR(-ENODEV);
dev_put(dev); dev_put(dev);
......
...@@ -59,7 +59,7 @@ static void cfg80211_sme_free(struct wireless_dev *wdev) ...@@ -59,7 +59,7 @@ static void cfg80211_sme_free(struct wireless_dev *wdev)
static int cfg80211_conn_scan(struct wireless_dev *wdev) static int cfg80211_conn_scan(struct wireless_dev *wdev)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_scan_request *request; struct cfg80211_scan_request *request;
int n_channels, err; int n_channels, err;
...@@ -130,7 +130,7 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) ...@@ -130,7 +130,7 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev)
static int cfg80211_conn_do_work(struct wireless_dev *wdev) static int cfg80211_conn_do_work(struct wireless_dev *wdev)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_connect_params *params; struct cfg80211_connect_params *params;
struct cfg80211_assoc_request req = {}; struct cfg80211_assoc_request req = {};
int err; int err;
...@@ -245,7 +245,7 @@ void cfg80211_conn_work(struct work_struct *work) ...@@ -245,7 +245,7 @@ void cfg80211_conn_work(struct work_struct *work)
/* Returned bss is reference counted and must be cleaned up appropriately. */ /* Returned bss is reference counted and must be cleaned up appropriately. */
static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev) static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_bss *bss; struct cfg80211_bss *bss;
u16 capa = WLAN_CAPABILITY_ESS; u16 capa = WLAN_CAPABILITY_ESS;
...@@ -275,7 +275,7 @@ static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev) ...@@ -275,7 +275,7 @@ static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev)
static void __cfg80211_sme_scan_done(struct net_device *dev) static void __cfg80211_sme_scan_done(struct net_device *dev)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_bss *bss; struct cfg80211_bss *bss;
ASSERT_WDEV_LOCK(wdev); ASSERT_WDEV_LOCK(wdev);
...@@ -306,7 +306,7 @@ void cfg80211_sme_scan_done(struct net_device *dev) ...@@ -306,7 +306,7 @@ void cfg80211_sme_scan_done(struct net_device *dev)
void cfg80211_sme_rx_auth(struct wireless_dev *wdev, const u8 *buf, size_t len) void cfg80211_sme_rx_auth(struct wireless_dev *wdev, const u8 *buf, size_t len)
{ {
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf;
u16 status_code = le16_to_cpu(mgmt->u.auth.status_code); u16 status_code = le16_to_cpu(mgmt->u.auth.status_code);
...@@ -352,7 +352,7 @@ void cfg80211_sme_rx_auth(struct wireless_dev *wdev, const u8 *buf, size_t len) ...@@ -352,7 +352,7 @@ void cfg80211_sme_rx_auth(struct wireless_dev *wdev, const u8 *buf, size_t len)
bool cfg80211_sme_rx_assoc_resp(struct wireless_dev *wdev, u16 status) bool cfg80211_sme_rx_assoc_resp(struct wireless_dev *wdev, u16 status)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
if (!wdev->conn) if (!wdev->conn)
return false; return false;
...@@ -386,7 +386,7 @@ void cfg80211_sme_deauth(struct wireless_dev *wdev) ...@@ -386,7 +386,7 @@ void cfg80211_sme_deauth(struct wireless_dev *wdev)
void cfg80211_sme_auth_timeout(struct wireless_dev *wdev) void cfg80211_sme_auth_timeout(struct wireless_dev *wdev)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
if (!wdev->conn) if (!wdev->conn)
return; return;
...@@ -397,7 +397,7 @@ void cfg80211_sme_auth_timeout(struct wireless_dev *wdev) ...@@ -397,7 +397,7 @@ void cfg80211_sme_auth_timeout(struct wireless_dev *wdev)
void cfg80211_sme_disassoc(struct wireless_dev *wdev) void cfg80211_sme_disassoc(struct wireless_dev *wdev)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
if (!wdev->conn) if (!wdev->conn)
return; return;
...@@ -408,7 +408,7 @@ void cfg80211_sme_disassoc(struct wireless_dev *wdev) ...@@ -408,7 +408,7 @@ void cfg80211_sme_disassoc(struct wireless_dev *wdev)
void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev) void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
if (!wdev->conn) if (!wdev->conn)
return; return;
...@@ -421,7 +421,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev, ...@@ -421,7 +421,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,
struct cfg80211_connect_params *connect, struct cfg80211_connect_params *connect,
const u8 *prev_bssid) const u8 *prev_bssid)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_bss *bss; struct cfg80211_bss *bss;
int err; int err;
...@@ -505,7 +505,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev, ...@@ -505,7 +505,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,
static int cfg80211_sme_disconnect(struct wireless_dev *wdev, u16 reason) static int cfg80211_sme_disconnect(struct wireless_dev *wdev, u16 reason)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
int err; int err;
if (!wdev->conn) if (!wdev->conn)
...@@ -593,7 +593,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, ...@@ -593,7 +593,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
return; return;
} }
nl80211_send_connect_result(wiphy_to_dev(wdev->wiphy), dev, nl80211_send_connect_result(wiphy_to_rdev(wdev->wiphy), dev,
bssid, req_ie, req_ie_len, bssid, req_ie, req_ie_len,
resp_ie, resp_ie_len, resp_ie, resp_ie_len,
status, GFP_KERNEL); status, GFP_KERNEL);
...@@ -624,7 +624,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, ...@@ -624,7 +624,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
#endif #endif
if (!bss && (status == WLAN_STATUS_SUCCESS)) { if (!bss && (status == WLAN_STATUS_SUCCESS)) {
WARN_ON_ONCE(!wiphy_to_dev(wdev->wiphy)->ops->connect); WARN_ON_ONCE(!wiphy_to_rdev(wdev->wiphy)->ops->connect);
bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid, bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid,
wdev->ssid, wdev->ssid_len, wdev->ssid, wdev->ssid_len,
WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS,
...@@ -686,7 +686,7 @@ void cfg80211_connect_result(struct net_device *dev, const u8 *bssid, ...@@ -686,7 +686,7 @@ void cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
u16 status, gfp_t gfp) u16 status, gfp_t gfp)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_event *ev; struct cfg80211_event *ev;
unsigned long flags; unsigned long flags;
...@@ -741,7 +741,8 @@ void __cfg80211_roamed(struct wireless_dev *wdev, ...@@ -741,7 +741,8 @@ void __cfg80211_roamed(struct wireless_dev *wdev,
cfg80211_hold_bss(bss_from_pub(bss)); cfg80211_hold_bss(bss_from_pub(bss));
wdev->current_bss = bss_from_pub(bss); wdev->current_bss = bss_from_pub(bss);
nl80211_send_roamed(wiphy_to_dev(wdev->wiphy), wdev->netdev, bss->bssid, nl80211_send_roamed(wiphy_to_rdev(wdev->wiphy),
wdev->netdev, bss->bssid,
req_ie, req_ie_len, resp_ie, resp_ie_len, req_ie, req_ie_len, resp_ie, resp_ie_len,
GFP_KERNEL); GFP_KERNEL);
...@@ -800,7 +801,7 @@ void cfg80211_roamed_bss(struct net_device *dev, ...@@ -800,7 +801,7 @@ void cfg80211_roamed_bss(struct net_device *dev,
size_t resp_ie_len, gfp_t gfp) size_t resp_ie_len, gfp_t gfp)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_event *ev; struct cfg80211_event *ev;
unsigned long flags; unsigned long flags;
...@@ -833,7 +834,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie, ...@@ -833,7 +834,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
size_t ie_len, u16 reason, bool from_ap) size_t ie_len, u16 reason, bool from_ap)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
int i; int i;
#ifdef CONFIG_CFG80211_WEXT #ifdef CONFIG_CFG80211_WEXT
union iwreq_data wrqu; union iwreq_data wrqu;
...@@ -879,7 +880,7 @@ void cfg80211_disconnected(struct net_device *dev, u16 reason, ...@@ -879,7 +880,7 @@ void cfg80211_disconnected(struct net_device *dev, u16 reason,
u8 *ie, size_t ie_len, gfp_t gfp) u8 *ie, size_t ie_len, gfp_t gfp)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_event *ev; struct cfg80211_event *ev;
unsigned long flags; unsigned long flags;
......
...@@ -770,7 +770,7 @@ EXPORT_SYMBOL(ieee80211_bss_get_ie); ...@@ -770,7 +770,7 @@ EXPORT_SYMBOL(ieee80211_bss_get_ie);
void cfg80211_upload_connect_keys(struct wireless_dev *wdev) void cfg80211_upload_connect_keys(struct wireless_dev *wdev)
{ {
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct net_device *dev = wdev->netdev; struct net_device *dev = wdev->netdev;
int i; int i;
......
...@@ -73,7 +73,7 @@ int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info, ...@@ -73,7 +73,7 @@ int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
struct vif_params vifparams; struct vif_params vifparams;
enum nl80211_iftype type; enum nl80211_iftype type;
rdev = wiphy_to_dev(wdev->wiphy); rdev = wiphy_to_rdev(wdev->wiphy);
switch (*mode) { switch (*mode) {
case IW_MODE_INFRA: case IW_MODE_INFRA:
...@@ -286,7 +286,7 @@ int cfg80211_wext_siwrts(struct net_device *dev, ...@@ -286,7 +286,7 @@ int cfg80211_wext_siwrts(struct net_device *dev,
struct iw_param *rts, char *extra) struct iw_param *rts, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
u32 orts = wdev->wiphy->rts_threshold; u32 orts = wdev->wiphy->rts_threshold;
int err; int err;
...@@ -324,7 +324,7 @@ int cfg80211_wext_siwfrag(struct net_device *dev, ...@@ -324,7 +324,7 @@ int cfg80211_wext_siwfrag(struct net_device *dev,
struct iw_param *frag, char *extra) struct iw_param *frag, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
u32 ofrag = wdev->wiphy->frag_threshold; u32 ofrag = wdev->wiphy->frag_threshold;
int err; int err;
...@@ -364,7 +364,7 @@ static int cfg80211_wext_siwretry(struct net_device *dev, ...@@ -364,7 +364,7 @@ static int cfg80211_wext_siwretry(struct net_device *dev,
struct iw_param *retry, char *extra) struct iw_param *retry, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
u32 changed = 0; u32 changed = 0;
u8 olong = wdev->wiphy->retry_long; u8 olong = wdev->wiphy->retry_long;
u8 oshort = wdev->wiphy->retry_short; u8 oshort = wdev->wiphy->retry_short;
...@@ -587,7 +587,7 @@ static int cfg80211_wext_siwencode(struct net_device *dev, ...@@ -587,7 +587,7 @@ static int cfg80211_wext_siwencode(struct net_device *dev,
struct iw_point *erq, char *keybuf) struct iw_point *erq, char *keybuf)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
int idx, err; int idx, err;
bool remove = false; bool remove = false;
struct key_params params; struct key_params params;
...@@ -647,7 +647,7 @@ static int cfg80211_wext_siwencodeext(struct net_device *dev, ...@@ -647,7 +647,7 @@ static int cfg80211_wext_siwencodeext(struct net_device *dev,
struct iw_point *erq, char *extra) struct iw_point *erq, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct iw_encode_ext *ext = (struct iw_encode_ext *) extra; struct iw_encode_ext *ext = (struct iw_encode_ext *) extra;
const u8 *addr; const u8 *addr;
int idx; int idx;
...@@ -775,7 +775,7 @@ static int cfg80211_wext_siwfreq(struct net_device *dev, ...@@ -775,7 +775,7 @@ static int cfg80211_wext_siwfreq(struct net_device *dev,
struct iw_freq *wextfreq, char *extra) struct iw_freq *wextfreq, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_chan_def chandef = { struct cfg80211_chan_def chandef = {
.width = NL80211_CHAN_WIDTH_20_NOHT, .width = NL80211_CHAN_WIDTH_20_NOHT,
}; };
...@@ -818,7 +818,7 @@ static int cfg80211_wext_giwfreq(struct net_device *dev, ...@@ -818,7 +818,7 @@ static int cfg80211_wext_giwfreq(struct net_device *dev,
struct iw_freq *freq, char *extra) struct iw_freq *freq, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_chan_def chandef; struct cfg80211_chan_def chandef;
int ret; int ret;
...@@ -847,7 +847,7 @@ static int cfg80211_wext_siwtxpower(struct net_device *dev, ...@@ -847,7 +847,7 @@ static int cfg80211_wext_siwtxpower(struct net_device *dev,
union iwreq_data *data, char *extra) union iwreq_data *data, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
enum nl80211_tx_power_setting type; enum nl80211_tx_power_setting type;
int dbm = 0; int dbm = 0;
...@@ -899,7 +899,7 @@ static int cfg80211_wext_giwtxpower(struct net_device *dev, ...@@ -899,7 +899,7 @@ static int cfg80211_wext_giwtxpower(struct net_device *dev,
union iwreq_data *data, char *extra) union iwreq_data *data, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
int err, val; int err, val;
if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM)
...@@ -1119,7 +1119,7 @@ static int cfg80211_wext_siwpower(struct net_device *dev, ...@@ -1119,7 +1119,7 @@ static int cfg80211_wext_siwpower(struct net_device *dev,
struct iw_param *wrq, char *extra) struct iw_param *wrq, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
bool ps = wdev->ps; bool ps = wdev->ps;
int timeout = wdev->ps_timeout; int timeout = wdev->ps_timeout;
int err; int err;
...@@ -1177,7 +1177,7 @@ static int cfg80211_wds_wext_siwap(struct net_device *dev, ...@@ -1177,7 +1177,7 @@ static int cfg80211_wds_wext_siwap(struct net_device *dev,
struct sockaddr *addr, char *extra) struct sockaddr *addr, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
int err; int err;
if (WARN_ON(wdev->iftype != NL80211_IFTYPE_WDS)) if (WARN_ON(wdev->iftype != NL80211_IFTYPE_WDS))
...@@ -1221,7 +1221,7 @@ static int cfg80211_wext_siwrate(struct net_device *dev, ...@@ -1221,7 +1221,7 @@ static int cfg80211_wext_siwrate(struct net_device *dev,
struct iw_param *rate, char *extra) struct iw_param *rate, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_bitrate_mask mask; struct cfg80211_bitrate_mask mask;
u32 fixed, maxrate; u32 fixed, maxrate;
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
...@@ -1272,7 +1272,7 @@ static int cfg80211_wext_giwrate(struct net_device *dev, ...@@ -1272,7 +1272,7 @@ static int cfg80211_wext_giwrate(struct net_device *dev,
struct iw_param *rate, char *extra) struct iw_param *rate, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
/* we are under RTNL - globally locked - so can use a static struct */ /* we are under RTNL - globally locked - so can use a static struct */
static struct station_info sinfo; static struct station_info sinfo;
u8 addr[ETH_ALEN]; u8 addr[ETH_ALEN];
...@@ -1310,7 +1310,7 @@ static int cfg80211_wext_giwrate(struct net_device *dev, ...@@ -1310,7 +1310,7 @@ static int cfg80211_wext_giwrate(struct net_device *dev,
static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev) static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
/* we are under RTNL - globally locked - so can use static structs */ /* we are under RTNL - globally locked - so can use static structs */
static struct iw_statistics wstats; static struct iw_statistics wstats;
static struct station_info sinfo; static struct station_info sinfo;
...@@ -1449,7 +1449,7 @@ static int cfg80211_wext_siwpmksa(struct net_device *dev, ...@@ -1449,7 +1449,7 @@ static int cfg80211_wext_siwpmksa(struct net_device *dev,
struct iw_point *data, char *extra) struct iw_point *data, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct cfg80211_pmksa cfg_pmksa; struct cfg80211_pmksa cfg_pmksa;
struct iw_pmksa *pmksa = (struct iw_pmksa *)extra; struct iw_pmksa *pmksa = (struct iw_pmksa *)extra;
......
...@@ -67,7 +67,7 @@ int cfg80211_mgd_wext_siwfreq(struct net_device *dev, ...@@ -67,7 +67,7 @@ int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
struct iw_freq *wextfreq, char *extra) struct iw_freq *wextfreq, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
struct ieee80211_channel *chan = NULL; struct ieee80211_channel *chan = NULL;
int err, freq; int err, freq;
...@@ -169,7 +169,7 @@ int cfg80211_mgd_wext_siwessid(struct net_device *dev, ...@@ -169,7 +169,7 @@ int cfg80211_mgd_wext_siwessid(struct net_device *dev,
struct iw_point *data, char *ssid) struct iw_point *data, char *ssid)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
size_t len = data->length; size_t len = data->length;
int err; int err;
...@@ -260,7 +260,7 @@ int cfg80211_mgd_wext_siwap(struct net_device *dev, ...@@ -260,7 +260,7 @@ int cfg80211_mgd_wext_siwap(struct net_device *dev,
struct sockaddr *ap_addr, char *extra) struct sockaddr *ap_addr, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
u8 *bssid = ap_addr->sa_data; u8 *bssid = ap_addr->sa_data;
int err; int err;
...@@ -333,7 +333,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev, ...@@ -333,7 +333,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev,
struct iw_point *data, char *extra) struct iw_point *data, char *extra)
{ {
struct wireless_dev *wdev = dev->ieee80211_ptr; struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
u8 *ie = extra; u8 *ie = extra;
int ie_len = data->length, err; int ie_len = data->length, err;
...@@ -390,7 +390,7 @@ int cfg80211_wext_siwmlme(struct net_device *dev, ...@@ -390,7 +390,7 @@ int cfg80211_wext_siwmlme(struct net_device *dev,
if (!wdev) if (!wdev)
return -EOPNOTSUPP; return -EOPNOTSUPP;
rdev = wiphy_to_dev(wdev->wiphy); rdev = wiphy_to_rdev(wdev->wiphy);
if (wdev->iftype != NL80211_IFTYPE_STATION) if (wdev->iftype != NL80211_IFTYPE_STATION)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment