Lines Matching refs:param
284 static int start_le_scan_legacy(struct bt_le_scan_param *param) in start_le_scan_legacy() argument
293 set_param.scan_type = param->type; in start_le_scan_legacy()
298 set_param.interval = sys_cpu_to_le16(param->interval); in start_le_scan_legacy()
299 set_param.window = sys_cpu_to_le16(param->window); in start_le_scan_legacy()
302 param->options & BT_LE_SCAN_OPT_FILTER_ACCEPT_LIST) { in start_le_scan_legacy()
308 active_scan = param->type == BT_HCI_LE_SCAN_ACTIVE; in start_le_scan_legacy()
327 param->options & BT_LE_SCAN_OPT_FILTER_DUPLICATE); in start_le_scan_legacy()
1340 const struct bt_le_per_adv_response_params *param, in bt_le_per_adv_set_response_data() argument
1350 if (param->request_subevent >= per_adv_sync->num_subevents) { in bt_le_per_adv_set_response_data()
1354 if (param->response_subevent >= per_adv_sync->num_subevents) { in bt_le_per_adv_set_response_data()
1372 cp->request_event = sys_cpu_to_le16(param->request_event); in bt_le_per_adv_set_response_data()
1373 cp->request_subevent = param->request_subevent; in bt_le_per_adv_set_response_data()
1374 cp->response_subevent = param->response_subevent; in bt_le_per_adv_set_response_data()
1375 cp->response_slot = param->response_slot; in bt_le_per_adv_set_response_data()
1685 static bool valid_le_scan_param(const struct bt_le_scan_param *param) in valid_le_scan_param() argument
1688 param->type == BT_LE_SCAN_TYPE_ACTIVE && in valid_le_scan_param()
1689 param->timeout != 0) { in valid_le_scan_param()
1705 if (param->type != BT_LE_SCAN_TYPE_PASSIVE && in valid_le_scan_param()
1706 param->type != BT_LE_SCAN_TYPE_ACTIVE) { in valid_le_scan_param()
1710 if (param->options & ~(BT_LE_SCAN_OPT_FILTER_DUPLICATE | in valid_le_scan_param()
1717 if (param->interval < 0x0004 || param->interval > 0x4000) { in valid_le_scan_param()
1721 if (param->window < 0x0004 || param->window > 0x4000) { in valid_le_scan_param()
1725 if (param->window > param->interval) { in valid_le_scan_param()
1732 int bt_le_scan_start(const struct bt_le_scan_param *param, bt_le_scan_cb_t cb) in bt_le_scan_start() argument
1741 if (!valid_le_scan_param(param)) { in bt_le_scan_start()
1745 if (param->type && !bt_id_scan_random_addr_check()) { in bt_le_scan_start()
1766 memcpy(&scan_state.explicit_scan_param, param, in bt_le_scan_start()
1862 int bt_le_per_adv_sync_create(const struct bt_le_per_adv_sync_param *param, in bt_le_per_adv_sync_create() argument
1878 if (param->sid > BT_GAP_SID_MAX || in bt_le_per_adv_sync_create()
1879 param->skip > BT_GAP_PER_ADV_MAX_SKIP || in bt_le_per_adv_sync_create()
1880 param->timeout > BT_GAP_PER_ADV_MAX_TIMEOUT || in bt_le_per_adv_sync_create()
1881 param->timeout < BT_GAP_PER_ADV_MIN_TIMEOUT) { in bt_le_per_adv_sync_create()
1899 if (param->options & BT_LE_PER_ADV_SYNC_OPT_USE_PER_ADV_LIST) { in bt_le_per_adv_sync_create()
1910 bt_addr_le_copy(&cp->addr, ¶m->addr); in bt_le_per_adv_sync_create()
1911 cp->sid = param->sid; in bt_le_per_adv_sync_create()
1914 if (param->options & in bt_le_per_adv_sync_create()
1923 if (param->options & BT_LE_PER_ADV_SYNC_OPT_FILTER_DUPLICATE) { in bt_le_per_adv_sync_create()
1928 if (param->options & BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOA) { in bt_le_per_adv_sync_create()
1932 if (param->options & BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOD_1US) { in bt_le_per_adv_sync_create()
1937 if (param->options & BT_LE_PER_ADV_SYNC_OPT_DONT_SYNC_AOD_2US) { in bt_le_per_adv_sync_create()
1942 if (param->options & BT_LE_PER_ADV_SYNC_OPT_SYNC_ONLY_CONST_TONE_EXT) { in bt_le_per_adv_sync_create()
1946 cp->skip = sys_cpu_to_le16(param->skip); in bt_le_per_adv_sync_create()
1947 cp->sync_timeout = sys_cpu_to_le16(param->timeout); in bt_le_per_adv_sync_create()
1975 bt_addr_le_copy(&per_adv_sync->addr, ¶m->addr); in bt_le_per_adv_sync_create()
1976 per_adv_sync->sid = param->sid; in bt_le_per_adv_sync_create()
2172 const struct bt_le_per_adv_sync_transfer_param *param) in valid_past_param() argument
2174 if (param->skip > 0x01f3 || in valid_past_param()
2175 param->timeout < 0x000A || in valid_past_param()
2176 param->timeout > 0x4000) { in valid_past_param()
2179 if ((param->options & BT_LE_PER_ADV_SYNC_TRANSFER_OPT_REPORTING_INITIALLY_DISABLED) && in valid_past_param()
2180 (param->options & BT_LE_PER_ADV_SYNC_TRANSFER_OPT_FILTER_DUPLICATES)) { in valid_past_param()
2234 const struct bt_le_per_adv_sync_transfer_param *param) in bt_le_per_adv_sync_transfer_subscribe() argument
2246 if (!valid_past_param(param)) { in bt_le_per_adv_sync_transfer_subscribe()
2250 if (param->options & BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOA) { in bt_le_per_adv_sync_transfer_subscribe()
2254 if (param->options & BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOD_1US) { in bt_le_per_adv_sync_transfer_subscribe()
2258 if (param->options & BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_NO_AOD_2US) { in bt_le_per_adv_sync_transfer_subscribe()
2262 if (param->options & BT_LE_PER_ADV_SYNC_TRANSFER_OPT_SYNC_ONLY_CTE) { in bt_le_per_adv_sync_transfer_subscribe()
2266 if (param->options & BT_LE_PER_ADV_SYNC_TRANSFER_OPT_REPORTING_INITIALLY_DISABLED) { in bt_le_per_adv_sync_transfer_subscribe()
2268 } else if (param->options & BT_LE_PER_ADV_SYNC_TRANSFER_OPT_FILTER_DUPLICATES) { in bt_le_per_adv_sync_transfer_subscribe()
2278 err = past_param_set(conn, mode, param->skip, param->timeout, cte_type); in bt_le_per_adv_sync_transfer_subscribe()
2288 err = default_past_param_set(mode, param->skip, param->timeout, cte_type); in bt_le_per_adv_sync_transfer_subscribe()