[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <927cea69-7afc-5c35-df8d-9813392e8928@candelatech.com>
Date: Tue, 5 Nov 2019 09:19:20 -0800
From: Ben Greear <greearb@...delatech.com>
To: Linus Lüssing <linus.luessing@...3.blue>,
ath10k@...ts.infradead.org
Cc: Kalle Valo <kvalo@...eaurora.org>,
"David S . Miller" <davem@...emloft.net>,
Simon Wunderlich <sw@...onwunderlich.de>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Linus Lüssing <ll@...onwunderlich.de>
Subject: Re: [PATCH net-next] ath10k: fix RX of frames with broken FCS in
monitor mode
On 11/5/19 8:49 AM, Linus Lüssing wrote:
> From: Linus Lüssing <ll@...onwunderlich.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.
>
> Cc: Simon Wunderlich <sw@...onwunderlich.de>
> Signed-off-by: Linus Lüssing <ll@...onwunderlich.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.
>
> Changelog RFC->v1:
>
> * removed "ar->monitor" check
> * added a debug counter
Thanks for adding the counter. Since it us u32, I doubt you need the spin lock
below?
--Ben
> + if (!(ar->filter_flags & FIF_FCSFAIL) &&
> + status->flag & RX_FLAG_FAILED_FCS_CRC) {
> + spin_lock_bh(&ar->data_lock);
> + ar->stats.rx_crc_err_drop++;
> + spin_unlock_bh(&ar->data_lock);
> +
> + dev_kfree_skb_any(skb);
> + return;
> + }
> +
> ath10k_dbg(ar, ATH10K_DBG_DATA,
> "rx skb %pK len %u peer %pM %s %s sn %u %s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
> skb,
>
--
Ben Greear <greearb@...delatech.com>
Candela Technologies Inc http://www.candelatech.com
Powered by blists - more mailing lists