hci_init: use log_debug for init script output

This commit is contained in:
Matthias Ringwald 2016-10-03 12:12:38 +02:00
parent 0e5ac34f5e
commit 148ca237ee

View File

@ -913,7 +913,7 @@ static void hci_initializing_next_state(void){
// assumption: hci_can_send_command_packet_now() == true
static void hci_initializing_run(void){
log_info("hci_initializing_run: substate %u, can send %u", hci_stack->substate, hci_can_send_command_packet_now());
log_debug("hci_initializing_run: substate %u, can send %u", hci_stack->substate, hci_can_send_command_packet_now());
switch (hci_stack->substate){
case HCI_INIT_SEND_RESET:
hci_state_reset();
@ -970,7 +970,6 @@ static void hci_initializing_run(void){
break;
}
case HCI_INIT_CUSTOM_INIT:
log_info("Custom init");
// Custom initialization
if (hci_stack->chipset && hci_stack->chipset->next_command){
int valid_cmd = (*hci_stack->chipset->next_command)(hci_stack->hci_packet_buffer);
@ -1003,7 +1002,7 @@ static void hci_initializing_run(void){
hci_stack->hci_transport->send_packet(HCI_COMMAND_DATA_PACKET, hci_stack->hci_packet_buffer, size);
break;
}
log_info("hci_run: init script done");
log_info("Init script done");
// Init script download causes baud rate to reset on Broadcom chipsets, restore UART baud rate if needed
if (hci_stack->manufacturer == COMPANY_ID_BROADCOM_CORPORATION){
@ -1144,7 +1143,7 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
uint16_t opcode = little_endian_read_16(packet,3);
if (opcode == hci_stack->last_cmd_opcode){
command_completed = 1;
log_info("Command complete for expected opcode %04x at substate %u", opcode, hci_stack->substate);
log_debug("Command complete for expected opcode %04x at substate %u", opcode, hci_stack->substate);
} else {
log_info("Command complete for different opcode %04x, expected %04x, at substate %u", opcode, hci_stack->last_cmd_opcode, hci_stack->substate);
}
@ -1156,12 +1155,12 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
if (opcode == hci_stack->last_cmd_opcode){
if (status){
command_completed = 1;
log_error("Command status error 0x%02x for expected opcode %04x at substate %u", status, opcode, hci_stack->substate);
log_debug("Command status error 0x%02x for expected opcode %04x at substate %u", status, opcode, hci_stack->substate);
} else {
log_info("Command status OK for expected opcode %04x, waiting for command complete", opcode);
}
} else {
log_info("Command status for opcode %04x, expected %04x", opcode, hci_stack->last_cmd_opcode);
log_debug("Command status for opcode %04x, expected %04x", opcode, hci_stack->last_cmd_opcode);
}
}