wifi plugin: fix style issues, and bug due to uncleared timeout.