From: Ben Greear <greearb@candelatech.com>
To: "Linus Lüssing" <linus.luessing@c0d3.blue>, ath10k@lists.infradead.org
Cc: "Linus Lüssing" <ll@simonwunderlich.de>,
"Simon Wunderlich" <sw@simonwunderlich.de>
Subject: Re: [RFC PATCH] ath10k: fix RX of frames with broken FCS in monitor mode
Date: Fri, 1 Nov 2019 08:46:53 -0700 [thread overview]
Message-ID: <8d256f92-a74b-1670-4493-8e36f402548b@candelatech.com> (raw)
In-Reply-To: <20191101111138.9086-1-linus.luessing@c0d3.blue>
On 11/1/19 4:11 AM, Linus Lüssing wrote:
> From: Linus Lüssing <ll@simonwunderlich.de>
>
> So far, frames were forwarded regardless of the FCS correctness leading
> to userspace applications listening on the monitor mode interface to
> receive potentially broken frames, even with the "fcsfail" flag unset.
>
> By default, with the "fcsfail" flag of a monitor mode interface
> unset, frames with FCS errors should be dropped. With this patch, the
> fcsfail flag is taken into account correctly.
>
> Signed-off-by: Linus Lüssing <ll@simonwunderlich.de>
> ---
> This was tested on an Open Mesh A41 device, featuring a QCA4019. And
> with this firmware:
>
> https://www.candelatech.com/downloads/ath10k-4019-10-4b/firmware-5-ct-full-community-12.bin-lede.011
>
> But from looking at the code it seems that the vanilla ath10k has the
> same issue, therefore submitting it here.
>
> I'm also not that familiar with the ath10k code yet. So not 100% sure if
> it's the right place for this check. Therefore sending as RFC.
> ---
> drivers/net/wireless/ath/ath10k/htt_rx.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
> index 53f1095de8ff..ce0a16ebb8bb 100644
> --- a/drivers/net/wireless/ath/ath10k/htt_rx.c
> +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
> @@ -1285,6 +1285,12 @@ static void ath10k_process_rx(struct ath10k *ar, struct sk_buff *skb)
>
> status = IEEE80211_SKB_RXCB(skb);
>
> + if (ar->monitor && !(ar->filter_flags & FIF_FCSFAIL) &&
> + status->flag & RX_FLAG_FAILED_FCS_CRC) {
> + dev_kfree_skb_any(skb);
> + return;
> + }
Maybe worth adding a counter like 'rx_drop_crc' to the ath10k_debug struct and increment it here
and also show in debugfs and/or ethtool stats?
And, maybe no check for ar->monitor, in case somehow the frame is still received
with bad CRC even without monitor mode?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2019-11-01 15:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-01 11:11 [RFC PATCH] ath10k: fix RX of frames with broken FCS in monitor mode Linus Lüssing
2019-11-01 15:46 ` Ben Greear [this message]
2019-11-05 13:00 ` Linus Lüssing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8d256f92-a74b-1670-4493-8e36f402548b@candelatech.com \
--to=greearb@candelatech.com \
--cc=ath10k@lists.infradead.org \
--cc=linus.luessing@c0d3.blue \
--cc=ll@simonwunderlich.de \
--cc=sw@simonwunderlich.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox