Search Linux Wireless

[PATCH 1/3] mac80211: allow tx handlers on injected packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>

---
 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;

-- 

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux