Project: /_project.yaml Book: /_book.yaml

Wi-Fi HAL

The Wi-Fi framework has three Wi-Fi HAL surfaces represented by three different HIDL packages:

  • Vendor HAL: A HAL surface for Android-specific commands. The HIDL files are in hardware/interfaces/wifi/1.x.
  • Supplicant HAL: A HAL surface for wpa_supplicant. The HIDL files are in hardware/interfaces/supplicant/1.x.
  • Hostapd HAL: A HAL surface for hostapd. The HIDL files are in hardware/interfaces/hostapd/1.x.

Vendor HAL

The Vendor HAL provides Android-specific commands. It is optional (not required) for infrastructure Station (STA) and Soft AP (SAP) modes to function. However, it is mandatory for Wi-Fi Aware and for Wi-Fi RTT services.

Pre-HIDL (i.e. pre-Android 8.0) Android used a HAL mechanism now called legacy HAL. The Android source code currently provides a default implementation of HIDL using a shim running on top of the legacy HAL.

The legacy HAL headers are located in hardware/libhardware_legacy/include/hardware_legacy/. The legacy HAL based implementation is located in hardware/interfaces/wifi/1.2/default.

Supplicant HAL

The Supplicant HAL provides a HIDL interface for the wpa_supplicant daemon.

The wpa_supplicant source code is located in external/wpa_supplicant_8/wpa_supplicant. The wpa_supplicant code providing the HIDL interface is located in the hidl sub-directory.

Hostapd HAL

The Hostapd HAL provides a HIDL interface for the hostapd daemon.

The hostapd source code is located in external/wpa_supplicant_8/hostapd. The hostapd code providing the HIDL interface is located in the hidl sub-directory.

Wi-Fi multi-interface concurrency

Different Android devices can support different combinations of Wi-Fi interfaces concurrently. The supported combinations are defined in the HAL and are exposed to the framework. The specification format is defined in android/hardware/interfaces/wifi/1.0/IWifiChip.hal. For example, a device may support one STA and one interface of either NAN (Wi-Fi Aware{: .external}) or P2P (Wi-Fi Direct{: .external}) type (but not both). This would be expressed as:

[{STA} <= 1, {NAN,P2P} <= 1]

The concurrency specification format is flexible and generic. It can express combinations that are not yet supported by the framework. The reference HAL has configurations for several combinations which may be activated with build flags. For configuration instructions, see: