Commit a3f9d596 authored by Johannes Berg's avatar Johannes Berg

iwlegacy: remove usage of txrc->max_rate_idx

Just calculate it like mac80211 does today, so we can get rid
of the calculation in mac80211 for everyone else.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent a6289d3f
...@@ -656,7 +656,7 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, ...@@ -656,7 +656,7 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
rate_mask = sta->supp_rates[sband->band]; rate_mask = sta->supp_rates[sband->band];
/* get user max rate if set */ /* get user max rate if set */
max_rate_idx = txrc->max_rate_idx; max_rate_idx = fls(txrc->rate_idx_mask) - 1;
if (sband->band == NL80211_BAND_5GHZ && max_rate_idx != -1) if (sband->band == NL80211_BAND_5GHZ && max_rate_idx != -1)
max_rate_idx += IL_FIRST_OFDM_RATE; max_rate_idx += IL_FIRST_OFDM_RATE;
if (max_rate_idx < 0 || max_rate_idx >= RATE_COUNT) if (max_rate_idx < 0 || max_rate_idx >= RATE_COUNT)
......
...@@ -2211,7 +2211,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, ...@@ -2211,7 +2211,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
/* Get max rate if user set max rate */ /* Get max rate if user set max rate */
if (lq_sta) { if (lq_sta) {
lq_sta->max_rate_idx = txrc->max_rate_idx; lq_sta->max_rate_idx = fls(txrc->rate_idx_mask) - 1;
if (sband->band == NL80211_BAND_5GHZ && if (sband->band == NL80211_BAND_5GHZ &&
lq_sta->max_rate_idx != -1) lq_sta->max_rate_idx != -1)
lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE; lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment