Lines Matching refs:tl
263 static void rs_tl_rm_old_stats(struct iwl_traffic_load *tl, u32 curr_time) in rs_tl_rm_old_stats() argument
268 while (tl->queue_count && in rs_tl_rm_old_stats()
269 (tl->time_stamp < oldest_time)) { in rs_tl_rm_old_stats()
270 tl->total -= tl->packet_count[tl->head]; in rs_tl_rm_old_stats()
271 tl->packet_count[tl->head] = 0; in rs_tl_rm_old_stats()
272 tl->time_stamp += TID_QUEUE_CELL_SPACING; in rs_tl_rm_old_stats()
273 tl->queue_count--; in rs_tl_rm_old_stats()
274 tl->head++; in rs_tl_rm_old_stats()
275 if (tl->head >= TID_QUEUE_MAX_SIZE) in rs_tl_rm_old_stats()
276 tl->head = 0; in rs_tl_rm_old_stats()
290 struct iwl_traffic_load *tl = NULL; in rs_tl_add_packet() local
302 tl = &lq_data->load[tid]; in rs_tl_add_packet()
307 if (!(tl->queue_count)) { in rs_tl_add_packet()
308 tl->total = 1; in rs_tl_add_packet()
309 tl->time_stamp = curr_time; in rs_tl_add_packet()
310 tl->queue_count = 1; in rs_tl_add_packet()
311 tl->head = 0; in rs_tl_add_packet()
312 tl->packet_count[0] = 1; in rs_tl_add_packet()
316 time_diff = TIME_WRAP_AROUND(tl->time_stamp, curr_time); in rs_tl_add_packet()
322 rs_tl_rm_old_stats(tl, curr_time); in rs_tl_add_packet()
324 index = (tl->head + index) % TID_QUEUE_MAX_SIZE; in rs_tl_add_packet()
325 tl->packet_count[index] = tl->packet_count[index] + 1; in rs_tl_add_packet()
326 tl->total = tl->total + 1; in rs_tl_add_packet()
328 if ((index + 1) > tl->queue_count) in rs_tl_add_packet()
329 tl->queue_count = index + 1; in rs_tl_add_packet()
372 struct iwl_traffic_load *tl = NULL; in rs_tl_get_load() local
377 tl = &(lq_data->load[tid]); in rs_tl_get_load()
381 if (!(tl->queue_count)) in rs_tl_get_load()
384 time_diff = TIME_WRAP_AROUND(tl->time_stamp, curr_time); in rs_tl_get_load()
390 rs_tl_rm_old_stats(tl, curr_time); in rs_tl_get_load()
392 return tl->total; in rs_tl_get_load()