• Home
  • Raw
  • Download

Lines Matching refs:stats

31 	struct cw1200_queue_stats *stats = queue->stats;  in __cw1200_queue_lock()  local
35 ieee80211_stop_queue(stats->priv->hw, queue->queue_id); in __cw1200_queue_lock()
41 struct cw1200_queue_stats *stats = queue->stats; in __cw1200_queue_unlock() local
46 ieee80211_wake_queue(stats->priv->hw, queue->queue_id); in __cw1200_queue_unlock()
69 static void cw1200_queue_post_gc(struct cw1200_queue_stats *stats, in cw1200_queue_post_gc() argument
76 stats->skb_dtor(stats->priv, item->skb, &item->txpriv); in cw1200_queue_post_gc()
96 struct cw1200_queue_stats *stats = queue->stats; in __cw1200_queue_gc() local
105 spin_lock_bh(&stats->lock); in __cw1200_queue_gc()
106 --stats->num_queued; in __cw1200_queue_gc()
107 if (!--stats->link_map_cache[item->txpriv.link_id]) in __cw1200_queue_gc()
109 spin_unlock_bh(&stats->lock); in __cw1200_queue_gc()
110 cw1200_debug_tx_ttl(stats->priv); in __cw1200_queue_gc()
117 wake_up(&stats->wait_link_id_empty); in __cw1200_queue_gc()
127 cw1200_pm_stay_awake(&stats->priv->pm_state, in __cw1200_queue_gc()
142 cw1200_queue_post_gc(queue->stats, &list); in cw1200_queue_gc()
145 int cw1200_queue_stats_init(struct cw1200_queue_stats *stats, in cw1200_queue_stats_init() argument
150 memset(stats, 0, sizeof(*stats)); in cw1200_queue_stats_init()
151 stats->map_capacity = map_capacity; in cw1200_queue_stats_init()
152 stats->skb_dtor = skb_dtor; in cw1200_queue_stats_init()
153 stats->priv = priv; in cw1200_queue_stats_init()
154 spin_lock_init(&stats->lock); in cw1200_queue_stats_init()
155 init_waitqueue_head(&stats->wait_link_id_empty); in cw1200_queue_stats_init()
157 stats->link_map_cache = kzalloc(sizeof(int) * map_capacity, in cw1200_queue_stats_init()
159 if (!stats->link_map_cache) in cw1200_queue_stats_init()
166 struct cw1200_queue_stats *stats, in cw1200_queue_init() argument
174 queue->stats = stats; in cw1200_queue_init()
189 queue->link_map_cache = kzalloc(sizeof(int) * stats->map_capacity, in cw1200_queue_init()
207 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_clear() local
222 spin_lock_bh(&stats->lock); in cw1200_queue_clear()
223 for (i = 0; i < stats->map_capacity; ++i) { in cw1200_queue_clear()
224 stats->num_queued -= queue->link_map_cache[i]; in cw1200_queue_clear()
225 stats->link_map_cache[i] -= queue->link_map_cache[i]; in cw1200_queue_clear()
228 spin_unlock_bh(&stats->lock); in cw1200_queue_clear()
234 wake_up(&stats->wait_link_id_empty); in cw1200_queue_clear()
235 cw1200_queue_post_gc(stats, &gc_list); in cw1200_queue_clear()
239 void cw1200_queue_stats_deinit(struct cw1200_queue_stats *stats) in cw1200_queue_stats_deinit() argument
241 kfree(stats->link_map_cache); in cw1200_queue_stats_deinit()
242 stats->link_map_cache = NULL; in cw1200_queue_stats_deinit()
262 size_t map_capacity = queue->stats->map_capacity; in cw1200_queue_get_num_queued()
287 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_put() local
289 if (txpriv->link_id >= queue->stats->map_capacity) in cw1200_queue_put()
311 spin_lock_bh(&stats->lock); in cw1200_queue_put()
312 ++stats->num_queued; in cw1200_queue_put()
313 ++stats->link_map_cache[txpriv->link_id]; in cw1200_queue_put()
314 spin_unlock_bh(&stats->lock); in cw1200_queue_put()
341 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_get() local
362 spin_lock_bh(&stats->lock); in cw1200_queue_get()
363 --stats->num_queued; in cw1200_queue_get()
364 if (!--stats->link_map_cache[item->txpriv.link_id]) in cw1200_queue_get()
366 spin_unlock_bh(&stats->lock); in cw1200_queue_get()
370 wake_up(&stats->wait_link_id_empty); in cw1200_queue_get()
379 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_requeue() local
400 spin_lock_bh(&stats->lock); in cw1200_queue_requeue()
401 ++stats->num_queued; in cw1200_queue_requeue()
402 ++stats->link_map_cache[item->txpriv.link_id]; in cw1200_queue_requeue()
403 spin_unlock_bh(&stats->lock); in cw1200_queue_requeue()
419 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_requeue_all() local
426 spin_lock_bh(&stats->lock); in cw1200_queue_requeue_all()
427 ++stats->num_queued; in cw1200_queue_requeue_all()
428 ++stats->link_map_cache[item->txpriv.link_id]; in cw1200_queue_requeue_all()
429 spin_unlock_bh(&stats->lock); in cw1200_queue_requeue_all()
448 struct cw1200_queue_stats *stats = queue->stats; in cw1200_queue_remove() local
489 stats->skb_dtor(stats->priv, gc_skb, &gc_txpriv); in cw1200_queue_remove()
559 bool cw1200_queue_stats_is_empty(struct cw1200_queue_stats *stats, in cw1200_queue_stats_is_empty() argument
564 spin_lock_bh(&stats->lock); in cw1200_queue_stats_is_empty()
566 empty = stats->num_queued == 0; in cw1200_queue_stats_is_empty()
569 for (i = 0; i < stats->map_capacity; ++i) { in cw1200_queue_stats_is_empty()
571 if (stats->link_map_cache[i]) { in cw1200_queue_stats_is_empty()
578 spin_unlock_bh(&stats->lock); in cw1200_queue_stats_is_empty()