Lines Matching full:stats

29 	struct cw1200_queue_stats *stats = queue->stats;  in __cw1200_queue_lock()  local
33 ieee80211_stop_queue(stats->priv->hw, queue->queue_id); in __cw1200_queue_lock()
39 struct cw1200_queue_stats *stats = queue->stats; in __cw1200_queue_unlock() local
44 ieee80211_wake_queue(stats->priv->hw, queue->queue_id); in __cw1200_queue_unlock()
67 static void cw1200_queue_post_gc(struct cw1200_queue_stats *stats, in cw1200_queue_post_gc() argument
74 stats->skb_dtor(stats->priv, item->skb, &item->txpriv); in cw1200_queue_post_gc()
93 struct cw1200_queue_stats *stats = queue->stats; in __cw1200_queue_gc() local
104 spin_lock_bh(&stats->lock); in __cw1200_queue_gc()
105 --stats->num_queued; in __cw1200_queue_gc()
106 if (!--stats->link_map_cache[iter->txpriv.link_id]) in __cw1200_queue_gc()
108 spin_unlock_bh(&stats->lock); in __cw1200_queue_gc()
109 cw1200_debug_tx_ttl(stats->priv); in __cw1200_queue_gc()
116 wake_up(&stats->wait_link_id_empty); in __cw1200_queue_gc()
126 cw1200_pm_stay_awake(&stats->priv->pm_state, in __cw1200_queue_gc()
141 cw1200_queue_post_gc(queue->stats, &list); in cw1200_queue_gc()
144 int cw1200_queue_stats_init(struct cw1200_queue_stats *stats, in cw1200_queue_stats_init() argument
149 memset(stats, 0, sizeof(*stats)); in cw1200_queue_stats_init()
150 stats->map_capacity = map_capacity; in cw1200_queue_stats_init()
151 stats->skb_dtor = skb_dtor; in cw1200_queue_stats_init()
152 stats->priv = priv; in cw1200_queue_stats_init()
153 spin_lock_init(&stats->lock); in cw1200_queue_stats_init()
154 init_waitqueue_head(&stats->wait_link_id_empty); in cw1200_queue_stats_init()
156 stats->link_map_cache = kzalloc_objs(int, map_capacity); in cw1200_queue_stats_init()
157 if (!stats->link_map_cache) in cw1200_queue_stats_init()
164 struct cw1200_queue_stats *stats, in cw1200_queue_init() argument
172 queue->stats = stats; in cw1200_queue_init()
186 queue->link_map_cache = kzalloc_objs(int, stats->map_capacity); in cw1200_queue_init()
203 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_clear() local
218 spin_lock_bh(&stats->lock); in cw1200_queue_clear()
219 for (i = 0; i < stats->map_capacity; ++i) { in cw1200_queue_clear()
220 stats->num_queued -= queue->link_map_cache[i]; in cw1200_queue_clear()
221 stats->link_map_cache[i] -= queue->link_map_cache[i]; in cw1200_queue_clear()
224 spin_unlock_bh(&stats->lock); in cw1200_queue_clear()
230 wake_up(&stats->wait_link_id_empty); in cw1200_queue_clear()
231 cw1200_queue_post_gc(stats, &gc_list); in cw1200_queue_clear()
235 void cw1200_queue_stats_deinit(struct cw1200_queue_stats *stats) in cw1200_queue_stats_deinit() argument
237 kfree(stats->link_map_cache); in cw1200_queue_stats_deinit()
238 stats->link_map_cache = NULL; in cw1200_queue_stats_deinit()
258 size_t map_capacity = queue->stats->map_capacity; in cw1200_queue_get_num_queued()
282 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_put() local
284 if (txpriv->link_id >= queue->stats->map_capacity) in cw1200_queue_put()
306 spin_lock_bh(&stats->lock); in cw1200_queue_put()
307 ++stats->num_queued; in cw1200_queue_put()
308 ++stats->link_map_cache[txpriv->link_id]; in cw1200_queue_put()
309 spin_unlock_bh(&stats->lock); in cw1200_queue_put()
336 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_get() local
357 spin_lock_bh(&stats->lock); in cw1200_queue_get()
358 --stats->num_queued; in cw1200_queue_get()
359 if (!--stats->link_map_cache[item->txpriv.link_id]) in cw1200_queue_get()
361 spin_unlock_bh(&stats->lock); in cw1200_queue_get()
365 wake_up(&stats->wait_link_id_empty); in cw1200_queue_get()
374 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_requeue() local
395 spin_lock_bh(&stats->lock); in cw1200_queue_requeue()
396 ++stats->num_queued; in cw1200_queue_requeue()
397 ++stats->link_map_cache[item->txpriv.link_id]; in cw1200_queue_requeue()
398 spin_unlock_bh(&stats->lock); in cw1200_queue_requeue()
416 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_remove() local
457 stats->skb_dtor(stats->priv, gc_skb, &gc_txpriv); in cw1200_queue_remove()
527 bool cw1200_queue_stats_is_empty(struct cw1200_queue_stats *stats, in cw1200_queue_stats_is_empty() argument
532 spin_lock_bh(&stats->lock); in cw1200_queue_stats_is_empty()
534 empty = stats->num_queued == 0; in cw1200_queue_stats_is_empty()
537 for (i = 0; i < stats->map_capacity; ++i) { in cw1200_queue_stats_is_empty()
539 if (stats->link_map_cache[i]) { in cw1200_queue_stats_is_empty()
546 spin_unlock_bh(&stats->lock); in cw1200_queue_stats_is_empty()