Merge tools/wlanconfig.c changes from the DFS branch