5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
wwd_sdpcm.h File Reference

Functions

uint8_t wwd_sdpcm_get_available_credits (void)
 
void * wwd_sdpcm_get_ioctl_buffer (wiced_buffer_t *buffer, uint16_t data_length)
 
void * wwd_sdpcm_get_iovar_buffer (wiced_buffer_t *buffer, uint16_t data_length, const char *name)
 
wwd_result_t wwd_sdpcm_init (void)
 
void wwd_sdpcm_process_rx_packet (wiced_buffer_t buffer)
 
void wwd_sdpcm_quit (void)
 
wwd_result_t wwd_sdpcm_send_ioctl (sdpcm_command_type_t type, uint32_t command, wiced_buffer_t send_buffer_hnd, wiced_buffer_t *response_buffer_hnd, wwd_interface_t interface)
 
wwd_result_t wwd_sdpcm_send_iovar (sdpcm_command_type_t type, wiced_buffer_t send_buffer_hnd, wiced_buffer_t *response_buffer_hnd, wwd_interface_t interface)
 

Detailed Description

Provides Wiced with function prototypes for IOCTL commands, and for communicating with the SDPCM module

Function Documentation

◆ wwd_sdpcm_get_available_credits()

uint8_t wwd_sdpcm_get_available_credits ( void )
extern

Returns the number of bus credits available

Returns
The number of bus credits available

◆ wwd_sdpcm_get_ioctl_buffer()

void * wwd_sdpcm_get_ioctl_buffer ( wiced_buffer_t * buffer,
uint16_t data_length )
extern

A helper function to easily acquire and initialise a buffer destined for use as an ioctl

Parameters
buffer: A pointer to a wiced_buffer_t object where the created buffer will be stored
data_length: The length of space reserved for user data
Returns
A pointer to the start of user data with data_length space available

◆ wwd_sdpcm_get_iovar_buffer()

void * wwd_sdpcm_get_iovar_buffer ( wiced_buffer_t * buffer,
uint16_t data_length,
const char * name )
extern

A helper function to easily acquire and initialise a buffer destined for use as an iovar

Parameters
buffer: A pointer to a wiced_buffer_t object where the created buffer will be stored
data_length: The length of space reserved for user data
name: The name of the iovar
Returns
A pointer to the start of user data with data_length space available

◆ wwd_sdpcm_init()

wwd_result_t wwd_sdpcm_init ( void )
extern

Initialises the SDPCM protocol handler

Initialises mutex and semaphore flags needed by the SDPCM handler. Also initialises the list of event handlers. This function is called from the wwd_thread_init function.

Returns
WWD result code

◆ wwd_sdpcm_process_rx_packet()

void wwd_sdpcm_process_rx_packet ( wiced_buffer_t buffer)
extern

Processes and directs incoming SDPCM packets

This function receives SDPCM packets from the Broadcom 802.11 device and decodes the SDPCM header to determine where the packet should be directed.

  • Control packets (IOCTL/IOVAR) cause the IOCTL flag to be set to allow the resumption of the thread which sent the IOCTL
  • Data Packets are sent to the bottom layer of the network stack via the host_network_process_ethernet_data function
  • Event Packets are decoded to determine which event occurred, and the event handler list is consulted and the appropriate event handler is called.
Parameters
buffer: The SDPCM packet buffer received from the Broadcom 802.11 device

◆ wwd_sdpcm_quit()

void wwd_sdpcm_quit ( void )
extern

Initialises the SDPCM protocol handler

De-initialises mutex and semaphore flags needed by the SDPCM handler. This function is called from the wwd_thread_func function when it is exiting.

◆ wwd_sdpcm_send_ioctl()

wwd_result_t wwd_sdpcm_send_ioctl ( sdpcm_command_type_t type,
uint32_t command,
wiced_buffer_t send_buffer_hnd,
wiced_buffer_t * response_buffer_hnd,
wwd_interface_t interface )
extern

Sends an IOCTL command

Sends a I/O Control command to the Broadcom 802.11 device. The data which is set or retrieved must be in a format structure which is appropriate for the particular I/O control being sent. These structures can only be found in the DHD source code such as wl/exe/wlu.c. The I/O control will always respond with a packet buffer which may contain data in a format specific to the I/O control being used.

@Note: The caller is responsible for releasing the response buffer. @Note: The function blocks until the IOCTL has completed @Note: Only one IOCTL may happen simultaneously.

Parameters
type: SDPCM_SET or SDPCM_GET - indicating whether to set or get the I/O control
send_buffer_hnd: A handle for a packet buffer containing the data value to be sent.
response_buffer_hnd: A pointer which will receive the handle for the packet buffer containing the response data value received..
interface: Which interface to send the iovar to (WWD_STA_INTERFACE or WWD_AP_INTERFACE)
Returns
WWD result code

◆ wwd_sdpcm_send_iovar()

wwd_result_t wwd_sdpcm_send_iovar ( sdpcm_command_type_t type,
wiced_buffer_t send_buffer_hnd,
wiced_buffer_t * response_buffer_hnd,
wwd_interface_t interface )
extern

Sets/Gets an I/O Variable (IOVar)

This function either sets or retrieves the value of an I/O variable from the Broadcom 802.11 device. The data which is set or retrieved must be in a format structure which is appropriate for the particular I/O variable being accessed. These structures can only be found in the DHD source code such as wl/exe/wlu.c.

@Note: The function blocks until the I/O variable read/write has completed

Parameters
type: SDPCM_SET or SDPCM_GET - indicating whether to set or get the I/O variable value
send_buffer_hnd: A handle for a packet buffer containing the data value to be sent.
response_buffer_hnd: A pointer which will receive the handle for the packet buffer containing the response data value received..
interface: Which interface to send the iovar to (AP or STA)
Returns
WWD result code