My schnauzer has just gone through a ear-infection and he would shake his head all the time. We took him to the vet and Oscar shook and broke a blood vessel so he had to get a tube in his ear to drain.
they gave him some medicine and then we had to take him back (to get it out.) so to answer your question YOU are NOT doing anything wrong. It just happens. What does your vet say?
My yorkies are not having any ear infections. But I guess it does not madder what breed.
Good Luck
Cheryl