According to section 126.96.36.199 in the IEEE 802.11e standard, one and only one of the following actions is allowed at slot boundaries: - decrement of backoff timer, or - initiate transmission, or - backoff procedure due to internal collision, or - do nothing.
So, 1. Backoff counter is resumed one slot time before the AIFS expiration. 2. However, since a single MAC operation per slot is permitted (backoff decrement or packet transmission), when the backoff counter decrements to 0, the station cannot transmit immediately, but has to wait for a further backoff slot if the medium is idle, or a further AIFS expiration if the medium is busy. I think that 802.11e TKN code is a good implementation of IEEE 802.11e. However, it seems that the implementation conforms to the requirement 1, but do not to the requirement 2. Am I correct? ps. The following paper can be a good guide. Giuseppe Bianchi, "Understanding 802.11e Contention-Based Prioritization Mechanisms and Their Coexistence with Legacy 802.11 Stations", IEEE Network, 2005