Lines Matching refs:stats

28 	struct cw1200_queue_stats *stats = queue->stats;
32 ieee80211_stop_queue(stats->priv->hw, queue->queue_id);
38 struct cw1200_queue_stats *stats = queue->stats;
43 ieee80211_wake_queue(stats->priv->hw, queue->queue_id);
66 static void cw1200_queue_post_gc(struct cw1200_queue_stats *stats,
73 stats->skb_dtor(stats->priv, item->skb, &item->txpriv);
92 struct cw1200_queue_stats *stats = queue->stats;
101 spin_lock_bh(&stats->lock);
102 --stats->num_queued;
103 if (!--stats->link_map_cache[item->txpriv.link_id])
105 spin_unlock_bh(&stats->lock);
106 cw1200_debug_tx_ttl(stats->priv);
113 wake_up(&stats->wait_link_id_empty);
123 cw1200_pm_stay_awake(&stats->priv->pm_state,
138 cw1200_queue_post_gc(queue->stats, &list);
141 int cw1200_queue_stats_init(struct cw1200_queue_stats *stats,
146 memset(stats, 0, sizeof(*stats));
147 stats->map_capacity = map_capacity;
148 stats->skb_dtor = skb_dtor;
149 stats->priv = priv;
150 spin_lock_init(&stats->lock);
151 init_waitqueue_head(&stats->wait_link_id_empty);
153 stats->link_map_cache = kcalloc(map_capacity, sizeof(int),
155 if (!stats->link_map_cache)
162 struct cw1200_queue_stats *stats,
170 queue->stats = stats;
185 queue->link_map_cache = kcalloc(stats->map_capacity, sizeof(int),
203 struct cw1200_queue_stats *stats = queue->stats;
218 spin_lock_bh(&stats->lock);
219 for (i = 0; i < stats->map_capacity; ++i) {
220 stats->num_queued -= queue->link_map_cache[i];
221 stats->link_map_cache[i] -= queue->link_map_cache[i];
224 spin_unlock_bh(&stats->lock);
230 wake_up(&stats->wait_link_id_empty);
231 cw1200_queue_post_gc(stats, &gc_list);
235 void cw1200_queue_stats_deinit(struct cw1200_queue_stats *stats)
237 kfree(stats->link_map_cache);
238 stats->link_map_cache = NULL;
258 size_t map_capacity = queue->stats->map_capacity;
282 struct cw1200_queue_stats *stats = queue->stats;
284 if (txpriv->link_id >= queue->stats->map_capacity)
306 spin_lock_bh(&stats->lock);
307 ++stats->num_queued;
308 ++stats->link_map_cache[txpriv->link_id];
309 spin_unlock_bh(&stats->lock);
336 struct cw1200_queue_stats *stats = queue->stats;
357 spin_lock_bh(&stats->lock);
358 --stats->num_queued;
359 if (!--stats->link_map_cache[item->txpriv.link_id])
361 spin_unlock_bh(&stats->lock);
365 wake_up(&stats->wait_link_id_empty);
374 struct cw1200_queue_stats *stats = queue->stats;
395 spin_lock_bh(&stats->lock);
396 ++stats->num_queued;
397 ++stats->link_map_cache[item->txpriv.link_id];
398 spin_unlock_bh(&stats->lock);
414 struct cw1200_queue_stats *stats = queue->stats;
421 spin_lock_bh(&stats->lock);
422 ++stats->num_queued;
423 ++stats->link_map_cache[item->txpriv.link_id];
424 spin_unlock_bh(&stats->lock);
443 struct cw1200_queue_stats *stats = queue->stats;
484 stats->skb_dtor(stats->priv, gc_skb, &gc_txpriv);
554 bool cw1200_queue_stats_is_empty(struct cw1200_queue_stats *stats,
559 spin_lock_bh(&stats->lock);
561 empty = stats->num_queued == 0;
564 for (i = 0; i < stats->map_capacity; ++i) {
566 if (stats->link_map_cache[i]) {
573 spin_unlock_bh(&stats->lock);