@@ -507,6 +507,7 @@ struct mgmt_rp_add_advertising {
#define MGMT_ADV_PARAM_TIMEOUT (1 << 13)
#define MGMT_ADV_PARAM_INTERVALS (1 << 14)
#define MGMT_ADV_PARAM_TX_POWER (1 << 15)
+#define MGMT_ADV_PARAM_SCAN_RSP (1 << 16)
#define MGMT_OP_REMOVE_ADVERTISING 0x003F
struct mgmt_cp_remove_advertising {
@@ -945,7 +945,13 @@ static int refresh_extended_adv(struct btd_adv_client *client,
return -EINVAL;
}
- cp.flags = htobl(flags);
+ /* Indicate that this instance will be configured as scannable */
+ if (client->scan_rsp_len &&
+ client->manager->supported_flags & MGMT_ADV_PARAM_SCAN_RSP) {
+ flags |= MGMT_ADV_PARAM_SCAN_RSP;
+ }
+
+ cp.flags = cpu_to_le32(flags);
mgmt_ret = mgmt_send(client->manager->mgmt, MGMT_OP_ADD_EXT_ADV_PARAMS,
client->manager->mgmt_index, sizeof(cp), &cp,