diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /net/wireless/ethtool.c | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'net/wireless/ethtool.c')
-rw-r--r-- | net/wireless/ethtool.c | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/net/wireless/ethtool.c b/net/wireless/ethtool.c index 48c48ffafa1..9bde4d1d3e9 100644 --- a/net/wireless/ethtool.c +++ b/net/wireless/ethtool.c | |||
@@ -2,7 +2,6 @@ | |||
2 | #include <net/cfg80211.h> | 2 | #include <net/cfg80211.h> |
3 | #include "core.h" | 3 | #include "core.h" |
4 | #include "ethtool.h" | 4 | #include "ethtool.h" |
5 | #include "rdev-ops.h" | ||
6 | 5 | ||
7 | static void cfg80211_get_drvinfo(struct net_device *dev, | 6 | static void cfg80211_get_drvinfo(struct net_device *dev, |
8 | struct ethtool_drvinfo *info) | 7 | struct ethtool_drvinfo *info) |
@@ -48,8 +47,9 @@ static void cfg80211_get_ringparam(struct net_device *dev, | |||
48 | memset(rp, 0, sizeof(*rp)); | 47 | memset(rp, 0, sizeof(*rp)); |
49 | 48 | ||
50 | if (rdev->ops->get_ringparam) | 49 | if (rdev->ops->get_ringparam) |
51 | rdev_get_ringparam(rdev, &rp->tx_pending, &rp->tx_max_pending, | 50 | rdev->ops->get_ringparam(wdev->wiphy, |
52 | &rp->rx_pending, &rp->rx_max_pending); | 51 | &rp->tx_pending, &rp->tx_max_pending, |
52 | &rp->rx_pending, &rp->rx_max_pending); | ||
53 | } | 53 | } |
54 | 54 | ||
55 | static int cfg80211_set_ringparam(struct net_device *dev, | 55 | static int cfg80211_set_ringparam(struct net_device *dev, |
@@ -62,37 +62,12 @@ static int cfg80211_set_ringparam(struct net_device *dev, | |||
62 | return -EINVAL; | 62 | return -EINVAL; |
63 | 63 | ||
64 | if (rdev->ops->set_ringparam) | 64 | if (rdev->ops->set_ringparam) |
65 | return rdev_set_ringparam(rdev, rp->tx_pending, rp->rx_pending); | 65 | return rdev->ops->set_ringparam(wdev->wiphy, |
66 | rp->tx_pending, rp->rx_pending); | ||
66 | 67 | ||
67 | return -ENOTSUPP; | 68 | return -ENOTSUPP; |
68 | } | 69 | } |
69 | 70 | ||
70 | static int cfg80211_get_sset_count(struct net_device *dev, int sset) | ||
71 | { | ||
72 | struct wireless_dev *wdev = dev->ieee80211_ptr; | ||
73 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | ||
74 | if (rdev->ops->get_et_sset_count) | ||
75 | return rdev_get_et_sset_count(rdev, dev, sset); | ||
76 | return -EOPNOTSUPP; | ||
77 | } | ||
78 | |||
79 | static void cfg80211_get_stats(struct net_device *dev, | ||
80 | struct ethtool_stats *stats, u64 *data) | ||
81 | { | ||
82 | struct wireless_dev *wdev = dev->ieee80211_ptr; | ||
83 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | ||
84 | if (rdev->ops->get_et_stats) | ||
85 | rdev_get_et_stats(rdev, dev, stats, data); | ||
86 | } | ||
87 | |||
88 | static void cfg80211_get_strings(struct net_device *dev, u32 sset, u8 *data) | ||
89 | { | ||
90 | struct wireless_dev *wdev = dev->ieee80211_ptr; | ||
91 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); | ||
92 | if (rdev->ops->get_et_strings) | ||
93 | rdev_get_et_strings(rdev, dev, sset, data); | ||
94 | } | ||
95 | |||
96 | const struct ethtool_ops cfg80211_ethtool_ops = { | 71 | const struct ethtool_ops cfg80211_ethtool_ops = { |
97 | .get_drvinfo = cfg80211_get_drvinfo, | 72 | .get_drvinfo = cfg80211_get_drvinfo, |
98 | .get_regs_len = cfg80211_get_regs_len, | 73 | .get_regs_len = cfg80211_get_regs_len, |
@@ -100,7 +75,4 @@ const struct ethtool_ops cfg80211_ethtool_ops = { | |||
100 | .get_link = ethtool_op_get_link, | 75 | .get_link = ethtool_op_get_link, |
101 | .get_ringparam = cfg80211_get_ringparam, | 76 | .get_ringparam = cfg80211_get_ringparam, |
102 | .set_ringparam = cfg80211_set_ringparam, | 77 | .set_ringparam = cfg80211_set_ringparam, |
103 | .get_strings = cfg80211_get_strings, | ||
104 | .get_ethtool_stats = cfg80211_get_stats, | ||
105 | .get_sset_count = cfg80211_get_sset_count, | ||
106 | }; | 78 | }; |