linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check.
@ 2012-12-05  5:38 Krishna Chaitanya
  2012-12-05  9:04 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Krishna Chaitanya @ 2012-12-05  5:38 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless

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

Signed-off-by: Chaitanya T K<chaitanya.mgit@gmail.com>
---

 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)

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

* Re: [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check.
  2012-12-05  5:38 [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check Krishna Chaitanya
@ 2012-12-05  9:04 ` Johannes Berg
  2012-12-05  9:05   ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2012-12-05  9:04 UTC (permalink / raw)
  To: Krishna Chaitanya; +Cc: linux-wireless

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



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

* Re: [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check.
  2012-12-05  9:04 ` Johannes Berg
@ 2012-12-05  9:05   ` Johannes Berg
  2012-12-05  9:10     ` Krishna Chaitanya
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2012-12-05  9:05 UTC (permalink / raw)
  To: Krishna Chaitanya; +Cc: linux-wireless

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


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

* Re: [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check.
  2012-12-05  9:05   ` Johannes Berg
@ 2012-12-05  9:10     ` Krishna Chaitanya
  2012-12-05  9:18       ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Krishna Chaitanya @ 2012-12-05  9:10 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

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


On Wed, Dec 5, 2012 at 2:35 PM, Johannes Berg <johannes@sipsolutions.net> 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
>

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

* Re: [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check.
  2012-12-05  9:10     ` Krishna Chaitanya
@ 2012-12-05  9:18       ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2012-12-05  9:18 UTC (permalink / raw)
  To: Krishna Chaitanya; +Cc: linux-wireless

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


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

end of thread, other threads:[~2012-12-05  9:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-05  5:38 [PATCH] mac80211: Moving Zero Len subframe reporting under driver capability check Krishna Chaitanya
2012-12-05  9:04 ` Johannes Berg
2012-12-05  9:05   ` Johannes Berg
2012-12-05  9:10     ` Krishna Chaitanya
2012-12-05  9:18       ` Johannes Berg

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