Files
wlan-ucentral-schema/renderer/templates/ethernet.uc
jackcybertan 125a148764 add PoE support for client ports
Since PSE Power on/off Control needs to be done through the ucentral config file, multiple config nodes and corresponding ucodes have been added.

Poe is placed under the ethernet node.

Fixes: WIFI-14724
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-06-27 07:26:26 +02:00

21 lines
623 B
Ucode

{% let eth_ports = ethernet.lookup_by_select_ports(ports.select_ports) %}
{% for (let port in eth_ports): %}
{% let nport = replace(port, '.', '_'); %}
set network.{{ nport }}=device
set network.{{ nport }}.name={{ s(port) }}
set network.{{ nport }}.ifname={{ s(port) }}
set network.{{ nport }}.enabled={{ ports.enabled }}
{% if (!ports.speed && !ports.duplex) continue %}
set network.{{ nport }}.speed={{ ports.speed }}
set network.{{ nport }}.duplex={{ ports.duplex == "full" ? true : false }}
{% endfor %}
{%
if (ports?.poe) {
include("ethernet/poe.uc",{
select_ports: ports.select_ports,
poe: ports.poe
});
}
%}