My dog did the same thing and the vet said she had a yeast infection and bacteria. It does need treated before it swells shut. My dog is on antibiotic and prednisone and an antifungal pill. We also have to put ointment in her ears. The vet said she would be on meds until atleast May. She has been on meds for 3 weeks already.
Definitely yeast infection. If not treated your dog could wind up needing surgery to remove the ear canal itself, you can't let an infection go when it's that bad, MUST TREAT ASAP!!! Probably needs antibiotic, antifungal and drops. My guess is your dog should be on a minimum of 4-6 week course maybe longer. My coonhound when I rescued her was so deeply infected with yeast in the ears she was on Zeniquin (potent antibiotic) for 8 weeks plus antifungals and special compounded drops from a pharmacy.
A thick, black wax usually indicates ear mites. The mites make the ears very itchy and that makes them scratch them, and it also irritates them to the point of redness. A good miticide should take care of it, and you can get this from your vet.
Ghilly
It sounds like a yeast infection. Your dog will need antibiotics and a cleaning solution. It will NOT go away without the antibiotic, so please take him to the vet ASAP!