According to the articles that i read (also wikipedia [1]), they refer that the above algorithm works on finite field $GF(q)$. But I cannot find an evidence that it still works on extension field, i.e: $GF(q^n)$. It looks like from the algorithm itself that there is no problem, but I rather like an expert opinion.
[1]- https://en.wikipedia.org/wiki/Berlekamp%E2%80%93Massey_algorithm#CITEREFReedsSloane1985