NetworkPkg: Triger regularly scan only if not connect to AP

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4605

When UEFI Wi-Fi is in BSS connected state, the platform is
considered as a static and Wi-Fi roaming support is not needed.
Wifi connection manager should not initiate Scan requests
in this state affect BSS client connectivity and must be avoided.
Triger regularly scan only if not connect to AP.

Signed-off-by: Heng Luo <heng.luo@intel.com>
Cc: Saloni Kasbekar <saloni.kasbekar@intel.com>
Cc: Zachary Clark-williams <zachary.clark-williams@intel.com>
Reviewed-by: Saloni Kasbekar <saloni.kasbekar@intel.com>
This commit is contained in:
Heng Luo 2024-01-03 10:35:41 +08:00 committed by mergify[bot]
parent f5b91c60ef
commit c15a899d83
1 changed files with 2 additions and 2 deletions

View File

@ -1506,8 +1506,8 @@ WifiMgrOnTimerTick (
}
Nic->ScanTickTime++;
if (((Nic->ScanTickTime > WIFI_SCAN_FREQUENCY) || Nic->OneTimeScanRequest) &&
(Nic->ScanState == WifiMgrScanFinished))
if ((((Nic->ScanTickTime > WIFI_SCAN_FREQUENCY) && (Nic->ConnectState != WifiMgrConnectedToAp)) ||
Nic->OneTimeScanRequest) && (Nic->ScanState == WifiMgrScanFinished))
{
Nic->OneTimeScanRequest = FALSE;
Nic->ScanTickTime = 0;