WHC CUST_PATH

WHC CUST_PATH Introduction

Core Capabilities

  • Provides a custom data transmission channel between Host and Device, supporting bidirectional arbitrary data transfer

Typical Use Cases

  • Function Extension: Enables development of private protocols beyond standard Wi-Fi/BT/Socket

  • Slim Host Mode Adaptation: Replaces standard Wi-Fi APIs in resource-constrained environments for lightweight control.

Technical Advantages

  • Flexibility:Protocol-agnostic, allowing custom data structures and interaction logic

  • Low Coupling: Isolated from standard interfaces (e.g., Wi-Fi/BT) to prevent functional conflicts

../../../_images/fullmac_architecture_diagram.svg

WHC CUST_PATH API

WHC Wi-Fi Header Files

whc_host_linux/common/whc_host_cmd_path_api.h

whc_host_linux/app/whc_host_app_api.h

WHC CUST_PATH API Reference

int whc_host_buf_rx_to_user(u8 *buf, u16 size);
../../../_images/fullmac_linux_api_rx.svg

Item

Description

Function Function

Processes device-to-host packet transmission, default forwards to user space

Parameters

buf: Packet buffer pointer, size: Valid packet length (bytes)

Return

0 indicates success, non-zero for error codes

Note

This is a weak symbol interface in RTK SDK, recommended to override per use case.

void whc_host_send_data_to_dev(u8 *pbuf, u32 len, u32 with_txdesc);
../../../_images/fullmac_linux_api_tx.svg

Item

Description

Function

Kernel-space to device packet transmission interface

Parameters

pbuf: Tx buffer, len: Valid data length with_txdesc: 1 indicates buffer contains TX descriptor header

Return

void

int whc_host_api_send_nl_data(uint8_t *buf, uint32_t buf_len);
../../../_images/fullmac_linux_api_tx.svg

Item

Description

Function

User-space to device Netlink data transmission interface

Parameters

buf: Structured data buffer, buf_len: Data length

Return

0 indicates success, non-zero for error codes

Note

  • Fat Host: Standard APIs are used for Wi-Fi/BT/Socket communication, while CUST_PATH APIs handle custom Host-Device data transfer.

  • Slim Host: Standard APIs for BT/Socket, but Wi-Fi control and custom data must use CUST_PATH APIs (standard Wi-Fi APIs unavailable).