ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: Ben Greear <greearb@candelatech.com>
Cc: "Linus Lüssing" <ll@simonwunderlich.de>,
	ath10k@lists.infradead.org,
	"Simon Wunderlich" <sw@simonwunderlich.de>
Subject: Re: [RFC PATCH] ath10k: fix RX of frames with broken FCS in monitor mode
Date: Tue, 5 Nov 2019 14:00:19 +0100	[thread overview]
Message-ID: <20191105125152.GB10238@otheros> (raw)
In-Reply-To: <8d256f92-a74b-1670-4493-8e36f402548b@candelatech.com>

On Fri, Nov 01, 2019 at 08:46:53AM -0700, Ben Greear wrote:
> > 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?

Ok.

> 
> And, maybe no check for ar->monitor, in case somehow the frame is still received
> with bad CRC even without monitor mode?

I think ath9k is also checking for "ah->is_monitoring" here:

https://elixir.bootlin.com/linux/v5.3.8/source/drivers/net/wireless/ath/ath9k/common.c#L96

And I didn't want to divert from this. Should I remove it anyway?

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

      reply	other threads:[~2019-11-05 13:00 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
2019-11-05 13:00   ` Linus Lüssing [this message]

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=20191105125152.GB10238@otheros \
    --to=linus.luessing@c0d3.blue \
    --cc=ath10k@lists.infradead.org \
    --cc=greearb@candelatech.com \
    --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