Commit 3dfbcf78 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Johannes Berg
Browse files

wifi: iwlwifi: mvm: log dropped frames



When we drop frames we want to have something printed in the logger.
This won't be printed by default of course.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230913145231.c2f02fecf66f.Ib472f9fd92856c6e5b5a99b68fdca0f694a531e9@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent fc2fe0a5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -376,8 +376,10 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
	 */
	if (phy_info & IWL_RX_MPDU_PHY_AMPDU &&
	    (status & IWL_RX_MPDU_STATUS_SEC_MASK) ==
	    IWL_RX_MPDU_STATUS_SEC_UNKNOWN && !mvm->monitor_on)
	    IWL_RX_MPDU_STATUS_SEC_UNKNOWN && !mvm->monitor_on) {
		IWL_DEBUG_DROP(mvm, "Dropping packets, bad enc status\n");
		return -1;
	}

	if (unlikely(ieee80211_is_mgmt(hdr->frame_control) &&
		     !ieee80211_has_protected(hdr->frame_control)))
@@ -2562,6 +2564,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
			iwl_mvm_rx_csum(mvm, sta, skb, pkt);

		if (iwl_mvm_is_dup(sta, queue, rx_status, hdr, desc)) {
			IWL_DEBUG_DROP(mvm, "Dropping duplicate packet 0x%x\n",
				       le16_to_cpu(hdr->seq_ctrl));
			kfree_skb(skb);
			goto out;
		}