Message ID | 20240923171825.148902-5-john@phrozen.org |
---|---|
State | Under Review |
Delegated to: | John Crispin |
Headers | show |
Series | allow loading default credentials from flash | expand |
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. On 2024-09-23 19:18, John Crispin wrote: > Introduce new uci-default functions: > - ucidef_set_wireless_mac_count [count] > > Signed-off-by: John Crispin <john@phrozen.org> > --- > .../files/lib/functions/uci-defaults.sh | 21 +++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh > index 67862497c0..30ae36949e 100644 > --- a/package/base-files/files/lib/functions/uci-defaults.sh > +++ b/package/base-files/files/lib/functions/uci-defaults.sh > @@ -684,6 +684,27 @@ ucidef_set_country() { > json_select .. > } > > +ucidef_set_wireless_mac_count() { > + local band="$1" Not a WiFi-expert, but: How will this band parameter work for WiFi 7 MLO where a single-phy device can represent multiple bands? How would we deal with devices having more than one radio per band? For example, some repeaters have a separate radio for backhaul and fronthaul. > + local mac_count="$2" Out of interest: How is mac_count to be used in practice? What component is enforcing / allocating the MAC addresses? > + > + case "$band" in > + 2g|5g|6g) ;; > + *) return;; > + esac > <snip>
On 24.09.24 12:53, Andreas Gnau wrote: > > Not a WiFi-expert, but: How will this band parameter work for WiFi 7 > MLO where a single-phy device can represent multiple bands? > > How would we deal with devices having more than one radio per band? > For example, some repeaters have a separate radio for backhaul and > fronthaul. > >> + local mac_count="$2" > > Out of interest: How is mac_count to be used in practice? What > component is enforcing / allocating the MAC addresses? there is an UCI option "num_global_macaddr" that can be set for a wifi-device. the script code will then know how many consecutive MACs can be used for a PHY without using the private bit MLO will ignore that setting just like multiple_bssid does right now
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 67862497c0..30ae36949e 100644 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -684,6 +684,27 @@ ucidef_set_country() { json_select .. } +ucidef_set_wireless_mac_count() { + local band="$1" + local mac_count="$2" + + case "$band" in + 2g|5g|6g) ;; + *) return;; + esac + [ -z "$mac_count" ] && return + + json_select_object wlan + json_select_object defaults + json_select_object ssids + json_select_object "$band" + json_add_string mac_count "$mac_count" + json_select .. + json_select .. + json_select .. + json_select .. +} + ucidef_set_root_password() { local passwd="$1" json_select_object credentials
Introduce new uci-default functions: - ucidef_set_wireless_mac_count [count] Signed-off-by: John Crispin <john@phrozen.org> --- .../files/lib/functions/uci-defaults.sh | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+)