#12 no new backoff() when medium is busy

v2.1
closed-fixed
nobody
MAC (4)
5
2011-12-19
2011-12-19
Galactix
No

After going through the eventlogs I found when Mac80211 gets a packet from the Netw and the channel is busy, it schedules a senseChannelWhileIdle(currentIFS + remainingBackoff) after the ongoing transmission ends (the backoff-counter freeze or deferral). Unfortunately, remainingBackoff is often 0 as post-backoff is likely to have completed. The result is many synchronised collisions one IFS after the ongoing transmission.

Of course this does not happen (often) in simple 10-node WLAN simulations but will occur quite often in networks with many nodes. And besides, it is not according to the standard :)

Proposed change in Mac80211::beginNewCycle():

if (!fromUpperLayer.empty()) {
if(!contention->isScheduled()) {
if(channel.isIdle()) {
senseChannelWhileIdle(currentIFS + remainingBackoff);
}else{
//channel is busy
if(remainingBackoff==0){
remainingBackoff = backoff();
}
}
}else{
//busy in contention, frame is enqueued.
}
}else{
// we do PBO
}

Here I use remaingingBackoff==0 to signal completion of the post-backoff. We cannot check for state == IDLE because state is set to CONTEND a few lines earlier.

See also:
http://www.freeminded.org/?p=801

Discussion

  • Michael Lindig
    Michael Lindig
    2011-12-19

    • status: open --> closed-fixed
     
  • Michael Lindig
    Michael Lindig
    2011-12-19

    fixed in GIT