WHC Wi-Fi Introduction
Supported Chips[ RTL8721Dx ][ RTL8721F ]
WHC Wi-Fi Architecture
WHC Wi-Fi Fat Host and Slim Host
Based on whether wpa_supplicant runs on the Host side, WHC is categorized into two architectures: Fat Host and Slim Host(Linux Host running cfg80211 belongs to the Fat Host architecture):
API_PATH
Definition: Standardized communication interface between the Device driver and Host-side wpa_supplicant.
Usage: Activated only when the Host runs wpa_supplicant; primarily for internal SDK calls.
Configuration: Requires manual enablement via Menuconfig (follow SDK guidelines).
CMD_PATH
Definition: Non-standard API data transmission channel between Host and Device (based on a private protocol).
Usage: Most CMD_PATH APIs are reserved for internal SDK use.
Configuration: Enabled by default in all modes, no user intervention needed.
CUST_PATH
Definition: Extends CMD_PATH to provide custom APIs for arbitrary Host-Device data transfer, termed CUST_PATH.
Core Feature 1:Generic Data Transfer, supports arbitrary data exchange between Host and Device.
Core Feature 2:In Slim Host Mode, replaces standard Wi-Fi APIs (unavailable in Slim Host) with CUST_PATH for all Wi-Fi control.
Configuration: Enabled by default; no additional setup required.
Reference: CUST_PATH
WHC Wi-Fi Configuration Options and Operating Modes
Fat Host and Slim Host:
Slim Host: WPA_SUPPLICANT runs on the Device side, eliminating the need to port it to non-standard Linux Host platforms, thus reducing project timelines.
Fat Host: WPA_SUPPLICANT runs on the Host side, you can use NAN/P2P which is supported by WPA_SUPPLICANT in Linux.
You can use Support WHC SUPPLICANT OFFLOAD to select Slim Host or Fat Host.
Configurable Dual TCPIP
Device-side LWIP and Host-side TCPIP stack run in parallel. Device-side LWIP handles keep-alive mechanisms, significantly reducing Host wake-ups (e.g., boosts battery life in IP Camera scenarios).
Device-side LWIP pre-processes packets, enabling Host traffic optimization.
Slim Host |
Fat Host(cfg80211) |
|||
---|---|---|---|---|
Abbreviation |
S1D |
S1D-T |
S2H |
S2H-T |
WPA_SUPPLICANT OFFLOAD |
Y |
Y |
N |
N |
Dual TCPIP(T) |
N |
Y |
N |
Y |
API PATH |
N |
N |
Y |
Y |
CMD PATH |
Y |
Y |
Y |
Y |
Status |
Ready |
Ready |
Ready |
Ready |
Slim Host |
Fat Host |
|||
---|---|---|---|---|
Abbreviation |
S1D |
S1D-T |
S1H |
S1H-T |
WPA_SUPPLICANT OFFLOAD |
Y |
Y |
N |
N |
Dual TCPIP(T) |
N |
Y |
N |
Y |
API PATH |
N |
N |
Y |
Y |
CMD PATH |
Y |
Y |
Y |
Y |
Status |
Ready |
Ready |
Ready |
Ready |
Slim Host |
Fat Host |
|||
---|---|---|---|---|
Abbreviation |
S1D |
S1D-T |
S2H |
S2H-T |
WPA_SUPPLICANT OFFLOAD |
Y |
Y |
N |
N |
Dual TCPIP(T) |
N |
Y |
N |
Y |
API PATH |
N |
N |
Y |
Y |
CMD PATH |
Y |
Y |
Y |
Y |
Status |
TODO |
Ready |
TODO |
TODO |
Note
Terminology
WPA_LITE: A lightweight WPA_SUPPLICANT implementation optimized for Realtek chips, featuring minimal code size and memory usage while supporting basic connectivity
WPA_STD: he standard Linux WPA_SUPPLICANT with full feature support, including advanced functionalities like P2P/NAN/SME
S1 Denotes WPA_LITE
S1D: WPA_SUPPLICANT uses WPA_LITE and runs on the Device side.
S2 Denotes WPA_STD
S2H: WPA_SUPPLICANT uses WPA_STD and runs on the Host side.
T: Indicates Dual TCPIP mode, where both Host and Device run TCPIP stacks.
Note
MENU CONFIG
The above configuration options correspond to the following Menuconfig navigation path
:(Top) -> CONFIG WHC INTF -> FULLMAC config
----Configuration----
(X) Support WHC CMD PATH
(X) Support WHC WIFI API PATH
( ) Support WHC SUPPLICANT OFFLOAD
( ) Support WHC DUAL TCPIP
WHC Wi-Fi File Tree
├─ whc
│ ├─ README.md
│ ├─ CMakeLists.txt
│ ├─ whc_def.h
│ ├─ whc_dev
│ │ ├─ ipc
│ │ │ ├─ whc_ipc_dev_api.c
│ │ │ ├─ whc_ipc_dev_trx.c
│ │ │ ├─ whc_ipc_dev_trx.h
│ │ │ └─ whc_ipc_device.c
│ │ ├─ sdio
│ │ │ ├─ whc_sdio_dev.c
│ │ │ ├─ whc_sdio_dev.h
│ │ │ ├─ whc_sdio_drv.c
│ │ │ └─ whc_sdio_drv.h
│ │ ├─ spi
│ │ │ ├─ whc_spi_dev.c
│ │ │ ├─ whc_spi_dev.h
│ │ │ ├─ whc_spi_drv.c
│ │ │ └─ whc_spi_drv.h
│ │ ├─ usb
│ │ │ ├─ whc_usb_dev.c
│ │ │ └─ whc_usb_dev.h
│ │ ├─ whc_dev.h
│ │ ├─ whc_dev_api.c
│ │ ├─ whc_dev_api.h
│ │ ├─ whc_dev_api_path.c
│ │ ├─ whc_dev_api_path.h
│ │ ├─ whc_dev_app.c
│ │ ├─ whc_dev_cust_evt.c
│ │ ├─ whc_dev_cust_evt.h
│ │ ├─ whc_dev_msg_queue.c
│ │ ├─ whc_dev_msg_queue.h
│ │ ├─ whc_dev_protocal_offload.c
│ │ ├─ whc_dev_protocal_offload.h
│ │ ├─ whc_dev_tcpip.c
│ │ ├─ whc_dev_tcpip.h
│ │ ├─ whc_dev_trx.c
│ │ └─ whc_dev_trx.h
│ ├─ whc_host_rtos
│ │ ├─ ipc
│ │ │ ├─ whc_ipc_host.c
│ │ │ ├─ whc_ipc_host_api.c
│ │ │ ├─ whc_ipc_host_api.h
│ │ │ ├─ whc_ipc_host_api_basic.c
│ │ │ ├─ whc_ipc_host_api_ext.c
│ │ │ ├─ whc_ipc_host_trx.c
│ │ │ ├─ whc_ipc_host_trx.h
│ │ │ └─ whc_ipc_host_zephyr.c
│ │ ├─ spi
│ │ │ ├─ whc_spi_host.c
│ │ │ ├─ whc_spi_host.h
│ │ │ ├─ whc_spi_host_trx.c
│ │ │ └─ whc_spi_host_trx.h
│ │ ├─ sdio
│ │ │ ├─ rtw_sdio_drvio.c
│ │ │ ├─ rtw_sdio_drvio.h
│ │ │ ├─ whc_sdio_host.c
│ │ │ ├─ whc_sdio_host.h
│ │ │ ├─ whc_sdio_init.c
│ │ │ ├─ whc_sdio_host_trx.c
│ │ │ └─ whc_sdio_host_trx.h
│ │ ├─ whc_host.h
│ │ ├─ whc_host_api.c
│ │ ├─ whc_host_api.h
│ │ ├─ whc_host_api_basic.c
│ │ ├─ whc_host_api_ext.c
│ │ ├─ whc_host_app.c
│ │ ├─ whc_host_app.h
│ │ ├─ whc_host_init.c
│ │ ├─ whc_host_cust_evt.c
│ │ ├─ whc_host_cust_evt.h
│ │ └─ whc_rtos
│ │ ├─ os_wrapper_memory.c
│ │ ├─ os_wrapper_mutex.c
│ │ └─ os_wrapper_semaphore.c
│ ├─ whc_ipc.h
│ ├─ whc_ipc_cfg.h
│ ├─ whc_ipc_msg_queue.c
│ └─ whc_ipc_msg_queue.h
├─ whc_host_linux
│ ├─ Kconfig
│ ├─ Makefile
│ ├─ fullmac_setup.sh
│ ├─ app
│ │ ├─ Makefile
│ │ ├─ whc_host_app_api.c
│ │ ├─ whc_host_app_api.h
│ │ └─ whc_host_app.c
│ ├─ fullmac
│ │ ├─ whc_fullmac_host_wiphy.c
│ │ ├─ whc_fullmac_host_regd.c
│ │ ├─ whc_fullmac_host_regd.h
│ │ ├─ whc_fullmac_host_protocal_offload.c
│ │ ├─ whc_fullmac_host_promisc.c
│ │ ├─ whc_fullmac_host_promisc.h
│ │ ├─ whc_fullmac_host_proc.c
│ │ ├─ whc_fullmac_host_proc.h
│ │ ├─ whc_fullmac_host_pkt_rx.c
│ │ ├─ whc_fullmac_host_ops_p2p.c
│ │ ├─ whc_fullmac_host_ops_nan.c
│ │ ├─ whc_fullmac_host_ops_key.c
│ │ ├─ whc_fullmac_host_ops_ap.c
│ │ ├─ whc_fullmac_host_ops.c
│ │ ├─ whc_fullmac_host_netdev_ops_p2p.c
│ │ ├─ whc_fullmac_host_ioctl.c
│ │ ├─ whc_fullmac_host_ioctl.h
│ │ ├─ whc_fullmac_host_event_tx.c
│ │ ├─ whc_fullmac_host_event_rx.c
│ │ ├─ whc_fullmac_host_cust_evt.c
│ │ ├─ whc_fullmac_host_cust_evt.h
│ │ ├─ whc_fullmac_host_cfgvendor.c
│ │ ├─ whc_fullmac_host_cfgvendor.h
│ │ ├─ whc_fullmac_host_acs.c
│ │ ├─ whc_fullmac_host_acs.h
│ │ ├─ usb
│ │ │ └─ Kbuild
│ │ ├─ spi
│ │ │ └─ Kbuild
│ │ ├─ sdio
│ │ │ └─ Kbuild
│ ├─ common
│ │ ├─ autoconf.h
│ │ ├─ whc_host_cmd_path_api.h
│ │ ├─ whc_host_cmd_path_tx.c
│ │ ├─ whc_host_event.h
│ │ ├─ whc_host_hci.c
│ │ ├─ whc_host_hci.h
│ │ ├─ whc_host_memory.c
│ │ ├─ whc_host_netlink.c
│ │ ├─ whc_host_netlink.h
│ │ ├─ whc_host_ops.c
│ │ ├─ whc_host_pkt_rx.c
│ │ ├─ whc_host_pkt_tx.c
│ │ ├─ whc_host_trx.h
│ │ ├─ netdev
│ │ │ ├─ whc_host_drv_probe.c
│ │ │ ├─ whc_host_drv_probe.h
│ │ │ ├─ whc_host_ethtool_ops.c
│ │ │ ├─ whc_host_ethtool_ops.h
│ │ │ ├─ whc_host_function.h
│ │ │ ├─ whc_host_linux.h
│ │ │ ├─ whc_host_netdev_ops.c
│ │ │ ├─ whc_host_netdev_ops.h
│ │ │ └─ whc_host_wiphy.h
│ │ ├─ sdio
│ │ │ ├─ whc_sdio_host.h
│ │ │ ├─ whc_sdio_host_drvio.c
│ │ │ ├─ whc_sdio_host_drvio.h
│ │ │ ├─ whc_sdio_host_fwdl.c
│ │ │ ├─ whc_sdio_host_init.c
│ │ │ ├─ whc_sdio_host_ops.c
│ │ │ ├─ whc_sdio_host_ops.h
│ │ │ ├─ whc_sdio_host_probe.c
│ │ │ └─ whc_sdio_host_reg.h
│ │ ├─ spi
│ │ │ ├─ whc_spi_host.h
│ │ │ ├─ whc_spi_host_ops.c
│ │ │ ├─ whc_spi_host_probe.c
│ │ │ └─ spidev-overlay.dts
│ │ └─ usb
│ │ ├─ whc_usb_host.h
│ │ ├─ whc_usb_host_ops.c
│ │ └─ whc_usb_host_probe.c
WHC Wi-Fi Driver Components and Porting
Device Driver
Reference: device driver porting
Host Driver
Reference: Slim Host driver porting / Fat Host driver porting
CUST_PATH
Fat Host Mode: If custom communication between Host and Device is needed beyond standard Wi-Fi/BT/Socket programming, use CUST_PATH.
Slim Host Mode: Standard Wi-Fi APIs are unavailable; CUST_PATH must be used.
Please reference CUST_PATH .
WHC Wi-Fi Throughput
Interface |
Wi-Fi driver location |
Item |
Slim Host |
Fat Host |
---|---|---|---|---|
SDIO [1] |
KM4 (334MHz) |
TCP RX |
49.7 |
53.5 |
TCP TX |
50.1 |
51.2 |
||
UDP RX |
58.9 |
59.6 |
||
UDP TX |
56.5 |
56.6 |
||
SPI [2] |
KM4 (334MHz) |
TCP RX |
16.8 |
17.1 |
TCP TX |
17.4 |
17.7 |
||
UDP RX |
19.1 |
18.6 |
||
UDP TX |
18.9 |
18.4 |
||
USB [3] |
TCP RX |
|||
TCP TX |
||||
UDP RX |
||||
UDP TX |
[1] The data is the test result of device code running in Flash, host:Raspberry Pi 5 Model B Rev 1.1,root: Linux raspberrypi 6.6.31+rpt-rpi-2712
[2] The data is the test result of device code running in Flash, host:Raspberry Pi 5 Model B Rev 1.0,root: Linux raspberrypi 6.6.31+rpt-rpi-2712
Interface |
Wi-Fi driver location |
Item |
Slim Host |
Fat Host |
---|---|---|---|---|
SPI [1] |
KM4 (334MHz) |
TCP RX |
10.9 |
11 |
TCP TX |
10.4 |
10.6 |
||
UDP RX |
16.3 |
15.5 |
||
UDP TX |
17.1 |
17.4 |
[1] The data is the test result of device code running in Flash,host:Ameba RTL8721Dx, SPI Clk 25M
Interface |
Wi-Fi driver location |
Item |
Slim Host |
Fat Host |
---|---|---|---|---|
SDIO [1] |
KM4 (320MHz) |
TCP RX |
65 |
65.5 |
TCP TX |
73.1 |
74.3 |
||
UDP RX |
81.9 |
83.8 |
||
UDP TX |
86.3 |
88 |
||
SPI [2] |
KM4 (333MHz) |
TCP RX |
17.8 |
17.8 |
TCP TX |
18.4 |
18.2 |
||
UDP RX |
19.1 |
19.0 |
||
UDP TX |
19.5 |
19.3 |
||
USB [3] |
TCP RX |
|||
TCP TX |
||||
UDP RX |
||||
UDP TX |
[1] The data is the test result of device code running in Flash, host:Raspberry Pi 5 Model B Rev 1.1,root: Linux raspberrypi 6.6.31+rpt-rpi-2712
[2] The data is the test result of device code running in Flash, host:Raspberry Pi 5 Model B Rev 1.0,root: Linux raspberrypi 6.6.31+rpt-rpi-2712
Interface |
Wi-Fi driver location |
Item |
Slim Host |
Fat Host |
---|---|---|---|---|
SPI [1] |
KM4 (333MHz) |
TCP RX |
13.1 |
13.1 |
TCP TX |
14 |
14.4 |
||
UDP RX |
19.2 |
20.1 |
||
UDP TX |
21.9 |
22.7 |
[1] The data is the test result of device code running in Flash, host:Ameba RTL8721F, SPI Clk 25M