Page MenuHomeFreeBSD

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

Authored by chris.longros_gmail.com on Sun, Apr 5, 3:01 PM.

Details

Reviewers
adrian
Summary

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.

Update rge.4 to document WoL support.

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

Test Plan

Tested on FreeBSD 16.0-CURRENT bare metal with Realtek RTL8125 on a Gigabyte B650 Gaming X AX motherboard.
Sending a magic packet with wol from my Arch Linux laptop wakes up the FreeBSD desktop.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 71969
Build 68852: arc lint + arc unit

Event Timeline

chris.longros_gmail.com edited the test plan for this revision. (Show Details)
chris.longros_gmail.com edited the test plan for this revision. (Show Details)

hi! i'm trying to put as much hardware specific code into if_rge_hw.c to hopefully make it easier to keep whole hardware-specific routines in sync with openbsd.

Would you mind updating your diff to push the wol code back into if_rge_hw.c and call it there? thanks!