From: Christian Lamparter <chunkeey@gmail.com>
To: Masi Osmani <mas-i@hotmail.de>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 12/12] carl9170: rx: handle zeroed PLCP CCK rate as corrupted frame
Date: Sat, 21 Mar 2026 22:42:26 +0100 [thread overview]
Message-ID: <cbeeac30-ff8e-4db0-bba9-30942001f557@gmail.com> (raw)
In-Reply-To: <AM7PPF5613FA0B686F41D14D2742825BE219443A@AM7PPF5613FA0B6.EURP251.PROD.OUTLOOK.COM>
On 3/15/26 11:56 PM, Masi Osmani wrote:
> The firmware occasionally delivers frames tagged as CCK modulation
> with a zeroed PLCP rate byte (plcp[0] == 0x00). This typically
> happens after PHY state degradation from a failed channel change or
> from RF noise on weak signals.
And the firmware just "delivers" the frame that it gets from the hardware.
Apart from filtering (if enabled) it doesn't/shouldn't edit it.
> Currently these frames fall through to the default case and produce
> a rate-limited wiphy_err log:
>
> ieee80211 phy3: invalid plcp cck rate (0).
>
> The frame is garbage regardless of the log level. Handle plcp[0]
> == 0x00 as a dedicated case: increment the rx_dropped counter
> (visible via debugfs) and return -EINVAL silently. Downgrade the
> remaining default case log from wiphy_err to wiphy_dbg so that
> genuinely unexpected PLCP values can still be investigated via
> dynamic debug without polluting normal dmesg output.
>
> Signed-off-by: Masi Osmani <mas-i@hotmail.de>
> ---
> drivers/net/wireless/ath/carl9170/rx.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> --- a/drivers/net/wireless/ath/carl9170/rx.c 2026-03-15 23:51:23.599698582 +0100
> +++ b/drivers/net/wireless/ath/carl9170/rx.c 2026-03-15 23:52:21.041912498 +0100
> @@ -372,9 +372,18 @@ static int carl9170_rx_mac_status(struct
> case AR9170_RX_PHY_RATE_CCK_11M:
> status->rate_idx = 3;
> break;
> + case 0x00:
> + /*
> + * Zeroed PLCP rate byte: the firmware delivered a
> + * corrupted frame, typically after PHY degradation
> + * from a failed channel change or from RF noise on
> + * weak signals. Drop silently.
> + */
> + ar->rx_dropped++;
> + return -EINVAL;
I don't think we can really tell? From what I know the antenna must have pick up
this frame that way already. Is there some insight in how the hardware works?
Because from what I can gleam this "head->plcp[0]" seems to be pretty much the raw
value from what the PHY produced.
Note: This all might be because AR9170_MAC_RX_CTRL_PASS_TO_HOST is enabled.
> default:
> if (net_ratelimit()) {
> - wiphy_err(ar->hw->wiphy, "invalid plcp cck "
> + wiphy_dbg(ar->hw->wiphy, "invalid plcp cck "
> "rate (%x).\n", head->plcp[0]);
> }
Downgrading this to debug? Yes, that I'm totally fine with.
next prev parent reply other threads:[~2026-03-21 21:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260315225609.61791-1-mas-i@hotmail.de>
2026-03-15 22:56 ` [PATCH 12/12] carl9170: rx: handle zeroed PLCP CCK rate as corrupted frame Masi Osmani
2026-03-21 21:42 ` Christian Lamparter [this message]
[not found] <20260317091045.23696-1-mas-i@hotmail.de>
2026-03-17 9:10 ` Masi Osmani
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=cbeeac30-ff8e-4db0-bba9-30942001f557@gmail.com \
--to=chunkeey@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mas-i@hotmail.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