  For a quasi-split classical group over a p-adic field with sufficiently large
residual characteristic, we prove that the maximum of depth of representations
in each L-packet equals the depth of the corresponding L-parameter.
Furthermore, for quasi-split unitary groups, we show that the depth is constant
in each L-packet. The key is an analysis of the endoscopic character relation
via harmonic analysis based on the Bruhat--Tits theory. These results are
slight generalizations of a result of Ganapathy and Varma.
