Ask a Dog Vet and Get Answers to Your Dog Veterinary Questions
It sounds like you're dealing with an ear infection. The common signs include itching at the ears, shaking the head and inflammation/ debris visualized in the ear canal.
These can be treated with topical ear medication. The meds include an anti-fungal for the yeast, antibiotic for the bacteria and steroid for the inflammation in the ear canal. Otomax is the most commonly used. You may want to use a new vet if the one you have seen is not treating it appropriately.
In the mean time, you can clean out the ears with a diluted hydrogen peroxide solution or over the counter ear cleansing solution.
You can also give Benadryl (Diphenhydramine) at a dose of 1-2 mg per lb every 6-8 hours as needed for the itching.
I hope this helps, let me know if you have any other questions.