Skip to content
Open

Misc2 #1352

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0b9d885
confd: hardware: Coding style
mattiaswal Jan 11, 2026
7ab270a
yang: wifi: Use correct type for counters
mattiaswal Jan 11, 2026
0fc7a1a
confd: core: Handle when custom-phys-address is changed on a Wi-Fi in…
mattiaswal Jan 11, 2026
d80d5a5
yang: wireguard: Require IP address as endpoint
mattiaswal Jan 12, 2026
f3cf3d1
yanger: show proper phy name for Wi-Fi phys
mattiaswal Jan 12, 2026
bfc7519
confd: wifi: rename setting enable-wifi6
mattiaswal Jan 13, 2026
fc8b1ab
confd: mdns: Fix config syntax
mattiaswal Jan 13, 2026
5f07cc6
workflow: Fix SD-card/eMMC image builds
mattiaswal Jan 19, 2026
de0f3dc
wifi: rpi: Silence some bogus error message related to the firmaware
mattiaswal Jan 20, 2026
6416203
confd: Fix errors in the dependency tracking regarding Wi-Fi
mattiaswal Jan 20, 2026
46f0cdc
confd: wifi: Refactor station out from hardware.c
mattiaswal Jan 20, 2026
45b1414
yang: Lockdown to only allow one station (or scanning) interface per …
mattiaswal Jan 20, 2026
3625551
kernel: Fix kernel panic in brcmfmac
mattiaswal Jan 20, 2026
a1ef052
YANG: Remove precence of wifi-container
mattiaswal Jan 20, 2026
14c22b0
Revert "udev: Always enumerate wifi phys from 0"
mattiaswal Jan 20, 2026
dd67e60
confd: wireguard: Add check for null pointer
mattiaswal Jan 20, 2026
82ae720
confd: Fix migration script
mattiaswal Jan 21, 2026
c4926f2
confd: wifi: Disable legacy rates (802.11b)
mattiaswal Jan 21, 2026
433fd77
confd: wifi: Enable wmm (Wi-Fi Multimedia) - QoS for WiFi.
mattiaswal Jan 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 21 additions & 80 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ on:
- bananapi-bpi-r3
- friendlyarm-nanopi-r2s
default: 'raspberrypi-rpi64'
use_latest_release:
description: 'Use latest release artifacts instead of workflow artifacts'
type: boolean
default: false

jobs:
create-image:
Expand Down Expand Up @@ -54,27 +50,27 @@ jobs:
run: |
case "${{ inputs.board }}" in
raspberrypi-rpi64)
echo "BOOTLOADER=rpi64_boot" >> $GITHUB_ENV
echo "TARGET=aarch64" >> $GITHUB_ENV
echo "BOOTLOADER=rpi64-boot" >> $GITHUB_ENV
echo "ARCH=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=false" >> $GITHUB_ENV
;;
bananapi-bpi-r3)
echo "BOOTLOADER_SD=bpi_r3_sd_boot" >> $GITHUB_ENV
echo "BOOTLOADER_EMMC=bpi_r3_emmc_boot" >> $GITHUB_ENV
echo "TARGET=aarch64" >> $GITHUB_ENV
echo "BOOTLOADER_SD=bpi-r3-sd-boot" >> $GITHUB_ENV
echo "BOOTLOADER_EMMC=bpi-r3-emmc_boot" >> $GITHUB_ENV
echo "ARCH=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=true" >> $GITHUB_ENV
;;
friendlyarm-nanopi-r2s)
echo "BOOTLOADER=nanopi_r2s_boot" >> $GITHUB_ENV
echo "TARGET=aarch64" >> $GITHUB_ENV
echo "BOOTLOADER=nanopi-r2s-boot" >> $GITHUB_ENV
echo "ARCH=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=false" >> $GITHUB_ENV
;;
*)
echo "Error: Unknown board ${{ inputs.board }}"
exit 1
;;
esac
echo "Target: $TARGET for board: ${{ inputs.board }}"
echo "Arch: $ARCH for board: ${{ inputs.board }}"
if [ "$BUILD_EMMC" = "true" ]; then
echo "Building both SD and eMMC images"
echo "SD Bootloader: $BOOTLOADER_SD"
Expand All @@ -85,24 +81,20 @@ jobs:
fi

