mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-25 18:35:17 +00:00
l2cap: add fcs_option to ERTM config l2cap_ertm_config_t
This commit is contained in:
parent
66a726407a
commit
c425ea4ad2
@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
### Added
|
||||
- L2CAP: emit L2CAP_EVENT_ERTM_BUFFER_RELEASED if ERTM buffer not needed/used anymore
|
||||
- L2CAP: add fcs_option to ERTM config l2cap_ertm_config_t
|
||||
|
||||
## Changes December 2018
|
||||
|
||||
|
@ -127,6 +127,7 @@ static l2cap_ertm_config_t ertm_config = {
|
||||
144, // l2cap ertm mtu
|
||||
4,
|
||||
4,
|
||||
0, // No FCS
|
||||
};
|
||||
|
||||
|
||||
|
@ -112,6 +112,7 @@ static l2cap_ertm_config_t ertm_config = {
|
||||
512, // l2cap ertm mtu
|
||||
2,
|
||||
2,
|
||||
0, // No FCS
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -408,7 +408,9 @@ static uint16_t l2cap_setup_options_ertm_request(l2cap_channel_t * channel, uint
|
||||
config_options[pos++] = 2; // length
|
||||
little_endian_store_16(config_options, pos, channel->local_mtu);
|
||||
pos += 2;
|
||||
//
|
||||
|
||||
// Issue: iOS (e.g. 10.2) uses "No FCS" as default while Core 5.0 specifies "FCS" as default
|
||||
// Workaround: try to actively negotiate FCS option
|
||||
config_options[pos++] = L2CAP_CONFIG_OPTION_TYPE_FRAME_CHECK_SEQUENCE;
|
||||
config_options[pos++] = 1; // length
|
||||
config_options[pos++] = channel->fcs_option;
|
||||
@ -521,10 +523,7 @@ static void l2cap_ertm_configure_channel(l2cap_channel_t * channel, l2cap_ertm_c
|
||||
pos += ertm_config->num_rx_buffers * channel->local_mps;
|
||||
channel->tx_packets_data = &buffer[pos];
|
||||
|
||||
// Issue: iOS (e.g. 10.2) uses "No FCS" as default while Core 5.0 specifies "FCS" as default
|
||||
// Workaround: try to actively negotiate "No FCS" and fall back to "FCS" if "No FCS" is rejected
|
||||
// This works as iOS accepts the "No FCS" request, hence the default value is only used on non-iOS devices
|
||||
channel->fcs_option = 0;
|
||||
channel->fcs_option = ertm_config->fcs_option;
|
||||
}
|
||||
|
||||
uint8_t l2cap_create_ertm_channel(btstack_packet_handler_t packet_handler, bd_addr_t address, uint16_t psm,
|
||||
|
@ -159,6 +159,9 @@ typedef struct {
|
||||
// Number of packets that can be received out of order (-> our tx_window size)
|
||||
uint8_t num_rx_buffers;
|
||||
|
||||
// Frame Check Sequence (FCS) Option
|
||||
uint8_t fcs_option;
|
||||
|
||||
} l2cap_ertm_config_t;
|
||||
|
||||
// info regarding an actual channel
|
||||
|
Loading…
x
Reference in New Issue
Block a user