2011-11-24 08:13:34

by Helmut Schaa

[permalink] [raw]
Subject: [PATCH] rt2x00: Pass BlockAck and BlackAckReq frames to mac80211 in monitor mode

Previously BlockAcks were always dropped by the rt2800 hardware while
BlockAckReqs were always accepted. However, both are only useful on
monitor interfaces at the moment and both are control frames. So
pass them up when mac80211 sets FIF_CONTROL.

Signed-off-by: Helmut Schaa <[email protected]>
---
drivers/net/wireless/rt2x00/rt2800lib.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 1ba079d..e5df380 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1203,8 +1203,10 @@ void rt2800_config_filter(struct rt2x00_dev *rt2x00dev,
!(filter_flags & FIF_CONTROL));
rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_PSPOLL,
!(filter_flags & FIF_PSPOLL));
- rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BA, 1);
- rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BAR, 0);
+ rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BA,
+ !(filter_flags & FIF_CONTROL));
+ rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BAR,
+ !(filter_flags & FIF_CONTROL));
rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_CNTL,
!(filter_flags & FIF_CONTROL));
rt2800_register_write(rt2x00dev, RX_FILTER_CFG, reg);
--
1.7.3.4



2011-11-24 09:48:36

by Gertjan van Wingerde

[permalink] [raw]
Subject: Re: [PATCH] rt2x00: Pass BlockAck and BlackAckReq frames to mac80211 in monitor mode

On Thu, Nov 24, 2011 at 9:13 AM, Helmut Schaa
<[email protected]> wrote:
> Previously BlockAcks were always dropped by the rt2800 hardware while
> BlockAckReqs were always accepted. However, both are only useful on
> monitor interfaces at the moment and both are control frames. So
> pass them up when mac80211 sets FIF_CONTROL.
>
> Signed-off-by: Helmut Schaa <[email protected]>

Acked-by: Gertjan van Wingerde <[email protected]>

> ---
> ?drivers/net/wireless/rt2x00/rt2800lib.c | ? ?6 ++++--
> ?1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 1ba079d..e5df380 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -1203,8 +1203,10 @@ void rt2800_config_filter(struct rt2x00_dev *rt2x00dev,
> ? ? ? ? ? ? ? ? ? ? ? ? ? !(filter_flags & FIF_CONTROL));
> ? ? ? ?rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_PSPOLL,
> ? ? ? ? ? ? ? ? ? ? ? ? ? !(filter_flags & FIF_PSPOLL));
> - ? ? ? rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BA, 1);
> - ? ? ? rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BAR, 0);
> + ? ? ? rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BA,
> + ? ? ? ? ? ? ? ? ? ? ? ? ?!(filter_flags & FIF_CONTROL));
> + ? ? ? rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BAR,
> + ? ? ? ? ? ? ? ? ? ? ? ? ?!(filter_flags & FIF_CONTROL));
> ? ? ? ?rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_CNTL,
> ? ? ? ? ? ? ? ? ? ? ? ? ? !(filter_flags & FIF_CONTROL));
> ? ? ? ?rt2800_register_write(rt2x00dev, RX_FILTER_CFG, reg);
> --
> 1.7.3.4
>
>



--
---
Gertjan

2011-11-24 15:38:43

by Ivo Van Doorn

[permalink] [raw]
Subject: Re: [PATCH] rt2x00: Pass BlockAck and BlackAckReq frames to mac80211 in monitor mode

On Thu, Nov 24, 2011 at 9:13 AM, Helmut Schaa
<[email protected]> wrote:
> Previously BlockAcks were always dropped by the rt2800 hardware while
> BlockAckReqs were always accepted. However, both are only useful on
> monitor interfaces at the moment and both are control frames. So
> pass them up when mac80211 sets FIF_CONTROL.
>
> Signed-off-by: Helmut Schaa <[email protected]>

Acked-by: Ivo van Doorn <[email protected]>

> ---
> ?drivers/net/wireless/rt2x00/rt2800lib.c | ? ?6 ++++--
> ?1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 1ba079d..e5df380 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -1203,8 +1203,10 @@ void rt2800_config_filter(struct rt2x00_dev *rt2x00dev,
> ? ? ? ? ? ? ? ? ? ? ? ? ? !(filter_flags & FIF_CONTROL));
> ? ? ? ?rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_PSPOLL,
> ? ? ? ? ? ? ? ? ? ? ? ? ? !(filter_flags & FIF_PSPOLL));
> - ? ? ? rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BA, 1);
> - ? ? ? rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BAR, 0);
> + ? ? ? rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BA,
> + ? ? ? ? ? ? ? ? ? ? ? ? ?!(filter_flags & FIF_CONTROL));
> + ? ? ? rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_BAR,
> + ? ? ? ? ? ? ? ? ? ? ? ? ?!(filter_flags & FIF_CONTROL));
> ? ? ? ?rt2x00_set_field32(&reg, RX_FILTER_CFG_DROP_CNTL,
> ? ? ? ? ? ? ? ? ? ? ? ? ? !(filter_flags & FIF_CONTROL));
> ? ? ? ?rt2800_register_write(rt2x00dev, RX_FILTER_CFG, reg);
> --
> 1.7.3.4
>
>