cfg80211: make ethtool the driver's responsibility

Currently, cfg80211 tries to implement ethtool, but that doesn't
really scale well, with all the different operations. Make the
lower-level driver responsible for it, which currently only has
an effect on mac80211. It will similarly not scale well at that
level though, since mac80211 also has many drivers.

To cleanly implement this in mac80211, introduce a new file and
move some code to appropriate places.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg
2014-06-04 17:31:56 +02:00
parent ba9030c20a
commit b7ffbd7ef6
13 changed files with 391 additions and 555 deletions

View File

@@ -714,25 +714,6 @@ static inline int rdev_get_antenna(struct cfg80211_registered_device *rdev,
return ret;
}
static inline int rdev_set_ringparam(struct cfg80211_registered_device *rdev,
u32 tx, u32 rx)
{
int ret;
trace_rdev_set_ringparam(&rdev->wiphy, tx, rx);
ret = rdev->ops->set_ringparam(&rdev->wiphy, tx, rx);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
static inline void rdev_get_ringparam(struct cfg80211_registered_device *rdev,
u32 *tx, u32 *tx_max, u32 *rx,
u32 *rx_max)
{
trace_rdev_get_ringparam(&rdev->wiphy);
rdev->ops->get_ringparam(&rdev->wiphy, tx, tx_max, rx, rx_max);
trace_rdev_return_void_tx_rx(&rdev->wiphy, *tx, *tx_max, *rx, *rx_max);
}
static inline int
rdev_sched_scan_start(struct cfg80211_registered_device *rdev,
struct net_device *dev,
@@ -815,35 +796,6 @@ static inline int rdev_set_noack_map(struct cfg80211_registered_device *rdev,
return ret;
}
static inline int
rdev_get_et_sset_count(struct cfg80211_registered_device *rdev,
struct net_device *dev, int sset)
{
int ret;
trace_rdev_get_et_sset_count(&rdev->wiphy, dev, sset);
ret = rdev->ops->get_et_sset_count(&rdev->wiphy, dev, sset);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
static inline void rdev_get_et_stats(struct cfg80211_registered_device *rdev,
struct net_device *dev,
struct ethtool_stats *stats, u64 *data)
{
trace_rdev_get_et_stats(&rdev->wiphy, dev);
rdev->ops->get_et_stats(&rdev->wiphy, dev, stats, data);
trace_rdev_return_void(&rdev->wiphy);
}
static inline void rdev_get_et_strings(struct cfg80211_registered_device *rdev,
struct net_device *dev, u32 sset,
u8 *data)
{
trace_rdev_get_et_strings(&rdev->wiphy, dev, sset);
rdev->ops->get_et_strings(&rdev->wiphy, dev, sset, data);
trace_rdev_return_void(&rdev->wiphy);
}
static inline int
rdev_get_channel(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev,