Lines Matching refs:est

2073 	struct rate_estimator *est = from_timer(est, t, timer);  in idt77252_est_timer()  local
2074 struct vc_map *vc = est->vc; in idt77252_est_timer()
2084 ncells = est->cells; in idt77252_est_timer()
2086 rate = ((u32)(ncells - est->last_cells)) << (7 - est->interval); in idt77252_est_timer()
2087 est->last_cells = ncells; in idt77252_est_timer()
2088 est->avcps += ((long)rate - (long)est->avcps) >> est->ewma_log; in idt77252_est_timer()
2089 est->cps = (est->avcps + 0x1f) >> 5; in idt77252_est_timer()
2091 cps = est->cps; in idt77252_est_timer()
2092 if (cps < (est->maxcps >> 4)) in idt77252_est_timer()
2093 cps = est->maxcps >> 4; in idt77252_est_timer()
2104 est->timer.expires = jiffies + ((HZ / 4) << est->interval); in idt77252_est_timer()
2105 add_timer(&est->timer); in idt77252_est_timer()
2114 struct rate_estimator *est; in idt77252_init_est() local
2116 est = kzalloc(sizeof(struct rate_estimator), GFP_KERNEL); in idt77252_init_est()
2117 if (!est) in idt77252_init_est()
2119 est->maxcps = pcr < 0 ? -pcr : pcr; in idt77252_init_est()
2120 est->cps = est->maxcps; in idt77252_init_est()
2121 est->avcps = est->cps << 5; in idt77252_init_est()
2122 est->vc = vc; in idt77252_init_est()
2124 est->interval = 2; /* XXX: make this configurable */ in idt77252_init_est()
2125 est->ewma_log = 2; /* XXX: make this configurable */ in idt77252_init_est()
2126 timer_setup(&est->timer, idt77252_est_timer, 0); in idt77252_init_est()
2127 mod_timer(&est->timer, jiffies + ((HZ / 4) << est->interval)); in idt77252_init_est()
2129 return est; in idt77252_init_est()
2206 struct rate_estimator *est = NULL; in idt77252_init_ubr() local
2212 est = vc->estimator; in idt77252_init_ubr()
2216 if (est) { in idt77252_init_ubr()
2217 timer_shutdown_sync(&est->timer); in idt77252_init_ubr()
2218 kfree(est); in idt77252_init_ubr()