Merge "Adapt CheckApfIsSupported for VSR-15 compatibility" into main

This commit is contained in:
Yuyang Huang 2024-03-25 06:51:10 +00:00 committed by Gerrit Code Review
commit b959192690

View file

@ -171,14 +171,18 @@ TEST_P(WifiStaIfaceAidlTest, CheckApfIsSupported) {
}
StaApfPacketFilterCapabilities apf_caps = {};
EXPECT_TRUE(wifi_sta_iface_->getApfPacketFilterCapabilities(&apf_caps).isOk());
} else {
return;
}
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);
// 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);
}
}