Skip to content

aic_load_fw: enable BT patch loading for U02/U03; fix kernel 6.17+ build#2

Open
lorek123 wants to merge 1 commit into
BLUEMOON233:mainfrom
lorek123:fix-bt-and-kernel-6.17
Open

aic_load_fw: enable BT patch loading for U02/U03; fix kernel 6.17+ build#2
lorek123 wants to merge 1 commit into
BLUEMOON233:mainfrom
lorek123:fix-bt-and-kernel-6.17

Conversation

@lorek123

Copy link
Copy Markdown

Summary

Two fixes for working WiFi+BT on AIC8800D80 USB dongles on modern kernels:

Fix 1: BT firmware never loads (#if 0 in aic_compat_8800d80.c)

The entire BT patch-loading block in aicfw_download_fw_8800d80() is wrapped
in #if 0. This means fw_patch_table, fw_adid, fw_patch, and
fw_patch_ext0 are never uploaded before the main firmware. Bluetooth is
silently non-functional on all U02/U03 hardware
hci0 never appears, no
error is logged, WiFi works fine, so it looks like a hardware or configuration
problem rather than a driver bug.

Two #if 0 / #endif guards are removed:

  • Outer guard: wraps patch-table allocation + adid/patch address setup
  • Inner guard: wraps the actual firmware uploads inside chip_id != CHIP_REV_U01 / FW_NORMAL_MODE

The 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 commit 57e969aa1b9c).
Replace with hardirq_count() which has identical semantics and has been
present since at least kernel 5.0.

Test environment

  • Hardware: LGX/Pandora International 88M80 USB dongle (1111:1111 → a69c:8d81)
  • Chip: AIC8800D80, CHIP_REV_U03 (chip_id=7)
  • Kernel: 6.19.14-ogc5.1.fc44.x86_64 (Bazzite 44)
  • Result: wlan0 + hci0 (68:8F:C9:...) both working; BT BR/EDR + LE confirmed

Notes

  • The #if 0 fix was independently confirmed by comparing against the Radxa
    driver and by reverse engineering the firmware loading sequence.
  • Firmware used: Radxa post-commit dd2afa18 (fw_patch_table +
    fw_adid + fw_patch + fw_patch_ext0 + fmacfwrd_version_val=06090101).
    Earlier firmware silently breaks BT even with this driver fix applied.

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant