Needs cleaning up. Perhaps (some of) the hostap configuration should be moved to the 'device' somehow?