- name: Download bootloader artifacts
if: ${{ !inputs.use_latest_release }}
run: |
# Download from latest bootloader build workflow on main branch
gh run list --workflow=build-boot.yml --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_boot_run_id
BOOT_RUN_ID=$(cat latest_boot_run_id)

# Download bootloader from latest-boot release tag
if [ "$BUILD_EMMC" = "true" ]; then
# Download both SD and eMMC bootloaders for boards that support both
echo "Downloading SD bootloader: ${BOOTLOADER_SD}"
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER_SD} --dir temp_bootloader_sd/
gh release download latest-boot --pattern "*${BOOTLOADER_SD}*" --dir temp_bootloader_sd/
mkdir -p output_sd/images
cd temp_bootloader_sd/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
cd ../
rm -rf temp_bootloader_sd/

echo "Downloading eMMC bootloader: ${BOOTLOADER_EMMC}"
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER_EMMC} --dir temp_bootloader_emmc/
gh release download latest-boot --pattern "*${BOOTLOADER_EMMC}*" --dir temp_bootloader_emmc/
mkdir -p output_emmc/images
cd temp_bootloader_emmc/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
Expand All @@ -115,7 +107,7 @@ jobs:
ls -la output_emmc/images/
else
# Single bootloader for boards that only support SD
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER} --dir temp_bootloader/
gh release download latest-boot --pattern "*${BOOTLOADER}*" --dir temp_bootloader/

# Extract bootloader directly to output/images
cd temp_bootloader/
Expand All @@ -130,15 +122,14 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download Infix artifacts
if: ${{ !inputs.use_latest_release }}
run: |
# Download from latest Kernelkit Trigger workflow for main branch
gh run list --workflow=164295764 --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_infix_run_id
INFIX_RUN_ID=$(cat latest_infix_run_id)

if [ "$BUILD_EMMC" = "true" ]; then
# Copy Infix artifacts to both SD and eMMC output directories
gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
gh run download ${INFIX_RUN_ID} --name artifact-${ARCH} --dir temp_infix/

cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
Expand All @@ -152,7 +143,7 @@ jobs:
ls -la output_emmc/images/
else
# Single output directory for SD-only boards
gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
gh run download ${INFIX_RUN_ID} --name artifact-${ARCH} --dir temp_infix/

# Extract Infix directly to output/images
cd temp_infix/
Expand All @@ -166,58 +157,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download from latest releases
if: ${{ inputs.use_latest_release }}
run: |
if [ "$BUILD_EMMC" = "true" ]; then
# Download both SD and eMMC bootloaders
gh release download latest-boot --pattern "*${BOOTLOADER_SD}*" --dir temp_bootloader_sd/
mkdir -p output_sd/images
cd temp_bootloader_sd/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
cd ../
rm -rf temp_bootloader_sd/

gh release download latest-boot --pattern "*${BOOTLOADER_EMMC}*" --dir temp_bootloader_emmc/
mkdir -p output_emmc/images
cd temp_bootloader_emmc/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
cd ../
rm -rf temp_bootloader_emmc/

# Download Infix once and extract to both directories
gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
cd ../
rm -rf temp_infix/

echo "SD files extracted to output_sd/images:"
ls -la output_sd/images/
echo "eMMC files extracted to output_emmc/images:"
ls -la output_emmc/images/
else
# Download latest bootloader release
gh release download latest-boot --pattern "*${BOOTLOADER}*" --dir temp_bootloader/
cd temp_bootloader/
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
cd ../
rm -rf temp_bootloader/

# Download latest Infix release
gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
cd temp_infix/
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
cd ../
rm -rf temp_infix/

echo "All files extracted to output/images:"
ls -la output/images/
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Verify extracted files
run: |
if [ "$BUILD_EMMC" = "true" ]; then
Expand Down Expand Up @@ -249,7 +188,7 @@ jobs:
export BR2_EXTERNAL_INFIX_PATH=$PWD
export RELEASE=""
export INFIX_ID="infix"
./utils/mkimage.sh ${{ inputs.board }}
./utils/mkimage.sh -t sdcard ${{ inputs.board }}
fi

- name: Create eMMC image
Expand Down Expand Up @@ -347,10 +286,11 @@ jobs:
# SD Card & eMMC Image Build Complete! 🚀

