WORK IN PROGRESS

The RDK WiFi Hardware Abstraction Layer (HAL) is a critical component of the RDK (Reference Design Kit) ecosystem, designed to provide a standardized interface for managing WiFi hardware across various platforms. The HAL abstracts the underlying hardware details, allowing higher-level applications and services to interact with WiFi functionalities without needing to understand the specifics of each hardware implementation.
OneWifi depends on rdk-wifi-hal component, without this component we can't able to compile onewifi successfully.

Purpose

The primary purpose of the RDK WiFi HAL is to:

  1. Abstract Hardware Differences: Different WiFi chipsets and platforms have unique interfaces and capabilities. The HAL provides a consistent API that abstracts these differences, enabling developers to write code that works across multiple hardware platforms.

  2. Facilitate Development: By providing a unified interface, the HAL simplifies the development process for applications that require WiFi functionalities. Developers can focus on application logic rather than hardware-specific details.

  3. Enhance Portability: The HAL allows for easier porting of applications across different hardware platforms, such as Broadcom, Intel, Qualcomm, and Raspberry Pi, without significant code changes.

  4. Support for Advanced Features: The HAL is designed to support advanced WiFi features such as Device Provisioning Protocol (DPP), WiFi Direct, and others, ensuring that the RDK ecosystem can leverage the latest WiFi technologies.

Functionality

The RDK WiFi HAL provides a range of functionalities, including but not limited to:

  • WiFi Management: Functions for managing WiFi connections, including scanning for networks, connecting to networks, and disconnecting from networks.

  • Configuration Management: APIs for configuring WiFi parameters such as SSID, security settings, and channel selection.

  • Event Handling: Mechanisms for handling WiFi-related events, such as connection status changes, signal strength updates, and error notifications.

  • Support for Multiple Platforms: The HAL includes platform-specific implementations for various hardware vendors, ensuring compatibility and optimized performance.

Supported Platforms

The RDK WiFi HAL supports multiple hardware platforms, including:

  • Broadcom: Implementation for Broadcom chipsets, widely used in consumer WiFi devices.
  • Intel: Support for Intel-based WiFi solutions, often found in laptops and embedded systems.
  • Qualcomm: Implementation for Qualcomm chipsets, known for their performance in mobile and IoT devices.
  • Raspberry Pi/Banana Pi: A lightweight implementation, enabling WiFi capabilities.
  • XLE: Support for XLE platforms, catering to specific use cases in the RDK ecosystem.


Below is a brief overview of the main directories in the RDK WiFi HAL project, focusing on their purpose and contents:

Directory Overview Expand source
chtsl00388@chtsl00388-IdeaPad-5-14ITL05:~/rdk-wifi-hal$ ls
CODE_STYLE.md  configure.ac  CONTRIBUTING.md  COPYING  feature_dpp  hal_ipc  LICENSE  Makefile.am  NOTICE  platform  README_hostapd  src  util  util_crypto
chtsl00388@chtsl00388-IdeaPad-5-14ITL05:~/rdk-wifi-hal$ 

Platform: 
It contains platform-specific implementations of the WiFi HAL. Each subdirectory within platform/ corresponds to a different hardware platform (e.g., Broadcom, Intel, Raspberry Pi). The files in this directory provide the necessary adaptations to interface with the specific WiFi hardware, ensuring that the HAL can operate across various environments.


Src:

This holds the core source files for the RDK WiFi HAL. This includes the main implementation files that define the functionality of the HAL, such as managing WiFi connections, handling events, and providing APIs for higher-level applications. The files in this directory are essential for the overall operation of the WiFi HAL.
Util:

Utility functions and helper modules that support the main functionality of the WiFi HAL. For example, it includes data structures and algorithms for managing collections, such as queues and hash maps, which are used to organize and access WiFi-related data efficiently. The utility files enhance code reusability and maintainability.

Feature_dpp:
It is dedicated to the implementation of the Device Provisioning Protocol (DPP) within the WiFi HAL. It includes the necessary source files and configuration for enabling DPP features, which facilitate secure and efficient provisioning of WiFi devices. This directory ensures that the HAL can support advanced provisioning capabilities.


The RDK WiFi HAL is designed to facilitate robust communication between the software layer and the underlying WiFi hardware. The following source files play critical roles in ensuring effective WiFi management and communication including the below:

  1. wifi_hal.c: Core implementation of the WiFi HAL, managing WiFi operations and configurations.
  2. wifi_hal_hostapd.c: Integrates with Hostapd for managing WiFi access points and client authentication.
  3. wifi_hal_nl80211.c: Implements the nl80211 interface for communication with the Linux kernel regarding WiFi devices.
  4. wifi_hal_nl80211_events.c: Handles events from the nl80211 interface, processing notifications about WiFi state changes.
  5. wifi_hal_nl80211_utils.c: Provides utility functions for managing nl80211 operations, enhancing code reusability.
  6. collection.c: Manages collections of WiFi-related data, facilitating access to scanning results and connection information.
  7. wifi_hal_mgmt_rx_one_wifi.c: Processes management frame reception for One WiFi scenarios, ensuring effective communication.
  8. wifi_hal_wnm_rrm.c: Implements Wireless Network Management (WNM) and Radio Resource Management (RRM) features for optimizing WiFi performance.

Reference link for message sequence diagram: Porting Guide - OneWifi#MessageSequenceDiagrams

Repository Source Code: https://code.rdkcentral.com/r/admin/repos/rdkb/components/opensource/ccsp/hal/rdk-wifi-hal,general

  • No labels