Bluetooth: drivers/h5: Remove unnecessary SIGNAL state
The handling of SIGNAL and PAYLOAD states is exactly the same. Just remove the other one. Change-Id: Id82524812919658c6b1df76a7081c826aaf3df34 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
ac35dfa7b2
commit
d1117f8575
1 changed files with 3 additions and 18 deletions
|
@ -455,7 +455,6 @@ void bt_uart_isr(void *unused)
|
||||||
START,
|
START,
|
||||||
HEADER,
|
HEADER,
|
||||||
PAYLOAD,
|
PAYLOAD,
|
||||||
SIGNAL,
|
|
||||||
END,
|
END,
|
||||||
} status = START;
|
} status = START;
|
||||||
|
|
||||||
|
@ -527,7 +526,7 @@ void bt_uart_isr(void *unused)
|
||||||
case HCI_3WIRE_LINK_PKT:
|
case HCI_3WIRE_LINK_PKT:
|
||||||
case HCI_3WIRE_ACK_PKT:
|
case HCI_3WIRE_ACK_PKT:
|
||||||
buf = bt_buf_get_sig();
|
buf = bt_buf_get_sig();
|
||||||
status = SIGNAL;
|
status = PAYLOAD;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BT_ERR("Wrong packet type %u",
|
BT_ERR("Wrong packet type %u",
|
||||||
|
@ -536,27 +535,13 @@ void bt_uart_isr(void *unused)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SIGNAL:
|
|
||||||
memcpy(net_buf_add(buf, sizeof(byte)), &byte,
|
|
||||||
sizeof(byte));
|
|
||||||
remaining--;
|
|
||||||
|
|
||||||
if (remaining) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
status = END;
|
|
||||||
break;
|
|
||||||
case PAYLOAD:
|
case PAYLOAD:
|
||||||
memcpy(net_buf_add(buf, sizeof(byte)), &byte,
|
memcpy(net_buf_add(buf, sizeof(byte)), &byte,
|
||||||
sizeof(byte));
|
sizeof(byte));
|
||||||
remaining--;
|
remaining--;
|
||||||
|
if (!remaining) {
|
||||||
if (remaining) {
|
status = END;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
status = END;
|
|
||||||
break;
|
break;
|
||||||
case END:
|
case END:
|
||||||
if (!slip_delim) {
|
if (!slip_delim) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue