your question is a bit vague. first it depends on the type of ear infection (there are many different kinds). if the breast-feeding mother has a middle ear infection for example there are many safe antibiotics that can be used. if the infant has a middle ear infection this can be safely treated as well.
what is the best way to treat a ear infection while breastfeeding?