  We consider 6d N=(2,0) theory on N M5-branes, together with a 4d defect
labeled by a Young diagram Y specifying its global symmetry G_Y. A recent
conjecture states that a compactification of this system leads to a 2d theory
with W-algebra symmetry depending on Y. We provide a check of the conjecture by
reproducing the level of the current subalgebra \hat{G}_Y of this W-algebra
from the property of the 4d defect.
