Lines Matching refs:le
677 phy->conn_interval_min = sys_cpu_to_le16(conn->le.interval_min); in set_phy_conn_param()
678 phy->conn_interval_max = sys_cpu_to_le16(conn->le.interval_max); in set_phy_conn_param()
679 phy->conn_latency = sys_cpu_to_le16(conn->le.latency); in set_phy_conn_param()
680 phy->supervision_timeout = sys_cpu_to_le16(conn->le.timeout); in set_phy_conn_param()
725 const bt_addr_le_t *peer_addr = &conn->le.dst; in bt_le_create_conn_ext()
728 if (bt_dev.le.rl_entries > bt_dev.le.rl_size) { in bt_le_create_conn_ext()
730 peer_addr = &conn->le.resp_addr; in bt_le_create_conn_ext()
792 bt_addr_le_copy(&cp->peer_addr, &conn->le.dst); in bt_le_create_conn_synced()
846 const bt_addr_le_t *peer_addr = &conn->le.dst; in bt_le_create_conn_legacy()
849 if (bt_dev.le.rl_entries > bt_dev.le.rl_size) { in bt_le_create_conn_legacy()
851 peer_addr = &conn->le.resp_addr; in bt_le_create_conn_legacy()
861 cp->conn_interval_min = sys_cpu_to_le16(conn->le.interval_min); in bt_le_create_conn_legacy()
862 cp->conn_interval_max = sys_cpu_to_le16(conn->le.interval_max); in bt_le_create_conn_legacy()
863 cp->conn_latency = sys_cpu_to_le16(conn->le.latency); in bt_le_create_conn_legacy()
864 cp->supervision_timeout = sys_cpu_to_le16(conn->le.timeout); in bt_le_create_conn_legacy()
875 BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features)) { in bt_le_create_conn()
1121 conn->le.phy.tx_phy = bt_get_phy(rp->tx_phy); in hci_le_read_phy()
1122 conn->le.phy.rx_phy = bt_get_phy(rp->rx_phy); in hci_le_read_phy()
1234 BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features))) { in le_conn_complete_adv_timeout()
1245 !BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features)) { in le_conn_complete_adv_timeout()
1275 BT_FEAT_LE_EXT_ADV(bt_dev.le.features))) { in enh_conn_complete()
1317 bt_addr_le_copy(&conn->le.dst, id_addr); in update_conn()
1318 conn->le.interval = sys_le16_to_cpu(evt->interval); in update_conn()
1319 conn->le.latency = sys_le16_to_cpu(evt->latency); in update_conn()
1320 conn->le.timeout = sys_le16_to_cpu(evt->supv_timeout); in update_conn()
1325 conn->le.data_len.tx_max_len = BT_GAP_DATA_LEN_DEFAULT; in update_conn()
1326 conn->le.data_len.tx_max_time = BT_GAP_DATA_TIME_DEFAULT; in update_conn()
1327 conn->le.data_len.rx_max_len = BT_GAP_DATA_LEN_DEFAULT; in update_conn()
1328 conn->le.data_len.rx_max_time = BT_GAP_DATA_TIME_DEFAULT; in update_conn()
1331 conn->le.subrate.factor = 1; /* No subrating. */ in update_conn()
1332 conn->le.subrate.continuation_number = 0; in update_conn()
1363 BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features))) { in bt_hci_le_enh_conn_complete()
1389 conn->le.phy.tx_phy = BT_GAP_LE_PHY_1M; in bt_hci_le_enh_conn_complete()
1390 conn->le.phy.rx_phy = BT_GAP_LE_PHY_1M; in bt_hci_le_enh_conn_complete()
1399 bt_addr_le_copy(&conn->le.init_addr, &peer_addr); in bt_hci_le_enh_conn_complete()
1402 BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features))) { in bt_hci_le_enh_conn_complete()
1407 conn->le.resp_addr.type = BT_ADDR_LE_RANDOM; in bt_hci_le_enh_conn_complete()
1409 bt_addr_copy(&conn->le.resp_addr.a, in bt_hci_le_enh_conn_complete()
1412 bt_addr_copy(&conn->le.resp_addr.a, in bt_hci_le_enh_conn_complete()
1416 bt_addr_le_copy(&conn->le.resp_addr, in bt_hci_le_enh_conn_complete()
1423 bt_addr_copy(&conn->le.resp_addr.a, &evt->local_rpa); in bt_hci_le_enh_conn_complete()
1431 if (BT_LE_STATES_PER_CONN_ADV(bt_dev.le.states)) { in bt_hci_le_enh_conn_complete()
1436 !BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features)) { in bt_hci_le_enh_conn_complete()
1449 bt_addr_le_copy(&conn->le.resp_addr, &peer_addr); in bt_hci_le_enh_conn_complete()
1452 conn->le.init_addr.type = BT_ADDR_LE_RANDOM; in bt_hci_le_enh_conn_complete()
1454 bt_addr_copy(&conn->le.init_addr.a, in bt_hci_le_enh_conn_complete()
1457 bt_addr_copy(&conn->le.init_addr.a, in bt_hci_le_enh_conn_complete()
1461 bt_addr_le_copy(&conn->le.init_addr, in bt_hci_le_enh_conn_complete()
1468 BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features)) { in bt_hci_le_enh_conn_complete()
1552 conn->le.phy.tx_phy = sync->phy; in bt_hci_le_enh_conn_complete_sync()
1553 conn->le.phy.rx_phy = sync->phy; in bt_hci_le_enh_conn_complete_sync()
1556 bt_addr_le_copy(&conn->le.init_addr, &peer_addr); in bt_hci_le_enh_conn_complete_sync()
1559 conn->le.resp_addr.type = BT_ADDR_LE_RANDOM; in bt_hci_le_enh_conn_complete_sync()
1560 bt_addr_copy(&conn->le.resp_addr.a, &evt->local_rpa); in bt_hci_le_enh_conn_complete_sync()
1562 bt_addr_le_copy(&conn->le.resp_addr, &bt_dev.id_addr[conn->id]); in bt_hci_le_enh_conn_complete_sync()
1720 memcpy(conn->le.features, evt->features, in le_remote_feat_complete()
1721 sizeof(conn->le.features)); in le_remote_feat_complete()
1769 conn->le.data_len.tx_max_len = max_tx_octets; in le_data_len_change()
1770 conn->le.data_len.tx_max_time = max_tx_time; in le_data_len_change()
1771 conn->le.data_len.rx_max_len = max_rx_octets; in le_data_len_change()
1772 conn->le.data_len.rx_max_time = max_rx_time; in le_data_len_change()
1798 conn->le.phy.tx_phy = bt_get_phy(evt->tx_phy); in le_phy_update_complete()
1799 conn->le.phy.rx_phy = bt_get_phy(evt->rx_phy); in le_phy_update_complete()
1928 param.interval_min = conn->le.interval_min; in le_conn_update_complete()
1929 param.interval_max = conn->le.interval_max; in le_conn_update_complete()
1930 param.latency = conn->le.pending_latency; in le_conn_update_complete()
1931 param.timeout = conn->le.pending_timeout; in le_conn_update_complete()
1936 conn->le.interval = sys_le16_to_cpu(evt->interval); in le_conn_update_complete()
1937 conn->le.latency = sys_le16_to_cpu(evt->latency); in le_conn_update_complete()
1938 conn->le.timeout = sys_le16_to_cpu(evt->supv_timeout); in le_conn_update_complete()
1941 if (!IN_RANGE(conn->le.interval, BT_HCI_LE_INTERVAL_MIN, in le_conn_update_complete()
1944 conn->le.interval); in le_conn_update_complete()
1946 if (conn->le.latency > BT_HCI_LE_PERIPHERAL_LATENCY_MAX) { in le_conn_update_complete()
1948 conn->le.latency); in le_conn_update_complete()
1950 if (!IN_RANGE(conn->le.timeout, BT_HCI_LE_SUPERVISON_TIMEOUT_MIN, in le_conn_update_complete()
1953 conn->le.timeout); in le_conn_update_complete()
1963 conn->le.conn_param_retry_countdown) { in le_conn_update_complete()
1964 conn->le.conn_param_retry_countdown--; in le_conn_update_complete()
2030 keys = conn->le.keys; in unpair()
2031 conn->le.keys = NULL; in unpair()
2127 if (conn->le.keys && (conn->le.keys->flags & BT_KEYS_AUTHENTICATED)) { in update_sec_level()
2128 if (conn->le.keys->flags & BT_KEYS_SC && in update_sec_level()
2129 conn->le.keys->enc_size == BT_SMP_MAX_ENC_KEY_SIZE) { in update_sec_level()
2650 conn->le.subrate.factor = sys_le16_to_cpu(evt->subrate_factor); in bt_hci_le_subrate_change_event()
2651 conn->le.subrate.continuation_number = sys_le16_to_cpu(evt->continuation_number); in bt_hci_le_subrate_change_event()
2652 conn->le.latency = sys_le16_to_cpu(evt->peripheral_latency); in bt_hci_le_subrate_change_event()
2653 conn->le.timeout = sys_le16_to_cpu(evt->supervision_timeout); in bt_hci_le_subrate_change_event()
2656 if (!IN_RANGE(conn->le.subrate.factor, BT_HCI_LE_SUBRATE_FACTOR_MIN, in bt_hci_le_subrate_change_event()
2659 conn->le.subrate.factor); in bt_hci_le_subrate_change_event()
2661 if (conn->le.latency > BT_HCI_LE_PERIPHERAL_LATENCY_MAX) { in bt_hci_le_subrate_change_event()
2663 conn->le.latency); in bt_hci_le_subrate_change_event()
2665 if (conn->le.subrate.continuation_number > BT_HCI_LE_CONTINUATION_NUM_MAX) { in bt_hci_le_subrate_change_event()
2667 conn->le.subrate.continuation_number); in bt_hci_le_subrate_change_event()
2669 if (!IN_RANGE(conn->le.timeout, BT_HCI_LE_SUPERVISON_TIMEOUT_MIN, in bt_hci_le_subrate_change_event()
2672 conn->le.timeout); in bt_hci_le_subrate_change_event()
2678 params.factor = conn->le.subrate.factor; in bt_hci_le_subrate_change_event()
2679 params.continuation_number = conn->le.subrate.continuation_number; in bt_hci_le_subrate_change_event()
2680 params.peripheral_latency = conn->le.latency; in bt_hci_le_subrate_change_event()
2681 params.supervision_timeout = conn->le.timeout; in bt_hci_le_subrate_change_event()
3107 memcpy(bt_dev.le.features, rp->features, sizeof(bt_dev.le.features)); in read_le_features_complete()
3120 if (bt_dev.le.acl_mtu) { in read_buffer_size_complete()
3124 bt_dev.le.acl_mtu = sys_le16_to_cpu(rp->acl_max_len); in read_buffer_size_complete()
3127 LOG_DBG("ACL BR/EDR buffers: pkts %u mtu %u", pkts, bt_dev.le.acl_mtu); in read_buffer_size_complete()
3129 k_sem_init(&bt_dev.le.acl_pkts, pkts, pkts); in read_buffer_size_complete()
3147 bt_dev.le.acl_mtu = acl_mtu; in le_read_buffer_size_complete()
3149 LOG_DBG("ACL LE buffers: pkts %u mtu %u", rp->le_max_num, bt_dev.le.acl_mtu); in le_read_buffer_size_complete()
3151 k_sem_init(&bt_dev.le.acl_pkts, rp->le_max_num, rp->le_max_num); in le_read_buffer_size_complete()
3166 bt_dev.le.acl_mtu = acl_mtu; in read_buffer_size_v2_complete()
3167 LOG_DBG("ACL LE buffers: pkts %u mtu %u", rp->acl_max_num, bt_dev.le.acl_mtu); in read_buffer_size_v2_complete()
3169 k_sem_init(&bt_dev.le.acl_pkts, rp->acl_max_num, rp->acl_max_num); in read_buffer_size_v2_complete()
3180 bt_dev.le.iso_mtu = iso_mtu; in read_buffer_size_v2_complete()
3182 LOG_DBG("ISO buffers: pkts %u mtu %u", rp->iso_max_num, bt_dev.le.iso_mtu); in read_buffer_size_v2_complete()
3184 k_sem_init(&bt_dev.le.iso_pkts, rp->iso_max_num, rp->iso_max_num); in read_buffer_size_v2_complete()
3185 bt_dev.le.iso_limit = rp->iso_max_num; in read_buffer_size_v2_complete()
3238 bt_dev.le.states = sys_get_le64(rp->le_states); in le_read_supp_states_complete()
3248 bt_dev.le.max_adv_data_len = sys_le16_to_cpu(rp->max_adv_data_len); in le_read_maximum_adv_data_len_complete()
3259 bt_dev.le.rl_size = rp->rl_size; in le_read_resolving_list_size_complete()
3341 BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features)) { in le_set_event_mask()
3356 BT_FEAT_LE_PRIVACY(bt_dev.le.features)) || in le_set_event_mask()
3358 BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features))) { in le_set_event_mask()
3372 if (BT_FEAT_LE_CONN_PARAM_REQ_PROC(bt_dev.le.features)) { in le_set_event_mask()
3377 BT_FEAT_LE_DLE(bt_dev.le.features)) { in le_set_event_mask()
3382 (BT_FEAT_LE_PHY_2M(bt_dev.le.features) || in le_set_event_mask()
3383 BT_FEAT_LE_PHY_CODED(bt_dev.le.features))) { in le_set_event_mask()
3395 BT_FEAT_LE_CONN_SUBRATING(bt_dev.le.features)) { in le_set_event_mask()
3401 BT_FEAT_LE_ENCR(bt_dev.le.features)) { in le_set_event_mask()
3421 BT_FEAT_LE_CIS(bt_dev.le.features)) { in le_set_event_mask()
3424 if (BT_FEAT_LE_CIS_PERIPHERAL(bt_dev.le.features)) { in le_set_event_mask()
3430 if (IS_ENABLED(CONFIG_BT_ISO) && BT_FEAT_LE_BIS(bt_dev.le.features)) { in le_set_event_mask()
3432 BT_FEAT_LE_ISO_BROADCASTER(bt_dev.le.features)) { in le_set_event_mask()
3437 BT_FEAT_LE_SYNC_RECEIVER(bt_dev.le.features)) { in le_set_event_mask()
3472 BT_FEAT_LE_CHANNEL_SOUNDING(bt_dev.le.features)) { in le_set_event_mask()
3558 BT_FEAT_LE_ISO(bt_dev.le.features)) { in le_init()
3577 if (IS_ENABLED(CONFIG_BT_EXT_ADV) && BT_DEV_FEAT_LE_EXT_ADV(bt_dev.le.features)) { in le_init()
3586 bt_dev.le.max_adv_data_len = 31; in le_init()
3591 bt_dev.le.max_adv_data_len = 31; in le_init()
3605 cp_le->le = 0x01; in le_init()
3629 BT_FEAT_LE_DLE(bt_dev.le.features)) { in le_init()
3656 if (BT_FEAT_LE_PRIVACY(bt_dev.le.features)) { in le_init()
3686 if (BT_FEAT_LE_CONNECTIONLESS_CTE_TX(bt_dev.le.features) || in le_init()
3687 BT_FEAT_LE_CONNECTIONLESS_CTE_RX(bt_dev.le.features) || in le_init()
3688 BT_FEAT_LE_RX_CTE(bt_dev.le.features)) { in le_init()
3697 BT_FEAT_LE_CONN_SUBRATING(bt_dev.le.features)) { in le_init()
3706 BT_FEAT_LE_CHANNEL_SOUNDING(bt_dev.le.features)) { in le_init()
3723 if (bt_dev.le.acl_mtu) { in bt_br_init()
3790 BT_FEAT_LE_ENCR(bt_dev.le.features)) { in set_event_mask()
4034 else if (!bt_dev.le.acl_mtu) { in hci_init()
4299 bt_dev.le.iso_mtu = mtu; in bt_testing_set_iso_mtu()
4434 bt_dev.le.rl_entries = 0; in bt_disable()