static void exp_debug_func(struct btd_adapter *adapter, uint32_t flags)
{
struct mgmt_cp_set_exp_feature cp;
+ uint8_t action = btd_opts.experimental ? 0x01 : 0x00;
- /* If already enabled don't attempt to set it again */
- if (flags & BIT(0))
+ /* If already set don't attempt to set it again */
+ if (action == (flags & BIT(0)))
return;
memset(&cp, 0, sizeof(cp));
memcpy(cp.uuid, debug_uuid, 16);
- cp.action = 0x01;
+ cp.action = btd_opts.experimental ? 0x01 : 0x00;
if (mgmt_send(adapter->mgmt, MGMT_OP_SET_EXP_FEATURE,
adapter->dev_id, sizeof(cp), &cp,
static void rpa_resolution_func(struct btd_adapter *adapter, uint32_t flags)
{
struct mgmt_cp_set_exp_feature cp;
+ uint8_t action = btd_opts.experimental ? 0x01 : 0x00;
- /* If already enabled don't attempt to set it again */
- if (flags & BIT(0))
+ /* If already set don't attempt to set it again */
+ if (action == (flags & BIT(0)))
return;
memset(&cp, 0, sizeof(cp));
memcpy(cp.uuid, rpa_resolution_uuid, 16);
- cp.action = 0x01;
+ cp.action = action;
if (mgmt_send(adapter->mgmt, MGMT_OP_SET_EXP_FEATURE,
adapter->dev_id, sizeof(cp), &cp,
adapter->central_rpa_res_support = 0x01;
#endif
- if (btd_opts.experimental &&
- btd_has_kernel_features(KERNEL_EXP_FEATURES))
- read_exp_features(adapter);
-
err = adapter_register(adapter);
if (err < 0) {
btd_error(adapter->dev_id, "Unable to register new adapter");
return;
}
+ if (btd_has_kernel_features(KERNEL_EXP_FEATURES))
+ read_exp_features(adapter);
+
/*
* Protect against potential two executions of read controller info.
*