diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-03-06 23:04:09 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-03-07 09:42:11 +0100 |
commit | a3f9d596b1ea9cf7db482879a8aeb91f54a87e75 (patch) | |
tree | 022b4775cb2b773eaa6367da5ebb3bf0727cc87f | |
parent | mac80211: ignore VHT membership selector when parsing rates (diff) | |
download | linux-a3f9d596b1ea9cf7db482879a8aeb91f54a87e75.tar.xz linux-a3f9d596b1ea9cf7db482879a8aeb91f54a87e75.zip |
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: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/3945-rs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/4965-rs.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-rs.c b/drivers/net/wireless/intel/iwlegacy/3945-rs.c index 03ad9b8b55f4..b2f35dfbc01b 100644 --- a/drivers/net/wireless/intel/iwlegacy/3945-rs.c +++ b/drivers/net/wireless/intel/iwlegacy/3945-rs.c @@ -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]; /* 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) max_rate_idx += IL_FIRST_OFDM_RATE; if (max_rate_idx < 0 || max_rate_idx >= RATE_COUNT) diff --git a/drivers/net/wireless/intel/iwlegacy/4965-rs.c b/drivers/net/wireless/intel/iwlegacy/4965-rs.c index a867ae7f4095..c055f6da11c6 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-rs.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-rs.c @@ -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 */ 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 && lq_sta->max_rate_idx != -1) lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE; |