6
Declares the
lan_config_data
structure, which contains all
information specific to the
el
driver. The
lan_configure
common
code uses this structure.
7
Declares an array of
cfg_subsys_attr_t
data structures and calls
it
el_attributes
.
8
Describes the
PCMCIA_Option
attribute, which specifies the option
data for the PCMCIA bus.
9
Describes the
ISA_Option
attribute, which specifies the option data
for the ISA bus.
10
Describes the
Polling
attribute, which is specific to this device driver.
It indicates the style of interrupt processing. The operation code
specifies
CFG_OP_CONFIGURE
and
CFG_OP_QUERY
. This means that the
attribute can only be set at configuration time and, after that, only
queried. You can specify a value in the
sysconfigtab
file fragment
(which is appended to the
/etc/sysconfigtab
database). The
cfgmgr
framework obtains this value from the
/etc/sysconfigtab
database
and stores it in the
el_polling
variable.
11
Describes the
Polls_Per_Second
attribute, which is specific to this
device driver. It indicates the polls per second for interrupt processing.
Similar to the
Polling
attribute, you can only specify a value for
this attribute at configuration time. The
cfgmgr
framework obtains
this value from the
/etc/sysconfigtab
database and stores it in
the
el_pollint
variable.
12
Ends the array by specifying the null string.
4.2 Setting Up the el_configure Routine
The following code shows how to set up the
el_configure( )
routine:
int el_configure(cfg_op_t op,
1
cfg_attr_t *indata,
2
size_t indatalen,
3
cfg_attr_t *outdata,
4
size_t outdatalen)
5
{
return (lan_configure (op, &el_data));
6
}
1
Declares an argument called
op
to contain a constant that describes the
configuration operation to be performed on the driver. This argument
evaluates to one of the following valid constants:
CFG_OP_CONFIGURE
,
CFG_OP_UNCONFIGURE
,
CFG_OP_QUERY
, or
CFG_OP_RECONFIGURE
.
2
Declares a pointer to a
cfg_attr_t
data structure called
indata
,
which consists of input to the
el_configure( )
routine. The
cfgmgr
framework fills in this data structure. The
cfg_attr_t
data structure
Implementing the Configure Section 4–3