diff options
author | Johannes Berg <johannes.berg@intel.com> | 2021-02-05 11:06:34 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2021-02-05 11:56:42 +0200 |
commit | 85b7eb490e86984d59df79a4baf9fa185d3587f8 (patch) | |
tree | 3bd4e2bf28f7fae1a0e7190ccae159c65e79b161 | |
parent | 46e64deaa868a77f182b2be5c82dae94368999de (diff) |
iwlwifi: mvm: slightly clean up rs_fw_set_supp_rates()
The "supp" variable doesn't need to be unsigned long, only
"tmp" is used with for_each_set_bit(). "supp" should just
be a u16, since that's how it's sent to the firmware.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210205110447.762e50704a39.I014bc7898f90c734f8e9be2a3efaf9bf8b7db6db@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c index 490a561c71db..8772b65c9dab 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c @@ -248,14 +248,13 @@ static void rs_fw_set_supp_rates(struct ieee80211_sta *sta, struct iwl_tlc_config_cmd *cmd) { int i; - unsigned long tmp; - unsigned long supp; /* must be unsigned long for for_each_set_bit */ + u16 supp = 0; + unsigned long tmp; /* must be unsigned long for for_each_set_bit */ const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; const struct ieee80211_sta_he_cap *he_cap = &sta->he_cap; /* non HT rates */ - supp = 0; tmp = sta->supp_rates[sband->band]; for_each_set_bit(i, &tmp, BITS_PER_LONG) supp |= BIT(sband->bitrates[i].hw_value); |