mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 09:28:44 -04:00
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:
committed by
Gregory Greenman
parent
3f7a9d577d
commit
9387e3596d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user