Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jul 2005 14:33:25 +0200
From:      stsp@stsp.in-berlin.de
To:        freebsd-hackers@freebsd.org
Subject:   wake on lan support for sis driver (NetSemi chip)
Message-ID:  <20050702123325.GA13307@stud.seeling33.de>

next in thread | raw e-mail | index | archive | help
Hello,

I have written a patch that teaches the sis driver to put
the NatSemi DP83815 chip into wake on lan mode on system shutdown.

A _very_ sketchy, but working, version, that still includes debugging
related macro craft that won't be in the final version, can be found at
http://stsp.in-berlin.de/wol/

Currently, the patch puts the card into "wake on Magic Packet" mode,
and leaves it at that. There is no configurability at all.
Ideally, I'd like the wake mode (None (default), Broadcast, Unicast,
Magic Packet, etc) and special things like "SecureOn" passwords to be
run-time configurable.

The best idea I came up with is defining a set of wake on lan related ioctls,
and adding commands to ifconfig that use them to hand user requests such as
"put my card into wake on broadcast mode, please" down to the driver.
With such a framework in place, adding wake on lan support for other
cards would only require a driver to implement ioctls that match
wake on lan features supported by the driver/chip, and voila, it's
run-time configurable as well. This design also creates a unified user
interface independent of the underlying driver, pretty much like 'ethtool'
does on linux.

Is there anything wrong with such a design, or does anyone have a better
idea how to make the driver run-time configurable?

I am not aware of any other network driver in the tree that implements
wake on lan. But if there were any, I would of course adapt my patch to
their behaviour.

Any comments on the patch in general are also appreciated (Note that
I've read style(9) by now, and I know that I need to make a few fixes
here and there ;)

thanks,
stefan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050702123325.GA13307>