wifi: Directly call WifiPhy::GetPrimaryChannelNumber
This commit is contained in:
@@ -1005,9 +1005,7 @@ ApWifiMac::GetVhtOperation(uint8_t linkId) const
|
||||
// indicates the channel center frequency index of the 80 MHz channel
|
||||
// segment that contains the primary channel.
|
||||
operation.SetChannelCenterFrequencySegment0(
|
||||
(bssBandwidth == 160)
|
||||
? phy->GetOperatingChannel().GetPrimaryChannelNumber(80, phy->GetStandard())
|
||||
: phy->GetChannelNumber());
|
||||
(bssBandwidth == 160) ? phy->GetPrimaryChannelNumber(80) : phy->GetChannelNumber());
|
||||
// For a 20, 40, or 80 MHz BSS bandwidth, this subfield is set to 0.
|
||||
// For a 160 MHz BSS bandwidth and the Channel Width subfield equal to 1,
|
||||
// indicates the channel center frequency index of the 160 MHz channel on
|
||||
|
||||
@@ -312,7 +312,7 @@ StaWifiMac::GetCurrentChannel(uint8_t linkId) const
|
||||
{
|
||||
auto phy = GetWifiPhy(linkId);
|
||||
uint16_t width = phy->GetOperatingChannel().IsOfdm() ? 20 : phy->GetChannelWidth();
|
||||
uint8_t ch = phy->GetOperatingChannel().GetPrimaryChannelNumber(width, phy->GetStandard());
|
||||
uint8_t ch = phy->GetPrimaryChannelNumber(width);
|
||||
return {ch, phy->GetPhyBand()};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user