bluetooth-init: ensure the interface is up before unloading the module
This is a workaround for a driver failure when unloading the module. The "btnxpuart" driver crashes with a null pointer dereference if the bluetooth interface is down when the module is unloaded. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
55f8ccadec
commit
7b50fb3a06
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue