diff mbox

mac80211: Moving Zero Len subframe reporting under driver capability check.

Message ID CABPxzYKvtgdoxU-dFS2F0tz_1F6cz02uvVgy5qfMPCEbLOZZ=A@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Krishna Chaitanya Dec. 5, 2012, 5:38 a.m. UTC
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(-)

                if (status->flag & RX_FLAG_AMPDU_IS_LAST)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Johannes Berg Dec. 5, 2012, 9:04 a.m. UTC | #1
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


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Johannes Berg Dec. 5, 2012, 9:05 a.m. UTC | #2
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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Krishna Chaitanya Dec. 5, 2012, 9:10 a.m. UTC | #3
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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Johannes Berg Dec. 5, 2012, 9:18 a.m. UTC | #4
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

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

Patch

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;