It's yeast growing in there. Clean them out with alcohol 3 times a day. If the infection has gone untreated for a long time you might need to take him to the vet. A secondary bacterial infection can occur with scratching that needs antibiotics. Yeast is a reoccurring infection that plagues many floppy eared dogs for life. You will need to keep them cleaned out and treated all the time his entire life. Rubbing alcohol will kill yeast, and simply putting a little in the ear canal 2x a week will prevent another raging infection. Lie the dog on his side. Hold open the canal and drop in a capful of alcohol. Make him lie for a few moments. Then do the other ear.