Lines Matching refs:cp

39 	const struct btp_has_set_active_index_cmd *cp = cmd;  in has_set_active_index()  local
40 int err = bt_has_preset_active_set(cp->index); in has_set_active_index()
51 const struct btp_has_set_preset_name_cmd *cp = cmd; in has_set_preset_name() local
52 const uint16_t fixed_size = sizeof(*cp); in has_set_preset_name()
55 if (cmd_len >= fixed_size && cmd_len >= (fixed_size + cp->length)) { in has_set_preset_name()
56 int name_len = MIN(cp->length, BT_HAS_PRESET_NAME_MAX); in has_set_preset_name()
58 memcpy(temp_name, cp->name, name_len); in has_set_preset_name()
60 err = bt_has_preset_name_change(cp->index, temp_name); in has_set_preset_name()
68 const struct btp_has_remove_preset_cmd *cp = cmd; in has_remove_preset() local
71 if (cp->index == BT_HAS_PRESET_INDEX_NONE) { in has_remove_preset()
82 err = bt_has_preset_unregister(cp->index); in has_remove_preset()
84 has_presets &= ~(1 << (cp->index - 1)); in has_remove_preset()
102 const struct btp_has_add_preset_cmd *cp = cmd; in has_add_preset() local
103 const uint16_t fixed_size = sizeof(*cp); in has_add_preset()
106 if (cmd_len >= fixed_size && cmd_len >= (fixed_size + cp->length)) { in has_add_preset()
107 int name_len = MIN(cp->length, BT_HAS_PRESET_NAME_MAX); in has_add_preset()
109 memcpy(temp_name, cp->name, name_len); in has_add_preset()
112 cp->index, cp->props, temp_name, &has_preset_ops in has_add_preset()
116 has_presets |= 1 << (cp->index - 1); in has_add_preset()
125 const struct btp_has_set_properties_cmd *cp = cmd; in has_set_properties() local
126 int err = (cp->props & BT_HAS_PROP_AVAILABLE) ? in has_set_properties()
127 bt_has_preset_available(cp->index) : in has_set_properties()
128 bt_has_preset_unavailable(cp->index); in has_set_properties()