[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] bug in 802.11 MAC code



i had posted a message about this earlier, but got no response. my 
workaround was to add another rx state MAC_RECV_CTS. rx_state_ is set to 
MAC_RECV_CTS in recvCTS and tx_resume() checks for this state.
so the relevant code in tx_resume() is something like:

if(tx_state_ == MAC_RTS && rx_state_ == MAC_RECV_CTS) {
	mhDefer_.start(sifs_);
} else {
	mhDefer_.start(difs_);
}

that may be safer than determining based on packet size. you can tell me if 
i'm wrong...

-neeraj

>From: Aman Singla <aman@atheros.com>
>To: NS Users Mailing List <ns-users@ISI.EDU>
>Subject: [ns] bug in 802.11 MAC code
>Date: Wed, 06 Sep 2000 15:13:17 -0700
>
>Hi-
>
>I came across a bug with the modeling of the 802.11 MAC
>(original code from CMU??).
>
>Looking in Mac802_11::tx_resume()
>a data packet defers for difs_ even following a RTS/CTS
>exchange - as shown in the original code:
>...
>         else if(pktTx_) {
>
>                 if(mhBackoff_.busy() == 0)
>                         mhDefer_.start(difs_);
>
>         }
>...
>The correct behavior is to wait for sifs_ following a
>RTS/CTS exchange; so the correct code might be:
>...
>         else if(pktTx_) {
>
>                 if(mhBackoff_.busy() == 0) {
>                         if (((u_int32_t)HDR_CMN(pktTx_)->size() <
>macmib_->RTSThreshold) ||
>
>((u_int32_t)ETHER_ADDR(HDR_MAC802_11(pktTx_)->dh_ra) == MAC_BROADCAST))
>                                 mhDefer_.start(difs_);
>                         else
>                                 mhDefer_.start(sifs_);
>                 }
>
>         }
>...
>
>:a

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.