static bool load_bredr_defaults(struct btd_adapter *adapter,
				struct mgmt_tlv_list *list,
				struct btd_br_defaults *defaults)
{
	if (btd_opts.mode == BT_MODE_LE)
		return true;

	if (defaults->page_scan_type != 0xFFFF) {
		if (!mgmt_tlv_add_fixed(list, 0x0000,
					&defaults->page_scan_type))
			return false;
	}

	if (defaults->page_scan_interval) {
		if (!mgmt_tlv_add_fixed(list, 0x0001,
					&defaults->page_scan_interval))
			return false;
	}

	if (defaults->page_scan_win) {
		if (!mgmt_tlv_add_fixed(list, 0x0002,
					&defaults->page_scan_win))
			return false;
	}

	if (defaults->scan_type != 0xFFFF) {
		if (!mgmt_tlv_add_fixed(list, 0x0003,
					&defaults->scan_type))
			return false;
	}

	if (defaults->scan_interval) {
		if (!mgmt_tlv_add_fixed(list, 0x0004,
					&defaults->scan_interval))
			return false;
	}

	if (defaults->scan_win) {
		if (!mgmt_tlv_add_fixed(list, 0x0005,
					&defaults->scan_win))
			return false;
	}

	if (defaults->link_supervision_timeout) {
		if (!mgmt_tlv_add_fixed(list, 0x0006,
					&defaults->link_supervision_timeout))
			return false;
	}

	if (defaults->page_timeout) {
		if (!mgmt_tlv_add_fixed(list, 0x0007,
					&defaults->page_timeout))
			return false;
	}

	if (defaults->min_sniff_interval) {
		if (!mgmt_tlv_add_fixed(list, 0x0008,
					&defaults->min_sniff_interval))
			return false;
	}

	if (defaults->max_sniff_interval) {
		if (!mgmt_tlv_add_fixed(list, 0x0009,
					&defaults->max_sniff_interval))
			return false;
	}

	return true;
}
static bool load_bredr_defaults(struct btd_adapter *adapter,
				struct mgmt_tlv_list *list,
				struct btd_br_defaults *defaults)
{
	if (btd_opts.mode == BT_MODE_LE)
		return true;

	if (defaults->page_scan_type != 0xFFFF) {
		if (!mgmt_tlv_add_fixed(list, 0x0000,
					&defaults->page_scan_type))
			return false;
	}

	if (defaults->page_scan_interval) {
		if (!mgmt_tlv_add_fixed(list, 0x0001,
					&defaults->page_scan_interval))
			return false;
	}

	if (defaults->page_scan_win) {
		if (!mgmt_tlv_add_fixed(list, 0x0002,
					&defaults->page_scan_win))
			return false;
	}

	if (defaults->scan_type != 0xFFFF) {
		if (!mgmt_tlv_add_fixed(list, 0x0003,
					&defaults->scan_type))
			return false;
	}

	if (defaults->scan_interval) {
		if (!mgmt_tlv_add_fixed(list, 0x0004,
					&defaults->scan_interval))
			return false;
	}

	if (defaults->scan_win) {
		if (!mgmt_tlv_add_fixed(list, 0x0005,
					&defaults->scan_win))
			return false;
	}

	if (defaults->link_supervision_timeout) {
		if (!mgmt_tlv_add_fixed(list, 0x0006,
					&defaults->link_supervision_timeout))
			return false;
	}

	if (defaults->page_timeout) {
		if (!mgmt_tlv_add_fixed(list, 0x0007,
					&defaults->page_timeout))
			return false;
	}

	if (defaults->min_sniff_interval) {
		if (!mgmt_tlv_add_fixed(list, 0x0008,
					&defaults->min_sniff_interval))
			return false;
	}

	if (defaults->max_sniff_interval) {
		if (!mgmt_tlv_add_fixed(list, 0x0009,
					&defaults->max_sniff_interval))
			return false;
	}

	return true;
}