l2cap-ertm: add ertm_mandatory flag using default yes for now

This commit is contained in:
Matthias Ringwald 2017-07-12 11:37:05 +02:00
parent 543b84e459
commit d4016dac2c
2 changed files with 4 additions and 3 deletions

View File

@ -1088,10 +1088,9 @@ uint8_t l2cap_create_ertm_channel(btstack_packet_handler_t channel_packet_handle
return BTSTACK_MEMORY_ALLOC_FAILED;
}
#ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE
channel->mode = L2CAP_CHANNEL_MODE_ENHANCED_RETRANSMISSION;
#endif
channel->ertm_mandatory = 1;
// add to connections list
btstack_linked_list_add(&l2cap_channels, (btstack_linked_item_t *) channel);
@ -1458,6 +1457,7 @@ void l2cap_accept_ertm_connection(uint16_t local_cid){
// configure L2CAP ERTM
channel->mode = L2CAP_CHANNEL_MODE_ENHANCED_RETRANSMISSION;
channel->ertm_mandatory = 1;
channel->state = L2CAP_STATE_WILL_SEND_CONNECTION_RESPONSE_ACCEPT;

View File

@ -180,6 +180,7 @@ typedef struct {
#ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE
// l2cap channel mode: basic or enhanced retransmission mode
l2cap_channel_mode_t mode;
uint8_t ertm_mandatory;
#endif
} l2cap_channel_t;