Linux Kernel
3.7.1
|
The following functions are implemented in the HIP core lib.
card_t* unifi_alloc_card | ( | CsrSdioFunction * | sdiopriv, |
void * | ospriv | ||
) |
Initialise the HIP core lib. Note that the OS layer must initialise the SDIO glue layer and obtain an SDIO function context, prior to this call.
Definition at line 68 of file csr_wifi_hip_card_sdio.c.
Run the HIP core lib Botton-Half. Whenever the HIP core lib want this function to be called by the OS layer, it calls unifi_run_bh().
card | the HIP core lib API context. |
remaining | pointer to return the time (in msecs) that this function should be re-scheduled. A return value of 0 means that no re-scheduling is required. If unifi_bh() is called before the timeout expires, the caller must pass in the remaining time. |
Definition at line 373 of file csr_wifi_hip_card_sdio_intr.c.
Use software to hard reset the chip. This is a subset of the unifi_init_card() functionality and should only be used only to reset a paniced chip before a coredump is taken.
card | the HIP core context. |
Definition at line 3005 of file csr_wifi_hip_card_sdio.c.
void unifi_card_info | ( | card_t * | card, |
card_info_t * | card_info | ||
) |
CsrResult unifi_configure_low_power_mode | ( | card_t * | card, |
enum unifi_low_power_mode | low_power_mode, | ||
enum unifi_periodic_wake_mode | periodic_wake_mode | ||
) |
Run the HIP core lib Botton-Half. Whenever the HIP core lib want this function to be called by the OS layer, it calls unifi_run_bh().
Typically, the SME is responsible for configuring these parameters, so unifi_sys_configure_power_mode_req() is usually implemented as a direct call to unifi_configure_low_power_mode().
Note: When polling mode is used instead of interrupts, low_power_mode must never be set to UNIFI_LOW_POWER_ENABLED.
card | the HIP core lib API context. |
low_power_mode | the Low Power Mode. |
periodic_wake_mode | the Periodic Wake Mode. |
Definition at line 316 of file csr_wifi_hip_card_sdio_intr.c.
Forces the UniFi chip to enter a Deep Sleep state. This is normally called by the OS layer when the platform suspends.
Note that if the UniFi Low Power Mode is disabled this call fails.
card | the HIP core lib API context. |
Definition at line 347 of file csr_wifi_hip_card_sdio_intr.c.
unifi_TrafficQueue unifi_frame_priority_to_queue | ( | CSR_PRIORITY | priority | ) |
Call-outs from the HIP core lib to the OS layer. The following functions need to be implemented during the porting exercise. Selects appropriate queue according to priority Helps maintain uniformity in queue selection between the HIP and the OS layers.
priority | priority of the packet |
Definition at line 28 of file csr_wifi_hip_send.c.
De-Initialise the HIP core lib.
card | the HIP core lib API context. |
Definition at line 1952 of file csr_wifi_hip_card_sdio.c.
Release a handle to a dynamically allocated firmware buffer (primarily intended for production test images which may need conversion)
Definition at line 177 of file firmware.c.
Ask OS layer for a handle to a dynamically allocated firmware buffer (primarily intended for production test images which may need conversion)
ospriv | the OS layer context. |
fwbuf | pointer to dynamically allocated buffer |
len | length of provided buffer in bytes |
Definition at line 143 of file firmware.c.
Ask the OS layer to return a portion from a f/w file.
ospriv | the OS layer context. |
arg | the OS pointer returned by unifi_fw_read_start(). |
offset | the offset in the f/w file to read the read from. |
buf | the buffer to store the returned data. |
len | the size in bytes of the requested read. |
Definition at line 200 of file firmware.c.
void* unifi_fw_read_start | ( | void * | ospriv, |
s8 | is_fw, | ||
const card_info_t * | info | ||
) |
Ask the OS layer to initialise a read from a f/w file.
ospriv | the OS layer context. |
is_fw | if 0 the request if for the loader file, if 1 the request is for a f/w file. |
info | a card_info_t structure containing versions information. Note that some members of the structure may not be initialised. |
NULL
if the file is not available, or a pointer which contains OS specific information for the file (typically the contents of the file) that the HIP core uses when calling unifi_fw_read() and unifi_fw_read_stop() Definition at line 60 of file firmware.c.
Ask the OS layer to finish reading from a f/w file.
ospriv | the OS layer context. |
dlpriv | the OS pointer returned by unifi_fw_read_start(). |
Definition at line 104 of file firmware.c.
CSR_PRIORITY unifi_get_default_downgrade_priority | ( | unifi_TrafficQueue | queue | ) |
Returns the priority corresponding to a particular Queue when that is used when downgrading a packet to a lower AC. Helps maintain uniformity in queue - priority mapping between the HIP and the OS layers.
queue |
Definition at line 51 of file csr_wifi_hip_send.c.
Initialise the UniFi chip.
Definition at line 170 of file csr_wifi_hip_card_sdio.c.
void unifi_pause_xmit | ( | void * | ospriv, |
unifi_TrafficQueue | queue | ||
) |
Flow control callbacks. unifi_pause_xmit() is called when the HIP core lib does not have any resources to store data packets. The OS layer needs to pause the Tx data plane until unifi_restart_xmit() is called.
ospriv | the OS layer context. |
void unifi_receive_event | ( | void * | ospriv, |
u8 * | sigdata, | ||
u32 | siglen, | ||
const bulk_data_param_t * | bulkdata | ||
) |
Delivers a signal received from UniFi to the OS layer. Normally, the data signals should be delivered to the data plane and all the rest to the SME (unifi_sys_hip_ind()).
Note that the OS layer is responsible for freeing the bulkdata buffers, using unifi_net_data_free().
ospriv | the OS layer context. |
sigptr | pointer to the signal. |
siglen | size of the signal. |
bulkdata | pointer to the bulk data associated with the signal. |
Definition at line 649 of file unifi_event.c.
Request to run the Bottom-Half. The HIP core lib calls this function to request that unifi_bh() needs to be run by the OS layer. It can be called anytime, i.e. when the unifi_bh() is running. Since unifi_bh() is not re-entrant, usually unifi_run_bh() sets an event to a thread that schedules a call to unifi_bh().
ospriv | the OS layer context. |
Check if the HIP core lib has resources to send a signal. Normally there no need to use this function.
Definition at line 381 of file csr_wifi_hip_send.c.
CsrResult unifi_send_signal | ( | card_t * | card, |
const u8 * | sigptr, | ||
u32 | siglen, | ||
const bulk_data_param_t * | bulkdata | ||
) |
Send a signal to UniFi. Normally it is called from unifi_sys_hip_req() and the OS layer Tx data plane.
Note that the bulkdata buffers ownership is passed to the HIP core lib. These buffers must be allocated using unifi_net_data_malloc().
card | the HIP core lib API context. |
sigptr | pointer to the signal. |
siglen | size of the signal. |
bulkdata | pointer to the bulk data associated with the signal. |
Definition at line 301 of file csr_wifi_hip_send.c.
void unifi_ta_classification | ( | card_t * | card, |
CsrWifiRouterCtrlTrafficType | traffic_type, | ||
u16 | period | ||
) |
Notify the HIP core lib for a detected Traffic Classification. Typically, the SME is responsible for configuring these parameters, so unifi_sys_traffic_classification_req() is usually implemented as a direct call to unifi_ta_classification().
card | the HIP core context. |
traffic_type | the detected traffic type. |
period | The detected period of the traffic. |
Definition at line 531 of file csr_wifi_hip_ta_sampling.c.
CsrResult unifi_ta_configure | ( | card_t * | card, |
CsrWifiRouterCtrlTrafficConfigType | config_type, | ||
const CsrWifiRouterCtrlTrafficConfig * | config | ||
) |
Configure the Traffic Analysis sampling
Enable or disable statistics gathering. Enable or disable particular packet detection.
card | the HIP core context |
config_type | the item to configure |
config | pointer to struct containing config info |
Definition at line 480 of file csr_wifi_hip_ta_sampling.c.
void unifi_ta_indicate_protocol | ( | void * | ospriv, |
CsrWifiRouterCtrlTrafficPacketType | packet_type, | ||
CsrWifiRouterCtrlProtocolDirection | direction, | ||
const CsrWifiMacAddress * | src_addr | ||
) |
Indicates a detected packet of type packet_type. Typically, this information is processed by the SME so unifi_ta_indicate_protocol() needs to schedule a call to unifi_sys_traffic_protocol_ind().
ospriv | the OS layer context. |
packet_type | the detected packet type. |
direction | the direction of the packet (Rx, Tx). |
src_addr | the source address of the packet. |
Definition at line 363 of file sme_native.c.
void unifi_ta_indicate_sampling | ( | void * | ospriv, |
CsrWifiRouterCtrlTrafficStats * | stats | ||
) |
Indicates statistics for the sample data over a period. Typically, this information is processed by the SME so unifi_ta_indicate_sampling() needs to schedule a call to unifi_sys_traffic_sample_ind().
ospriv | the OS layer context. |
stats | the pointer to the structure that contains the statistics. |
Definition at line 386 of file sme_native.c.
void unifi_ta_sample | ( | card_t * | card, |
CsrWifiRouterCtrlProtocolDirection | direction, | ||
const bulk_data_desc_t * | data, | ||
const u8 * | saddr, | ||
const u8 * | sta_macaddr, | ||
u32 | timestamp, | ||
u16 | rate | ||
) |
Pass a packet for Traffic Analysis sampling
card | the HIP core context |
direction | the direction (Rx or Tx) of the frame. |
data | pointer to bulkdata struct containing the packet |
saddr | the source address of the packet |
sta_macaddr | the MAC address of the UniFi chip |
timestamp | the current time in msecs |
Definition at line 344 of file csr_wifi_hip_ta_sampling.c.