WDScanOnce

C Specification

#include <revolution/wd/WDScan.h>
WDError WDScanOnce( u16* buf,
                    u16 bufLen,
                    const WDScanParam* param );

Description

Performs a wireless channel scan once.
The WDScanOnce blocks until the scan process, in conjunction with operation settings, is complete.

Scan Results

The number of results found are stored in the first two bytes of the scan results buffer in u16 format. From the third byte on, the basic service set (BSS) information continues without a break in the WDBssDesc type. However, because each BSS's information is of variable length, it is necessary to calculate it using the WDBssDesc structure's length field (itself two bytes in length) at the head of each consecutive BSS information segment.

Arguments

buf Designates a pointer to the buffer that stores the information about the BSS information found as search results.

Note: Due to hardware design, scan results must be stored in a buffer made available in MEM2. In addition, if this buffer is not aligned to the data cache, it can damage unrelated adjacent buffers or be damaged itself. As such, specify the buffer with 32-byte borders at both its beginning and its end.

bufLen Size of the buffer to store the scan results in bytes.
param Pointer to the WDScanParam structure that performs that scan's operation settings.

Return Values

WD_SUCCESS Process was successful.
WD_ERR_FATAL A fatal error occurred while running the firmware.
WD_ERR_ILLEGAL_PARAM An operation setting specified in param was illegal.
WD_ERR_ILLEGAL_STATUS A call from the exception handler.
WD_ERR_INPROGRESS The firmware was not ready.
WD_ERR_EXCLUSIVE The process failed because the WD library is exclusively controlled.
WD_ERR_INSUFFICIENT_BUF Scan results could not be stored in the given buffer. BSS information is stored in the given buffer in the order in which it was found for as much as was possible.

Note: Errors may be added as the library is updated. With the exception of WD_ERR_INSUFFICIENT_BUF, handle all negative return values as general errors.

See Also

WDCheckEnableChannel
WDScanParam
WDBssDesc

Revision History

2006/12/12 Added description.
2006/11/09 Initial version.


CONFIDENTIAL