linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 1/3] mac80211: allow tx handlers on injected packets
Date: Mon, 13 Aug 2007 09:45:05 +0200	[thread overview]
Message-ID: <20070813074643.269370000@sipsolutions.net> (raw)
In-Reply-To: 20070813074504.416717000@sipsolutions.net

If we specify the F_WEP flag for injection, then we have
indicated that we want encryption. Since that is handled
by the tx handlers we need to run the packet through them
with the additional benefit that everything else is also
done. This is important for hostapd when it sends EAPOL
frames, it needs to do that to avoid the qdisc.

I'm not entirely convinced this is the right thing, but
it's what I needed to get it all running for now.

Not-Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

---
 net/mac80211/tx.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--- wireless-dev.orig/net/mac80211/tx.c	2007-08-12 13:03:43.719561279 +0200
+++ wireless-dev/net/mac80211/tx.c	2007-08-12 13:52:20.775894433 +0200
@@ -835,8 +835,7 @@ __ieee80211_parse_tx_radiotap(
 	control->key_idx = -1; /* no encryption key */
 	control->flags &= ~(IEEE80211_TXCTL_USE_RTS_CTS |
 			    IEEE80211_TXCTL_USE_CTS_PROTECT);
-	control->flags |= IEEE80211_TXCTL_DO_NOT_ENCRYPT |
-			  IEEE80211_TXCTL_NO_ACK;
+	control->flags |= IEEE80211_TXCTL_DO_NOT_ENCRYPT;
 	control->antenna_sel_tx = 0; /* default to default antenna */
 
 	/*
@@ -1115,7 +1114,12 @@ static int ieee80211_tx(struct net_devic
 	tx.u.tx.mgmt_interface = mgmt;
 	tx.u.tx.mode = local->hw.conf.mode;
 
-	if (res_prepare == TXRX_QUEUED) { /* if it was an injected packet */
+	/*
+	 * if it was an injected packet and "don't encrypt"
+	 * was specified, then skip everthing. quite hackish
+	 */
+	if (res_prepare == TXRX_QUEUED &&
+	    (control->flags & IEEE80211_TXCTL_DO_NOT_ENCRYPT)) {
 		res = TXRX_CONTINUE;
 	} else {
 		for (handler = local->tx_handlers; *handler != NULL;

-- 


  reply	other threads:[~2007-08-13  8:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13  7:45 [PATCH 0/3] management interface removal Johannes Berg
2007-08-13  7:45 ` Johannes Berg [this message]
2007-08-13  7:45 ` [PATCH 2/3] mac80211: refactor event sending Johannes Berg
2007-08-13  7:45 ` [PATCH 3/3] mac80211: remove management interface Johannes Berg
2007-08-13  7:55   ` Johannes Berg
2007-08-13 15:44   ` Michael Wu
2007-08-14 11:42     ` Johannes Berg
2007-08-14 12:21       ` Ivo van Doorn
2007-08-14 12:42         ` [PATCH v2] " Johannes Berg
2007-08-14 13:17           ` 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=20070813074643.269370000@sipsolutions.net \
    --to=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).