diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx9/bluetooth-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx9/bluetooth-init index 7d4b630d9..687b8cff2 100644 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx9/bluetooth-init +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5-init/ccimx9/bluetooth-init @@ -66,8 +66,12 @@ bluetooth_start() { } bluetooth_stop() { - # Remove the kernel module - rmmod "${MODULE_NAME}" + # + # The btnxpuart driver hits a null pointer dereference on module + # unloading when the interface is down. So as a workaround, make + # sure the interface is UP before unloading the module. + # + hciconfig "${HCI_IFACE}" up && rmmod "${MODULE_NAME}" power 0 }