diff options
author | Kalle Valo <kalle.valo@iki.fi> | 2010-02-07 03:21:00 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-08 16:50:59 -0500 |
commit | d1ace8e57a4e3af78767684c6f6b5f8b88417abb (patch) | |
tree | 5b2b311286010fd76abd159055f4cdab6417a4f2 | |
parent | 8ccbc3b8b0c919e8609560ca56cd777ece8d2c41 (diff) |
ar9170: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.
Because ar9170 uses ieee80211_tx_queue_stats internally, create a new
identical struct ar9170_tx_queue_stats which the driver can use.
Compile-tested only.
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Tested-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ar9170/ar9170.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ar9170/main.c | 13 |
2 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/ar9170/ar9170.h b/drivers/net/wireless/ath/ar9170/ar9170.h index b99a8c2053d8..8c8ce67971e9 100644 --- a/drivers/net/wireless/ath/ar9170/ar9170.h +++ b/drivers/net/wireless/ath/ar9170/ar9170.h | |||
@@ -144,6 +144,12 @@ struct ar9170_sta_tid { | |||
144 | bool active; | 144 | bool active; |
145 | }; | 145 | }; |
146 | 146 | ||
147 | struct ar9170_tx_queue_stats { | ||
148 | unsigned int len; | ||
149 | unsigned int limit; | ||
150 | unsigned int count; | ||
151 | }; | ||
152 | |||
147 | #define AR9170_QUEUE_TIMEOUT 64 | 153 | #define AR9170_QUEUE_TIMEOUT 64 |
148 | #define AR9170_TX_TIMEOUT 8 | 154 | #define AR9170_TX_TIMEOUT 8 |
149 | #define AR9170_BA_TIMEOUT 4 | 155 | #define AR9170_BA_TIMEOUT 4 |
@@ -211,7 +217,7 @@ struct ar9170 { | |||
211 | 217 | ||
212 | /* qos queue settings */ | 218 | /* qos queue settings */ |
213 | spinlock_t tx_stats_lock; | 219 | spinlock_t tx_stats_lock; |
214 | struct ieee80211_tx_queue_stats tx_stats[5]; | 220 | struct ar9170_tx_queue_stats tx_stats[5]; |
215 | struct ieee80211_tx_queue_params edcf[5]; | 221 | struct ieee80211_tx_queue_params edcf[5]; |
216 | 222 | ||
217 | spinlock_t cmdlock; | 223 | spinlock_t cmdlock; |
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index 4d27f7f67c76..91797cb6e0e8 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
@@ -2396,18 +2396,6 @@ static int ar9170_get_stats(struct ieee80211_hw *hw, | |||
2396 | return 0; | 2396 | return 0; |
2397 | } | 2397 | } |
2398 | 2398 | ||
2399 | static int ar9170_get_tx_stats(struct ieee80211_hw *hw, | ||
2400 | struct ieee80211_tx_queue_stats *tx_stats) | ||
2401 | { | ||
2402 | struct ar9170 *ar = hw->priv; | ||
2403 | |||
2404 | spin_lock_bh(&ar->tx_stats_lock); | ||
2405 | memcpy(tx_stats, ar->tx_stats, sizeof(tx_stats[0]) * hw->queues); | ||
2406 | spin_unlock_bh(&ar->tx_stats_lock); | ||
2407 | |||
2408 | return 0; | ||
2409 | } | ||
2410 | |||
2411 | static int ar9170_conf_tx(struct ieee80211_hw *hw, u16 queue, | 2399 | static int ar9170_conf_tx(struct ieee80211_hw *hw, u16 queue, |
2412 | const struct ieee80211_tx_queue_params *param) | 2400 | const struct ieee80211_tx_queue_params *param) |
2413 | { | 2401 | { |
@@ -2509,7 +2497,6 @@ static const struct ieee80211_ops ar9170_ops = { | |||
2509 | .set_key = ar9170_set_key, | 2497 | .set_key = ar9170_set_key, |
2510 | .sta_notify = ar9170_sta_notify, | 2498 | .sta_notify = ar9170_sta_notify, |
2511 | .get_stats = ar9170_get_stats, | 2499 | .get_stats = ar9170_get_stats, |
2512 | .get_tx_stats = ar9170_get_tx_stats, | ||
2513 | .ampdu_action = ar9170_ampdu_action, | 2500 | .ampdu_action = ar9170_ampdu_action, |
2514 | }; | 2501 | }; |
2515 | 2502 | ||