* [PATCH 1/1] mac80211: Fix ieee80211_rx_reorder_ampdu: ignore QoS null packets
@ 2008-07-07 12:32 Tomas Winkler
2008-07-07 12:37 ` Stefanik Gábor
0 siblings, 1 reply; 3+ messages in thread
From: Tomas Winkler @ 2008-07-07 12:32 UTC (permalink / raw)
To: linville, johannes, yi.zhu; +Cc: linux-wireless, Emmanuel Grumbach
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This patch fixes the check at the entrance to ieee80211_rx_reorder_ampdu.
This check has been broken by 511fe3f3c4ba0b5b77421336f64a19b6cd00e65f
'mac80211: rx.c use new helpers'
Letting QoS NULL packet in ieee80211_rx_reorder_ampdu led to packet loss in
RX.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
include/linux/ieee80211.h | 11 +++++++++++
net/mac80211/rx.c | 2 +-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index aa603c3..3865d4c 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -460,6 +460,17 @@ static inline int ieee80211_is_nullfunc(__le16 fc)
cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC);
}
+/**
+ * ieee80211_is_nullfunc - check if FTYPE=IEEE80211_FTYPE_DATA and
+ * STYPE=IEEE80211_STYPE_QOS_NULLFUNC
+ * @fc: frame control bytes in little-endian byteorder
+ */
+static inline int ieee80211_is_qos_nullfunc(__le16 fc)
+{
+ return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
+ cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
+}
+
struct ieee80211s_hdr {
u8 flags;
u8 ttl;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 6a88e8f..a6e8214 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2052,7 +2052,7 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local,
tid_agg_rx = sta->ampdu_mlme.tid_rx[tid];
/* null data frames are excluded */
- if (unlikely(ieee80211_is_nullfunc(hdr->frame_control)))
+ if (unlikely(ieee80211_is_qos_nullfunc(hdr->frame_control)))
goto end_reorder;
/* new un-ordered ampdu frame - process it */
--
1.5.4.1
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] mac80211: Fix ieee80211_rx_reorder_ampdu: ignore QoS null packets
2008-07-07 12:32 [PATCH 1/1] mac80211: Fix ieee80211_rx_reorder_ampdu: ignore QoS null packets Tomas Winkler
@ 2008-07-07 12:37 ` Stefanik Gábor
2008-07-07 13:02 ` Tomas Winkler
0 siblings, 1 reply; 3+ messages in thread
From: Stefanik Gábor @ 2008-07-07 12:37 UTC (permalink / raw)
To: Tomas Winkler
Cc: linville, johannes, yi.zhu, linux-wireless, Emmanuel Grumbach
On Mon, Jul 7, 2008 at 2:32 PM, Tomas Winkler <tomas.winkler@intel.com> wrote:
> From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
>
> This patch fixes the check at the entrance to ieee80211_rx_reorder_ampdu.
> This check has been broken by 511fe3f3c4ba0b5b77421336f64a19b6cd00e65f
> 'mac80211: rx.c use new helpers'
>
> Letting QoS NULL packet in ieee80211_rx_reorder_ampdu led to packet loss in
> RX.
>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> ---
> include/linux/ieee80211.h | 11 +++++++++++
> net/mac80211/rx.c | 2 +-
> 2 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
> index aa603c3..3865d4c 100644
> --- a/include/linux/ieee80211.h
> +++ b/include/linux/ieee80211.h
> @@ -460,6 +460,17 @@ static inline int ieee80211_is_nullfunc(__le16 fc)
> cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC);
> }
>
> +/**
> + * ieee80211_is_nullfunc - check if FTYPE=IEEE80211_FTYPE_DATA and
Was this intended to be "ieee80211_is_qos_nullfunc - check..."?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] mac80211: Fix ieee80211_rx_reorder_ampdu: ignore QoS null packets
2008-07-07 12:37 ` Stefanik Gábor
@ 2008-07-07 13:02 ` Tomas Winkler
0 siblings, 0 replies; 3+ messages in thread
From: Tomas Winkler @ 2008-07-07 13:02 UTC (permalink / raw)
To: Stefanik Gábor
Cc: linville, johannes, yi.zhu, linux-wireless, Emmanuel Grumbach
On Mon, Jul 7, 2008 at 3:37 PM, Stefanik G=E1bor <netrolller.3d@gmail.c=
om> wrote:
> On Mon, Jul 7, 2008 at 2:32 PM, Tomas Winkler <tomas.winkler@intel.co=
m> wrote:
>> From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
>>
>> This patch fixes the check at the entrance to ieee80211_rx_reorder_a=
mpdu.
>> This check has been broken by 511fe3f3c4ba0b5b77421336f64a19b6cd00e6=
5f
>> 'mac80211: rx.c use new helpers'
>>
>> Letting QoS NULL packet in ieee80211_rx_reorder_ampdu led to packet =
loss in
>> RX.
>>
>> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
>> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
>> ---
>> include/linux/ieee80211.h | 11 +++++++++++
>> net/mac80211/rx.c | 2 +-
>> 2 files changed, 12 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
>> index aa603c3..3865d4c 100644
>> --- a/include/linux/ieee80211.h
>> +++ b/include/linux/ieee80211.h
>> @@ -460,6 +460,17 @@ static inline int ieee80211_is_nullfunc(__le16 =
fc)
>> cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NUL=
LFUNC);
>> }
>>
>> +/**
>> + * ieee80211_is_nullfunc - check if FTYPE=3DIEEE80211_FTYPE_DATA an=
d
>
> Was this intended to be "ieee80211_is_qos_nullfunc - check..."?
Thanks. V2 was posted.
Tomas
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-07 13:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-07 12:32 [PATCH 1/1] mac80211: Fix ieee80211_rx_reorder_ampdu: ignore QoS null packets Tomas Winkler
2008-07-07 12:37 ` Stefanik Gábor
2008-07-07 13:02 ` Tomas Winkler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox