#!/bin/bash
#
# this is ugly - reset the device after resume. Should be done by the kernel
# driver, but the kernel guys are always slow in fixing stuff, you know ;)
DEVPATH=/sys/bus/bluetooth/devices
case "$1" in
	thaw|resume)
		for dev in /sys/bus/bluetooth/devices/hci*; do
			[ ! -e $dev ] && break
			hci=${dev##*/}
			hciconfig $hci reset
		done
		true
		;;
	*)
		;;
esac
