Linux wireless drivers development
 help / color / mirror / Atom feed
From: Zhao Li <enderaoelyther@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Thomas Pedersen <thomas@adapt-ip.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zhao Li <enderaoelyther@gmail.com>
Subject: [PATCH v2 0/2] wifi: handle S1G and extension-frame RX layout
Date: Fri, 12 Jun 2026 00:19:44 +0800	[thread overview]
Message-ID: <20260611161943.91069-4-enderaoelyther@gmail.com> (raw)
In-Reply-To: <20260610162700.58722-1-enderaoelyther@gmail.com>

Hi,

v2 keeps the mac80211 RX fix focused on the extension-frame layout and
adds a small cfg80211 companion fix for S1G scan-result TSF handling.

The first patch changes the RX entry path to validate and linearize S1G
beacons before generic RX dispatch, route S1G beacons without regular
addr2 station lookup, and drop unsupported extension frames before they
can reach regular-header address handling.

The second patch keeps cfg80211's regular management-frame TSF read out
of the S1G path and derives the S1G BSS TSF from the S1G beacon timestamp
and the S1G Beacon Compatibility element.

For process clarity: I used AI-assisted tooling for data-flow tracing,
state-machine analysis, code review, security checks, side-effect review,
and patch drafting. I reviewed the result and take responsibility for the
submission.

Changes since v1:
- Linearize S1G beacon SKBs together with management frames instead of
  using a later pskb_may_pull() check.
- Keep the management-frame and S1G beacon minimum-length checks tied to
  their respective frame layouts.
- Route S1G beacons through the station/default-link RX path without
  regular addr2 station lookup.
- Avoid repeated per-sink S1G guards in the address-copy and MLO
  translation paths by invoking RX handlers directly for S1G beacons.
- Drop unsupported non-S1G extension frames before generic RX dispatch.
- Add the cfg80211 S1G TSF companion fix.

Zhao Li (2):
  wifi: mac80211: validate extension-frame layout before RX
  wifi: cfg80211: derive S1G beacon TSF from S1G fields

 net/mac80211/rx.c   | 34 ++++++++++++++++++++++++++++++++--
 net/mac80211/util.c |  3 +++
 net/wireless/scan.c |  5 +++--
 3 files changed, 38 insertions(+), 4 deletions(-)

-- 
2.50.1 (Apple Git-155)

  parent reply	other threads:[~2026-06-11 16:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 16:27 [PATCH] wifi: mac80211: validate S1G beacon length before RX Zhao Li
2026-06-11 12:03 ` Johannes Berg
2026-06-11 16:19 ` Zhao Li [this message]
2026-06-11 16:19   ` [PATCH v2 1/2] wifi: mac80211: validate extension-frame layout " Zhao Li
2026-06-11 16:19   ` [PATCH v2 2/2] wifi: cfg80211: derive S1G beacon TSF from S1G fields Zhao Li
2026-06-12  2:28     ` Lachlan Hodges
2026-06-12  0:54   ` [PATCH v2 0/2] wifi: handle S1G and extension-frame RX layout Lachlan Hodges

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=20260611161943.91069-4-enderaoelyther@gmail.com \
    --to=enderaoelyther@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=thomas@adapt-ip.com \
    /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