Lines Matching defs:stats

29 	struct cw1200_queue_stats *stats = queue->stats;
33 ieee80211_stop_queue(stats->priv->hw, queue->queue_id);
39 struct cw1200_queue_stats *stats = queue->stats;
44 ieee80211_wake_queue(stats->priv->hw, queue->queue_id);
67 static void cw1200_queue_post_gc(struct cw1200_queue_stats *stats,
74 stats->skb_dtor(stats->priv, item->skb, &item->txpriv);
93 struct cw1200_queue_stats *stats = queue->stats;
104 spin_lock_bh(&stats->lock);
105 --stats->num_queued;
106 if (!--stats->link_map_cache[iter->txpriv.link_id])
108 spin_unlock_bh(&stats->lock);
109 cw1200_debug_tx_ttl(stats->priv);
116 wake_up(&stats->wait_link_id_empty);
126 cw1200_pm_stay_awake(&stats->priv->pm_state,
141 cw1200_queue_post_gc(queue->stats, &list);
144 int cw1200_queue_stats_init(struct cw1200_queue_stats *stats,
149 memset(stats, 0, sizeof(*stats));
150 stats->map_capacity = map_capacity;
151 stats->skb_dtor = skb_dtor;
152 stats->priv = priv;
153 spin_lock_init(&stats->lock);
154 init_waitqueue_head(&stats->wait_link_id_empty);
156 stats->link_map_cache = kcalloc(map_capacity, sizeof(int),
158 if (!stats->link_map_cache)
165 struct cw1200_queue_stats *stats,
173 queue->stats = stats;
188 queue->link_map_cache = kcalloc(stats->map_capacity, sizeof(int),
206 struct cw1200_queue_stats *stats = queue->stats;
221 spin_lock_bh(&stats->lock);
222 for (i = 0; i < stats->map_capacity; ++i) {
223 stats->num_queued -= queue->link_map_cache[i];
224 stats->link_map_cache[i] -= queue->link_map_cache[i];
227 spin_unlock_bh(&stats->lock);
233 wake_up(&stats->wait_link_id_empty);
234 cw1200_queue_post_gc(stats, &gc_list);
238 void cw1200_queue_stats_deinit(struct cw1200_queue_stats *stats)
240 kfree(stats->link_map_cache);
241 stats->link_map_cache = NULL;
261 size_t map_capacity = queue->stats->map_capacity;
285 struct cw1200_queue_stats *stats = queue->stats;
287 if (txpriv->link_id >= queue->stats->map_capacity)
309 spin_lock_bh(&stats->lock);
310 ++stats->num_queued;
311 ++stats->link_map_cache[txpriv->link_id];
312 spin_unlock_bh(&stats->lock);
339 struct cw1200_queue_stats *stats = queue->stats;
360 spin_lock_bh(&stats->lock);
361 --stats->num_queued;
362 if (!--stats->link_map_cache[item->txpriv.link_id])
364 spin_unlock_bh(&stats->lock);
368 wake_up(&stats->wait_link_id_empty);
377 struct cw1200_queue_stats *stats = queue->stats;
398 spin_lock_bh(&stats->lock);
399 ++stats->num_queued;
400 ++stats->link_map_cache[item->txpriv.link_id];
401 spin_unlock_bh(&stats->lock);
417 struct cw1200_queue_stats *stats = queue->stats;
424 spin_lock_bh(&stats->lock);
425 ++stats->num_queued;
426 ++stats->link_map_cache[item->txpriv.link_id];
427 spin_unlock_bh(&stats->lock);
446 struct cw1200_queue_stats *stats = queue->stats;
487 stats->skb_dtor(stats->priv, gc_skb, &gc_txpriv);
557 bool cw1200_queue_stats_is_empty(struct cw1200_queue_stats *stats,
562 spin_lock_bh(&stats->lock);
564 empty = stats->num_queued == 0;
567 for (i = 0; i < stats->map_capacity; ++i) {
569 if (stats->link_map_cache[i]) {
576 spin_unlock_bh(&stats->lock);