iwlwifi: mvm: Invert the condition for OFDM rate
OFDM rate used for all bands except to band 2.4 which use CCK rate. Inverting the condition help that in future we won't need to expand the condition for more bands. Signed-off-by: Tova Mussai <tova.mussai@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
3717f91a81
commit
d558b7f834
@ -855,11 +855,10 @@ u8 iwl_mvm_mac_ctxt_get_lowest_rate(struct ieee80211_tx_info *info,
|
|||||||
struct ieee80211_vif *vif)
|
struct ieee80211_vif *vif)
|
||||||
{
|
{
|
||||||
u8 rate;
|
u8 rate;
|
||||||
|
if (info->band == NL80211_BAND_2GHZ && !vif->p2p)
|
||||||
if (info->band == NL80211_BAND_5GHZ || vif->p2p)
|
|
||||||
rate = IWL_FIRST_OFDM_RATE;
|
|
||||||
else
|
|
||||||
rate = IWL_FIRST_CCK_RATE;
|
rate = IWL_FIRST_CCK_RATE;
|
||||||
|
else
|
||||||
|
rate = IWL_FIRST_OFDM_RATE;
|
||||||
|
|
||||||
return rate;
|
return rate;
|
||||||
}
|
}
|
||||||
|
@ -341,8 +341,11 @@ static u32 iwl_mvm_get_tx_rate(struct iwl_mvm *mvm,
|
|||||||
rate_idx = rate_lowest_index(
|
rate_idx = rate_lowest_index(
|
||||||
&mvm->nvm_data->bands[info->band], sta);
|
&mvm->nvm_data->bands[info->band], sta);
|
||||||
|
|
||||||
/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
|
/*
|
||||||
if (info->band == NL80211_BAND_5GHZ)
|
* For non 2 GHZ band, remap mac80211 rate
|
||||||
|
* indices into driver indices
|
||||||
|
*/
|
||||||
|
if (info->band != NL80211_BAND_2GHZ)
|
||||||
rate_idx += IWL_FIRST_OFDM_RATE;
|
rate_idx += IWL_FIRST_OFDM_RATE;
|
||||||
|
|
||||||
/* For 2.4 GHZ band, check that there is no need to remap */
|
/* For 2.4 GHZ band, check that there is no need to remap */
|
||||||
|
@ -217,7 +217,7 @@ int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags,
|
|||||||
int band_offset = 0;
|
int band_offset = 0;
|
||||||
|
|
||||||
/* Legacy rate format, search for match in table */
|
/* Legacy rate format, search for match in table */
|
||||||
if (band == NL80211_BAND_5GHZ)
|
if (band != NL80211_BAND_2GHZ)
|
||||||
band_offset = IWL_FIRST_OFDM_RATE;
|
band_offset = IWL_FIRST_OFDM_RATE;
|
||||||
for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++)
|
for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++)
|
||||||
if (fw_rate_idx_to_plcp[idx] == rate)
|
if (fw_rate_idx_to_plcp[idx] == rate)
|
||||||
|
Loading…
Reference in New Issue
Block a user