From 9ca54ed439b8c59b4f0b9507d05c0bd658a1dbf0 Mon Sep 17 00:00:00 2001 From: Brendan Szymanski Date: Tue, 14 Jul 2026 16:18:05 -0400 Subject: [PATCH] BoardConfig.mk: set BOARD_WLAN_DEVICE := bcmdhd for generic nl80211 HAL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without BOARD_WLAN_DEVICE, libwifi-hal's fallback returns WIFI_ERROR_NOT_SUPPORTED from init_wifi_vendor_hal_func_table, which causes the AIDL wifi HAL (com.android.hardware.wifi) to fail at startup: E android.hardware.wifi-service: Can not initialize the vendor function pointer table E android.hardware.wifi-service: Wifi HAL start failed The bcmdhd implementation of init_wifi_vendor_hal_func_table uses purely generic nl80211 — it scans /sys/class/net/ for phy80211 interfaces, creates netlink sockets, and resolves the nl80211 family ID via genl_ctrl_resolve(). There are no bcmdhd-specific IOCTLs or vendor commands in the core startup path (wifi_initialize, wifi_cleanup, wifi_event_loop, wifi_get_ifaces, wifi_get_iface_name); the vendor commands are only used for optional advanced features (RTT, NAN, etc.) that this device does not use. --- BoardConfig.mk | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/BoardConfig.mk b/BoardConfig.mk index 9ec5dba..c0ab45d 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -90,10 +90,18 @@ TARGET_COPY_OUT_VENDOR := vendor # Wifi -# Generic nl80211/cfg80211 only: WiFi comes from USB adapters (mt76, rtw88, -# ath9k_htc, ...). No BOARD_WLAN_DEVICE / private driver-command lib — those -# inject vendor-private commands (bcmdhd's were used previously) that generic -# mac80211 drivers reject. +# BOARD_WLAN_DEVICE := bcmdhd selects the Broadcom wifi HAL implementation. +# Despite its name, bcmdhd's init_wifi_vendor_hal_func_table uses purely +# generic nl80211 — it scans /sys/class/net/ for phy80211 interfaces, creates +# netlink sockets, and resolves the nl80211 family ID. The functions are +# Broadcom-generic, not bcmdhd-specific; any nl80211-compatible adapter +# (mt7921u, rtw88, ath9k_htc, etc.) works fine. +# +# Without BOARD_WLAN_DEVICE, libwifi-hal's fallback returns +# WIFI_ERROR_NOT_SUPPORTED from init_wifi_vendor_hal_func_table, causing the +# AIDL wifi HAL (com.android.hardware.wifi) to fail at startup with "Can not +# initialize the vendor function pointer table". +BOARD_WLAN_DEVICE := bcmdhd BOARD_HOSTAPD_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_DRIVER := NL80211 #WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true