diff options
author | Johannes Berg <johannes.berg@intel.com> | 2021-12-19 13:28:32 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2021-12-21 12:38:16 +0200 |
commit | 8ccb768c2368b1c3b2341852c2bcdfb48d028bae (patch) | |
tree | 6dba532d912df0f0970e51d3e9c2ae4a47ee7c48 /drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |
parent | f0337cb48f3bf5f0bbccc985d8a0a8c4aa4934b7 (diff) | |
download | linux-8ccb768c2368b1c3b2341852c2bcdfb48d028bae.tar.bz2 |
iwlwifi: mvm: drop too short packets silently
There's little value in this warning, we get a warning here
if firmware passes us a short packet, particularly in monitor
mode.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211219132536.305d12cf51ac.I2e4e6874113b1e5d8ee467b8a2d90820cc6ddde9@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index c8b20f202627..295629c5c035 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -176,18 +176,8 @@ static int iwl_mvm_create_skb(struct iwl_mvm *mvm, struct sk_buff *skb, */ hdrlen += crypt_len; - if (WARN_ONCE(headlen < hdrlen, - "invalid packet lengths (hdrlen=%d, len=%d, crypt_len=%d)\n", - hdrlen, len, crypt_len)) { - /* - * We warn and trace because we want to be able to see - * it in trace-cmd as well. - */ - IWL_DEBUG_RX(mvm, - "invalid packet lengths (hdrlen=%d, len=%d, crypt_len=%d)\n", - hdrlen, len, crypt_len); + if (unlikely(headlen < hdrlen)) return -EINVAL; - } skb_put_data(skb, hdr, hdrlen); skb_put_data(skb, (u8 *)hdr + hdrlen + pad_len, headlen - hdrlen); |