Whenever the MAC layer has either finished sending or received packet p, it triggers COMPLETEEVENT. This procedure subtracts the channel occupancy time of p from the tokens associated with node i that is the source or destination of p. It also modifies actuali, the actual tokens used since starti. We will explain how TBR uses actuali in the next subsection.
We now describe how to compute the channel occupancy time for packet p. We define packet transfer time as the total time required to transfer a data packet at the 802.11 MAC layer, which is typically the sum of i) the transmission time of the data packet, ii) the transmission time of a synchronous MAC-layer ack when necessary, iii) propagation delays for both the data and ack packets, and iv) the inter-frame idle periods necessary for the sending node to be idle before accessing the channel. Since the MAC-layer may perform retransmissions upon a transmission failure, the channel occupancy time is the sum of the packet transfer time of each transmission until p has successfully been transmitted or dropped as a result of an undeliverable failure. Therefore, failed packets also contribute to the channel occupancy time of the sending node.
Taking into account retransmissions is straight forward in the downlink direction. However, in the uplink direction, the AP is not aware of the exact number of retransmission attempts made by the client stations. Ideally, the underlying MAC protocol should include a retry sequence number field (about 4 bits) in the header to indicate how many retransmissions precede the current packet transmission.
When retransmission information is not available for each packet received and the necessary header modification is not an option, the AP needs to estimate the information necessary to compute the channel occupancy time. We distinguish two types of losses at the AP: one detected at the MAC layer (due to the CRC check failure) and the other at the physical layer. In the former, it is highly likely that the MAC header, whose size is relatively much smaller than the typical payload size, is not corrupted and thus the AP can determine the source address of the failed transmission as well as the transmission rate. We note that the MAC layer header can be made robust against channel errors by transmitting at a lower data rate.
However, if the frame loss is detected at the physical layer, TBR can be aware of the loss but may not know the necessary transmission information. We believe that heuristics can be developed to estimate the transmission information of each loss detected at the physical layer based on i) the number of active clients in the last few dozen milliseconds, ii) the likelihood of each client contending, and iii) their steady state loss rates at the downlink direction. We plan to develop such heuristics in the future.