From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH 7/8] wifi: mac80211: improve drop for action frame return
Date: Wed, 20 Mar 2024 09:14:04 +0200 [thread overview]
Message-ID: <20240320091155.34daf0a89eb4.I60e0639511f9de64e40e6105b640adf90f8f57f7@changeid> (raw)
In-Reply-To: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com>
From: Johannes Berg <johannes.berg@intel.com>
If we use a drop we not only save the extra call to
dev_kfree_skb(), but also have a better reason in
tracing, so do that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
net/mac80211/drop.h | 3 ++-
net/mac80211/rx.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/drop.h b/net/mac80211/drop.h
index 12a6f0e9eca6..59e3ec4dc960 100644
--- a/net/mac80211/drop.h
+++ b/net/mac80211/drop.h
@@ -2,7 +2,7 @@
/*
* mac80211 drop reason list
*
- * Copyright (C) 2023 Intel Corporation
+ * Copyright (C) 2023-2024 Intel Corporation
*/
#ifndef MAC80211_DROP_H
@@ -66,6 +66,7 @@ typedef unsigned int __bitwise ieee80211_rx_result;
R(RX_DROP_U_UNEXPECTED_STA_4ADDR) \
R(RX_DROP_U_UNEXPECTED_VLAN_MCAST) \
R(RX_DROP_U_NOT_PORT_CONTROL) \
+ R(RX_DROP_U_UNKNOWN_ACTION_REJECTED) \
/* this line for the trailing \ - add before this */
/* having two enums allows for checking ieee80211_rx_result use with sparse */
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c1f850138405..4b4cbd8bf35d 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3958,8 +3958,8 @@ ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx)
__ieee80211_tx_skb_tid_band(rx->sdata, nskb, 7, -1,
status->band);
}
- dev_kfree_skb(rx->skb);
- return RX_QUEUED;
+
+ return RX_DROP_U_UNKNOWN_ACTION_REJECTED;
}
static ieee80211_rx_result debug_noinline
--
2.34.1
next prev parent reply other threads:[~2024-03-20 7:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 7:13 [PATCH 0/8] cfg80211/mac80211 patches from our internal tree 2024-03-20 Miri Korenblit
2024-03-20 7:13 ` [PATCH 1/8] wifi: mac80211: do not call ieee80211_key_switch_links during reconfig Miri Korenblit
2024-03-20 12:57 ` Johannes Berg
2024-03-20 7:13 ` [PATCH 2/8] wifi: mac80211: don't enter idle during link switch Miri Korenblit
2024-03-20 7:14 ` [PATCH 3/8] wifi: mac80211: clarify IEEE80211_STATUS_SUBDATA_MASK Miri Korenblit
2024-03-20 7:14 ` [PATCH 4/8] wifi: mac80211_hwsim: Declare HE/EHT capabilities support for P2P interfaces Miri Korenblit
2024-03-20 7:14 ` [PATCH 5/8] wifi: mac80211: don't select link ID if not provided in scan request Miri Korenblit
2024-03-20 7:14 ` [PATCH 6/8] wifi: mac80211: don't ask driver about no-op link changes Miri Korenblit
2024-03-20 7:14 ` Miri Korenblit [this message]
2024-03-20 7:14 ` [PATCH 8/8] wifi: mac80211: reactivate multi-link later in restart Miri Korenblit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240320091155.34daf0a89eb4.I60e0639511f9de64e40e6105b640adf90f8f57f7@changeid \
--to=miriam.rachel.korenblit@intel.com \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).