Thanks for query,
You have an associated sinus infection
with your ear infection
Repeated infection of cold
& flu causes maxillary & frontal sinus to gets infected caused you this type of headache.
Your middle ear infection should require a full course of medication to resolve completely.it takes more times then usual ten other infection of body.
If you got repeated infection or continue discharged from ear you may need Tympanoplasty
operation.It is necessary to save your mastoid bone from infection.
You should require hot water inhalation of tincture benzoine that will help to reduce infection of sinus.