HomeFreeBSD

rge: add Wake-on-LAN support for magic packet

Description

rge: add Wake-on-LAN support for magic packet

Advertise IFCAP_WOL_MAGIC when PCI power management is available
and enable it by default. On suspend or shutdown, rge_setwol()
enables the WOL_MAGIC and WOL_LANWAKE bits in CFG3/CFG5, disables
the RXDV gate, and enables PM so the NIC stays powered to watch
for magic packets.

Move hardware-specific WOL register configuration into
rge_wol_config() in if_rge_hw.c to keep hardware-specific
functions in sync with OpenBSD.

Update rge.4 to document WoL support.

Tested on FreeBSD 16.0-CURRENT bare metal with Realtek RTL8125
on a Gigabyte B650 Gaming X AX motherboard.

Signed-off-by: Christos Longros <chris.longros@gmail.com>

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D56259

Details

Provenance
chris.longros_gmail.comAuthored on Apr 10 2026, 5:31 PM
adrianCommitted on Apr 10 2026, 5:31 PM
Reviewer
adrian
Differential Revision
D56259: rge: add Wake-on-LAN support for magic packet
Parents
rGde9fe28ab847: Allow passing xtras to safe_set
Branches
Unknown
Tags
Unknown