diff options
author | Ivo van Doorn <IvDoorn@gmail.com> | 2011-04-18 09:34:41 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-19 15:40:04 -0400 |
commit | e7dee444263a103a9a2ac5fd5d0b5e9dc177d57c (patch) | |
tree | 928178a52ac28e79263b6c61838ffd47a365a089 /drivers/net | |
parent | 8d0a2dcfb6f965781cde6d9dfbd4540ab22a0eb9 (diff) |
rt2x00: Implement get_ringparam callback function
With the get_ringparam callback function we can export ring parameters
to ethtool through the mac80211 interface.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 1 |
9 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index d4acdde7c75a..bbe76f79b62e 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1720,6 +1720,7 @@ static const struct ieee80211_ops rt2400pci_mac80211_ops = { | |||
1720 | .tx_last_beacon = rt2400pci_tx_last_beacon, | 1720 | .tx_last_beacon = rt2400pci_tx_last_beacon, |
1721 | .rfkill_poll = rt2x00mac_rfkill_poll, | 1721 | .rfkill_poll = rt2x00mac_rfkill_poll, |
1722 | .flush = rt2x00mac_flush, | 1722 | .flush = rt2x00mac_flush, |
1723 | .get_ringparam = rt2x00mac_get_ringparam, | ||
1723 | }; | 1724 | }; |
1724 | 1725 | ||
1725 | static const struct rt2x00lib_ops rt2400pci_rt2x00_ops = { | 1726 | static const struct rt2x00lib_ops rt2400pci_rt2x00_ops = { |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 15f5649e2cae..6f489968e7a4 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -2013,6 +2013,7 @@ static const struct ieee80211_ops rt2500pci_mac80211_ops = { | |||
2013 | .tx_last_beacon = rt2500pci_tx_last_beacon, | 2013 | .tx_last_beacon = rt2500pci_tx_last_beacon, |
2014 | .rfkill_poll = rt2x00mac_rfkill_poll, | 2014 | .rfkill_poll = rt2x00mac_rfkill_poll, |
2015 | .flush = rt2x00mac_flush, | 2015 | .flush = rt2x00mac_flush, |
2016 | .get_ringparam = rt2x00mac_get_ringparam, | ||
2016 | }; | 2017 | }; |
2017 | 2018 | ||
2018 | static const struct rt2x00lib_ops rt2500pci_rt2x00_ops = { | 2019 | static const struct rt2x00lib_ops rt2500pci_rt2x00_ops = { |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index d88c36712ef0..5ef338671d73 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1823,6 +1823,7 @@ static const struct ieee80211_ops rt2500usb_mac80211_ops = { | |||
1823 | .conf_tx = rt2x00mac_conf_tx, | 1823 | .conf_tx = rt2x00mac_conf_tx, |
1824 | .rfkill_poll = rt2x00mac_rfkill_poll, | 1824 | .rfkill_poll = rt2x00mac_rfkill_poll, |
1825 | .flush = rt2x00mac_flush, | 1825 | .flush = rt2x00mac_flush, |
1826 | .get_ringparam = rt2x00mac_get_ringparam, | ||
1826 | }; | 1827 | }; |
1827 | 1828 | ||
1828 | static const struct rt2x00lib_ops rt2500usb_rt2x00_ops = { | 1829 | static const struct rt2x00lib_ops rt2500usb_rt2x00_ops = { |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index b0c729b25c73..08d3947fcb26 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -1028,6 +1028,7 @@ static const struct ieee80211_ops rt2800pci_mac80211_ops = { | |||
1028 | .ampdu_action = rt2800_ampdu_action, | 1028 | .ampdu_action = rt2800_ampdu_action, |
1029 | .flush = rt2x00mac_flush, | 1029 | .flush = rt2x00mac_flush, |
1030 | .get_survey = rt2800_get_survey, | 1030 | .get_survey = rt2800_get_survey, |
1031 | .get_ringparam = rt2x00mac_get_ringparam, | ||
1031 | }; | 1032 | }; |
1032 | 1033 | ||
1033 | static const struct rt2800_ops rt2800pci_rt2800_ops = { | 1034 | static const struct rt2800_ops rt2800pci_rt2800_ops = { |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 44ead759e20f..0d4e8fa3e1f8 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -673,6 +673,7 @@ static const struct ieee80211_ops rt2800usb_mac80211_ops = { | |||
673 | .ampdu_action = rt2800_ampdu_action, | 673 | .ampdu_action = rt2800_ampdu_action, |
674 | .flush = rt2x00mac_flush, | 674 | .flush = rt2x00mac_flush, |
675 | .get_survey = rt2800_get_survey, | 675 | .get_survey = rt2800_get_survey, |
676 | .get_ringparam = rt2x00mac_get_ringparam, | ||
676 | }; | 677 | }; |
677 | 678 | ||
678 | static const struct rt2800_ops rt2800usb_rt2800_ops = { | 679 | static const struct rt2800_ops rt2800usb_rt2800_ops = { |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index dcdc50d27ea0..f1d8f55d3ca8 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -1254,6 +1254,8 @@ int rt2x00mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
1254 | const struct ieee80211_tx_queue_params *params); | 1254 | const struct ieee80211_tx_queue_params *params); |
1255 | void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw); | 1255 | void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw); |
1256 | void rt2x00mac_flush(struct ieee80211_hw *hw, bool drop); | 1256 | void rt2x00mac_flush(struct ieee80211_hw *hw, bool drop); |
1257 | void rt2x00mac_get_ringparam(struct ieee80211_hw *hw, | ||
1258 | u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); | ||
1257 | 1259 | ||
1258 | /* | 1260 | /* |
1259 | * Driver allocation handlers. | 1261 | * Driver allocation handlers. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 4770156df1a8..6d1d38329e52 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -737,3 +737,19 @@ void rt2x00mac_flush(struct ieee80211_hw *hw, bool drop) | |||
737 | rt2x00queue_flush_queue(queue, drop); | 737 | rt2x00queue_flush_queue(queue, drop); |
738 | } | 738 | } |
739 | EXPORT_SYMBOL_GPL(rt2x00mac_flush); | 739 | EXPORT_SYMBOL_GPL(rt2x00mac_flush); |
740 | |||
741 | void rt2x00mac_get_ringparam(struct ieee80211_hw *hw, | ||
742 | u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max) | ||
743 | { | ||
744 | struct rt2x00_dev *rt2x00dev = hw->priv; | ||
745 | struct data_queue *queue; | ||
746 | |||
747 | tx_queue_for_each(rt2x00dev, queue) { | ||
748 | *tx += queue->length; | ||
749 | *tx_max += queue->limit; | ||
750 | } | ||
751 | |||
752 | *rx = rt2x00dev->rx->length; | ||
753 | *rx_max = rt2x00dev->rx->limit; | ||
754 | } | ||
755 | EXPORT_SYMBOL_GPL(rt2x00mac_get_ringparam); | ||
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index c5dccdb2f175..eb5403108394 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2979,6 +2979,7 @@ static const struct ieee80211_ops rt61pci_mac80211_ops = { | |||
2979 | .get_tsf = rt61pci_get_tsf, | 2979 | .get_tsf = rt61pci_get_tsf, |
2980 | .rfkill_poll = rt2x00mac_rfkill_poll, | 2980 | .rfkill_poll = rt2x00mac_rfkill_poll, |
2981 | .flush = rt2x00mac_flush, | 2981 | .flush = rt2x00mac_flush, |
2982 | .get_ringparam = rt2x00mac_get_ringparam, | ||
2982 | }; | 2983 | }; |
2983 | 2984 | ||
2984 | static const struct rt2x00lib_ops rt61pci_rt2x00_ops = { | 2985 | static const struct rt2x00lib_ops rt61pci_rt2x00_ops = { |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index be3eb5e894ef..bf7fea4cb961 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -2310,6 +2310,7 @@ static const struct ieee80211_ops rt73usb_mac80211_ops = { | |||
2310 | .get_tsf = rt73usb_get_tsf, | 2310 | .get_tsf = rt73usb_get_tsf, |
2311 | .rfkill_poll = rt2x00mac_rfkill_poll, | 2311 | .rfkill_poll = rt2x00mac_rfkill_poll, |
2312 | .flush = rt2x00mac_flush, | 2312 | .flush = rt2x00mac_flush, |
2313 | .get_ringparam = rt2x00mac_get_ringparam, | ||
2313 | }; | 2314 | }; |
2314 | 2315 | ||
2315 | static const struct rt2x00lib_ops rt73usb_rt2x00_ops = { | 2316 | static const struct rt2x00lib_ops rt73usb_rt2x00_ops = { |