Wi-Fi#
Functions#
Initialize the WLAN control block structure.
Fills command info and places it into wlan TX queue.
Extract filename out of the received json update data.
Process WLAN receive commands.
Get WLAN status.
Set the WLAN status.
Post on a waiting semaphore.
Check if any socket command is in waiting state.
Check if any WLAN command is in waiting state.
Receive raw data packet from module.
Handle packet transfer completion.
Will clear TX packet, if TX buffer is full.
Check if the common buffer is full.
By wireless library to acquire or wait for wlan semaphore.
By wireless library to update the WLAN command state to free state.
By wireless library to update the wlan cmd state to progress state.
Posts all waiting WLAN semaphores. This API is typically used to reset the semaphore states.
Sort the scan list based on rssi value.
Process received beacons and probe responses.
Function Documentation#
rsi_wlan_cb_init#
int8_t rsi_wlan_cb_init (rsi_wlan_cb_t * wlan_cb)
Initialize the WLAN control block structure.
Type | Direction | Argument Name | Description |
---|---|---|---|
rsi_wlan_cb_t * | [in] | wlan_cb | - Pointer to WLAN cb structure |
Returns
0 - Success
Non Zero Value - Failure
47
of file driver/rsi_wlan.c
rsi_driver_wlan_send_cmd#
int32_t rsi_driver_wlan_send_cmd (rsi_wlan_cmd_request_t cmd, rsi_pkt_t * pkt)
Fills command info and places it into wlan TX queue.
Type | Direction | Argument Name | Description |
---|---|---|---|
rsi_wlan_cmd_request_t | [in] | cmd | - Type of the command to send |
rsi_pkt_t * | [in] | pkt | - Pointer of the packet to send |
Returns
0 - Success
Non Zero Value - Failure
109
of file driver/rsi_wlan.c
rsi_extract_filename#
uint8_t * rsi_extract_filename (uint8_t * json, uint8_t * buffer)
Extract filename out of the received json update data.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t * | [in] | json | - json object data string |
uint8_t * | [in] | buffer | - contains file name |
Returns
Returns file name extracted
763
of file driver/rsi_wlan.c
rsi_driver_process_wlan_recv_cmd#
int32_t rsi_driver_process_wlan_recv_cmd (rsi_pkt_t * pkt)
Process WLAN receive commands.
Type | Direction | Argument Name | Description |
---|---|---|---|
rsi_pkt_t * | [in] | pkt | - Pointer to received RX packet |
Returns
0 - Success
Non-Zero Value - Failure
Note
Memory allocation for the pointer is from receive handler, after process it will be freed.
798
of file driver/rsi_wlan.c
rsi_check_wlan_state#
uint32_t rsi_check_wlan_state (void )
Get WLAN status.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Returns
Wlan block status
0 - RSI_WLAN_STATE_NONE
1 - RSI_WLAN_STATE_OPERMODE_DONE
2 - RSI_WLAN_STATE_BAND_DONE
3 - RSI_WLAN_STATE_INIT_DONE
4 - RSI_WLAN_STATE_SCAN_DONE
5 - RSI_WLAN_STATE_CONNECTED
6 - RSI_WLAN_STATE_IP_CONFIG_DONE
7 - RSI_WLAN_STATE_IPV6_CONFIG_DONE
8 - RSI_WLAN_STATE_AUTO_CONFIG_GOING_ON
9 - RSI_WLAN_STATE_AUTO_CONFIG_DONE
10- RSI_WLAN_STATE_AUTO_CONFIG_FAILED
2720
of file driver/rsi_wlan.c
rsi_wlan_set_status#
void rsi_wlan_set_status (int32_t status)
Set the WLAN status.
Type | Direction | Argument Name | Description |
---|---|---|---|
int32_t | [in] | status | - Status value to be set |
Returns
void
2735
of file driver/rsi_wlan.c
rsi_post_waiting_semaphore#
int32_t rsi_post_waiting_semaphore (void )
Post on a waiting semaphore.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Returns
0 - Success
Non-Zero Value - Failure
2749
of file driver/rsi_wlan.c
rsi_wlan_check_waiting_socket_cmd#
int32_t rsi_wlan_check_waiting_socket_cmd (void )
Check if any socket command is in waiting state.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Returns
0 - No socket command is in waiting state
1 - socket command is in waiting state
2834
of file driver/rsi_wlan.c
rsi_wlan_check_waiting_wlan_cmd#
int32_t rsi_wlan_check_waiting_wlan_cmd (void )
Check if any WLAN command is in waiting state.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Returns
0 - Success
Non-Zero Value - Failure
2863
of file driver/rsi_wlan.c
rsi_wlan_process_raw_data#
void rsi_wlan_process_raw_data (rsi_pkt_t * pkt)
Receive raw data packet from module.
Type | Direction | Argument Name | Description |
---|---|---|---|
rsi_pkt_t * | [in] | pkt | - pointer to rx pkt |
Note
Memory allocation for the pointer is from receive handler ,after process it will be freed .
Returns
void
2892
of file driver/rsi_wlan.c
rsi_wlan_packet_transfer_done#
void rsi_wlan_packet_transfer_done (rsi_pkt_t * pkt)
Handle packet transfer completion.
Type | Direction | Argument Name | Description |
---|---|---|---|
rsi_pkt_t * | [in] | pkt | - pointer to packet |
Returns
void
2925
of file driver/rsi_wlan.c
rsi_check_wlan_buffer_full#
void rsi_check_wlan_buffer_full (rsi_pkt_t * pkt)
Will clear TX packet, if TX buffer is full.
Type | Direction | Argument Name | Description |
---|---|---|---|
rsi_pkt_t * | [in] | pkt | - Buffer pointer |
Note
BUFFER_FULL_HANDLING macro should be enabled.
Returns
void
2986
of file driver/rsi_wlan.c
rsi_check_common_buffer_full#
void rsi_check_common_buffer_full (rsi_pkt_t * pkt)
Check if the common buffer is full.
Type | Direction | Argument Name | Description |
---|---|---|---|
rsi_pkt_t * | [in] | pkt | - Buffer pointer |
Returns
void
3034
of file driver/rsi_wlan.c
rsi_wait_on_wlan_semaphore#
rsi_error_t rsi_wait_on_wlan_semaphore (rsi_semaphore_handle_t * semaphore, uint32_t timeout_ms)
By wireless library to acquire or wait for wlan semaphore.
Type | Direction | Argument Name | Description |
---|---|---|---|
rsi_semaphore_handle_t * | [in] | semaphore | - Semaphore handle pointer |
uint32_t | [in] | timeout_ms | - Maximum time to wait to acquire semaphore. |
Returns
0 - Success
Negative Value - failure
3057
of file driver/rsi_wlan.c
rsi_update_wlan_cmd_state_to_free_state#
void rsi_update_wlan_cmd_state_to_free_state (void )
By wireless library to update the WLAN command state to free state.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Returns
void
3081
of file driver/rsi_wlan.c
rsi_update_wlan_cmd_state_to_progress_state#
void rsi_update_wlan_cmd_state_to_progress_state (void )
By wireless library to update the wlan cmd state to progress state.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Returns
void
3095
of file driver/rsi_wlan.c
rsi_post_waiting_wlan_semaphore#
int32_t rsi_post_waiting_wlan_semaphore (void )
Posts all waiting WLAN semaphores. This API is typically used to reset the semaphore states.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Returns
0 - Success
Non-Zero Value - Failure
3111
of file driver/rsi_wlan.c
rsi_call_asynchronous_callback#
void rsi_call_asynchronous_callback ()
3125
of file driver/rsi_wlan.c
sort_index_based_on_rssi#
void sort_index_based_on_rssi (struct wpa_scan_results_arr * scan_results_array)
Sort the scan list based on rssi value.
Type | Direction | Argument Name | Description |
---|---|---|---|
struct wpa_scan_results_arr * | [in] | scan_results_array | - Pointer to scan results array |
Returns
void
3163
of file driver/rsi_wlan.c
get_akm_suites_info#
static unsigned int get_akm_suites_info (const uint16_t akmcnt, const uint8_t * ie_data)
Type | Direction | Argument Name | Description |
---|---|---|---|
const uint16_t | N/A | akmcnt | |
const uint8_t * | N/A | ie_data |
3199
of file driver/rsi_wlan.c
process_scan_results#
int process_scan_results (uint8_t * buf, uint16_t len, int8_t rssi, uint8_t channel, uint16_t freq)
Process received beacons and probe responses.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t * | [in] | buf | - Received frame. |
uint16_t | [in] | len | - length of the buffer. |
int8_t | [in] | rssi | - RSSI value |
uint8_t | [in] | channel | - Channel in which the frame is received |
uint16_t | [in] | freq | - Frequency of the channel |
Returns
0 - Success
Non-Zero Value - failure
3249
of file driver/rsi_wlan.c