Commit 9387e359 authored by Mukesh Sisodiya's avatar Mukesh Sisodiya Committed by Gregory Greenman
Browse files

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: default avatarMukesh Sisodiya <mukesh.sisodiya@intel.com>
Link: https://lore.kernel.org/r/20230127002430.8eede67758bb.I585ab389e27d61153540b7cb5ebed66e21f765f0@changeid


Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
parent 3f7a9d57
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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()) {
		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);
			rx_status->rate_idx = 0;
		}

		break;