**Board:** ${{ inputs.board }}
**Target:** ${{ env.TARGET }}
**Arch:** ${{ env.ARCH }}
**SD Bootloader:** ${{ env.BOOTLOADER_SD }}
**eMMC Bootloader:** ${{ env.BOOTLOADER_EMMC }}
**Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
**Bootloader Source:** latest-boot release
**Infix Source:** Latest workflow run on main

## Created Images
$(find output/images/ -name "*.img" -o -name "*.img.bmap" | xargs ls -lh 2>/dev/null | awk '{print "- " $9 " (" $5 ")"}' || echo "- No images found")
Expand All @@ -363,9 +303,10 @@ jobs:
# SD Card Image Build Complete! 🚀

**Board:** ${{ inputs.board }}
**Target:** ${{ env.TARGET }}
**Arch:** ${{ env.ARCH }}
**Bootloader:** ${{ env.BOOTLOADER }}
**Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
**Bootloader Source:** latest-boot release
**Infix Source:** Latest workflow run on main

## Created Images
$(find output/images/ -name "*.img" -o -name "*.img.bmap" | xargs ls -lh 2>/dev/null | awk '{print "- " $9 " (" $5 ")"}' || echo "- No images found")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Rename WiFi PHY devices from phy0 to radio0 to avoid name clashes
SUBSYSTEM=="ieee80211", ACTION=="add", KERNEL=="phy*", \
RUN+="/usr/libexec/infix/rename-wifi-phy %k"
RUN+="/bin/sh -c '/usr/sbin/iw phy %k set name radio%n'"
8 changes: 0 additions & 8 deletions board/common/rootfs/usr/libexec/infix/rename-wifi-phy

This file was deleted.

6 changes: 3 additions & 3 deletions doc/wifi.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ admin@example:/config/hardware/component/radio0/wifi-radio/> leave
- `country-code`: Two-letter ISO 3166-1 code - determines allowed channels and maximum power. Examples: US, DE, GB, SE, FR, JP. **Must match your physical location for legal compliance.**
- `band`: 2.4GHz, 5GHz, or 6GHz (required for AP mode). Band selection automatically enables appropriate WiFi standards (2.4GHz: 802.11n, 5GHz: 802.11n/ac, 6GHz: 802.11n/ac/ax)
- `channel`: Channel number (1-196) or "auto" (required for AP mode). When set to "auto", defaults to channel 6 for 2.4GHz, channel 36 for 5GHz, or channel 109 for 6GHz
- `enable-wifi6`: Boolean (default: false). Opt-in to enable WiFi 6 (802.11ax) on 2.4GHz and 5GHz bands. The 6GHz band always uses WiFi 6 regardless of this setting
- `enable-80211ax`: Boolean (default: false). Opt-in to enable 802.11ax (WiFi 6) on 2.4GHz and 5GHz bands. The 6GHz band always uses 802.11ax regardless of this setting

