* [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames
@ 2011-09-29 9:27 Helmut Schaa
2011-09-29 9:59 ` Johannes Berg
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Helmut Schaa @ 2011-09-29 9:27 UTC (permalink / raw)
To: linux-wireless; +Cc: linville, johannes, Helmut Schaa
Allow injected unicast frames to be sent without having to wait
for an ACK.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
Just in case you're interested in what's the intended purpose of this:
Some clients are staying on scanned channels for a very short period of
time. hostapd sends out probe responses for each configured BSSID. Under
some circumstances I can see that the client already left the channel
while some probe responses are still sent out and thus retried. This
consumes quite some airtime. Commercial wireless APs (Aruba for example)
seem to disable retries for probe responses to mitigate such issues.
include/net/ieee80211_radiotap.h | 1 +
net/mac80211/tx.c | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index b0be5fb..7e2c4d4 100644
--- a/include/net/ieee80211_radiotap.h
+++ b/include/net/ieee80211_radiotap.h
@@ -251,6 +251,7 @@ enum ieee80211_radiotap_type {
* retries */
#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */
#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */
+#define IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 /* don't expect an ack */
/* For IEEE80211_RADIOTAP_MCS */
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 0107263..8b55465 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1047,6 +1047,7 @@ static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len,
NULL);
+ u16 txflags;
info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
tx->flags &= ~IEEE80211_TX_FRAGMENTED;
@@ -1095,6 +1096,13 @@ static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
tx->flags |= IEEE80211_TX_FRAGMENTED;
break;
+ case IEEE80211_RADIOTAP_TX_FLAGS:
+ txflags = le16_to_cpu(get_unaligned((__le16*)
+ iterator.this_arg));
+ if (txflags & IEEE80211_RADIOTAP_F_TX_NOACK)
+ info->flags |= IEEE80211_TX_CTL_NO_ACK;
+ break;
+
/*
* Please update the file
* Documentation/networking/mac80211-injection.txt
@@ -1257,7 +1265,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
tx->flags |= IEEE80211_TX_UNICAST;
if (unlikely(local->wifi_wme_noack_test))
info->flags |= IEEE80211_TX_CTL_NO_ACK;
- else
+ else if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames
2011-09-29 9:27 [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames Helmut Schaa
@ 2011-09-29 9:59 ` Johannes Berg
2011-09-29 10:02 ` Helmut Schaa
2011-09-29 11:42 ` [PATCHv2] mac80211: Allow noack " Helmut Schaa
2011-10-07 8:56 ` [PATCH] mac80211: Allow NO_ACK " Johannes Berg
2 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2011-09-29 9:59 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless, linville
On Thu, 2011-09-29 at 11:27 +0200, Helmut Schaa wrote:
> Allow injected unicast frames to be sent without having to wait
> for an ACK.
>
> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
> ---
>
> Just in case you're interested in what's the intended purpose of this:
>
> Some clients are staying on scanned channels for a very short period of
> time. hostapd sends out probe responses for each configured BSSID. Under
> some circumstances I can see that the client already left the channel
> while some probe responses are still sent out and thus retried. This
> consumes quite some airtime. Commercial wireless APs (Aruba for example)
> seem to disable retries for probe responses to mitigate such issues.
Makes sense, but I wonder if we really should continue using
radiotap :-) Maybe mgmt-tx in nl80211 would be appropriate.
> @@ -1257,7 +1265,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
> tx->flags |= IEEE80211_TX_UNICAST;
> if (unlikely(local->wifi_wme_noack_test))
> info->flags |= IEEE80211_TX_CTL_NO_ACK;
> - else
> + else if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
> info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
??
johannes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames
2011-09-29 9:59 ` Johannes Berg
@ 2011-09-29 10:02 ` Helmut Schaa
2011-09-29 10:21 ` Johannes Berg
0 siblings, 1 reply; 10+ messages in thread
From: Helmut Schaa @ 2011-09-29 10:02 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, linville
On Thu, Sep 29, 2011 at 11:59 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2011-09-29 at 11:27 +0200, Helmut Schaa wrote:
>> Allow injected unicast frames to be sent without having to wait
>> for an ACK.
>>
>> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
>> ---
>>
>> Just in case you're interested in what's the intended purpose of this:
>>
>> Some clients are staying on scanned channels for a very short period of
>> time. hostapd sends out probe responses for each configured BSSID. Under
>> some circumstances I can see that the client already left the channel
>> while some probe responses are still sent out and thus retried. This
>> consumes quite some airtime. Commercial wireless APs (Aruba for example)
>> seem to disable retries for probe responses to mitigate such issues.
>
> Makes sense, but I wonder if we really should continue using
> radiotap :-) Maybe mgmt-tx in nl80211 would be appropriate.
Hmm, not sure how much work that would be ...
>> @@ -1257,7 +1265,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
>> tx->flags |= IEEE80211_TX_UNICAST;
>> if (unlikely(local->wifi_wme_noack_test))
>> info->flags |= IEEE80211_TX_CTL_NO_ACK;
>> - else
>> + else if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
>> info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
>
> ??
Don't remove the IEEE80211_TX_CTL_NO_ACK flag when it was set via radiotap.
Helmut
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames
2011-09-29 10:02 ` Helmut Schaa
@ 2011-09-29 10:21 ` Johannes Berg
2011-09-29 10:50 ` Helmut Schaa
0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2011-09-29 10:21 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless, linville
On Thu, 2011-09-29 at 12:02 +0200, Helmut Schaa wrote:
> > Makes sense, but I wonder if we really should continue using
> > radiotap :-) Maybe mgmt-tx in nl80211 would be appropriate.
An nl80211 flag, and the right modifications in hostapd to use mgmt-tx
and the flag. But I guess that's just another thing on the growing list
of things to do to move hostapd to not use monitor interfaces ...
> Hmm, not sure how much work that would be ...
>
> >> @@ -1257,7 +1265,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
> >> tx->flags |= IEEE80211_TX_UNICAST;
> >> if (unlikely(local->wifi_wme_noack_test))
> >> info->flags |= IEEE80211_TX_CTL_NO_ACK;
> >> - else
> >> + else if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
> >> info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
> >
> > ??
>
> Don't remove the IEEE80211_TX_CTL_NO_ACK flag when it was set via radiotap.
Well, ok, but the logic is:
if (flag not set)
unset flag
which is kinda useless, right?
johannes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames
2011-09-29 10:21 ` Johannes Berg
@ 2011-09-29 10:50 ` Helmut Schaa
0 siblings, 0 replies; 10+ messages in thread
From: Helmut Schaa @ 2011-09-29 10:50 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, linville
On Thu, Sep 29, 2011 at 12:21 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
>> >> @@ -1257,7 +1265,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
>> >> tx->flags |= IEEE80211_TX_UNICAST;
>> >> if (unlikely(local->wifi_wme_noack_test))
>> >> info->flags |= IEEE80211_TX_CTL_NO_ACK;
>> >> - else
>> >> + else if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
>> >> info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
>> >
>> > ??
>>
>> Don't remove the IEEE80211_TX_CTL_NO_ACK flag when it was set via radiotap.
>
> Well, ok, but the logic is:
>
> if (flag not set)
> unset flag
>
> which is kinda useless, right?
Haha, right!
Since the tx info is always initialized to 0 the code was useless before
as well :) but now it is even more useless ...
I guess it was good for documentary purposes. Hence, I'll replace it with
a comment instead ...
Helmut
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCHv2] mac80211: Allow noack flag overwrite for injected frames
2011-09-29 9:27 [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames Helmut Schaa
2011-09-29 9:59 ` Johannes Berg
@ 2011-09-29 11:42 ` Helmut Schaa
2011-10-27 19:30 ` Johannes Berg
2011-10-07 8:56 ` [PATCH] mac80211: Allow NO_ACK " Johannes Berg
2 siblings, 1 reply; 10+ messages in thread
From: Helmut Schaa @ 2011-09-29 11:42 UTC (permalink / raw)
To: linux-wireless; +Cc: linville, johannes, Helmut Schaa
Allow injected unicast frames to be sent without having to wait
for an ACK.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
include/net/ieee80211_radiotap.h | 1 +
net/mac80211/tx.c | 15 +++++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index b0be5fb..7e2c4d4 100644
--- a/include/net/ieee80211_radiotap.h
+++ b/include/net/ieee80211_radiotap.h
@@ -251,6 +251,7 @@ enum ieee80211_radiotap_type {
* retries */
#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */
#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */
+#define IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 /* don't expect an ack */
/* For IEEE80211_RADIOTAP_MCS */
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 0107263..c1bad18 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1047,6 +1047,7 @@ static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len,
NULL);
+ u16 txflags;
info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
tx->flags &= ~IEEE80211_TX_FRAGMENTED;
@@ -1095,6 +1096,13 @@ static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
tx->flags |= IEEE80211_TX_FRAGMENTED;
break;
+ case IEEE80211_RADIOTAP_TX_FLAGS:
+ txflags = le16_to_cpu(get_unaligned((__le16*)
+ iterator.this_arg));
+ if (txflags & IEEE80211_RADIOTAP_F_TX_NOACK)
+ info->flags |= IEEE80211_TX_CTL_NO_ACK;
+ break;
+
/*
* Please update the file
* Documentation/networking/mac80211-injection.txt
@@ -1257,8 +1265,11 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
tx->flags |= IEEE80211_TX_UNICAST;
if (unlikely(local->wifi_wme_noack_test))
info->flags |= IEEE80211_TX_CTL_NO_ACK;
- else
- info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
+ /*
+ * Flags are initialized to 0. Hence, no need to
+ * explicitly unset IEEE80211_TX_CTL_NO_ACK since
+ * it might already be set for injected frames.
+ */
}
if (tx->flags & IEEE80211_TX_FRAGMENTED) {
--
1.7.3.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCHv2] mac80211: Allow noack flag overwrite for injected frames
2011-09-29 11:42 ` [PATCHv2] mac80211: Allow noack " Helmut Schaa
@ 2011-10-27 19:30 ` Johannes Berg
2011-10-28 3:46 ` Helmut Schaa
0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2011-10-27 19:30 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless, linville
On Thu, 2011-09-29 at 13:42 +0200, Helmut Schaa wrote:
> Allow injected unicast frames to be sent without having to wait
> for an ACK.
Did you ever have a hostapd patch for this?
johannes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCHv2] mac80211: Allow noack flag overwrite for injected frames
2011-10-27 19:30 ` Johannes Berg
@ 2011-10-28 3:46 ` Helmut Schaa
0 siblings, 0 replies; 10+ messages in thread
From: Helmut Schaa @ 2011-10-28 3:46 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, linville
On Thu, Oct 27, 2011 at 9:30 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2011-09-29 at 13:42 +0200, Helmut Schaa wrote:
>> Allow injected unicast frames to be sent without having to wait
>> for an ACK.
>
> Did you ever have a hostapd patch for this?
Yes but I'm traveling right now. But is this still needed since you removed
the monitor interface requirement in hostapd? But at least a rebased
version to make use of your work makes sense ...
Helmut
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames
2011-09-29 9:27 [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames Helmut Schaa
2011-09-29 9:59 ` Johannes Berg
2011-09-29 11:42 ` [PATCHv2] mac80211: Allow noack " Helmut Schaa
@ 2011-10-07 8:56 ` Johannes Berg
2011-10-07 9:43 ` Helmut Schaa
2 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2011-10-07 8:56 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless, linville
On Thu, 2011-09-29 at 11:27 +0200, Helmut Schaa wrote:
> + case IEEE80211_RADIOTAP_TX_FLAGS:
> + txflags = le16_to_cpu(get_unaligned((__le16*)
> + iterator.this_arg));
> + if (txflags & IEEE80211_RADIOTAP_F_TX_NOACK)
> + info->flags |= IEEE80211_TX_CTL_NO_ACK;
> + break;
> +
> /*
> * Please update the file
> * Documentation/networking/mac80211-injection.txt
... :-)
johannes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames
2011-10-07 8:56 ` [PATCH] mac80211: Allow NO_ACK " Johannes Berg
@ 2011-10-07 9:43 ` Helmut Schaa
0 siblings, 0 replies; 10+ messages in thread
From: Helmut Schaa @ 2011-10-07 9:43 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, linville
On Fri, Oct 7, 2011 at 10:56 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2011-09-29 at 11:27 +0200, Helmut Schaa wrote:
>
>> + case IEEE80211_RADIOTAP_TX_FLAGS:
>> + txflags = le16_to_cpu(get_unaligned((__le16*)
>> + iterator.this_arg));
>> + if (txflags & IEEE80211_RADIOTAP_F_TX_NOACK)
>> + info->flags |= IEEE80211_TX_CTL_NO_ACK;
>> + break;
>> +
>> /*
>> * Please update the file
>> * Documentation/networking/mac80211-injection.txt
>
> ... :-)
Oops. I'll send a followup ...
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-10-28 3:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-29 9:27 [PATCH] mac80211: Allow NO_ACK flag overwrite for injected frames Helmut Schaa
2011-09-29 9:59 ` Johannes Berg
2011-09-29 10:02 ` Helmut Schaa
2011-09-29 10:21 ` Johannes Berg
2011-09-29 10:50 ` Helmut Schaa
2011-09-29 11:42 ` [PATCHv2] mac80211: Allow noack " Helmut Schaa
2011-10-27 19:30 ` Johannes Berg
2011-10-28 3:46 ` Helmut Schaa
2011-10-07 8:56 ` [PATCH] mac80211: Allow NO_ACK " Johannes Berg
2011-10-07 9:43 ` Helmut Schaa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox