Index Index for
Section 9
Index Alphabetical
listing for L
Bottom of page Bottom of
page

lan_configure(9r)

NAME

lan_configure - Network: Performs module configuration operations typical of a network driver

SYNOPSIS

int lan_configure( cfg_op_t op, struct lan_config_data *driver_data );

ARGUMENTS

op Specifies the opcode passed to the driver's module configuration entry point. May be one of the following: CFG_OP_CONFIGURE, CFG_OP_QUERY, CFG_OP_RECONFIGURE, or CFG_OP_UNCONFIGURE driver_data Specifies a pointer to a lan_config_data structure, which is declared by the network driver. It contains information such as the driver data structure for the network device.

DESCRIPTION

The lan_configure() routine performs operations typical of what a network driver's configure() routine does. The actions taken for each possible opcode are: · CFG_OP_CONFIGURE Handles the module being configured either statically or dynamically. Creates a controller structure for the device driver and invokes the driver framework code to search all buses for occurances of the network device. Upon successful completion, the cfg_state member of the driver_data argument is set to either SUBSYSTEM_DYNAMICALLY_CONFIGURED or SUBSYSTEM_STATICALLY_CONFIGURED. · CFG_OP_QUERY Returns a status of success but takes no other action. · CFG_OP_RECONFIGURE Returns a status of success but takes no other action. · CFG_OP_UNCONFIGURE Invokes the driver framework code to search for all occurrences of the network device and call the driver's unattach() routine for each occurrence it finds. If the driver was dynamically configured, all the controller structures created by the network driver will be freed. For any other op, EINVAL is returned.

NOTES

A network driver's configure() routine can call lan_configure() rather than implementing its own support for the opcodes listed in the Description section.

RETURN VALUES

ESUCCESS The operation completed successfully. EINVAL Either an opcode was passed to lan_configure() that was different from those listed in the Description section, or a function that lan_configure() calls failed. ENOMEM lan_configure() did not obtain the memory necessary to build a request for the Driver Framework.

SEE ALSO

Data Structures: lan_config_data(9s), driver(9s) Writing Device Drivers

Index Index for
Section 9
Index Alphabetical
listing for L
Top of page Top of
page