Lines Matching refs:rate_table
392 static int ath_rc_get_rateindex(const struct ath_rate_table *rate_table,
414 static void ath_rc_sort_validrates(const struct ath_rate_table *rate_table,
424 if (rate_table->info[idx].ratekbps >
425 rate_table->info[idx_next].ratekbps) {
449 int ath_rc_get_nextvalid_txrate(const struct ath_rate_table *rate_table,
488 ath_rc_get_lower_rix(const struct ath_rate_table *rate_table,
505 const struct ath_rate_table *rate_table,
510 for (i = 0; i < rate_table->rate_cnt; i++) {
511 if (rate_table->info[i].rate_flags & RC_LEGACY) {
512 u32 phy = rate_table->info[i].phy;
531 const struct ath_rate_table *rate_table,
539 for (j = 0; j < rate_table->rate_cnt; j++) {
540 u32 phy = rate_table->info[j].phy;
541 u16 rate_flags = rate_table->info[j].rate_flags;
543 u8 dot11rate = rate_table->info[j].dot11rate;
575 const struct ath_rate_table *rate_table,
584 for (j = 0; j < rate_table->rate_cnt; j++) {
585 u32 phy = rate_table->info[j].phy;
586 u16 rate_flags = rate_table->info[j].rate_flags;
588 u8 dot11rate = rate_table->info[j].dot11rate;
612 const struct ath_rate_table *rate_table,
652 this_thruput = rate_table->info[rate].user_ratekbps *
672 if (ath_rc_get_nextvalid_txrate(rate_table,
675 rate_table->probe_interval) &&
688 if (RC_TS_ONLY(rate_table->info[rate].rate_flags) &&
692 if (RC_DS_OR_LATER(rate_table->info[rate].rate_flags) &&
696 if (RC_SS_OR_LEGACY(rate_table->info[rate].rate_flags))
707 static void ath_rc_rate_set_series(const struct ath_rate_table *rate_table,
713 rate->idx = rate_table->info[rix].ratecode;
720 if (WLAN_RC_PHY_HT(rate_table->info[rix].phy)) {
722 if (WLAN_RC_PHY_40(rate_table->info[rix].phy))
724 if (WLAN_RC_PHY_SGI(rate_table->info[rix].phy))
730 const struct ath_rate_table *rate_table,
739 rix = ath_rc_get_rateindex(rate_table, &rates[i]);
743 cix = rate_table->info[rix].ctrl_rate;
756 (rate_table->info[rix].phy == WLAN_RC_PHY_OFDM ||
757 WLAN_RC_PHY_HT(rate_table->info[rix].phy))) {
759 cix = rate_table->info[enable_g_protection].ctrl_rate;
770 const struct ath_rate_table *rate_table;
794 rate_table = sc->cur_rate_table;
795 rix = ath_rc_get_highest_rix(sc, ath_rc_priv, rate_table, &is_probe);
813 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
819 ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &rix);
820 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
826 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
836 ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &rix);
838 ath_rc_rate_set_series(rate_table, &rates[i], txrc,
859 u8 dot11rate = rate_table->info[rix].dot11rate;
860 u8 phy = rate_table->info[rix].phy;
877 ath_rc_rate_set_rtscts(sc, rate_table, tx_info);
881 const struct ath_rate_table *rate_table,
996 now_msec - rate_table->probe_interval / 2;
1034 const struct ath_rate_table *rate_table = sc->cur_rate_table;
1037 if ((tx_rate < 0) || (tx_rate > rate_table->rate_cnt))
1043 state_change = ath_rc_update_per(sc, rate_table, ath_rc_priv,
1052 rate_table->info[tx_rate].ratekbps <=
1053 rate_table->info[ath_rc_priv->rate_max_phy].ratekbps) {
1054 ath_rc_get_lower_rix(rate_table, ath_rc_priv,
1085 rate_table->probe_interval) {
1099 static int ath_rc_get_rateindex(const struct ath_rate_table *rate_table,
1113 rix += rate->idx + rate_table->mcs_start;
1117 rix = rate_table->info[rix].ht_index;
1119 rix = rate_table->info[rix].sgi_index;
1121 rix = rate_table->info[rix].cw40index;
1131 const struct ath_rate_table *rate_table;
1136 rate_table = sc->cur_rate_table;
1155 rix = ath_rc_get_rateindex(rate_table, &rates[i]);
1179 rix = ath_rc_get_rateindex(rate_table, &rates[i]);
1225 const struct ath_rate_table *rate_table)
1252 hi = ath_rc_init_validrates(ath_rc_priv, rate_table,
1256 hi = ath_rc_setvalid_rates(ath_rc_priv, rate_table,
1260 rate_table,
1277 if (!ath_rc_valid_phyrate(i, rate_table->initial_ratemax, 1)
1287 ath_rc_sort_validrates(rate_table, ath_rc_priv);
1289 sc->cur_rate_table = rate_table;
1408 const struct ath_rate_table *rate_table;
1443 rate_table = ath_choose_rate_table(sc, sband->band,
1446 rate_table = hw_rate_table[sc->cur_rate_mode];
1450 ath_rc_init(sc, priv_sta, sband, sta, rate_table);
1459 const struct ath_rate_table *rate_table = NULL;
1485 rate_table = ath_choose_rate_table(sc, sband->band,
1490 ath_rc_init(sc, priv_sta, sband, sta, rate_table);