cleanup script for wifi

merge two blocks for update wifi into one block