@@ -9653,6 +9653,10 @@ static void read_commands_complete(uint8_t status, uint16_t length,
DBG("kernel supports exp features");
kernel_features |= KERNEL_EXP_FEATURES;
break;
+ case MGMT_OP_ADD_EXT_ADV_PARAMS:
+ DBG("kernel supports ext adv commands");
+ kernel_features |= KERNEL_HAS_EXT_ADV_ADD_CMDS;
+ break;
default:
break;
}
@@ -246,6 +246,7 @@ enum kernel_features {
KERNEL_SET_SYSTEM_CONFIG = 1 << 2,
KERNEL_EXP_FEATURES = 1 << 3,
KERNEL_HAS_RESUME_EVT = 1 << 4,
+ KERNEL_HAS_EXT_ADV_ADD_CMDS = 1 << 5,
};
bool btd_has_kernel_features(uint32_t feature);
@@ -57,6 +57,7 @@ struct btd_adv_manager {
uint8_t max_ads;
uint32_t supported_flags;
unsigned int instance_bitmap;
+ bool extended_add_cmds;
};
#define AD_TYPE_BROADCAST 0
@@ -1426,6 +1427,10 @@ static struct btd_adv_manager *manager_create(struct btd_adapter *adapter,
manager->mgmt_index = btd_adapter_get_index(adapter);
manager->clients = queue_new();
manager->supported_flags = MGMT_ADV_FLAG_LOCAL_NAME;
+ manager->extended_add_cmds =
+ btd_has_kernel_features(KERNEL_HAS_EXT_ADV_ADD_CMDS);
+ manager->min_tx_power = ADV_TX_POWER_NO_PREFERENCE;
+ manager->max_tx_power = ADV_TX_POWER_NO_PREFERENCE;
if (!g_dbus_register_interface(btd_get_dbus_connection(),
adapter_get_path(manager->adapter),