2012-12-05 05:38:37

by Krishna Chaitanya

[permalink] [raw]
Subject: [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check.

Zero Len subframe makes sense only when driver supports the reporting
of zero len subframes.

Signed-off-by: Chaitanya T K<[email protected]>
---

net/mac80211/rx.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index db343fa..3f1443b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -281,10 +281,11 @@ ieee80211_add_rx_radiotap_header(struct
ieee80211_local *local,
cpu_to_le32(1 << IEEE80211_RADIOTAP_AMPDU_STATUS);
put_unaligned_le32(status->ampdu_reference, pos);
pos += 4;
- if (status->flag & RX_FLAG_AMPDU_REPORT_ZEROLEN)
+ if (status->flag & RX_FLAG_AMPDU_REPORT_ZEROLEN) {
flags |= IEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN;
- if (status->flag & RX_FLAG_AMPDU_IS_ZEROLEN)
- flags |= IEEE80211_RADIOTAP_AMPDU_IS_ZEROLEN;
+ if (status->flag & RX_FLAG_AMPDU_IS_ZEROLEN)
+ flags |= IEEE80211_RADIOTAP_AMPDU_IS_ZEROLEN;
+ }
if (status->flag & RX_FLAG_AMPDU_LAST_KNOWN)
flags |= IEEE80211_RADIOTAP_AMPDU_LAST_KNOWN;
if (status->flag & RX_FLAG_AMPDU_IS_LAST)


2012-12-05 09:17:56

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check.

On Wed, 2012-12-05 at 14:40 +0530, Krishna Chaitanya wrote:
> Agree. this is just a check to avoid buggy drivers misusing the field :-)

Fair enough, if you resend a patch that applies I'll do it.

johannes


2012-12-05 09:05:30

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check.

On Wed, 2012-12-05 at 10:04 +0100, Johannes Berg wrote:
> On Wed, 2012-12-05 at 11:08 +0530, Krishna Chaitanya wrote:
> > Zero Len subframe makes sense only when driver supports the reporting
> > of zero len subframes.
>
> Yes, but if the driver is stupid enough to set RX_FLAG_AMPDU_IS_ZEROLEN
> without setting RX_FLAG_AMPDU_REPORT_ZEROLEN I'm not sure we care?

Plus your patch doesn't apply anyway.

johannes


2012-12-05 09:04:32

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check.

On Wed, 2012-12-05 at 11:08 +0530, Krishna Chaitanya wrote:
> Zero Len subframe makes sense only when driver supports the reporting
> of zero len subframes.

Yes, but if the driver is stupid enough to set RX_FLAG_AMPDU_IS_ZEROLEN
without setting RX_FLAG_AMPDU_REPORT_ZEROLEN I'm not sure we care?

johannes



2012-12-05 09:16:48

by Krishna Chaitanya

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check.

Agree. this is just a check to avoid buggy drivers misusing the field :-)


On Wed, Dec 5, 2012 at 2:35 PM, Johannes Berg <[email protected]> wrote:
> On Wed, 2012-12-05 at 10:04 +0100, Johannes Berg wrote:
>> On Wed, 2012-12-05 at 11:08 +0530, Krishna Chaitanya wrote:
>> > Zero Len subframe makes sense only when driver supports the reporting
>> > of zero len subframes.
>>
>> Yes, but if the driver is stupid enough to set RX_FLAG_AMPDU_IS_ZEROLEN
>> without setting RX_FLAG_AMPDU_REPORT_ZEROLEN I'm not sure we care?
>
> Plus your patch doesn't apply anyway.
>
> johannes
>