Subject: Re: wpi(4) and transmitter being off
To: Arnaud Degroote <email@example.com>
From: Greg Troxel <firstname.lastname@example.org>
Date: 08/08/2007 19:49:07
Arnaud Degroote <email@example.com> writes:
> I can remove the IFF_RUNNING and IFF_OACTIVE in the on->off transition, it
> is not a problem. I'm not really sure it will be help userland (and user)
> that he must switch the transmitter on.
Originally IFF_RUNNING simply meant 'resources have been allocated for
this driver'. That flag isn't supposed to be used by anything outside
the driver. In Linux, it's used for link detection, and maybe also on
Solaris. So using it for transmitter enabled seems likely to cause
IFF_OACTIVE is about not having any txq resources left, so that
enqueuing a packet shouldn't invoke the start routine, or perhaps rather
that the packet should not be written to the hardware. So that really
doesn't seem appropriate here.
Perhaps 'ifconfig wpi0 up' should return an error if the killswitch is
on, with EPERM, or something like that. But that may not be helpful
How about a new media state 'disabled' in addition to active and no
carrier? That's really what's going on.