diff options
author | Kalle Valo <kalle.valo@iki.fi> | 2010-02-07 03:20:52 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-08 16:50:59 -0500 |
commit | 8ccbc3b8b0c919e8609560ca56cd777ece8d2c41 (patch) | |
tree | d9a2eac97d46092766704534536d685809e61f8f /drivers | |
parent | 4046fe66ce74b66b553035c57c892f4715e074db (diff) |
mwl8k: remove get_tx_stats() mac80211 op
get_tx_stats() will be removed from mac80211.
mwl8k used struct ieee80211_tx_queue_stats internally to track the queue
lenght. Replace struct ieee80211_tx_queue_stats with a simple len field
in struct mwl8k_tx_queue. Limit and count fields seemed to be unused.
Compile-tested only.
Cc: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index f0f08f3919cc..0cfdb9db66f7 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -119,7 +119,7 @@ struct mwl8k_tx_queue { | |||
119 | /* sw appends here */ | 119 | /* sw appends here */ |
120 | int tail; | 120 | int tail; |
121 | 121 | ||
122 | struct ieee80211_tx_queue_stats stats; | 122 | unsigned int len; |
123 | struct mwl8k_tx_desc *txd; | 123 | struct mwl8k_tx_desc *txd; |
124 | dma_addr_t txd_dma; | 124 | dma_addr_t txd_dma; |
125 | struct sk_buff **skb; | 125 | struct sk_buff **skb; |
@@ -1136,8 +1136,7 @@ static int mwl8k_txq_init(struct ieee80211_hw *hw, int index) | |||
1136 | int size; | 1136 | int size; |
1137 | int i; | 1137 | int i; |
1138 | 1138 | ||
1139 | memset(&txq->stats, 0, sizeof(struct ieee80211_tx_queue_stats)); | 1139 | txq->len = 0; |
1140 | txq->stats.limit = MWL8K_TX_DESCS; | ||
1141 | txq->head = 0; | 1140 | txq->head = 0; |
1142 | txq->tail = 0; | 1141 | txq->tail = 0; |
1143 | 1142 | ||
@@ -1213,7 +1212,7 @@ static void mwl8k_dump_tx_rings(struct ieee80211_hw *hw) | |||
1213 | printk(KERN_ERR "%s: txq[%d] len=%d head=%d tail=%d " | 1212 | printk(KERN_ERR "%s: txq[%d] len=%d head=%d tail=%d " |
1214 | "fw_owned=%d drv_owned=%d unused=%d\n", | 1213 | "fw_owned=%d drv_owned=%d unused=%d\n", |
1215 | wiphy_name(hw->wiphy), i, | 1214 | wiphy_name(hw->wiphy), i, |
1216 | txq->stats.len, txq->head, txq->tail, | 1215 | txq->len, txq->head, txq->tail, |
1217 | fw_owned, drv_owned, unused); | 1216 | fw_owned, drv_owned, unused); |
1218 | } | 1217 | } |
1219 | } | 1218 | } |
@@ -1299,7 +1298,7 @@ mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int limit, int force) | |||
1299 | int processed; | 1298 | int processed; |
1300 | 1299 | ||
1301 | processed = 0; | 1300 | processed = 0; |
1302 | while (txq->stats.len > 0 && limit--) { | 1301 | while (txq->len > 0 && limit--) { |
1303 | int tx; | 1302 | int tx; |
1304 | struct mwl8k_tx_desc *tx_desc; | 1303 | struct mwl8k_tx_desc *tx_desc; |
1305 | unsigned long addr; | 1304 | unsigned long addr; |
@@ -1321,8 +1320,8 @@ mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int limit, int force) | |||
1321 | } | 1320 | } |
1322 | 1321 | ||
1323 | txq->head = (tx + 1) % MWL8K_TX_DESCS; | 1322 | txq->head = (tx + 1) % MWL8K_TX_DESCS; |
1324 | BUG_ON(txq->stats.len == 0); | 1323 | BUG_ON(txq->len == 0); |
1325 | txq->stats.len--; | 1324 | txq->len--; |
1326 | priv->pending_tx_pkts--; | 1325 | priv->pending_tx_pkts--; |
1327 | 1326 | ||
1328 | addr = le32_to_cpu(tx_desc->pkt_phys_addr); | 1327 | addr = le32_to_cpu(tx_desc->pkt_phys_addr); |
@@ -1454,8 +1453,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) | |||
1454 | wmb(); | 1453 | wmb(); |
1455 | tx->status = cpu_to_le32(MWL8K_TXD_STATUS_FW_OWNED | txstatus); | 1454 | tx->status = cpu_to_le32(MWL8K_TXD_STATUS_FW_OWNED | txstatus); |
1456 | 1455 | ||
1457 | txq->stats.count++; | 1456 | txq->len++; |
1458 | txq->stats.len++; | ||
1459 | priv->pending_tx_pkts++; | 1457 | priv->pending_tx_pkts++; |
1460 | 1458 | ||
1461 | txq->tail++; | 1459 | txq->tail++; |
@@ -3818,24 +3816,6 @@ static int mwl8k_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
3818 | return rc; | 3816 | return rc; |
3819 | } | 3817 | } |
3820 | 3818 | ||
3821 | static int mwl8k_get_tx_stats(struct ieee80211_hw *hw, | ||
3822 | struct ieee80211_tx_queue_stats *stats) | ||
3823 | { | ||
3824 | struct mwl8k_priv *priv = hw->priv; | ||
3825 | struct mwl8k_tx_queue *txq; | ||
3826 | int index; | ||
3827 | |||
3828 | spin_lock_bh(&priv->tx_lock); | ||
3829 | for (index = 0; index < MWL8K_TX_QUEUES; index++) { | ||
3830 | txq = priv->txq + index; | ||
3831 | memcpy(&stats[index], &txq->stats, | ||
3832 | sizeof(struct ieee80211_tx_queue_stats)); | ||
3833 | } | ||
3834 | spin_unlock_bh(&priv->tx_lock); | ||
3835 | |||
3836 | return 0; | ||
3837 | } | ||
3838 | |||
3839 | static int mwl8k_get_stats(struct ieee80211_hw *hw, | 3819 | static int mwl8k_get_stats(struct ieee80211_hw *hw, |
3840 | struct ieee80211_low_level_stats *stats) | 3820 | struct ieee80211_low_level_stats *stats) |
3841 | { | 3821 | { |
@@ -3871,7 +3851,6 @@ static const struct ieee80211_ops mwl8k_ops = { | |||
3871 | .set_rts_threshold = mwl8k_set_rts_threshold, | 3851 | .set_rts_threshold = mwl8k_set_rts_threshold, |
3872 | .sta_notify = mwl8k_sta_notify, | 3852 | .sta_notify = mwl8k_sta_notify, |
3873 | .conf_tx = mwl8k_conf_tx, | 3853 | .conf_tx = mwl8k_conf_tx, |
3874 | .get_tx_stats = mwl8k_get_tx_stats, | ||
3875 | .get_stats = mwl8k_get_stats, | 3854 | .get_stats = mwl8k_get_stats, |
3876 | .ampdu_action = mwl8k_ampdu_action, | 3855 | .ampdu_action = mwl8k_ampdu_action, |
3877 | }; | 3856 | }; |