mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
rc: bluetooth: startup improvements
During startup hccontrol reset needs to be run multiple times for iwbt to work more reliably. Add a loop trying up to three times. Tested by: various (original version; I changed test to -eq) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44861
This commit is contained in:
parent
9e8c1ab097
commit
40652f86b5
1 changed files with 11 additions and 2 deletions
|
|
@ -127,8 +127,17 @@ bluetooth_setup_stack()
|
|||
> /dev/null 2>&1 || return 1
|
||||
|
||||
# Initilalize HCI node
|
||||
${hccontrol} -n ${dev}hci reset \
|
||||
> /dev/null 2>&1 || return 1
|
||||
for loop in 1 2 3
|
||||
do
|
||||
${hccontrol} -n ${dev}hci reset \
|
||||
> /dev/null 2>1 && break
|
||||
if [ ${loop} -eq 3 ]
|
||||
then
|
||||
warn Reset failed three times, giving up.
|
||||
return 1
|
||||
fi
|
||||
warn Reset failed, retrying.
|
||||
done
|
||||
|
||||
${hccontrol} -n ${dev}hci read_bd_addr \
|
||||
> /dev/null 2>&1 || return 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue