Bluetooth: controller: split: Simplify DLE state checks
Simplify the Data Length Update Procedure state check when processing incoming LENGTH_REQ/RSP PDUs. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
e217ade79e
commit
d13c6b2b29
1 changed files with 3 additions and 9 deletions
|
@ -4501,8 +4501,7 @@ static inline int length_req_rsp_recv(struct ll_conn *conn, memq_link_t *link,
|
||||||
if (/* Local idle, and Peer request then complete the Peer procedure
|
if (/* Local idle, and Peer request then complete the Peer procedure
|
||||||
* with response.
|
* with response.
|
||||||
*/
|
*/
|
||||||
((conn->llcp_length.req == conn->llcp_length.ack) &&
|
((conn->llcp_length.req == conn->llcp_length.ack) && tx) ||
|
||||||
(pdu_rx->llctrl.opcode == PDU_DATA_LLCTRL_TYPE_LENGTH_REQ)) ||
|
|
||||||
/* or Local has active... */
|
/* or Local has active... */
|
||||||
((conn->llcp_length.req != conn->llcp_length.ack) &&
|
((conn->llcp_length.req != conn->llcp_length.ack) &&
|
||||||
/* with Local requested and Peer request then complete the
|
/* with Local requested and Peer request then complete the
|
||||||
|
@ -4510,17 +4509,12 @@ static inline int length_req_rsp_recv(struct ll_conn *conn, memq_link_t *link,
|
||||||
*/
|
*/
|
||||||
((((conn->llcp_length.state == LLCP_LENGTH_STATE_REQ) ||
|
((((conn->llcp_length.state == LLCP_LENGTH_STATE_REQ) ||
|
||||||
(conn->llcp_length.state == LLCP_LENGTH_STATE_REQ_ACK_WAIT)) &&
|
(conn->llcp_length.state == LLCP_LENGTH_STATE_REQ_ACK_WAIT)) &&
|
||||||
(pdu_rx->llctrl.opcode ==
|
tx) ||
|
||||||
PDU_DATA_LLCTRL_TYPE_LENGTH_REQ)) ||
|
|
||||||
/* with Local waiting for response, and Peer response then
|
/* with Local waiting for response, and Peer response then
|
||||||
* complete the Local procedure or Peer request then complete the
|
* complete the Local procedure or Peer request then complete the
|
||||||
* Peer procedure with response.
|
* Peer procedure with response.
|
||||||
*/
|
*/
|
||||||
((conn->llcp_length.state == LLCP_LENGTH_STATE_RSP_WAIT) &&
|
(conn->llcp_length.state == LLCP_LENGTH_STATE_RSP_WAIT)))) {
|
||||||
((pdu_rx->llctrl.opcode ==
|
|
||||||
PDU_DATA_LLCTRL_TYPE_LENGTH_RSP) ||
|
|
||||||
(pdu_rx->llctrl.opcode ==
|
|
||||||
PDU_DATA_LLCTRL_TYPE_LENGTH_REQ)))))) {
|
|
||||||
struct pdu_data_llctrl_length_req *lr;
|
struct pdu_data_llctrl_length_req *lr;
|
||||||
u16_t max_rx_octets;
|
u16_t max_rx_octets;
|
||||||
u16_t max_tx_octets;
|
u16_t max_tx_octets;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue