Lines Matching refs:window
248 static void rs_rate_scale_clear_window(struct iwl_rate_scale_data *window) in rs_rate_scale_clear_window() argument
250 window->data = 0; in rs_rate_scale_clear_window()
251 window->success_counter = 0; in rs_rate_scale_clear_window()
252 window->success_ratio = IWL_INVALID_VALUE; in rs_rate_scale_clear_window()
253 window->counter = 0; in rs_rate_scale_clear_window()
254 window->average_tpt = IWL_INVALID_VALUE; in rs_rate_scale_clear_window()
255 window->stamp = 0; in rs_rate_scale_clear_window()
465 struct iwl_rate_scale_data *window = NULL; in rs_collect_tx_data() local
473 window = &(tbl->win[scale_index]); in rs_collect_tx_data()
487 if (window->counter >= IWL_RATE_MAX_WINDOW) { in rs_collect_tx_data()
489 window->counter = IWL_RATE_MAX_WINDOW - 1; in rs_collect_tx_data()
491 if (window->data & mask) { in rs_collect_tx_data()
492 window->data &= ~mask; in rs_collect_tx_data()
493 window->success_counter--; in rs_collect_tx_data()
498 window->counter++; in rs_collect_tx_data()
501 window->data <<= 1; in rs_collect_tx_data()
505 window->success_counter++; in rs_collect_tx_data()
506 window->data |= 0x1; in rs_collect_tx_data()
514 if (window->counter > 0) in rs_collect_tx_data()
515 window->success_ratio = 128 * (100 * window->success_counter) in rs_collect_tx_data()
516 / window->counter; in rs_collect_tx_data()
518 window->success_ratio = IWL_INVALID_VALUE; in rs_collect_tx_data()
520 fail_count = window->counter - window->success_counter; in rs_collect_tx_data()
524 (window->success_counter >= IWL_RATE_MIN_SUCCESS_TH)) in rs_collect_tx_data()
525 window->average_tpt = (window->success_ratio * tpt + 64) / 128; in rs_collect_tx_data()
527 window->average_tpt = IWL_INVALID_VALUE; in rs_collect_tx_data()
530 window->stamp = jiffies; in rs_collect_tx_data()
1380 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_legacy_other() local
1404 if (window->success_ratio >= IWL_RS_GOOD_RATIO) in rs_move_legacy_other()
1512 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_siso_to_other() local
1535 if (window->success_ratio >= IWL_RS_GOOD_RATIO) in rs_move_siso_to_other()
1647 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo2_to_other() local
1668 if (window->success_ratio >= IWL_RS_GOOD_RATIO) in rs_move_mimo2_to_other()
1784 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo3_to_other() local
1805 if (window->success_ratio >= IWL_RS_GOOD_RATIO) in rs_move_mimo3_to_other()
2029 struct iwl_rate_scale_data *window = NULL; in rs_rate_scale_perform() local
2140 window = &(tbl->win[index]); in rs_rate_scale_perform()
2144 window = &(tbl->win[index]); in rs_rate_scale_perform()
2153 fail_count = window->counter - window->success_counter; in rs_rate_scale_perform()
2155 (window->success_counter < IWL_RATE_MIN_SUCCESS_TH)) { in rs_rate_scale_perform()
2158 window->success_counter, window->counter, index); in rs_rate_scale_perform()
2161 window->average_tpt = IWL_INVALID_VALUE; in rs_rate_scale_perform()
2171 if (window->average_tpt != ((window->success_ratio * in rs_rate_scale_perform()
2175 window->average_tpt = ((window->success_ratio * in rs_rate_scale_perform()
2184 if (window->average_tpt > lq_sta->last_tpt) { in rs_rate_scale_perform()
2187 window->success_ratio, in rs_rate_scale_perform()
2188 window->average_tpt, in rs_rate_scale_perform()
2196 current_tpt = window->average_tpt; in rs_rate_scale_perform()
2201 window->success_ratio, in rs_rate_scale_perform()
2202 window->average_tpt, in rs_rate_scale_perform()
2239 sr = window->success_ratio; in rs_rate_scale_perform()
2242 current_tpt = window->average_tpt; in rs_rate_scale_perform()
2346 !lq_sta->stay_in_tbl && window->counter) { in rs_rate_scale_perform()