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

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 CONFIG WHC ITNF > FULLMAC CONFIG :

(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 Wi-Fi Driver Components and Porting

Device Driver

Host Driver

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