aic_load_fw: enable BT patch loading for U02/U03; fix kernel 6.17+ build#2
Open
lorek123 wants to merge 1 commit into
Open
aic_load_fw: enable BT patch loading for U02/U03; fix kernel 6.17+ build#2lorek123 wants to merge 1 commit into
lorek123 wants to merge 1 commit into
Conversation
…el 6.17+ build Two fixes needed for working WiFi+BT on AIC8800D80 USB dongles: 1. aic_load_fw/aic_compat_8800d80.c: enable BT patch loading The entire BT patch-loading block in aicfw_download_fw_8800d80() is wrapped in #if 0, so fw_patch_table, fw_adid, fw_patch, and fw_patch_ext0 are never uploaded before the main firmware. BT is silently non-functional on all U02/U03 hardware (i.e. every real-world AIC8800D80 device seen in the field). Remove the two #if 0 / #endif guards: - Outer guard wrapping patch-table allocation + adid/patch address setup - Inner guard wrapping the actual firmware uploads for chip_id != CHIP_REV_U01 The Radxa reference driver (radxa-pkg/aic8800) already has this corrected. Fixes: hci0 never appears on AIC8800D80 USB dongle 2. aic8800_fdrv/rwnx_rx.c: replace in_irq() with hardirq_count() in_irq() was removed in kernel 6.17 (commit 57e969aa1b9c). hardirq_count() has the same semantics and is present since kernel 5.0. Fixes: build failure on kernel >= 6.17 Tested-by: Artur Lorenz <lorek123@gmail.com> kernel 6.19.14-ogc5.1.fc44.x86_64, Bazzite 44 chip AIC8800D80 CHIP_REV_U03 (chip_id=7) BT: hci0 (68:8F:C9:...) BR/EDR+LE working Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes for working WiFi+BT on AIC8800D80 USB dongles on modern kernels:
Fix 1: BT firmware never loads (
#if 0in aic_compat_8800d80.c)The entire BT patch-loading block in
aicfw_download_fw_8800d80()is wrappedin
#if 0. This meansfw_patch_table,fw_adid,fw_patch, andfw_patch_ext0are never uploaded before the main firmware. Bluetooth issilently non-functional on all U02/U03 hardware —
hci0never appears, noerror is logged, WiFi works fine, so it looks like a hardware or configuration
problem rather than a driver bug.
Two
#if 0/#endifguards are removed:chip_id != CHIP_REV_U01/FW_NORMAL_MODEThe Radxa reference driver already has
this corrected. This patch brings the standalone driver into alignment.
Fix 2:
in_irq()removed in kernel 6.17+in_irq()was removed in kernel 6.17 (upstream commit57e969aa1b9c).Replace with
hardirq_count()which has identical semantics and has beenpresent since at least kernel 5.0.
Test environment
wlan0+hci0(68:8F:C9:...) both working; BT BR/EDR + LE confirmedNotes
#if 0fix was independently confirmed by comparing against the Radxadriver and by reverse engineering the firmware loading sequence.
dd2afa18(fw_patch_table+fw_adid+fw_patch+fw_patch_ext0+fmacfw→rd_version_val=06090101).Earlier firmware silently breaks BT even with this driver fix applied.