related to #52
Currently, channel switch is performed only after receiving Channel Switch Announcement with Channel Switch Count <= 1. This ensures proper operation under normal conditions. However, Beacon misses happen (especially if there is a reason to leave the current channel). If the last Beacon before channel switch is lost, then STA will remain on the channel. Such a condition is not fatal, because STA will eventually recover after some time (by scanning for the BSS and rejoining). It is not optimal, though. The information that a channel switch is scheduled could have been already known thanks to prior announcements. Ignoring them is just losing the opportunity to work fluently under harsh conditions.
Of course it has a drawback. The last (lost) Beacon before scheduled channel switch could cancel it. If so, then our STA will change the
channel, notice that there is no one to talk to there and then try recover as usual. However, if we lose last Beacon it is more probable that the channel switch was not cancelled and thus assuming that we decrease the probability of missing (or performing an incorrect) channel switch.
BTW It is desirable to pay more attention to received Channel Switch Announcements to avoid malicious packet injections that can cause a serious DoS.