wifi: small code cleanup

This commit is contained in:
Sébastien Deronne
2016-11-25 22:45:34 +01:00
parent 31d266c79f
commit e45a3546c0
4 changed files with 7 additions and 33 deletions

View File

@@ -82,6 +82,7 @@ ApWifiMac::GetTypeId (void)
}
ApWifiMac::ApWifiMac ()
: m_enableBeaconGeneration (false)
{
NS_LOG_FUNCTION (this);
m_beaconDca = CreateObject<DcaTxop> ();
@@ -94,8 +95,6 @@ ApWifiMac::ApWifiMac ()
//Let the lower layers know that we are acting as an AP.
SetTypeOfStation (AP);
m_enableBeaconGeneration = false;
}
ApWifiMac::~ApWifiMac ()

View File

@@ -663,31 +663,6 @@ DcaTxop::Cancel (void)
{
NS_LOG_FUNCTION (this);
NS_LOG_DEBUG ("transmission cancelled");
/**
* This happens in only one case: in an AP, you have two DcaTxop:
* - one is used exclusively for beacons and has a high priority.
* - the other is used for everything else and has a normal
* priority.
*
* If the normal queue tries to send a unicast data frame, but
* if the tx fails (ack timeout), it starts a backoff. If the beacon
* queue gets a tx oportunity during this backoff, it will trigger
* a call to this Cancel function.
*
* Since we are already doing a backoff, we will get access to
* the medium when we can, we have nothing to do here. We just
* ignore the cancel event and wait until we are given again a
* tx oportunity.
*
* Note that this is really non-trivial because each of these
* frames is assigned a sequence number from the same sequence
* counter (because this is a non-802.11e device) so, the scheme
* described here fails to ensure in-order delivery of frames
* at the receiving side. This, however, does not matter in
* this case because we assume that the receiving side does not
* update its <seq,ad> tupple for packets whose destination
* address is a broadcast address.
*/
}
void

View File

@@ -367,16 +367,16 @@ MacLow::MacLow ()
m_endTxNoAckEvent (),
m_currentPacket (0),
m_listener (0),
m_lastNavStart (Seconds (0)),
m_lastNavDuration (Seconds (0)),
m_promisc (false),
m_ampdu (false),
m_phyMacLowListener (0),
m_ctsToSelfSupported (false),
m_sentMpdus (0),
m_nTxMpdus (0)
{
NS_LOG_FUNCTION (this);
m_lastNavDuration = Seconds (0);
m_lastNavStart = Seconds (0);
m_promisc = false;
m_ampdu = false;
m_sentMpdus = 0;
m_aggregateQueue = CreateObject<WifiMacQueue> ();
}

View File

@@ -105,7 +105,7 @@ StaWifiMac::StaWifiMac ()
: m_state (BEACON_MISSED),
m_probeRequestEvent (),
m_assocRequestEvent (),
m_beaconWatchdogEnd (Seconds (0.0))
m_beaconWatchdogEnd (Seconds (0))
{
NS_LOG_FUNCTION (this);