linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] mac80211: allow specifying RTS/self-CTS protection when injecting packets
@ 2008-02-21  0:17 Johannes Berg
  2008-02-21 16:11 ` John W. Linville
  2008-02-21 19:08 ` Andy Green
  0 siblings, 2 replies; 4+ messages in thread
From: Johannes Berg @ 2008-02-21  0:17 UTC (permalink / raw)
  To: Andy Green; +Cc: linux-wireless

I made this patch to test RTS/CTS operation in drivers, do you think
it's useful apart that and should be merged?

---
 Documentation/networking/mac80211-injection.txt |    6 ++++++
 net/mac80211/tx.c                               |   10 ++++++++++
 2 files changed, 16 insertions(+)

--- everything.orig/net/mac80211/tx.c	2008-02-19 18:41:18.401563530 +0100
+++ everything/net/mac80211/tx.c	2008-02-19 18:41:21.631563150 +0100
@@ -840,6 +840,7 @@ __ieee80211_parse_tx_radiotap(struct iee
 	struct ieee80211_supported_band *sband;
 	int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len);
 	struct ieee80211_tx_control *control = tx->u.tx.control;
+	u16 val16;
 
 	sband = tx->local->hw.wiphy->bands[tx->local->hw.conf.channel->band];
 
@@ -922,6 +923,15 @@ __ieee80211_parse_tx_radiotap(struct iee
 				tx->flags |= IEEE80211_TXRXD_FRAGMENTED;
 			break;
 
+		case IEEE80211_RADIOTAP_TX_FLAGS:
+			val16 = le16_to_cpu(get_unaligned((__le16 *) iterator.this_arg));
+
+			if (val16 & IEEE80211_RADIOTAP_F_TX_RTS)
+				control->flags |= IEEE80211_TXCTL_USE_RTS_CTS;
+			else if (val16 & IEEE80211_RADIOTAP_F_TX_CTS)
+				control->flags |= IEEE80211_TXCTL_USE_CTS_PROTECT;
+			break;
+
 		/*
 		 * Please update the file
 		 * Documentation/networking/mac80211-injection.txt
--- everything.orig/Documentation/networking/mac80211-injection.txt	2008-02-18 15:29:41.068223795 +0100
+++ everything/Documentation/networking/mac80211-injection.txt	2008-02-19 18:41:21.661561252 +0100
@@ -40,6 +40,12 @@ radiotap headers and used to control inj
 			      this flag is only reliable when software
 			      fragmentation is enabled)
 
+ * IEEE80211_RADIOTAP_TX_FLAGS
+
+   IEEE80211_RADIOTAP_F_TX_RTS:	use RTS/CTS handshake
+   IEEE80211_RADIOTAP_F_TX_CTS:	use CTS-to-self protection
+
+
 The injection code can also skip all other currently defined radiotap fields
 facilitating replay of captured radiotap headers directly.
 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] mac80211: allow specifying RTS/self-CTS protection when injecting packets
  2008-02-21  0:17 [RFC] mac80211: allow specifying RTS/self-CTS protection when injecting packets Johannes Berg
@ 2008-02-21 16:11 ` John W. Linville
  2008-02-21 19:22   ` Johannes Berg
  2008-02-21 19:08 ` Andy Green
  1 sibling, 1 reply; 4+ messages in thread
From: John W. Linville @ 2008-02-21 16:11 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Andy Green, linux-wireless

On Thu, Feb 21, 2008 at 01:17:14AM +0100, Johannes Berg wrote:
> I made this patch to test RTS/CTS operation in drivers, do you think
> it's useful apart that and should be merged?

I don't see why not...what would be the objection?

-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] mac80211: allow specifying RTS/self-CTS protection when injecting packets
  2008-02-21  0:17 [RFC] mac80211: allow specifying RTS/self-CTS protection when injecting packets Johannes Berg
  2008-02-21 16:11 ` John W. Linville
@ 2008-02-21 19:08 ` Andy Green
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Green @ 2008-02-21 19:08 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

Somebody in the thread at some point said:
> I made this patch to test RTS/CTS operation in drivers, do you think
> it's useful apart that and should be merged?

> + * IEEE80211_RADIOTAP_TX_FLAGS
> +
> +   IEEE80211_RADIOTAP_F_TX_RTS:	use RTS/CTS handshake
> +   IEEE80211_RADIOTAP_F_TX_CTS:	use CTS-to-self protection
> +
> +
>  The injection code can also skip all other currently defined radiotap fields
>  facilitating replay of captured radiotap headers directly.

Hi Johannes -

Sure the footprint is nothing to speak of and it just exposes flags
there already supported using radiotap flags already existing.

I didn't think of a use for it but if the original flag has any use then
no doubt it can be used by the injection path by some enterprising soul.

(Sorry for late reply, travelling)

-Andy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] mac80211: allow specifying RTS/self-CTS protection when injecting packets
  2008-02-21 16:11 ` John W. Linville
@ 2008-02-21 19:22   ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2008-02-21 19:22 UTC (permalink / raw)
  To: John W. Linville; +Cc: Andy Green, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]


On Thu, 2008-02-21 at 11:11 -0500, John W. Linville wrote:
> On Thu, Feb 21, 2008 at 01:17:14AM +0100, Johannes Berg wrote:
> > I made this patch to test RTS/CTS operation in drivers, do you think
> > it's useful apart that and should be merged?
> 
> I don't see why not...what would be the objection?

You can't specify "Don't send RTS/CTS" because not specifying either
flag means "automatic".

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-21 19:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21  0:17 [RFC] mac80211: allow specifying RTS/self-CTS protection when injecting packets Johannes Berg
2008-02-21 16:11 ` John W. Linville
2008-02-21 19:22   ` Johannes Berg
2008-02-21 19:08 ` Andy Green

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).