lan_media_mode
usually reflects how the media is to be selected. (In
contrast, the value that is stored in the
lan_media
member reflects the
current setting of the device.) Typically, you set this member in the
driver’s
probe
interface to the media mode constant that identifies the
mode for the media.
The
lan_common.h
file defines two enumerated data types called
media_types
and
media_modes
. You can set the
lan_media_mode
member to one of the following values, which are defined by the
media_types
and
media_modes
enumerated data types:
LAN_MEDIA_UTP
The mode for the media is unshielded
twisted-pair cable.
LAN_MEDIA_BNC
The mode for the media is thin wire.
LAN_MEDIA_STP
The mode for the media is shielded
twisted pair cable.
LAN_MEDIA_FIBER
The mode for the media is any
fiber-based media.
LAN_MEDIA_AUI
The mode for the media is the attachment
unit interface (AUI).
LAN_MEDIA_4PAIR
The mode for the media is four-pair cable.
LAN_MODE_AUTOSENSE
The hardware determines the media.
3
Defines an alternate name for referencing the
lan_media_state
member of the
lan_media
data structure. The
lan_media_state
member will be set only if
lan_media_mode
has the value
LAN_MODE_AUTOSENSE
. This member is typically set in the driver’s
probe( )
routine.
The
lan_media_state
member can be set to one of the following
constants, which are defined in the
lan_common.h
file:
LAN_MEDIA_STATE_SENSING
The media is currently in the autosensing state.
LAN_MEDIA_STATE_DETERMINED
The media state has been determined.
4
Defines an alternate name for referencing the
lan_media
member
of the
lan_media
data structure. The
lan_media
member specifies
the currently set media.
The value that is stored in the
lan_media
member is valid in the
autosense mode only if the
lan_media_state
member is set to the
constant
LAN_MEDIA_STATE_DETERMINED
. The value that is stored in
lan_media
reflects the current setting of the device. (In contrast, the
value that is stored in the
lan_media_mode
member usually reflects
how the media is to be selected.) Typically, you set the
lan_media
Defining the softc Data Structure 3–5