wifi: Eliminate some more Visual Studio compiler warnings
This commit is contained in:
@@ -732,7 +732,7 @@ ApWifiMac::SendAssocResp (Mac48Address to, bool success, bool isReassoc)
|
||||
if (success)
|
||||
{
|
||||
code.SetSuccess ();
|
||||
uint16_t aid;
|
||||
uint16_t aid = 0;
|
||||
bool found = false;
|
||||
if (isReassoc)
|
||||
{
|
||||
|
||||
@@ -356,10 +356,10 @@ DcfManager::DoGrantAccess (void)
|
||||
* the result of the calculations.
|
||||
*/
|
||||
state->NotifyAccessGranted ();
|
||||
for (std::vector<Ptr<DcfState> >::iterator k = internalCollisionStates.begin ();
|
||||
k != internalCollisionStates.end (); k++)
|
||||
for (std::vector<Ptr<DcfState> >::iterator l = internalCollisionStates.begin ();
|
||||
l != internalCollisionStates.end (); l++)
|
||||
{
|
||||
(*k)->NotifyInternalCollision ();
|
||||
(*l)->NotifyInternalCollision ();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -154,14 +154,14 @@ IdealWifiManager::DoInitialize ()
|
||||
guardInterval = GetPhy ()->GetGuardInterval ().GetNanoSeconds ();
|
||||
}
|
||||
txVector.SetGuardInterval (guardInterval);
|
||||
for (uint8_t i = 1; i <= GetPhy ()->GetMaxSupportedTxSpatialStreams (); i++)
|
||||
for (uint8_t k = 1; k <= GetPhy ()->GetMaxSupportedTxSpatialStreams (); k++)
|
||||
{
|
||||
NS_LOG_DEBUG ("Initialize, adding mode = " << mode.GetUniqueName () <<
|
||||
" channel width " << +j <<
|
||||
" nss " << +i <<
|
||||
" nss " << +k <<
|
||||
" GI " << guardInterval);
|
||||
NS_LOG_DEBUG ("In SetupPhy, adding mode = " << mode.GetUniqueName ());
|
||||
txVector.SetNss (i);
|
||||
txVector.SetNss (k);
|
||||
txVector.SetMode (mode);
|
||||
AddSnrThreshold (txVector, GetPhy ()->CalculateSnr (txVector, m_ber));
|
||||
}
|
||||
|
||||
@@ -2352,6 +2352,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
Time tstamp;
|
||||
uint8_t tid = GetTid (packet, hdr);
|
||||
Ptr<WifiMacQueue> queue;
|
||||
Ptr<Packet> aggPacket;
|
||||
AcIndex ac = QosUtilsMapTidToAc (tid);
|
||||
std::map<AcIndex, Ptr<EdcaTxopN> >::const_iterator edcaIt = m_edca.find (ac);
|
||||
NS_ASSERT (edcaIt != m_edca.end ());
|
||||
@@ -2372,7 +2373,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
uint16_t blockAckSize = 0;
|
||||
bool aggregated = false;
|
||||
int i = 0;
|
||||
Ptr<Packet> aggPacket = newPacket->Copy ();
|
||||
aggPacket = newPacket->Copy ();
|
||||
|
||||
if (!hdr.IsBlockAckReq ())
|
||||
{
|
||||
@@ -2455,7 +2456,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
}
|
||||
|
||||
newPacket = peekedPacket->Copy ();
|
||||
Ptr<Packet> aggPacket = newPacket->Copy ();
|
||||
aggPacket = newPacket->Copy ();
|
||||
|
||||
newPacket->AddHeader (peekedHdr);
|
||||
AddWifiMacTrailer (newPacket);
|
||||
@@ -2566,7 +2567,7 @@ MacLow::AggregateToAmpdu (Ptr<const Packet> packet, const WifiMacHeader hdr)
|
||||
{
|
||||
newPacket = packet->Copy ();
|
||||
peekedHdr = hdr;
|
||||
Ptr<Packet> aggPacket = newPacket->Copy ();
|
||||
aggPacket = newPacket->Copy ();
|
||||
m_aggregateQueue[tid]->Enqueue (Create<WifiMacQueueItem> (aggPacket, peekedHdr));
|
||||
newPacket->AddHeader (peekedHdr);
|
||||
AddWifiMacTrailer (newPacket);
|
||||
|
||||
@@ -486,7 +486,7 @@ MinstrelWifiManager::FindRate (MinstrelWifiRemoteStation *station)
|
||||
// if samplieLimit is zero, then don't sample this rate
|
||||
if (!station->m_minstrelTable[idx].sampleLimit)
|
||||
{
|
||||
idx = station->m_maxTpRate;
|
||||
idx = station->m_maxTpRate;
|
||||
station->m_isSampling = false;
|
||||
}
|
||||
else
|
||||
@@ -504,7 +504,7 @@ MinstrelWifiManager::FindRate (MinstrelWifiRemoteStation *station)
|
||||
if (station->m_sampleDeferred)
|
||||
{
|
||||
NS_LOG_DEBUG ("The next look around rate is slower than the maximum throughput rate, continue with the maximum throughput rate: " << station->m_maxTpRate << "(" << GetSupported (station, station->m_maxTpRate) << ")");
|
||||
idx = station->m_maxTpRate;
|
||||
idx = station->m_maxTpRate;
|
||||
}
|
||||
}
|
||||
//continue using the best rate
|
||||
|
||||
@@ -530,7 +530,7 @@ StaWifiMac::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr)
|
||||
Time delay = MicroSeconds (beacon.GetBeaconIntervalUs () * m_maxMissedBeacons);
|
||||
RestartBeaconWatchdog (delay);
|
||||
SetBssid (hdr->GetAddr3 ());
|
||||
SupportedRates rates = beacon.GetSupportedRates ();
|
||||
rates = beacon.GetSupportedRates ();
|
||||
for (uint8_t i = 0; i < m_phy->GetNModes (); i++)
|
||||
{
|
||||
WifiMode mode = m_phy->GetMode (i);
|
||||
@@ -544,7 +544,7 @@ StaWifiMac::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr)
|
||||
{
|
||||
ErpInformation erpInformation = beacon.GetErpInformation ();
|
||||
isShortPreambleEnabled &= !erpInformation.GetBarkerPreambleMode ();
|
||||
if (erpInformation.GetUseProtection () == true)
|
||||
if (erpInformation.GetUseProtection () != 0)
|
||||
{
|
||||
m_stationManager->SetUseNonErpProtection (true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user