wifi: Fix secondary channel frequency calculation for 80+80MHz
This commit is contained in:
committed by
Sébastien Deronne
parent
9330795f83
commit
7903f6275f
@@ -708,12 +708,9 @@ WifiPhyOperatingChannel::GetSecondaryChannelCenterFrequency(
|
||||
// we assume here that all segments have the same width
|
||||
const auto segmentWidth = GetWidth(segmentIndex);
|
||||
const auto segmentOffset = (segmentIndex * (segmentWidth / secondaryChannelWidth));
|
||||
const auto primaryChannelIndex = GetPrimaryChannelIndex(secondaryChannelWidth);
|
||||
const auto primaryCenterFrequency =
|
||||
GetFrequency(segmentIndex) - segmentWidth / 2. +
|
||||
(primaryChannelIndex - segmentOffset + 0.5) * secondaryChannelWidth;
|
||||
return (primaryChannelIndex % 2 == 0) ? (primaryCenterFrequency + secondaryChannelWidth)
|
||||
: (primaryCenterFrequency - secondaryChannelWidth);
|
||||
return GetFrequency(segmentIndex) - segmentWidth / 2. +
|
||||
(GetSecondaryChannelIndex(secondaryChannelWidth) - segmentOffset + 0.5) *
|
||||
secondaryChannelWidth;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
|
||||
Reference in New Issue
Block a user