bug fixes in wifi functions

misplaced a few defines