![Atheros AP222A User Manual Download Page 26](http://html1.mh-extra.com/html/atheros/ap222a/ap222a_user-manual_2998481026.webp)
COMPANY CONFIDENTIAL
25
2.5.1.1.1 rcS
Format:
# /etc/rc.d/rcS
This script is the bootup script. It will install any board specific modules, initialize the networking system and bridge,
and optionally bring up the WLAN with the default configuration. It calls the
rc.network
,
rc.bridge
, and optionally the
apup
script. This script is never executed in any context other than initialization.
2.5.1.1.2 rc.network
Format:
/etc/rc.d/rc.network
This script initializes the main network interfaces on the device. This script requires that the WAN_MODE
environmental variable be set. The WAN_MODE variable controls whether the WAN interface is bridged to the LAN
interface, or if it operates on its own. If set to “static”, the WAN IP is set to the value defined in WAN_IPADDR. If set
to “DHCP”, the WAN address will run the UDHCPC client to obtain its IP address from the network. Finally, if set to
“bridged”, then the WAN is bridged with the LAN and WLAN interfaces.
2.5.1.1.3 rc.bridge
Format
# /etc/rc.d/rc.bridge
The
rc.bridge
script will setup the bridging function on the device. It is assumed that the LAN interface is always
bridged with the WLAN interfaces, so this interface is always included in the bridge. If the WAN_MODE is set to
“bridged”, then the WAN will also be included in the bridge.
The LAN_DHCP variable indicates whether the DHCP server should be started on the bridge. If set to “y”, then the
UDHCPD daemon is started. The configuration file for the DHCP server is located at
/etc/udhcpd.conf
.
2.5.1.1.4 rc.wlan
Format:
# /etc/rc.d/rc.wlan up|down
The WLAN modules are initialized or removed using this script. The argument “up” or “down” indicate whether to
install or remove the WLAN driver modules from the system. This script is called by the
makeVAP
script when it
determines that the ath_pci module is not loaded, and is called by the
killVAP
script when all VAPs are removed. It is
also called, indirectly, when the reboot command is issued (the inittab will cause the
killVAP all
command to be
executed on shutdown).
This script does not actually create any VAPs. It simply loads the modules and gets the system ready for VAP creation.
There are no environmental variables that currently are used to configure this script.
2.5.1.2 Driver Operation Scripts
To operate the driver (for example, to create interfaces), three main scripts are provided. These scripts perform the
creation of VAP objects, activation of VAP objects, and destruction of VAP objects. The creation and activation stages
for VAP objects were separated due to the need to create ALL VAP objects before activating ANY VAP objects. This is
required because multiple VAPs will still share the same HAL and ATH driver object. All RF parameters applied to the
VAPS will apply to the single ATH object, so they only need to be set in a single VAP.