Commit b79d2219 authored by Luca Coelho's avatar Luca Coelho Committed by Gregory Greenman
Browse files

wifi: iwlwifi: mvm: print an error instead of a warning on invalid rate



In some rare occasions, the firmware may let some frames with invalid
rates, such as CCK rates on the high band, come through.  This causes
the driver to issue a warning, but since this is a possible issue and
it's not really a bug in the driver, convert the warning into an
error.

Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20221102165239.3d3673c70556.I13464b11d405fd6021618b0a32404cecb7e9ac51@changeid
parent 06ffeebb
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -1747,10 +1747,12 @@ static void iwl_mvm_rx_fill_status(struct iwl_mvm *mvm,


		rx_status->rate_idx = rate;
		rx_status->rate_idx = rate;


		if (WARN_ONCE(rate < 0 || rate > 0xFF,
		if ((rate < 0 || rate > 0xFF) && net_ratelimit()) {
			      "Invalid rate flags 0x%x, band %d,\n",
			IWL_ERR(mvm, "Invalid rate flags 0x%x, band %d,\n",
			      rate_n_flags, rx_status->band))
				rate_n_flags, rx_status->band);
			rx_status->rate_idx = 0;
			rx_status->rate_idx = 0;
		}

		break;
		break;
		}
		}
	}
	}