wifi: iwlwifi: mvm: Reset rate index if rate is wrong

Setting rate index should not depend on net_ratelimit().
Fix that for the case of invalid rate.

Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Link: https://lore.kernel.org/r/20230127002430.8eede67758bb.I585ab389e27d61153540b7cb5ebed66e21f765f0@changeid
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
This commit is contained in:
Mukesh Sisodiya
2023-01-27 00:28:18 +02:00
committed by Gregory Greenman
parent 3f7a9d577d
commit 9387e3596d

View File

@@ -1736,10 +1736,11 @@ static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm,
rx_status->rate_idx = rate;
if ((rate < 0 || rate > 0xFF) && net_ratelimit()) {
IWL_ERR(mvm, "Invalid rate flags 0x%x, band %d,\n",
rate_n_flags, rx_status->band);
if ((rate < 0 || rate > 0xFF)) {
rx_status->rate_idx = 0;
if (net_ratelimit())
IWL_ERR(mvm, "Invalid rate flags 0x%x, band %d,\n",
rate_n_flags, rx_status->band);
}
break;