[PATCH] firmware: add missing firmware for ar3k Atheros bluetooth

Sergio Costas sergio.costas at canonical.com
Wed Jul 5 18:37:36 UTC 2023


From: Sergio Costas Rodriguez <sergio.costas at canonical.com>

BugLink: https://bugs.launchpad.net/ubuntu/+bug/2025054

[Impact]

When using the Ubuntu Core 22 kernel in an Asus Zenbook UX22,
this error is shown in journalctl:

     usb 1-1-1: Direct firmware load for ar3k/AthrBT_0x01020200.dfu 
failed with error -2
     Bluetooth: Patch file not found ar3k/AthrBT_0x01020200.dfu
     Bluetooth: Loading patch file failed
     ath3k: probe of 1-1.1:1.0 failed with error -2

and, of course, bluetooth doesn't work.

[Fix]

This patch adds the missing files, and makes bluetooth work.
---
  trim-firmware | 9 +++++++++
  1 file changed, 9 insertions(+)

diff --git a/trim-firmware b/trim-firmware
index 148c964..b2635fc 100755
--- a/trim-firmware
+++ b/trim-firmware
@@ -68,6 +68,15 @@ if [ -e "${DESTDIR}"/firmware/regulatory.db ] ; then
         cp "${DESTDIR}"/firmware/regulatory.* "${DESTDIR}"/firmware.new
  fi

+# Copy all AthrBT files, because they are needed for some devices
+# like the original Asus Zenbook, but only if the module ath3k.ko
+# is compiled
+if [[ ! -z `find "${DESTDIR}"/modules -name ath3k.ko` ]] ; then
+       if [ -d "${DESTDIR}"/firmware/ar3k ] ; then
+               cp -a "${DESTDIR}"/firmware/ar3k "${DESTDIR}"/firmware.new/
+       fi
+fi
+
  # Move kernel firmware files to the new firmware directory
  for d in "${DESTDIR}"/modules/* ; do
         if [ -d "${DESTDIR}"/firmware/"${d##*/}" ] ; then
-- 
2.39.2




More information about the kernel-team mailing list