Commit e35e4d28 authored by Hila Gonen's avatar Hila Gonen Committed by Johannes Berg
Browse files

cfg80211: add wrappers for registered_device_ops



This will allow adding central tracing like in mac80211.
Signed-off-by: default avatarHila Gonen <hila.gonen@intel.com>
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent de7044ee
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <net/cfg80211.h> #include <net/cfg80211.h>
#include "nl80211.h" #include "nl80211.h"
#include "core.h" #include "core.h"
#include "rdev-ops.h"
static int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev, static int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev,
...@@ -23,7 +24,7 @@ static int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev, ...@@ -23,7 +24,7 @@ static int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev,
if (!wdev->beacon_interval) if (!wdev->beacon_interval)
return -ENOENT; return -ENOENT;
err = rdev->ops->stop_ap(&rdev->wiphy, dev); err = rdev_stop_ap(rdev, dev);
if (!err) { if (!err) {
wdev->beacon_interval = 0; wdev->beacon_interval = 0;
wdev->channel = NULL; wdev->channel = NULL;
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/export.h> #include <linux/export.h>
#include <net/cfg80211.h> #include <net/cfg80211.h>
#include "core.h" #include "core.h"
#include "rdev-ops.h"
struct ieee80211_channel * struct ieee80211_channel *
rdev_freq_to_chan(struct cfg80211_registered_device *rdev, rdev_freq_to_chan(struct cfg80211_registered_device *rdev,
...@@ -92,7 +93,7 @@ int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev, ...@@ -92,7 +93,7 @@ int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev,
if (!chan) if (!chan)
return -EINVAL; return -EINVAL;
return rdev->ops->set_monitor_channel(&rdev->wiphy, chan, chantype); return rdev_set_monitor_channel(rdev, chan, chantype);
} }
void void
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "debugfs.h" #include "debugfs.h"
#include "wext-compat.h" #include "wext-compat.h"
#include "ethtool.h" #include "ethtool.h"
#include "rdev-ops.h"
/* name for sysfs, %d is appended */ /* name for sysfs, %d is appended */
#define PHY_NAME "phy" #define PHY_NAME "phy"
...@@ -216,7 +217,7 @@ static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data) ...@@ -216,7 +217,7 @@ static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data)
{ {
struct cfg80211_registered_device *rdev = data; struct cfg80211_registered_device *rdev = data;
rdev->ops->rfkill_poll(&rdev->wiphy); rdev_rfkill_poll(rdev);
} }
static int cfg80211_rfkill_set_block(void *data, bool blocked) static int cfg80211_rfkill_set_block(void *data, bool blocked)
...@@ -690,7 +691,7 @@ void wiphy_unregister(struct wiphy *wiphy) ...@@ -690,7 +691,7 @@ void wiphy_unregister(struct wiphy *wiphy)
flush_work(&rdev->event_work); flush_work(&rdev->event_work);
if (rdev->wowlan && rdev->ops->set_wakeup) if (rdev->wowlan && rdev->ops->set_wakeup)
rdev->ops->set_wakeup(&rdev->wiphy, false); rdev_set_wakeup(rdev, false);
cfg80211_rdev_free_wowlan(rdev); cfg80211_rdev_free_wowlan(rdev);
} }
EXPORT_SYMBOL(wiphy_unregister); EXPORT_SYMBOL(wiphy_unregister);
...@@ -964,9 +965,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb, ...@@ -964,9 +965,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
if ((wdev->iftype == NL80211_IFTYPE_STATION || if ((wdev->iftype == NL80211_IFTYPE_STATION ||
wdev->iftype == NL80211_IFTYPE_P2P_CLIENT) && wdev->iftype == NL80211_IFTYPE_P2P_CLIENT) &&
rdev->ops->set_power_mgmt) rdev->ops->set_power_mgmt)
if (rdev->ops->set_power_mgmt(wdev->wiphy, dev, if (rdev_set_power_mgmt(rdev, dev, wdev->ps,
wdev->ps, wdev->ps_timeout)) {
wdev->ps_timeout)) {
/* assume this means it's off */ /* assume this means it's off */
wdev->ps = false; wdev->ps = false;
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include <net/cfg80211.h> #include <net/cfg80211.h>
#include "core.h" #include "core.h"
#include "ethtool.h" #include "ethtool.h"
#include "rdev-ops.h"
static void cfg80211_get_drvinfo(struct net_device *dev, static void cfg80211_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info) struct ethtool_drvinfo *info)
...@@ -47,9 +48,8 @@ static void cfg80211_get_ringparam(struct net_device *dev, ...@@ -47,9 +48,8 @@ static void cfg80211_get_ringparam(struct net_device *dev,
memset(rp, 0, sizeof(*rp)); memset(rp, 0, sizeof(*rp));
if (rdev->ops->get_ringparam) if (rdev->ops->get_ringparam)
rdev->ops->get_ringparam(wdev->wiphy, rdev_get_ringparam(rdev, &rp->tx_pending, &rp->tx_max_pending,
&rp->tx_pending, &rp->tx_max_pending, &rp->rx_pending, &rp->rx_max_pending);
&rp->rx_pending, &rp->rx_max_pending);
} }
static int cfg80211_set_ringparam(struct net_device *dev, static int cfg80211_set_ringparam(struct net_device *dev,
...@@ -62,8 +62,7 @@ static int cfg80211_set_ringparam(struct net_device *dev, ...@@ -62,8 +62,7 @@ static int cfg80211_set_ringparam(struct net_device *dev,
return -EINVAL; return -EINVAL;
if (rdev->ops->set_ringparam) if (rdev->ops->set_ringparam)
return rdev->ops->set_ringparam(wdev->wiphy, return rdev_set_ringparam(rdev, rp->tx_pending, rp->rx_pending);
rp->tx_pending, rp->rx_pending);
return -ENOTSUPP; return -ENOTSUPP;
} }
...@@ -73,7 +72,7 @@ static int cfg80211_get_sset_count(struct net_device *dev, int sset) ...@@ -73,7 +72,7 @@ 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_dev(wdev->wiphy);
if (rdev->ops->get_et_sset_count) if (rdev->ops->get_et_sset_count)
return rdev->ops->get_et_sset_count(wdev->wiphy, dev, sset); return rdev_get_et_sset_count(rdev, dev, sset);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
...@@ -83,7 +82,7 @@ static void cfg80211_get_stats(struct net_device *dev, ...@@ -83,7 +82,7 @@ static void cfg80211_get_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_dev(wdev->wiphy);
if (rdev->ops->get_et_stats) if (rdev->ops->get_et_stats)
rdev->ops->get_et_stats(wdev->wiphy, dev, stats, data); rdev_get_et_stats(rdev, dev, stats, data);
} }
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)
...@@ -91,7 +90,7 @@ static void cfg80211_get_strings(struct net_device *dev, u32 sset, u8 *data) ...@@ -91,7 +90,7 @@ 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_dev(wdev->wiphy);
if (rdev->ops->get_et_strings) if (rdev->ops->get_et_strings)
rdev->ops->get_et_strings(wdev->wiphy, dev, sset, data); rdev_get_et_strings(rdev, dev, sset, data);
} }
const struct ethtool_ops cfg80211_ethtool_ops = { const struct ethtool_ops cfg80211_ethtool_ops = {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <net/cfg80211.h> #include <net/cfg80211.h>
#include "wext-compat.h" #include "wext-compat.h"
#include "nl80211.h" #include "nl80211.h"
#include "rdev-ops.h"
void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid) void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid)
...@@ -128,7 +129,7 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, ...@@ -128,7 +129,7 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
return err; return err;
} }
err = rdev->ops->join_ibss(&rdev->wiphy, dev, params); err = rdev_join_ibss(rdev, dev, params);
if (err) { if (err) {
wdev->connect_keys = NULL; wdev->connect_keys = NULL;
wdev->sme_state = CFG80211_SME_IDLE; wdev->sme_state = CFG80211_SME_IDLE;
...@@ -175,7 +176,7 @@ static void __cfg80211_clear_ibss(struct net_device *dev, bool nowext) ...@@ -175,7 +176,7 @@ static void __cfg80211_clear_ibss(struct net_device *dev, bool nowext)
*/ */
if (rdev->ops->del_key) if (rdev->ops->del_key)
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
rdev->ops->del_key(wdev->wiphy, dev, i, false, NULL); rdev_del_key(rdev, dev, i, false, NULL);
if (wdev->current_bss) { if (wdev->current_bss) {
cfg80211_unhold_bss(wdev->current_bss); cfg80211_unhold_bss(wdev->current_bss);
...@@ -211,7 +212,7 @@ int __cfg80211_leave_ibss(struct cfg80211_registered_device *rdev, ...@@ -211,7 +212,7 @@ int __cfg80211_leave_ibss(struct cfg80211_registered_device *rdev,
if (!wdev->ssid_len) if (!wdev->ssid_len)
return -ENOLINK; return -ENOLINK;
err = rdev->ops->leave_ibss(&rdev->wiphy, dev); err = rdev_leave_ibss(rdev, dev);
if (err) if (err)
return err; return err;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <net/cfg80211.h> #include <net/cfg80211.h>
#include "nl80211.h" #include "nl80211.h"
#include "core.h" #include "core.h"
#include "rdev-ops.h"
/* Default values, timeouts in ms */ /* Default values, timeouts in ms */
#define MESH_TTL 31 #define MESH_TTL 31
...@@ -160,7 +161,7 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev, ...@@ -160,7 +161,7 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
if (err) if (err)
return err; return err;
err = rdev->ops->join_mesh(&rdev->wiphy, dev, conf, setup); err = rdev_join_mesh(rdev, dev, conf, setup);
if (!err) { if (!err) {
memcpy(wdev->ssid, setup->mesh_id, setup->mesh_id_len); memcpy(wdev->ssid, setup->mesh_id, setup->mesh_id_len);
wdev->mesh_id_len = setup->mesh_id_len; wdev->mesh_id_len = setup->mesh_id_len;
...@@ -220,9 +221,8 @@ int cfg80211_set_mesh_freq(struct cfg80211_registered_device *rdev, ...@@ -220,9 +221,8 @@ int cfg80211_set_mesh_freq(struct cfg80211_registered_device *rdev,
if (err) if (err)
return err; return err;
err = rdev->ops->libertas_set_mesh_channel(&rdev->wiphy, err = rdev_libertas_set_mesh_channel(rdev, wdev->netdev,
wdev->netdev, channel);
channel);
if (!err) if (!err)
wdev->channel = channel; wdev->channel = channel;
...@@ -267,7 +267,7 @@ static int __cfg80211_leave_mesh(struct cfg80211_registered_device *rdev, ...@@ -267,7 +267,7 @@ static int __cfg80211_leave_mesh(struct cfg80211_registered_device *rdev,
if (!wdev->mesh_id_len) if (!wdev->mesh_id_len)
return -ENOTCONN; return -ENOTCONN;
err = rdev->ops->leave_mesh(&rdev->wiphy, dev); err = rdev_leave_mesh(rdev, dev);
if (!err) { if (!err) {
wdev->mesh_id_len = 0; wdev->mesh_id_len = 0;
wdev->channel = NULL; wdev->channel = NULL;
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#include <net/iw_handler.h> #include <net/iw_handler.h>
#include "core.h" #include "core.h"
#include "nl80211.h" #include "nl80211.h"
#include "rdev-ops.h"
void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len) void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len)
{ {
...@@ -310,7 +312,7 @@ int __cfg80211_mlme_auth(struct cfg80211_registered_device *rdev, ...@@ -310,7 +312,7 @@ int __cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
if (err) if (err)
goto out; goto out;
err = rdev->ops->auth(&rdev->wiphy, dev, &req); err = rdev_auth(rdev, dev, &req);
out: out:
cfg80211_put_bss(req.bss); cfg80211_put_bss(req.bss);
...@@ -415,7 +417,7 @@ int __cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev, ...@@ -415,7 +417,7 @@ int __cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev,
if (err) if (err)
goto out; goto out;
err = rdev->ops->assoc(&rdev->wiphy, dev, &req); err = rdev_assoc(rdev, dev, &req);
out: out:
if (err) { if (err) {
...@@ -477,7 +479,7 @@ int __cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev, ...@@ -477,7 +479,7 @@ int __cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev,
return 0; return 0;
} }
return rdev->ops->deauth(&rdev->wiphy, dev, &req); return rdev_deauth(rdev, dev, &req);
} }
int cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev, int cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev,
...@@ -522,7 +524,7 @@ static int __cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev, ...@@ -522,7 +524,7 @@ static int __cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev,
else else
return -ENOTCONN; return -ENOTCONN;
return rdev->ops->disassoc(&rdev->wiphy, dev, &req); return rdev_disassoc(rdev, dev, &req);
} }
int cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev, int cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev,
...@@ -563,7 +565,7 @@ void cfg80211_mlme_down(struct cfg80211_registered_device *rdev, ...@@ -563,7 +565,7 @@ void cfg80211_mlme_down(struct cfg80211_registered_device *rdev,
memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN); memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN);
req.bssid = bssid; req.bssid = bssid;
rdev->ops->deauth(&rdev->wiphy, dev, &req); rdev_deauth(rdev, dev, &req);
if (wdev->current_bss) { if (wdev->current_bss) {
cfg80211_unhold_bss(wdev->current_bss); cfg80211_unhold_bss(wdev->current_bss);
...@@ -693,7 +695,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, ...@@ -693,7 +695,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid,
list_add(&nreg->list, &wdev->mgmt_registrations); list_add(&nreg->list, &wdev->mgmt_registrations);
if (rdev->ops->mgmt_frame_register) if (rdev->ops->mgmt_frame_register)
rdev->ops->mgmt_frame_register(wiphy, wdev, frame_type, true); rdev_mgmt_frame_register(rdev, wdev, frame_type, true);
out: out:
spin_unlock_bh(&wdev->mgmt_registrations_lock); spin_unlock_bh(&wdev->mgmt_registrations_lock);
...@@ -716,8 +718,8 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid) ...@@ -716,8 +718,8 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid)
if (rdev->ops->mgmt_frame_register) { if (rdev->ops->mgmt_frame_register) {
u16 frame_type = le16_to_cpu(reg->frame_type); u16 frame_type = le16_to_cpu(reg->frame_type);
rdev->ops->mgmt_frame_register(wiphy, wdev, rdev_mgmt_frame_register(rdev, wdev,
frame_type, false); frame_type, false);
} }
list_del(&reg->list); list_del(&reg->list);
...@@ -843,10 +845,10 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, ...@@ -843,10 +845,10 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
return -EINVAL; return -EINVAL;
/* Transmit the Action frame as requested by user space */ /* Transmit the Action frame as requested by user space */
return rdev->ops->mgmt_tx(&rdev->wiphy, wdev, chan, offchan, return rdev_mgmt_tx(rdev, wdev, chan, offchan,
channel_type, channel_type_valid, channel_type, channel_type_valid,
wait, buf, len, no_cck, dont_wait_for_ack, wait, buf, len, no_cck, dont_wait_for_ack,
cookie); cookie);
} }
bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm,
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "core.h" #include "core.h"
#include "nl80211.h" #include "nl80211.h"
#include "reg.h" #include "reg.h"
#include "rdev-ops.h"
static int nl80211_crypto_settings(struct cfg80211_registered_device *rdev, static int nl80211_crypto_settings(struct cfg80211_registered_device *rdev,
struct genl_info *info, struct genl_info *info,
...@@ -951,7 +952,7 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 portid, u32 seq, int flag ...@@ -951,7 +952,7 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 portid, u32 seq, int flag
dev->wiphy.available_antennas_rx) && dev->ops->get_antenna) { dev->wiphy.available_antennas_rx) && dev->ops->get_antenna) {
u32 tx_ant = 0, rx_ant = 0; u32 tx_ant = 0, rx_ant = 0;
int res; int res;
res = dev->ops->get_antenna(&dev->wiphy, &tx_ant, &rx_ant); res = rdev_get_antenna(dev, &tx_ant, &rx_ant);
if (!res) { if (!res) {
if (nla_put_u32(msg, NL80211_ATTR_WIPHY_ANTENNA_TX, if (nla_put_u32(msg, NL80211_ATTR_WIPHY_ANTENNA_TX,
tx_ant) || tx_ant) ||
...@@ -1465,7 +1466,7 @@ static int nl80211_set_wds_peer(struct sk_buff *skb, struct genl_info *info) ...@@ -1465,7 +1466,7 @@ static int nl80211_set_wds_peer(struct sk_buff *skb, struct genl_info *info)
return -EOPNOTSUPP; return -EOPNOTSUPP;
bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); bssid = nla_data(info->attrs[NL80211_ATTR_MAC]);
return rdev->ops->set_wds_peer(wdev->wiphy, dev, bssid); return rdev_set_wds_peer(rdev, dev, bssid);
} }
...@@ -1570,9 +1571,8 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) ...@@ -1570,9 +1571,8 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
if (result) if (result)
goto bad_res; goto bad_res;
result = rdev->ops->set_txq_params(&rdev->wiphy, result = rdev_set_txq_params(rdev, netdev,
netdev, &txq_params);
&txq_params);
if (result) if (result)
goto bad_res; goto bad_res;
} }
...@@ -1607,7 +1607,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) ...@@ -1607,7 +1607,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
mbm = nla_get_u32(info->attrs[idx]); mbm = nla_get_u32(info->attrs[idx]);
} }
result = rdev->ops->set_tx_power(&rdev->wiphy, type, mbm); result = rdev_set_tx_power(rdev, type, mbm);
if (result) if (result)
goto bad_res; goto bad_res;
} }
...@@ -1636,7 +1636,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) ...@@ -1636,7 +1636,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
tx_ant = tx_ant & rdev->wiphy.available_antennas_tx; tx_ant = tx_ant & rdev->wiphy.available_antennas_tx;
rx_ant = rx_ant & rdev->wiphy.available_antennas_rx; rx_ant = rx_ant & rdev->wiphy.available_antennas_rx;
result = rdev->ops->set_antenna(&rdev->wiphy, tx_ant, rx_ant); result = rdev_set_antenna(rdev, tx_ant, rx_ant);
if (result) if (result)
goto bad_res; goto bad_res;
} }
...@@ -1721,7 +1721,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) ...@@ -1721,7 +1721,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
if (changed & WIPHY_PARAM_COVERAGE_CLASS) if (changed & WIPHY_PARAM_COVERAGE_CLASS)
rdev->wiphy.coverage_class = coverage_class; rdev->wiphy.coverage_class = coverage_class;
result = rdev->ops->set_wiphy_params(&rdev->wiphy, changed); result = rdev_set_wiphy_params(rdev, changed);
if (result) { if (result) {
rdev->wiphy.retry_short = old_retry_short; rdev->wiphy.retry_short = old_retry_short;
rdev->wiphy.retry_long = old_retry_long; rdev->wiphy.retry_long = old_retry_long;
...@@ -1773,8 +1773,7 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag ...@@ -1773,8 +1773,7 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
struct ieee80211_channel *chan; struct ieee80211_channel *chan;
enum nl80211_channel_type channel_type; enum nl80211_channel_type channel_type;
chan = rdev->ops->get_channel(&rdev->wiphy, wdev, chan = rdev_get_channel(rdev, wdev, &channel_type);
&channel_type);
if (chan && if (chan &&
(nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ,
chan->center_freq) || chan->center_freq) ||
...@@ -2022,9 +2021,9 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info) ...@@ -2022,9 +2021,9 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
err = parse_monitor_flags(type == NL80211_IFTYPE_MONITOR ? err = parse_monitor_flags(type == NL80211_IFTYPE_MONITOR ?
info->attrs[NL80211_ATTR_MNTR_FLAGS] : NULL, info->attrs[NL80211_ATTR_MNTR_FLAGS] : NULL,
&flags); &flags);
wdev = rdev->ops->add_virtual_intf(&rdev->wiphy, wdev = rdev_add_virtual_intf(rdev,
nla_data(info->attrs[NL80211_ATTR_IFNAME]), nla_data(info->attrs[NL80211_ATTR_IFNAME]),
type, err ? NULL : &flags, &params); type, err ? NULL : &flags, &params);
if (IS_ERR(wdev)) { if (IS_ERR(wdev)) {
nlmsg_free(msg); nlmsg_free(msg);
return PTR_ERR(wdev); return PTR_ERR(wdev);
...@@ -2091,7 +2090,7 @@ static int nl80211_del_interface(struct sk_buff *skb, struct genl_info *info) ...@@ -2091,7 +2090,7 @@ static int nl80211_del_interface(struct sk_buff *skb, struct genl_info *info)
if (!wdev->netdev) if (!wdev->netdev)
info->user_ptr[1] = NULL; info->user_ptr[1] = NULL;
return rdev->ops->del_virtual_intf(&rdev->wiphy, wdev); return rdev_del_virtual_intf(rdev, wdev);
} }
static int nl80211_set_noack_map(struct sk_buff *skb, struct genl_info *info) static int nl80211_set_noack_map(struct sk_buff *skb, struct genl_info *info)
...@@ -2108,7 +2107,7 @@ static int nl80211_set_noack_map(struct sk_buff *skb, struct genl_info *info) ...@@ -2108,7 +2107,7 @@ static int nl80211_set_noack_map(struct sk_buff *skb, struct genl_info *info)
noack_map = nla_get_u16(info->attrs[NL80211_ATTR_NOACK_MAP]); noack_map = nla_get_u16(info->attrs[NL80211_ATTR_NOACK_MAP]);
return rdev->ops->set_noack_map(&rdev->wiphy, dev, noack_map); return rdev_set_noack_map(rdev, dev, noack_map);
} }
struct get_key_cookie { struct get_key_cookie {
...@@ -2218,8 +2217,8 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) ...@@ -2218,8 +2217,8 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
!(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN)) !(rdev->wiphy.flags & WIPHY_FLAG_IBSS_RSN))
return -ENOENT; return -ENOENT;
err = rdev->ops->get_key(&rdev->wiphy, dev, key_idx, pairwise, err = rdev_get_key(rdev, dev, key_idx, pairwise, mac_addr, &cookie,
mac_addr, &cookie, get_key_callback); get_key_callback);
if (err) if (err)
goto free_msg; goto free_msg;
...@@ -2267,7 +2266,7 @@ static int nl80211_set_key(struct sk_buff *skb, struct genl_info *info) ...@@ -2267,7 +2266,7 @@ static int nl80211_set_key(struct sk_buff *skb, struct genl_info *info)
if (err) if (err)
goto out; goto out;
err = rdev->ops->set_default_key(&rdev->wiphy, dev, key.idx, err = rdev_set_default_key(rdev, dev, key.idx,
key.def_uni, key.def_multi); key.def_uni, key.def_multi);