]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: mvm: log dropped frames
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 13 Sep 2023 11:56:42 +0000 (14:56 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 13 Sep 2023 14:11:40 +0000 (16:11 +0200)
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: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230913145231.c2f02fecf66f.Ib472f9fd92856c6e5b5a99b68fdca0f694a531e9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c

index f0e0b91880a2330e05744f0d860086f18df63211..42d69f557e711b86a0659d81fa249d957603b75c 100644 (file)
@@ -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;
                }