Compacted the WiFi TX flow-control code into a single while() loop