diff options
author | Ivo van Doorn <IvDoorn@gmail.com> | 2011-04-18 15:34:41 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-19 15:40:04 -0400 |
commit | e7dee444263a103a9a2ac5fd5d0b5e9dc177d57c (patch) | |
tree | 928178a52ac28e79263b6c61838ffd47a365a089 /drivers/net/wireless/rt2x00/rt2x00mac.c | |
parent | 8d0a2dcfb6f965781cde6d9dfbd4540ab22a0eb9 (diff) | |
download | blackbird-obmc-linux-e7dee444263a103a9a2ac5fd5d0b5e9dc177d57c.tar.gz blackbird-obmc-linux-e7dee444263a103a9a2ac5fd5d0b5e9dc177d57c.zip |
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/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 16 |
1 files changed, 16 insertions, 0 deletions
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) rt2x00queue_flush_queue(queue, drop); } EXPORT_SYMBOL_GPL(rt2x00mac_flush); + +void rt2x00mac_get_ringparam(struct ieee80211_hw *hw, + u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max) +{ + struct rt2x00_dev *rt2x00dev = hw->priv; + struct data_queue *queue; + + tx_queue_for_each(rt2x00dev, queue) { + *tx += queue->length; + *tx_max += queue->limit; + } + + *rx = rt2x00dev->rx->length; + *rx_max = rt2x00dev->rx->limit; +} +EXPORT_SYMBOL_GPL(rt2x00mac_get_ringparam); |