/* removes the old data from the statistics. All data that is older than TID_MAX_TIME_DIFF, will be deleted.  */
static void rs_tl_rm_old_stats(struct iwl_traffic_load *tl, u32 curr_time)
/* removes the old data from the statistics. All data that is older than TID_MAX_TIME_DIFF, will be deleted.  */
static void rs_tl_rm_old_stats(struct iwl_traffic_load *tl, u32 curr_time)
{
	u32 oldest_time = curr_time - TID_MAX_TIME_DIFF;
	while (tl->queue_count &&
	       (tl->time_stamp < oldest_time)) {
		tl->total -= tl->packet_count[tl->head];
		tl->packet_count[tl->head] = 0;
		tl->time_stamp += TID_QUEUE_CELL_SPACING;
		tl->queue_count--;
		tl->head++;
		if (tl->head >= TID_QUEUE_MAX_SIZE)
			tl->head = 0;
	}
}