A stud wall (150mm) is to be built,

, for the expansion of an old bathroom on the upper floor. The bottom plate is attached to the concrete slab. Now to the question: is it sufficient to attach the existing door frame that was previously set in lightweight concrete blocks, can the top be attached to the wood paneling that sits on the underside of the roof truss?
(The other side of the door frame is attached to existing lightweight concrete blocks.)