Merge "Adapt CheckApfIsSupported for VSR-15 compatibility" into main am: b959192690 am: 0e8bea62dd

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2968205

Change-Id: Ibd8f85dd63176654c2bc2d031a980011ec3deccf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Yuyang Huang 2024-03-25 07:24:24 +00:00 committed by Automerger Merge Worker
commit 8b3add91f9

View file

@ -176,14 +176,18 @@ TEST_P(WifiStaIfaceAidlTest, CheckApfIsSupported) {
}
StaApfPacketFilterCapabilities apf_caps = {};
EXPECT_TRUE(wifi_sta_iface_->getApfPacketFilterCapabilities(&apf_caps).isOk());
} else {
EXPECT_TRUE(isFeatureSupported(IWifiStaIface::FeatureSetMask::APF));
StaApfPacketFilterCapabilities apf_caps = {};
EXPECT_TRUE(wifi_sta_iface_->getApfPacketFilterCapabilities(&apf_caps).isOk());
// The APF version must be 4 or higher and the usable memory must be at least
// 1024 bytes.
EXPECT_GE(apf_caps.version, 4);
EXPECT_GE(apf_caps.maxLength, 1024);
return;
}
EXPECT_TRUE(isFeatureSupported(IWifiStaIface::FeatureSetMask::APF));
StaApfPacketFilterCapabilities apf_caps = {};
EXPECT_TRUE(wifi_sta_iface_->getApfPacketFilterCapabilities(&apf_caps).isOk());
EXPECT_GE(apf_caps.version, 4);
// Based on VSR-14 the usable memory must be at least 1024 bytes.
EXPECT_GE(apf_caps.maxLength, 1024);
if (vendor_api_level >= __ANDROID_API_V__) {
// Based on VSR-15 the usable memory must be at least 2000 bytes.
EXPECT_GE(apf_caps.maxLength, 2000);
}
}