bug 605: Nqsta MAC should ignore beacons SSIDs while waiting for association response

This commit is contained in:
Gustavo J. A. M. Carneiro
2009-06-26 12:57:29 +02:00
parent a5edf27444
commit d1a4ff3a99
4 changed files with 22 additions and 8 deletions

View File

@@ -453,9 +453,15 @@ NqstaWifiMac::RestartBeaconWatchdog (Time delay)
}
}
bool
NqstaWifiMac::IsAssociated (void)
NqstaWifiMac::IsAssociated (void) const
{
return (m_state == ASSOCIATED)?true:false;
return m_state == ASSOCIATED;
}
bool
NqstaWifiMac::IsWaitAssocResp (void) const
{
return m_state == WAIT_ASSOC_RESP;
}
void
@@ -553,7 +559,7 @@ NqstaWifiMac::Receive (Ptr<Packet> packet, WifiMacHeader const *hdr)
{
goodBeacon = true;
}
if (IsAssociated () && hdr->GetAddr3 () != GetBssid ())
if ((IsWaitAssocResp () || IsAssociated ()) && hdr->GetAddr3 () != GetBssid ())
{
goodBeacon = false;
}

View File

@@ -130,7 +130,8 @@ private:
void TryToEnsureAssociated (void);
void AssocRequestTimeout (void);
void ProbeRequestTimeout (void);
bool IsAssociated (void);
bool IsAssociated (void) const;
bool IsWaitAssocResp (void) const;
void MissedBeacons (void);
void RestartBeaconWatchdog (Time delay);
SupportedRates GetSupportedRates (void) const;

View File

@@ -484,9 +484,15 @@ QstaWifiMac::RestartBeaconWatchdog (Time delay)
}
bool
QstaWifiMac::IsAssociated ()
QstaWifiMac::IsAssociated (void) const
{
return (m_state == ASSOCIATED)?true:false;
return m_state == ASSOCIATED;
}
bool
QstaWifiMac::IsWaitAssocResp (void) const
{
return m_state == WAIT_ASSOC_RESP;
}
void
@@ -593,7 +599,7 @@ QstaWifiMac::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr)
{
goodBeacon = true;
}
if (IsAssociated () && hdr->GetAddr3 () != GetBssid ())
if ((IsWaitAssocResp () || IsAssociated ()) && hdr->GetAddr3 () != GetBssid ())
{
goodBeacon = false;
}

View File

@@ -101,7 +101,8 @@ private:
void SendAssociationRequest (void);
void SendProbeRequest (void);
void TryToEnsureAssociated (void);
bool IsAssociated (void);
bool IsAssociated (void) const;
bool IsWaitAssocResp (void) const;
virtual void DoDispose (void);
/**