LinuxKPI: 802.11: fix counting the number of supbands
While the main purpose was to assign an(y) early chandef with the
loop, later additions made use of it to also count supbands as well
as to initialise max_rates.
Due to the main goal we can exit the loop early and not properly
count and initialise supbands and max_rates.
Move the terminating condition into the loop and make it a continue
rather than ending the loop.
Fixes: d9945d7821b9b ("improve hw_scan")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit f454a4a10dc027474a85269cb4a3f50bbbf90528)