> [!NOTE]
> TX power and channel width are automatically determined by the driver based on regulatory constraints, PHY mode, and hardware capabilities.
Expand All @@ -105,7 +105,7 @@ admin@example:/config/> edit hardware component radio0 wifi-radio
admin@example:/config/hardware/component/radio0/wifi-radio/> set country-code DE
admin@example:/config/hardware/component/radio0/wifi-radio/> set band 5GHz
admin@example:/config/hardware/component/radio0/wifi-radio/> set channel 36
admin@example:/config/hardware/component/radio0/wifi-radio/> set enable-wifi6 true
admin@example:/config/hardware/component/radio0/wifi-radio/> set enable-80211ax true
admin@example:/config/hardware/component/radio0/wifi-radio/> leave
```

Expand All @@ -121,7 +121,7 @@ admin@example:/config/hardware/component/radio0/wifi-radio/> leave
- Older WiFi 5/4 clients can still connect but won't use WiFi 6 features

> [!NOTE]
> The 6GHz band always uses WiFi 6 (802.11ax) regardless of the `enable-wifi6`
> The 6GHz band always uses WiFi 6 (802.11ax) regardless of the `enable-80211ax`
> setting, as WiFi 6E requires 802.11ax support.

## Discovering Available Networks (Scanning)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
From 6d6e9958d1066f53e1359c09ff3e92386244c89e Mon Sep 17 00:00:00 2001
From: Mattias Walström <lazzer@gmail.com>
From d571b8417741b2dbed814bc38c133dcf37055c66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= <lazzer@gmail.com>
Date: Thu, 15 Jan 2026 22:47:37 +0100
Subject: [PATCH 29/30] wifi: brcmfmac: support deletion and recreation of
Subject: [PATCH 29/32] wifi: brcmfmac: support deletion and recreation of
primary interface
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Organization: Wires

The Broadcom FullMAC firmware does not allow the primary interface
(bsscfgidx 0) to be deleted - it always exists in firmware. However,
Expand Down Expand Up @@ -37,14 +38,14 @@ Add support for this by:

Signed-off-by: Mattias Walström <lazzer@gmail.com>
---
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 177 ++++++++++++++++--
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 179 ++++++++++++++++--
.../broadcom/brcm80211/brcmfmac/cfg80211.h | 4 +-
.../broadcom/brcm80211/brcmfmac/core.c | 6 +-
.../broadcom/brcm80211/brcmfmac/p2p.c | 16 +-
4 files changed, 183 insertions(+), 20 deletions(-)
4 files changed, 185 insertions(+), 20 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index bb96b87b2a6e..9c8128551072 100644
index bb96b87b2a6e..41b75ebc9d4f 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -124,6 +124,9 @@ struct cca_msrmnt_query {
Expand Down Expand Up @@ -269,7 +270,16 @@ index bb96b87b2a6e..9c8128551072 100644
return brcmf_cfg80211_del_apsta_iface(wiphy, wdev);
case NL80211_IFTYPE_P2P_CLIENT:
case NL80211_IFTYPE_P2P_GO:
@@ -8114,11 +8261,11 @@ brcmf_dump_obss(struct brcmf_if *ifp, struct cca_msrmnt_query req,
@@ -7790,6 +7937,8 @@ static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg)
return err;

ndev = cfg_to_ndev(cfg);
+ if (!ndev)
+ return -ENODEV;
wdev = ndev->ieee80211_ptr;
ifp = netdev_priv(ndev);

@@ -8114,11 +8263,11 @@ brcmf_dump_obss(struct brcmf_if *ifp, struct cca_msrmnt_query req,
}

static s32
Expand All @@ -283,7 +293,7 @@ index bb96b87b2a6e..9c8128551072 100644

if (chan->flags & IEEE80211_CHAN_DISABLED)
return -EINVAL;
@@ -8144,7 +8291,7 @@ brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev,
@@ -8144,7 +8293,7 @@ brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev,
int idx, struct survey_info *info)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
Expand All @@ -292,7 +302,7 @@ index bb96b87b2a6e..9c8128551072 100644
struct brcmf_dump_survey survey = {};
struct ieee80211_supported_band *band;
enum nl80211_band band_id;
@@ -8175,21 +8322,21 @@ brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev,
@@ -8175,21 +8324,21 @@ brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev,
if (band_id == NUM_NL80211_BANDS)
return -ENOENT;

Expand Down Expand Up @@ -396,3 +406,6 @@ index e1752a513c73..2dc0fbba271d 100644
if (brcmf_cfg80211_vif_event_armed(cfg))
return ERR_PTR(-EBUSY);

--
2.43.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From f4d3d21bbb0bf21d7ad12cbb419e6a4c464ea619 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= <lazzer@gmail.com>
Date: Tue, 20 Jan 2026 20:12:10 +0100
Subject: [PATCH 31/32] wifi: brcmfmac: suppress log spam for
regulatory-restricted channels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Organization: Wires

When scanning, the driver attempts to set each channel and logs an
error if the firmware rejects it. For regulatory-restricted channels,
the firmware returns -52 (EBADE), which is expected behavior.

Suppress the error message for -52 errors to avoid spamming the kernel
log during normal scan operations.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
---
.../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 1d937e41b95f..f49e11160d02 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -8280,7 +8280,12 @@ brcmf_set_channel(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp,
if (chspec != INVCHANSPEC) {
err = brcmf_fil_iovar_int_set(ifp, "chanspec", chspec);
if (err) {
- brcmf_err("set chanspec 0x%04x fail, reason %d\n", chspec, err);
+ /* -52 (EBADE) is expected for regulatory-restricted
+ * channels, don't spam the log for these.
+ */
+ if (err != -EBADE)
+ brcmf_err("set chanspec 0x%04x fail, reason %d\n",
+ chspec, err);
err = -EINVAL;
}
} else {
--
2.43.0

Loading