add api for mac to link wifi automatically