Bluetooth: controller: Increase conn count only on success

Since a connection attempt can fail and will still generate an LE
Connection Complete event, check the status from the LL control module
before incrementing the HCI connection count used for flow control.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2017-08-02 15:15:53 +02:00 committed by Johan Hedberg
commit dce2f95e95

View file

@ -1842,7 +1842,9 @@ static void le_conn_complete(struct pdu_data *pdu_data, u16_t handle,
sep->supv_timeout = sys_cpu_to_le16(radio_cc->timeout);
sep->clock_accuracy = radio_cc->mca;
conn_count++;
if (!radio_cc->status) {
conn_count++;
}
}
static void disconn_complete(struct pdu_data *pdu_data, u16_t handle,