From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH 2/2] mac80211: remove ieee80211_tx_h_check_control_port_protocol()
Date: Thu, 26 Mar 2020 15:53:35 +0100 [thread overview]
Message-ID: <20200326155333.05f411833f60.Ibf3dccc8aea73ae868da352811e5f1a3aef72ee0@changeid> (raw)
In-Reply-To: <20200326155333.f183f52b02f0.I4054e2a8c11c2ddcb795a0103c87be3538690243@changeid>
From: Johannes Berg <johannes.berg@intel.com>
This code is actually not ever effective, since the skb->protocol
isn't set up correctly (or at all) on outgoing frames. Also, we
already set the flags (except for IEEE80211_TX_CTL_USE_MINRATE)
in other code paths, and rate control already handles the frames
specially. Just remove it entirely.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/tx.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index bc1c27dc8dd5..5a37f7924af4 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -568,21 +568,6 @@ ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx)
return ieee80211_tx_h_multicast_ps_buf(tx);
}
-static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_check_control_port_protocol(struct ieee80211_tx_data *tx)
-{
- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
-
- if (unlikely(tx->sdata->control_port_protocol == tx->skb->protocol)) {
- if (tx->sdata->control_port_no_encrypt)
- info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
- info->control.flags |= IEEE80211_TX_CTRL_PORT_CTRL_PROTO;
- info->flags |= IEEE80211_TX_CTL_USE_MINRATE;
- }
-
- return TX_CONTINUE;
-}
-
static ieee80211_tx_result debug_noinline
ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
{
@@ -1775,7 +1760,6 @@ static int invoke_tx_handlers_early(struct ieee80211_tx_data *tx)
CALL_TXH(ieee80211_tx_h_dynamic_ps);
CALL_TXH(ieee80211_tx_h_check_assoc);
CALL_TXH(ieee80211_tx_h_ps_buf);
- CALL_TXH(ieee80211_tx_h_check_control_port_protocol);
CALL_TXH(ieee80211_tx_h_select_key);
if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
CALL_TXH(ieee80211_tx_h_rate_ctrl);
--
2.25.1
next prev parent reply other threads:[~2020-03-26 14:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 14:53 [PATCH 1/2] mac80211: set IEEE80211_TX_CTRL_PORT_CTRL_PROTO for nl80211 TX Johannes Berg
2020-03-26 14:53 ` Johannes Berg [this message]
2023-01-18 10:53 ` [PATCH 2/2] mac80211: remove ieee80211_tx_h_check_control_port_protocol() Johannes Berg
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=20200326155333.05f411833f60.Ibf3dccc8aea73ae868da352811e5f1a3aef72ee0@changeid \
--to=johannes@sipsolutions.net \
--cc=johannes.berg@intel.com \
--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).