Searched refs:rs_sta (Results 1 - 2 of 2) sorted by relevance
/linux-4.4.14/drivers/net/wireless/iwlegacy/ |
H A D | 3945-rs.c | 150 il3945_rate_scale_flush_wins(struct il3945_rs_sta *rs_sta) il3945_rate_scale_flush_wins() argument 155 struct il_priv *il __maybe_unused = rs_sta->il; il3945_rate_scale_flush_wins() 163 if (!rs_sta->win[i].counter) il3945_rate_scale_flush_wins() 166 spin_lock_irqsave(&rs_sta->lock, flags); il3945_rate_scale_flush_wins() 167 if (time_after(jiffies, rs_sta->win[i].stamp + RATE_WIN_FLUSH)) { il3945_rate_scale_flush_wins() 169 rs_sta->win[i].counter, i); il3945_rate_scale_flush_wins() 170 il3945_clear_win(&rs_sta->win[i]); il3945_rate_scale_flush_wins() 173 spin_unlock_irqrestore(&rs_sta->lock, flags); il3945_rate_scale_flush_wins() 186 struct il3945_rs_sta *rs_sta = (void *)data; il3945_bg_rate_scale_flush() local 187 struct il_priv *il __maybe_unused = rs_sta->il; il3945_bg_rate_scale_flush() 194 unflushed = il3945_rate_scale_flush_wins(rs_sta); il3945_bg_rate_scale_flush() 196 spin_lock_irqsave(&rs_sta->lock, flags); il3945_bg_rate_scale_flush() 199 packet_count = (rs_sta->tx_packets - rs_sta->last_tx_packets) + 1; il3945_bg_rate_scale_flush() 201 rs_sta->last_tx_packets = rs_sta->tx_packets + 1; il3945_bg_rate_scale_flush() 205 jiffies_to_msecs(jiffies - rs_sta->last_partial_flush); il3945_bg_rate_scale_flush() 224 rs_sta->flush_time = msecs_to_jiffies(duration); il3945_bg_rate_scale_flush() 229 mod_timer(&rs_sta->rate_scale_flush, il3945_bg_rate_scale_flush() 230 jiffies + rs_sta->flush_time); il3945_bg_rate_scale_flush() 232 rs_sta->last_partial_flush = jiffies; il3945_bg_rate_scale_flush() 234 rs_sta->flush_time = RATE_FLUSH; il3945_bg_rate_scale_flush() 235 rs_sta->flush_pending = 0; il3945_bg_rate_scale_flush() 240 rs_sta->last_flush = jiffies; il3945_bg_rate_scale_flush() 242 spin_unlock_irqrestore(&rs_sta->lock, flags); il3945_bg_rate_scale_flush() 255 il3945_collect_tx_data(struct il3945_rs_sta *rs_sta, il3945_collect_tx_data() argument 261 struct il_priv *il __maybe_unused = rs_sta->il; il3945_collect_tx_data() 268 spin_lock_irqsave(&rs_sta->lock, flags); il3945_collect_tx_data() 319 ((win->success_ratio * rs_sta->expected_tpt[idx] + il3945_collect_tx_data() 327 spin_unlock_irqrestore(&rs_sta->lock, flags); il3945_collect_tx_data() 339 struct il3945_rs_sta *rs_sta; il3945_rs_rate_init() local 348 rs_sta = &psta->rs_sta; il3945_rs_rate_init() 351 rs_sta->il = il; il3945_rs_rate_init() 353 rs_sta->start_rate = RATE_INVALID; il3945_rs_rate_init() 356 rs_sta->expected_tpt = il3945_expected_tpt_b; il3945_rs_rate_init() 358 rs_sta->last_partial_flush = jiffies; il3945_rs_rate_init() 359 rs_sta->last_flush = jiffies; il3945_rs_rate_init() 360 rs_sta->flush_time = RATE_FLUSH; il3945_rs_rate_init() 361 rs_sta->last_tx_packets = 0; il3945_rs_rate_init() 363 rs_sta->rate_scale_flush.data = (unsigned long)rs_sta; il3945_rs_rate_init() 364 rs_sta->rate_scale_flush.function = il3945_bg_rate_scale_flush; il3945_rs_rate_init() 367 il3945_clear_win(&rs_sta->win[i]); il3945_rs_rate_init() 376 rs_sta->last_txrate_idx = i; il3945_rs_rate_init() 384 rs_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; il3945_rs_rate_init() 409 struct il3945_rs_sta *rs_sta; il3945_rs_alloc_sta() local 415 rs_sta = &psta->rs_sta; il3945_rs_alloc_sta() 417 spin_lock_init(&rs_sta->lock); il3945_rs_alloc_sta() 418 init_timer(&rs_sta->rate_scale_flush); il3945_rs_alloc_sta() 422 return rs_sta; il3945_rs_alloc_sta() 428 struct il3945_rs_sta *rs_sta = il_sta; il3945_rs_free_sta() local 435 del_timer_sync(&rs_sta->rate_scale_flush); il3945_rs_free_sta() 453 struct il3945_rs_sta *rs_sta = il_sta; il3945_rs_tx_status() local 475 if (!rs_sta->il) { il3945_rs_tx_status() 480 rs_sta->tx_packets++; il3945_rs_tx_status() 506 il3945_collect_tx_data(rs_sta, &rs_sta->win[scale_rate_idx], 0, il3945_rs_tx_status() 519 il3945_collect_tx_data(rs_sta, &rs_sta->win[last_idx], il3945_rs_tx_status() 526 spin_lock_irqsave(&rs_sta->lock, flags); il3945_rs_tx_status() 528 if (!rs_sta->flush_pending && il3945_rs_tx_status() 529 time_after(jiffies, rs_sta->last_flush + rs_sta->flush_time)) { il3945_rs_tx_status() 531 rs_sta->last_partial_flush = jiffies; il3945_rs_tx_status() 532 rs_sta->flush_pending = 1; il3945_rs_tx_status() 533 mod_timer(&rs_sta->rate_scale_flush, il3945_rs_tx_status() 534 jiffies + rs_sta->flush_time); il3945_rs_tx_status() 537 spin_unlock_irqrestore(&rs_sta->lock, flags); il3945_rs_tx_status() 543 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, u8 idx, u16 rate_mask, il3945_get_adjacent_rate() argument 548 struct il_priv *il __maybe_unused = rs_sta->il; il3945_get_adjacent_rate() 579 if (rs_sta->tgg) il3945_get_adjacent_rate() 592 if (rs_sta->tgg) il3945_get_adjacent_rate() 632 struct il3945_rs_sta *rs_sta = il_sta; il3945_rs_get_rate() local 648 if (rs_sta && !rs_sta->il) { il3945_rs_get_rate() 665 idx = min(rs_sta->last_txrate_idx & 0xffff, RATE_COUNT_3945 - 1); il3945_rs_get_rate() 670 spin_lock_irqsave(&rs_sta->lock, flags); il3945_rs_get_rate() 675 if (rs_sta->start_rate != RATE_INVALID) { il3945_rs_get_rate() 676 if (rs_sta->start_rate < idx && il3945_rs_get_rate() 677 (rate_mask & (1 << rs_sta->start_rate))) il3945_rs_get_rate() 678 idx = rs_sta->start_rate; il3945_rs_get_rate() 679 rs_sta->start_rate = RATE_INVALID; il3945_rs_get_rate() 688 win = &(rs_sta->win[idx]); il3945_rs_get_rate() 694 spin_unlock_irqrestore(&rs_sta->lock, flags); il3945_rs_get_rate() 700 rs_sta->expected_tpt ? "not " : ""); il3945_rs_get_rate() 711 il3945_get_adjacent_rate(rs_sta, idx, rate_mask, sband->band); il3945_rs_get_rate() 721 low_tpt = rs_sta->win[low].average_tpt; il3945_rs_get_rate() 724 high_tpt = rs_sta->win[high].average_tpt; il3945_rs_get_rate() 726 spin_unlock_irqrestore(&rs_sta->lock, flags); il3945_rs_get_rate() 783 current_tpt > 100 * rs_sta->expected_tpt[low])) il3945_rs_get_rate() 812 rs_sta->last_txrate_idx = idx; il3945_rs_get_rate() 815 rs_sta->last_txrate_idx = idx; il3945_rs_get_rate() 816 info->control.rates[0].idx = rs_sta->last_txrate_idx; il3945_rs_get_rate() 916 struct il3945_rs_sta *rs_sta; il3945_rate_scale_init() local 932 rs_sta = &psta->rs_sta; il3945_rate_scale_init() 934 spin_lock_irqsave(&rs_sta->lock, flags); il3945_rate_scale_init() 936 rs_sta->tgg = 0; il3945_rate_scale_init() 941 rs_sta->tgg = 1; il3945_rate_scale_init() 942 rs_sta->expected_tpt = il3945_expected_tpt_g_prot; il3945_rate_scale_init() 944 rs_sta->expected_tpt = il3945_expected_tpt_g; il3945_rate_scale_init() 947 rs_sta->expected_tpt = il3945_expected_tpt_a; il3945_rate_scale_init() 954 spin_unlock_irqrestore(&rs_sta->lock, flags); il3945_rate_scale_init() 962 rs_sta->start_rate = il3945_get_rate_idx_by_rssi(rssi, il->band); il3945_rate_scale_init() 965 rs_sta->start_rate, il3945_rates[rs_sta->start_rate].plcp); il3945_rate_scale_init()
|
H A D | 3945.h | 104 struct il3945_rs_sta rs_sta; member in struct:il3945_sta_priv
|
Completed in 220 milliseconds