wifi: Get rid of anonymous enum in StaWifiMac

This commit is contained in:
Stefano Avallone
2023-04-24 14:28:23 +02:00
committed by Stefano Avallone
parent 1b29ec8fec
commit 787a75de01
3 changed files with 15 additions and 9 deletions

View File

@@ -523,13 +523,13 @@ StaWifiMac::StartScanning()
}
if (m_activeProbing)
{
scanParams.type = WifiScanParams::ACTIVE;
scanParams.type = WifiScanType::ACTIVE;
scanParams.probeDelay = MicroSeconds(m_probeDelay->GetValue());
scanParams.minChannelTime = scanParams.maxChannelTime = m_probeRequestTimeout;
}
else
{
scanParams.type = WifiScanParams::PASSIVE;
scanParams.type = WifiScanType::PASSIVE;
scanParams.maxChannelTime = m_waitBeaconTimeout;
}

View File

@@ -41,6 +41,17 @@ class CapabilityInformation;
class RandomVariableStream;
class WifiAssocManager;
/**
* \ingroup wifi
*
* Scan type (active or passive)
*/
enum class WifiScanType : uint8_t
{
ACTIVE = 0,
PASSIVE
};
/**
* \ingroup wifi
*
@@ -63,12 +74,7 @@ struct WifiScanParams
/// typedef for a list of channels
using ChannelList = std::list<Channel>;
enum : uint8_t
{
ACTIVE = 0,
PASSIVE
} type; ///< indicates either active or passive scanning
WifiScanType type; ///< indicates either active or passive scanning
Ssid ssid; ///< desired SSID or wildcard SSID
std::vector<ChannelList> channelList; ///< list of channels to scan, for each link
Time probeDelay; ///< delay prior to transmitting a Probe Request

View File

@@ -94,7 +94,7 @@ WifiDefaultAssocManager::DoStartScanning()
m_probeRequestEvent.Cancel();
m_waitBeaconEvent.Cancel();
if (GetScanParams().type == WifiScanParams::ACTIVE)
if (GetScanParams().type == WifiScanType::ACTIVE)
{
for (uint8_t linkId = 0; linkId < m_mac->GetNLinks(); linkId++)
{