Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@
]
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
]
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
]
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
]
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
]
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
]
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
]
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@
]
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
]
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
15 changes: 15 additions & 0 deletions board/common/qemu/ddi/Config.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,21 @@ config IX_QEMU_NET_MODEL

endmenu

menu "Wireless"

config IX_QEMU_WIFI_RADIOS
int "Number of virtual Wi-Fi radios"
default 0
help
Number of simulated 802.11 radios (mac80211_hwsim) to create
in the guest. With 0, the default, the guest has no radios.

Set a small number, e.g. 2, for local AP and station
experiments. The radios only reach each other inside this
one guest.

endmenu

config IX_QEMU_EXTRA
string "Extra QEMU options"

Expand Down
10 changes: 10 additions & 0 deletions board/common/qemu/ddi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,15 @@ gen_net()
gen_net_tap
}

gen_wifi()
{
echo "${IX_QEMU_WIFI_RADIOS:-0}" >"$qdir"/wifi

q sect fw_cfg
q param name opt/wifi
q param file "$qdir"/wifi
}

gen_gdb()
{
# Create a UNIX socket on the host that is connected to a virtio
Expand Down Expand Up @@ -563,6 +572,7 @@ EOF
gen_serial
gen_disks
gen_net
gen_wifi
gen_gdb

if [ "$IX_QEMU_LOADER_QEMU" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
},
"infix-meta:meta": {
"version": "1.12"
"version": "1.13"
},
"infix-services:mdns": {
"enabled": true
Expand Down
12 changes: 12 additions & 0 deletions doc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ All notable changes to the project are documented in this file.
ones on every boot. Requires a bootloader from v26.11.0 or later
- Support for Qualcomm WCN6855 Wi-Fi cards, e.g., the QCNFA765, with
2.4, 5 and 6 GHz bands and 802.11ax, see [Wi-Fi][wifi]
- Wi-Fi: a band, channel, channel width, interface mode or number of
access points the radio does not support is now refused with an error
when configured, see [Wi-Fi][wifi]. The modes a radio supports are
in its operational data, as are the channels of each band
- Wi-Fi: a radio without a band no longer accepts a channel, channel
width or legacy rates. They had no effect there and are dropped from
the configuration on upgrade
- WebUI: the Wi-Fi radio forms offer only the bands the radio supports,
and the channel is picked from the channels of the selected band.
The country code is set in one place on the interfaces page
- NanoPi R2S Plus: Infix can now be installed on the eMMC
- NanoPi R2S Plus: both USB ports can now be locked and unlocked
- NanoPi R2S Plus: support for the optional RTL8822CS Wi-Fi module
Expand Down Expand Up @@ -108,6 +118,8 @@ All notable changes to the project are documented in this file.

- LLDP: a device with a Wi-Fi interface announced its WLAN access
point capability as disabled
- Wi-Fi: the supported channels of a radio listed only the last
channel of each band, and the 6 GHz band could be missing
- A change to a VLAN filtering bridge with spanning tree enabled was
not applied once its ports were members of a VLAN
- Disabling spanning tree on a bridge left its ports disabled, and the
Expand Down
11 changes: 10 additions & 1 deletion doc/wifi.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ admin@example:/config/hardware/component/radio0/wifi-radio/> <b>leave</b>

**⚠ Must match your physical location for legal compliance! ⚠**

- `band`: 2.4GHz, 5GHz, or 6GHz (required for AP mode). Automatically enables
- `band`: 2.4GHz, 5GHz, or 6GHz (required for AP mode). Only a radio used
for a station can go without a band, and then `channel`, `channel-width`
and `legacy-rates` cannot be set either. Automatically enables
appropriate Wi-Fi standards:
- 2.4GHz: 802.11n/ax
- 5GHz: 802.11n/ac/ax
Expand Down Expand Up @@ -187,6 +189,13 @@ Each band strikes a different balance between range and capacity. The
lists below are the common allocations, and your regulatory domain may
allow fewer.

A band, channel, or channel width that the radio does not support is
refused when the configuration is applied, as is more access points
than the radio can carry, or an interface in a mode the radio lacks,
e.g. a mesh point on a radio without 802.11s support. The error names
the radio or interface and the setting.
Use `show hardware` to see what each radio supports.

**2.4 GHz**

Channels 1-13 are available in most of the world, 1-11 in the US and
Expand Down
3 changes: 2 additions & 1 deletion src/confd/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ(2.61)
# confd version is same as system YANG model version, step on breaking changes
AC_INIT([confd], [1.12], [https://github.com/kernelkit/infix/issues])
AC_INIT([confd], [1.13], [https://github.com/kernelkit/infix/issues])
AM_INIT_AUTOMAKE(1.11 foreign subdir-objects)
AM_SILENT_RULES(yes)

Expand All @@ -26,6 +26,7 @@ AC_CONFIG_FILES([
share/migrate/1.10/Makefile
share/migrate/1.11/Makefile
share/migrate/1.12/Makefile
share/migrate/1.13/Makefile
yang/Makefile
yang/confd/Makefile
yang/test-mode/Makefile
Expand Down
15 changes: 15 additions & 0 deletions src/confd/share/migrate/1.13/10-wifi-radio-band.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
# A Wi-Fi radio without a band no longer takes a channel, channel-width
# or legacy-rates. They had no effect there, drop them.

file=$1
temp=${file}.tmp

jq '
if .["ietf-hardware:hardware"].component then
.["ietf-hardware:hardware"].component |= map(
if has("infix-hardware:wifi-radio") and (.["infix-hardware:wifi-radio"] | has("band") | not) then
.["infix-hardware:wifi-radio"] |= del(.channel, .["channel-width"], .["legacy-rates"])
else . end)
else . end
' "$file" > "$temp" && mv "$temp" "$file"
2 changes: 2 additions & 0 deletions src/confd/share/migrate/1.13/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
migratedir = $(pkgdatadir)/migrate/1.13
dist_migrate_DATA = 10-wifi-radio-band.sh
2 changes: 1 addition & 1 deletion src/confd/share/migrate/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SUBDIRS = 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12
SUBDIRS = 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13
migratedir = $(pkgdatadir)/migrate
6 changes: 6 additions & 0 deletions src/confd/src/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ int hardware_change(sr_session_ctx_t *session, struct lyd_node *config, struct l

wifi_country_change(config, diff, event);

if (event == SR_EV_CHANGE) {
rc = wifi_radios_validate(session, config, diff);
if (rc)
return rc;
}

difs = lydx_get_descendant(diff, "hardware", "component", NULL);
LYX_LIST_FOR_EACH(difs, dif, "component") {
const char *name = lydx_get_cattr(dif, "name");
Expand Down
1 change: 1 addition & 0 deletions src/confd/src/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ void wifi_gen_ssid_config(FILE *hostapd, struct lyd_node *cif, struct lyd_node *
const char *band, struct confd *confd);

/* hw-wifi.c */
int wifi_radios_validate(sr_session_ctx_t *session, struct lyd_node *config, struct lyd_node *diff);
void wifi_country_change(struct lyd_node *config, struct lyd_node *diff, sr_event_t event);
int wifi_radio_change(struct lyd_node *config, struct lyd_node *cif, sr_event_t event, struct confd *confd);

Expand Down
Loading
Loading