Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21b63b82 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Do not allow LE connection timeout smaller than 1s for HID devices

Bug: 28979841
Change-Id: I520608a13224601fb9101d00c08b34cdb0f8d374
parent 70c446a6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1756,6 +1756,9 @@ void bta_hh_w4_le_read_char_cmpl(tBTA_HH_DEV_CB *p_dev_cb, tBTA_HH_DATA *p_buf)
        if (max < BTM_BLE_CONN_INT_MIN_LIMIT)
            max = BTM_BLE_CONN_INT_MIN_LIMIT;

        if (tout < BTM_BLE_CONN_TIMEOUT_MIN_DEF)
            tout = BTM_BLE_CONN_TIMEOUT_MIN_DEF;

        BTM_BleSetPrefConnParams (p_dev_cb->addr, min, max, latency, tout);
        L2CA_UpdateBleConnParams(p_dev_cb->addr, min, max, latency, tout);
    }
+5 −0
Original line number Diff line number Diff line
@@ -186,6 +186,11 @@ typedef UINT8 tBTM_BLE_SFP;
#define BTM_BLE_CONN_TIMEOUT_DEF    2000
#endif

/* minimum supervision timeout */
#ifndef BTM_BLE_CONN_TIMEOUT_MIN_DEF
#define BTM_BLE_CONN_TIMEOUT_MIN_DEF    100
#endif

/* minimum acceptable connection interval */
#ifndef BTM_BLE_CONN_INT_MIN_LIMIT
#define BTM_BLE_CONN_INT_MIN_LIMIT     0x0009