wifi: Remove unused WifiPhy members

This commit is contained in:
Stefano Avallone
2021-02-11 21:38:47 +01:00
parent 571e526ce6
commit be1b87f73b
2 changed files with 0 additions and 628 deletions

View File

@@ -55,240 +55,6 @@ NS_LOG_COMPONENT_DEFINE ("WifiPhy");
NS_OBJECT_ENSURE_REGISTERED (WifiPhy);
/**
* This table maintains the mapping of valid ChannelNumber to
* Frequency/ChannelWidth pairs. If you want to make a channel applicable
* to all standards, then you may use the WIFI_PHY_STANDARD_UNSPECIFIED
* standard to represent this, as a wildcard. If you want to limit the
* configuration of a particular channel/frequency/width to a particular
* standard(s), then you can specify one or more such bindings.
*/
WifiPhy::ChannelToFrequencyWidthMap WifiPhy::m_channelToFrequencyWidth =
{
//2.4 GHz channels
// 802.11b uses width of 22, while OFDM modes use width of 20
{ { {1, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2412, 22} },
{ { {1, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2412, 20} },
{ { {2, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2417, 22} },
{ { {2, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2417, 20} },
{ { {3, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2422, 22} },
{ { {3, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2422, 20} },
{ { {4, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2427, 22} },
{ { {4, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2427, 20} },
{ { {5, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2432, 22} },
{ { {5, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2432, 20} },
{ { {6, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2437, 22} },
{ { {6, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2437, 20} },
{ { {7, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2442, 22} },
{ { {7, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2442, 20} },
{ { {8, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2447, 22} },
{ { {8, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2447, 20} },
{ { {9, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2452, 22} },
{ { {9, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2452, 20} },
{ { {10, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2457, 22} },
{ { {10, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2457, 20} },
{ { {11, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2462, 22} },
{ { {11, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2462, 20} },
{ { {12, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2467, 22} },
{ { {12, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2467, 20} },
{ { {13, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2472, 22} },
{ { {13, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {2472, 20} },
// Only defined for 802.11b
{ { {14, WIFI_PHY_BAND_2_4GHZ}, WIFI_PHY_STANDARD_80211b}, {2484, 22} },
// Now the 5 GHz channels; UNSPECIFIED for 802.11a/n/ac/ax channels
// 20 MHz channels
{ { {36, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5180, 20} },
{ { {40, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5200, 20} },
{ { {44, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5220, 20} },
{ { {48, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5240, 20} },
{ { {52, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5260, 20} },
{ { {56, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5280, 20} },
{ { {60, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5300, 20} },
{ { {64, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5320, 20} },
{ { {100, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5500, 20} },
{ { {104, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5520, 20} },
{ { {108, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5540, 20} },
{ { {112, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5560, 20} },
{ { {116, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5580, 20} },
{ { {120, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5600, 20} },
{ { {124, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5620, 20} },
{ { {128, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5640, 20} },
{ { {132, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5660, 20} },
{ { {136, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5680, 20} },
{ { {140, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5700, 20} },
{ { {144, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5720, 20} },
{ { {149, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5745, 20} },
{ { {153, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5765, 20} },
{ { {157, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5785, 20} },
{ { {161, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5805, 20} },
{ { {165, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5825, 20} },
{ { {169, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5845, 20} },
{ { {173, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5865, 20} },
{ { {177, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5885, 20} },
{ { {181, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5905, 20} },
// 40 MHz channels
{ { {38, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5190, 40} },
{ { {46, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5230, 40} },
{ { {54, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5270, 40} },
{ { {62, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5310, 40} },
{ { {102, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5510, 40} },
{ { {110, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5550, 40} },
{ { {118, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5590, 40} },
{ { {126, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5630, 40} },
{ { {134, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5670, 40} },
{ { {142, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5710, 40} },
{ { {151, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5755, 40} },
{ { {159, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5795, 40} },
{ { {167, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5835, 40} },
{ { {175, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5875, 40} },
// 80 MHz channels
{ { {42, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5210, 80} },
{ { {58, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5290, 80} },
{ { {106, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5530, 80} },
{ { {122, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5610, 80} },
{ { {138, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5690, 80} },
{ { {155, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5775, 80} },
{ { {171, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5855, 80} },
// 160 MHz channels
{ { {50, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5250, 160} },
{ { {114, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5570, 160} },
{ { {163, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_UNSPECIFIED}, {5815, 160} },
// 802.11p 10 MHz channels at the 5.855-5.925 band
{ { {172, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5860, 10} },
{ { {174, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5870, 10} },
{ { {176, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5880, 10} },
{ { {178, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5890, 10} },
{ { {180, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5900, 10} },
{ { {182, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5910, 10} },
{ { {184, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5920, 10} },
// 802.11p 5 MHz channels at the 5.855-5.925 band (for simplification, we consider the same center frequencies as the 10 MHz channels)
{ { {171, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5860, 5} },
{ { {173, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5870, 5} },
{ { {175, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5880, 5} },
{ { {177, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5890, 5} },
{ { {179, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5900, 5} },
{ { {181, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5910, 5} },
{ { {183, WIFI_PHY_BAND_5GHZ}, WIFI_PHY_STANDARD_80211p}, {5920, 5} },
// Now the 6 GHz channels (802.11ax only)
// 20 MHz channels
{ { {1, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {5945, 20} },
{ { {5, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {5965, 20} },
{ { {9, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {5985, 20} },
{ { {13, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6005, 20} },
{ { {17, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6025, 20} },
{ { {21, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6045, 20} },
{ { {25, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6065, 20} },
{ { {29, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6085, 20} },
{ { {33, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6105, 20} },
{ { {37, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6125, 20} },
{ { {41, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6145, 20} },
{ { {45, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6165, 20} },
{ { {49, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6185, 20} },
{ { {53, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6205, 20} },
{ { {57, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6225, 20} },
{ { {61, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6245, 20} },
{ { {65, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6265, 20} },
{ { {69, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6285, 20} },
{ { {73, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6305, 20} },
{ { {77, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6325, 20} },
{ { {81, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6345, 20} },
{ { {85, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6365, 20} },
{ { {89, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6385, 20} },
{ { {93, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6405, 20} },
{ { {97, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6425, 20} },
{ { {101, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6445, 20} },
{ { {105, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6465, 20} },
{ { {109, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6485, 20} },
{ { {113, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6505, 20} },
{ { {117, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6525, 20} },
{ { {121, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6545, 20} },
{ { {125, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6565, 20} },
{ { {129, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6585, 20} },
{ { {133, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6605, 20} },
{ { {137, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6625, 20} },
{ { {141, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6645, 20} },
{ { {145, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6665, 20} },
{ { {149, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6685, 20} },
{ { {153, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6705, 20} },
{ { {157, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6725, 20} },
{ { {161, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6745, 20} },
{ { {165, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6765, 20} },
{ { {169, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6785, 20} },
{ { {173, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6805, 20} },
{ { {177, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6825, 20} },
{ { {181, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6845, 20} },
{ { {185, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6865, 20} },
{ { {189, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6885, 20} },
{ { {193, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6905, 20} },
{ { {197, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6925, 20} },
{ { {201, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6945, 20} },
{ { {205, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6965, 20} },
{ { {209, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6985, 20} },
{ { {213, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {7005, 20} },
{ { {217, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {7025, 20} },
{ { {221, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {7045, 20} },
{ { {225, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {7065, 20} },
{ { {229, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {7085, 20} },
{ { {233, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {7105, 20} },
// 40 MHz channels
{ { {3, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {5955, 40} },
{ { {11, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {5995, 40} },
{ { {19, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6035, 40} },
{ { {27, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6075, 40} },
{ { {35, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6115, 40} },
{ { {43, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6155, 40} },
{ { {51, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6195, 40} },
{ { {59, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6235, 40} },
{ { {67, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6275, 40} },
{ { {75, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6315, 40} },
{ { {83, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6355, 40} },
{ { {91, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6395, 40} },
{ { {99, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6435, 40} },
{ { {107, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6475, 40} },
{ { {115, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6515, 40} },
{ { {123, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6555, 40} },
{ { {131, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6595, 40} },
{ { {139, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6635, 40} },
{ { {147, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6675, 40} },
{ { {155, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6715, 40} },
{ { {163, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6755, 40} },
{ { {171, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6795, 40} },
{ { {179, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6835, 40} },
{ { {187, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6875, 40} },
{ { {195, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6915, 40} },
{ { {203, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6955, 40} },
{ { {211, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6995, 40} },
{ { {219, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {7035, 40} },
{ { {227, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {7075, 40} },
// 80 MHz channels
{ { {7, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {5975, 80} },
{ { {23, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6055, 80} },
{ { {39, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6135, 80} },
{ { {55, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6215, 80} },
{ { {71, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6295, 80} },
{ { {87, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6375, 80} },
{ { {103, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6455, 80} },
{ { {119, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6535, 80} },
{ { {135, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6615, 80} },
{ { {151, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6695, 80} },
{ { {167, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6775, 80} },
{ { {183, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6855, 80} },
{ { {199, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6935, 80} },
{ { {215, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {7015, 80} },
// 160 MHz channels
{ { {15, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6015, 160} },
{ { {47, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6175, 160} },
{ { {79, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6335, 160} },
{ { {111, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6495, 160} },
{ { {143, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6655, 160} },
{ { {175, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6815, 160} },
{ { {207, WIFI_PHY_BAND_6GHZ}, WIFI_PHY_STANDARD_80211ax}, {6975, 160} }
};
const std::set<FrequencyChannelInfo> WifiPhy::m_frequencyChannels =
{
//2.4 GHz channels
@@ -790,13 +556,8 @@ WifiPhy::WifiPhy ()
m_previouslyRxPpduUid (UINT64_MAX),
m_standard (WIFI_PHY_STANDARD_UNSPECIFIED),
m_band (WIFI_PHY_BAND_UNSPECIFIED),
m_isConstructed (false),
m_channelCenterFrequency (0),
m_initialFrequency (0),
m_frequencyChannelNumberInitialized (false),
m_channelNumber (0),
m_initialChannelNumber (0),
m_channelWidth (0),
m_initialChannelWidth (0),
m_sifs (Seconds (0)),
m_slot (Seconds (0)),
@@ -853,19 +614,6 @@ WifiPhy::DoDispose (void)
m_phyEntities.clear ();
}
void
WifiPhy::DoInitialize (void)
{
NS_LOG_FUNCTION (this);
m_isConstructed = true;
if (m_frequencyChannelNumberInitialized == true)
{
NS_LOG_DEBUG ("Frequency already initialized");
return;
}
InitializeFrequencyChannelNumber ();
}
Ptr<WifiPhyStateHelper>
WifiPhy::GetState (void) const
{
@@ -902,34 +650,6 @@ WifiPhy::SetCapabilitiesChangedCallback (Callback<void> callback)
m_capabilitiesChangedCallback = callback;
}
void
WifiPhy::InitializeFrequencyChannelNumber (void)
{
NS_LOG_FUNCTION (this);
NS_ASSERT_MSG (m_frequencyChannelNumberInitialized == false, "Initialization called twice");
// If frequency has been set to a non-zero value during attribute
// construction phase, the frequency and channel width will drive the
// initial configuration. If frequency has not been set, but both
// standard and channel number have been set, that pair will instead
// drive the configuration, and frequency and channel number will be
// aligned
if (m_initialFrequency != 0)
{
SetFrequency (m_initialFrequency);
}
else if (m_initialChannelNumber != 0 && GetPhyStandard () != WIFI_PHY_STANDARD_UNSPECIFIED)
{
SetChannelNumber (m_initialChannelNumber);
}
else if (m_initialChannelNumber != 0 && GetPhyStandard () == WIFI_PHY_STANDARD_UNSPECIFIED)
{
NS_FATAL_ERROR ("Error, ChannelNumber " << +GetChannelNumber () << " was set by user, but neither a standard nor a frequency");
}
m_frequencyChannelNumberInitialized = true;
}
void
WifiPhy::SetRxSensitivity (double threshold)
{
@@ -1135,98 +855,6 @@ WifiPhy::CalculateSnr (const WifiTxVector& txVector, double ber) const
return m_interference.GetErrorRateModel ()->CalculateSnr (txVector, ber);
}
void
WifiPhy::ConfigureDefaultsForStandard (void)
{
NS_LOG_FUNCTION (this);
switch (m_standard)
{
case WIFI_PHY_STANDARD_80211a:
SetChannelWidth (20);
SetFrequency (5180);
// Channel number should be aligned by SetFrequency () to 36
NS_ASSERT (GetChannelNumber () == 36);
break;
case WIFI_PHY_STANDARD_80211b:
SetChannelWidth (22);
SetFrequency (2412);
// Channel number should be aligned by SetFrequency () to 1
NS_ASSERT (GetChannelNumber () == 1);
break;
case WIFI_PHY_STANDARD_80211g:
SetChannelWidth (20);
SetFrequency (2412);
// Channel number should be aligned by SetFrequency () to 1
NS_ASSERT (GetChannelNumber () == 1);
break;
case WIFI_PHY_STANDARD_80211p:
if (GetChannelWidth () > 10)
{
SetChannelWidth (10);
}
SetFrequency (5860);
// Channel number should be aligned by SetFrequency () to either 172 or 171
NS_ASSERT ((GetChannelWidth () == 10 && GetChannelNumber () == 172) || (GetChannelWidth () == 5 && GetChannelNumber () == 171)) ;
break;
case WIFI_PHY_STANDARD_80211n:
SetChannelWidth (20);
if (m_band == WIFI_PHY_BAND_2_4GHZ)
{
SetFrequency (2412);
// Channel number should be aligned by SetFrequency () to 1
NS_ASSERT (GetChannelNumber () == 1);
}
else if (m_band == WIFI_PHY_BAND_5GHZ)
{
SetFrequency (5180);
// Channel number should be aligned by SetFrequency () to 36
NS_ASSERT (GetChannelNumber () == 36);
}
else
{
NS_FATAL_ERROR ("Invalid band");
}
break;
case WIFI_PHY_STANDARD_80211ac:
SetChannelWidth (80);
SetFrequency (5210);
// Channel number should be aligned by SetFrequency () to 42
NS_ASSERT (GetChannelNumber () == 42);
break;
case WIFI_PHY_STANDARD_80211ax:
if (m_band == WIFI_PHY_BAND_2_4GHZ)
{
SetChannelWidth (20);
SetFrequency (2412);
// Channel number should be aligned by SetFrequency () to 1
NS_ASSERT (GetChannelNumber () == 1);
}
else if (m_band == WIFI_PHY_BAND_5GHZ)
{
SetChannelWidth (80);
SetFrequency (5210);
// Channel number should be aligned by SetFrequency () to 42
NS_ASSERT (GetChannelNumber () == 42);
}
else if (m_band == WIFI_PHY_BAND_6GHZ)
{
SetChannelWidth (80);
SetFrequency (5975);
// Channel number should be aligned by SetFrequency () to 7
NS_ASSERT (GetChannelNumber () == 7);
}
else
{
NS_FATAL_ERROR ("Invalid band");
}
break;
case WIFI_PHY_STANDARD_UNSPECIFIED:
default:
NS_LOG_WARN ("Configuring unspecified standard; performing no action");
break;
}
}
const Ptr<const PhyEntity>
WifiPhy::GetStaticPhyEntity (WifiModulationClass modulation)
{
@@ -1426,101 +1054,6 @@ WifiPhy::Configure80211ax (void)
AddPhyEntity (WIFI_MOD_CLASS_HE, Create<HePhy> ());
}
bool
WifiPhy::DefineChannelNumber (uint8_t channelNumber, WifiPhyBand band, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth)
{
NS_LOG_FUNCTION (this << +channelNumber << band << standard << frequency << channelWidth);
ChannelNumberStandardPair p = std::make_pair (std::make_pair (channelNumber, band), standard);
ChannelToFrequencyWidthMap::const_iterator it;
it = m_channelToFrequencyWidth.find (p);
if (it != m_channelToFrequencyWidth.end ())
{
NS_LOG_DEBUG ("channel number/standard already defined; returning false");
return false;
}
FrequencyWidthPair f = std::make_pair (frequency, channelWidth);
m_channelToFrequencyWidth[p] = f;
return true;
}
uint8_t
WifiPhy::FindChannelNumberForFrequencyWidth (uint16_t frequency, uint16_t width) const
{
NS_LOG_FUNCTION (this << frequency << width);
bool found = false;
FrequencyWidthPair f = std::make_pair (frequency, width);
ChannelToFrequencyWidthMap::const_iterator it = m_channelToFrequencyWidth.begin ();
while (it != m_channelToFrequencyWidth.end ())
{
if (it->second == f)
{
found = true;
break;
}
++it;
}
if (found)
{
NS_LOG_DEBUG ("Found, returning " << +it->first.first.first);
return (it->first.first.first);
}
else
{
NS_LOG_DEBUG ("Not found, returning 0");
return 0;
}
}
void
WifiPhy::ConfigureChannelForStandard (void)
{
NS_LOG_FUNCTION (this);
// If the user has configured both Frequency and ChannelNumber, Frequency
// takes precedence
if (GetFrequency () != 0)
{
// If Frequency is already set, then see whether a ChannelNumber can
// be found that matches Frequency and ChannelWidth. If so, configure
// the ChannelNumber to that channel number. If not, set ChannelNumber to zero.
NS_LOG_DEBUG ("Frequency set; checking whether a channel number corresponds");
uint8_t channelNumberSearched = FindChannelNumberForFrequencyWidth (GetFrequency (), GetChannelWidth ());
if (channelNumberSearched)
{
NS_LOG_DEBUG ("Channel number found; setting to " << +channelNumberSearched);
SetChannelNumber (channelNumberSearched);
}
else
{
NS_LOG_DEBUG ("Channel number not found; setting to zero");
SetChannelNumber (0);
}
}
else if (GetChannelNumber () != 0)
{
// If the channel number is known for this particular standard or for
// the unspecified standard, configure using the known values;
// otherwise, this is a configuration error
NS_LOG_DEBUG ("Configuring for channel number " << +GetChannelNumber ());
FrequencyWidthPair f = GetFrequencyWidthForChannelNumberStandard (GetChannelNumber (), GetPhyBand (), GetPhyStandard ());
if (f.first == 0)
{
// the specific pair of number/standard is not known
NS_LOG_DEBUG ("Falling back to check WIFI_PHY_STANDARD_UNSPECIFIED");
f = GetFrequencyWidthForChannelNumberStandard (GetChannelNumber (), GetPhyBand (), WIFI_PHY_STANDARD_UNSPECIFIED);
}
if (f.first == 0)
{
NS_FATAL_ERROR ("Error, ChannelNumber " << +GetChannelNumber () << " is unknown for this standard");
}
else
{
NS_LOG_DEBUG ("Setting frequency to " << f.first << "; width to " << +f.second);
SetFrequency (f.first);
SetChannelWidth (f.second);
}
}
}
void
WifiPhy::ConfigureStandardAndBand (WifiPhyStandard standard, WifiPhyBand band)
{
@@ -1897,77 +1430,6 @@ WifiPhy::GetSupportedChannelWidthSet (void) const
return m_supportedChannelWidthSet;
}
WifiPhy::FrequencyWidthPair
WifiPhy::GetFrequencyWidthForChannelNumberStandard (uint8_t channelNumber, WifiPhyBand band, WifiPhyStandard standard) const
{
ChannelNumberStandardPair p = std::make_pair (std::make_pair (channelNumber, band), standard);
FrequencyWidthPair f = m_channelToFrequencyWidth[p];
return f;
}
bool
WifiPhy::DoFrequencySwitch (uint16_t frequency)
{
m_powerRestricted = false;
m_channelAccessRequested = false;
m_currentEvent = 0;
m_currentPreambleEvents.clear ();
if (!IsInitialized ())
{
//this is not channel switch, this is initialization
NS_LOG_DEBUG ("start at frequency " << frequency);
return true;
}
NS_ASSERT (!IsStateSwitching ());
switch (m_state->GetState ())
{
case WifiPhyState::RX:
NS_LOG_DEBUG ("drop packet because of channel/frequency switching while reception");
m_endPhyRxEvent.Cancel ();
for (auto & phyEntity : m_phyEntities)
{
phyEntity.second->CancelAllEvents ();
}
goto switchFrequency;
break;
case WifiPhyState::TX:
NS_LOG_DEBUG ("channel/frequency switching postponed until end of current transmission");
Simulator::Schedule (GetDelayUntilIdle (), &WifiPhy::SetFrequency, this, frequency);
break;
case WifiPhyState::CCA_BUSY:
case WifiPhyState::IDLE:
for (auto & phyEntity : m_phyEntities)
{
phyEntity.second->CancelAllEvents ();
}
goto switchFrequency;
break;
case WifiPhyState::SLEEP:
NS_LOG_DEBUG ("frequency switching ignored in sleep mode");
break;
default:
NS_ASSERT (false);
break;
}
return false;
switchFrequency:
NS_LOG_DEBUG ("switching frequency " << GetFrequency () << " -> " << frequency);
m_state->SwitchToChannelSwitching (GetChannelSwitchDelay ());
m_interference.EraseEvents ();
/*
* Needed here to be able to correctly sensed the medium for the first
* time after the switching. The actual switching is not performed until
* after m_channelSwitchDelay. Packets received during the switching
* state are added to the event list and are employed later to figure
* out the state of the medium after the switching.
*/
return true;
}
void
WifiPhy::SetSleepMode (void)
{

View File

@@ -58,19 +58,6 @@ public:
WifiPhy ();
virtual ~WifiPhy ();
/**
* A pair of a channel number and a WifiPhyBand
*/
typedef std::pair<uint8_t, WifiPhyBand> ChannelNumberBandPair;
/**
* A pair of a ChannelNumberBandPair and a WifiPhyStandard
*/
typedef std::pair<ChannelNumberBandPair, WifiPhyStandard> ChannelNumberStandardPair;
/**
* A pair of a center frequency (MHz) and a channel width (MHz)
*/
typedef std::pair<uint16_t, uint16_t> FrequencyWidthPair;
static const std::set<FrequencyChannelInfo> m_frequencyChannels; //!< Available frequency channels
/**
@@ -518,24 +505,6 @@ public:
*/
const WifiPhyOperatingChannel& GetOperatingChannel (void) const;
/**
* Add a channel definition to the WifiPhy. The channelNumber, PHY
* band and PHY standard informations may then be used to lookup a
* pair (frequency, channelWidth).
*
* If the channel is not already defined for the standard, the method
* should return true; otherwise false.
*
* \param channelNumber the channel number to define
* \param band the PHY band which the channel belongs to
* \param standard the applicable WifiPhyStandard
* \param frequency the frequency (MHz)
* \param channelWidth the channel width (MHz)
*
* \return true if the channel definition succeeded
*/
bool DefineChannelNumber (uint8_t channelNumber, WifiPhyBand band, WifiPhyStandard standard, uint16_t frequency, uint16_t channelWidth);
/**
* Return the Channel this WifiPhy is connected to.
*
@@ -1078,7 +1047,6 @@ public:
protected:
// Inherited
virtual void DoInitialize (void);
virtual void DoDispose (void);
/*
@@ -1096,16 +1064,6 @@ protected:
* currently not possible (i.e., the radio is in sleep mode)
*/
Time DoChannelSwitch (void);
/**
* The default implementation does nothing and returns true. This method
* is typically called internally by SetFrequency ().
*
* \brief Perform any actions necessary when user changes frequency
* \param frequency frequency to try to switch to in MHz
* \return true if WifiPhy can actually change the frequency; false if not
* \see SetFrequency
*/
bool DoFrequencySwitch (uint16_t frequency);
/**
* Check if PHY state should move to CCA busy state based on current
@@ -1185,17 +1143,6 @@ protected:
private:
/**
* \brief post-construction setting of frequency and/or channel number
*
* This method exists to handle the fact that two attribute values,
* Frequency and ChannelNumber, are coupled. The initialization of
* these values needs to be deferred until after attribute construction
* time, to avoid static initialization order issues. This method is
* typically called either when ConfigureStandard () is called or when
* DoInitialize () is called.
*/
void InitializeFrequencyChannelNumber (void);
/**
* Configure WifiPhy with appropriate channel frequency and
* supported rates for 802.11a standard.
@@ -1246,35 +1193,6 @@ private:
* Rebuild the mapping of MCS values to indices in the device MCS set.
*/
void RebuildMcsMap (void);
/**
* Configure the PHY-level parameters for different Wi-Fi standard.
* This method is called when defaults for each standard must be
* selected.
*/
void ConfigureDefaultsForStandard (void);
/**
* Configure the PHY-level parameters for different Wi-Fi standard.
* This method is called when the Frequency or ChannelNumber attributes
* are set by the user. If the Frequency or ChannelNumber are valid for
* the standard, they are used instead.
*/
void ConfigureChannelForStandard (void);
/**
* Look for channel number matching the frequency and width
* \param frequency The center frequency to use in MHz
* \param width The channel width to use in MHz
* \return the channel number if found, zero if not
*/
uint8_t FindChannelNumberForFrequencyWidth (uint16_t frequency, uint16_t width) const;
/**
* Lookup frequency/width pair for channelNumber/standard pair
* \param channelNumber The channel number to check
* \param band the PHY band to check
* \param standard The WifiPhyStandard to check
* \return the FrequencyWidthPair found
*/
FrequencyWidthPair GetFrequencyWidthForChannelNumberStandard (uint8_t channelNumber, WifiPhyBand band, WifiPhyStandard standard) const;
/**
* Due to newly arrived signal, the current reception cannot be continued and has to be aborted
@@ -1405,13 +1323,8 @@ private:
WifiPhyStandard m_standard; //!< WifiPhyStandard
WifiPhyBand m_band; //!< WifiPhyBand
bool m_isConstructed; //!< true when ready to set frequency
uint16_t m_channelCenterFrequency; //!< Center frequency in MHz
uint16_t m_initialFrequency; //!< Store frequency until initialization (MHz)
bool m_frequencyChannelNumberInitialized; //!< Store initialization state
uint8_t m_channelNumber; //!< Operating channel number
uint8_t m_initialChannelNumber; //!< Store channel number until initialization
uint16_t m_channelWidth; //!< Channel width (MHz)
uint16_t m_initialChannelWidth; //!< Store channel width (MHz) until initialization
WifiPhyOperatingChannel m_operatingChannel; //!< Operating channel
@@ -1442,9 +1355,6 @@ private:
uint8_t m_txSpatialStreams; //!< Number of supported TX spatial streams
uint8_t m_rxSpatialStreams; //!< Number of supported RX spatial streams
typedef std::map<ChannelNumberStandardPair, FrequencyWidthPair> ChannelToFrequencyWidthMap; //!< channel to frequency width map typedef
static ChannelToFrequencyWidthMap m_channelToFrequencyWidth; //!< the channel to frequency width map
Time m_channelSwitchDelay; //!< Time required to switch between channel
Ptr<NetDevice> m_device; //!< Pointer to the device