• Home
  • Raw
  • Download

Lines Matching refs: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 = kcalloc(map_capacity, sizeof(int), in cw1200_queue_stats_init()
158 if (!stats->link_map_cache) in cw1200_queue_stats_init()
165 struct cw1200_queue_stats *stats, in cw1200_queue_init() argument
173 queue->stats = stats; in cw1200_queue_init()
188 queue->link_map_cache = kcalloc(stats->map_capacity, sizeof(int), in cw1200_queue_init()
206 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_clear() local
221 spin_lock_bh(&stats->lock); in cw1200_queue_clear()
222 for (i = 0; i < stats->map_capacity; ++i) { in cw1200_queue_clear()
223 stats->num_queued -= queue->link_map_cache[i]; in cw1200_queue_clear()
224 stats->link_map_cache[i] -= queue->link_map_cache[i]; in cw1200_queue_clear()
227 spin_unlock_bh(&stats->lock); in cw1200_queue_clear()
233 wake_up(&stats->wait_link_id_empty); in cw1200_queue_clear()
234 cw1200_queue_post_gc(stats, &gc_list); in cw1200_queue_clear()
238 void cw1200_queue_stats_deinit(struct cw1200_queue_stats *stats) in cw1200_queue_stats_deinit() argument
240 kfree(stats->link_map_cache); in cw1200_queue_stats_deinit()
241 stats->link_map_cache = NULL; in cw1200_queue_stats_deinit()
261 size_t map_capacity = queue->stats->map_capacity; in cw1200_queue_get_num_queued()
285 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_put() local
287 if (txpriv->link_id >= queue->stats->map_capacity) in cw1200_queue_put()
309 spin_lock_bh(&stats->lock); in cw1200_queue_put()
310 ++stats->num_queued; in cw1200_queue_put()
311 ++stats->link_map_cache[txpriv->link_id]; in cw1200_queue_put()
312 spin_unlock_bh(&stats->lock); in cw1200_queue_put()
339 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_get() local
360 spin_lock_bh(&stats->lock); in cw1200_queue_get()
361 --stats->num_queued; in cw1200_queue_get()
362 if (!--stats->link_map_cache[item->txpriv.link_id]) in cw1200_queue_get()
364 spin_unlock_bh(&stats->lock); in cw1200_queue_get()
368 wake_up(&stats->wait_link_id_empty); in cw1200_queue_get()
377 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_requeue() local
398 spin_lock_bh(&stats->lock); in cw1200_queue_requeue()
399 ++stats->num_queued; in cw1200_queue_requeue()
400 ++stats->link_map_cache[item->txpriv.link_id]; in cw1200_queue_requeue()
401 spin_unlock_bh(&stats->lock); in cw1200_queue_requeue()
417 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_requeue_all() local
424 spin_lock_bh(&stats->lock); in cw1200_queue_requeue_all()
425 ++stats->num_queued; in cw1200_queue_requeue_all()
426 ++stats->link_map_cache[item->txpriv.link_id]; in cw1200_queue_requeue_all()
427 spin_unlock_bh(&stats->lock); in cw1200_queue_requeue_all()
446 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_remove() local
487 stats->skb_dtor(stats->priv, gc_skb, &gc_txpriv); in cw1200_queue_remove()
557 bool cw1200_queue_stats_is_empty(struct cw1200_queue_stats *stats, in cw1200_queue_stats_is_empty() argument
562 spin_lock_bh(&stats->lock); in cw1200_queue_stats_is_empty()
564 empty = stats->num_queued == 0; in cw1200_queue_stats_is_empty()
567 for (i = 0; i < stats->map_capacity; ++i) { in cw1200_queue_stats_is_empty()
569 if (stats->link_map_cache[i]) { in cw1200_queue_stats_is_empty()
576 spin_unlock_bh(&stats->lock); in cw1200_queue_stats_is_empty()