Skip to content

Two patches supporting a soft AP running on a virtual interface - #7778

Open
pelwell wants to merge 4 commits into
raspberrypi:rpi-6.18.yfrom
pelwell:softap
Open

pelwell wants to merge 4 commits into
raspberrypi:rpi-6.18.yfrom
pelwell:softap

Conversation

@pelwell

@pelwell pelwell commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Creating a virtual WiFi interface allows one to create a soft AP while remaining connected as a client of an upstream AP on the real WiFi interface. Existing firmware(s?) support this, but it works best when the soft AP uses the same channel as the upstream AP. These patches limit channel hopping, and also prevent the upstream connection being taken down when the soft AP is stopped.

Apply some standard GitHub Actions security measures:

- Limit the GITHUB_TOKEN to read-only repository access with a
  top-level "permissions: contents: read", rather than relying on the
  repository default, which may grant write access.
- Set "persist-credentials: false" on all checkouts so the token is not
  left in .git/config for later build steps to read.
- Pin all actions to commit SHAs instead of mutable tags, guarding
  against a compromised tag being moved to malicious code. This is most
  important for the third-party webispy/checkpatch-action. At the same
  time, update actions/checkout to v7.0.1 and actions/upload-artifact
  to v7.0.2; neither has breaking changes relevant to these workflows.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
webispy/checkpatch-action runs checkpatch.pl from its webispy/checkpatch
Docker image, which was last built in February 2023. That copy is
missing years of upstream changes, and still applies the networking
block comment rule dropped in commit 82b8000 ("net: drop special
comment style"), so it reports warnings that local runs don't.

Point the action's CHECKPATCH_COMMAND at the PR's own
scripts/checkpatch.pl so each branch is checked against its own rules.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
brcmf_cfg80211_start_ap only takes the device down (BRCMF_C_DOWN) when
the AP is on the primary interface or the firmware can't run multiple
channels/bands, but brcmf_cfg80211_stop_ap always does a full
DOWN/SET_AP 0/UP reset for the first AP interface. When the AP is a
virtual interface alongside an associated STA (e.g. a NetworkManager
"shared" hotspot on an __ap vif), stopping or restarting the AP
therefore disconnects the upstream STA.

Factor the start_ap condition out into brcmf_ap_owns_radio() and, when
the AP doesn't own the radio, just disable its BSS with the "bss"
iovar, as is already done for P2P GO interfaces.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
When a soft AP runs on a virtual interface alongside an associated STA,
firmware with multi-channel support will run the two on different
channels, time-sharing the radio. On the SYN43436P this almost
completely breaks traffic forwarded between the interfaces (e.g. a
NetworkManager "shared" hotspot), because frames queued for whichever
interface is off-channel are dropped.

While such an AP is running, set the "mchan_stago_disab" iovar, which
disables multi-channel operation for STA + GO/AP concurrency. The
firmware then keeps the AP on the STA's channel: it starts there
regardless of the channel requested, and follows the STA when it
roams. Clear it again when the AP stops (or fails to start) so that
other concurrency is unaffected. Firmware without the iovar just
ignores the request.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell

pelwell commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Updated the Assisted-by tags and pulled in the workflow changes to test them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant