Update setAfcChannelAllowance

Use a new structure to passdown:
- AFC information queried based on frequency
- AFC information queried based on channel number
- expiration time

This change is per chip vendor request. Based on AFC server support,
either frequency based information or channel based information may be
empty. If both are empty, then it indicate the driver should not allow
any standard power transmission on 6Ghz.

Bug: 262791660
Test: compile
Test: Manually verified information is passed down with local framework
change

Change-Id: Id1d014a6113f6863b98ef8239a5a52d3863aa758
diff --git a/wifi/aidl/default/wifi_chip.cpp b/wifi/aidl/default/wifi_chip.cpp
index dd24e6b..e4c2d44 100644
--- a/wifi/aidl/default/wifi_chip.cpp
+++ b/wifi/aidl/default/wifi_chip.cpp
@@ -701,9 +701,9 @@
 }
 
 ndk::ScopedAStatus WifiChip::setAfcChannelAllowance(
-        const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo) {
+        const AfcChannelAllowance& afcChannelAllowance) {
     return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
-                           &WifiChip::setAfcChannelAllowanceInternal, availableAfcFrequencyInfo);
+                           &WifiChip::setAfcChannelAllowanceInternal, afcChannelAllowance);
 }
 
 ndk::ScopedAStatus WifiChip::triggerSubsystemRestart() {
@@ -1431,8 +1431,12 @@
 }
 
 ndk::ScopedAStatus WifiChip::setAfcChannelAllowanceInternal(
-        const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo) {
-    LOG(INFO) << "setAfcChannelAllowance is not yet supported " << availableAfcFrequencyInfo.size();
+        const AfcChannelAllowance& afcChannelAllowance) {
+    LOG(INFO) << "setAfcChannelAllowance is not yet supported. availableAfcFrequencyInfos size="
+              << afcChannelAllowance.availableAfcFrequencyInfos.size()
+              << " availableAfcChannelInfos size="
+              << afcChannelAllowance.availableAfcChannelInfos.size()
+              << " availabilityExpireTimeMs=" << afcChannelAllowance.availabilityExpireTimeMs;
     return createWifiStatus(WifiStatusCode::ERROR_NOT_SUPPORTED);
 }
 
diff --git a/wifi/aidl/default/wifi_chip.h b/wifi/aidl/default/wifi_chip.h
index c5dcee7..3439f2b 100644
--- a/wifi/aidl/default/wifi_chip.h
+++ b/wifi/aidl/default/wifi_chip.h
@@ -142,7 +142,7 @@
                                          int32_t in_filterMask,
                                          std::vector<WifiUsableChannel>* _aidl_return) override;
     ndk::ScopedAStatus setAfcChannelAllowance(
-            const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo) override;
+            const AfcChannelAllowance& afcChannelAllowance) override;
     ndk::ScopedAStatus triggerSubsystemRestart() override;
     ndk::ScopedAStatus getSupportedRadioCombinations(
             std::vector<WifiRadioCombination>* _aidl_return) override;
@@ -220,7 +220,7 @@
             WifiBand band, int32_t ifaceModeMask, int32_t filterMask);
     ndk::ScopedAStatus enableStaChannelForPeerNetworkInternal(int32_t channelCategoryEnableFlag);
     ndk::ScopedAStatus setAfcChannelAllowanceInternal(
-            const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo);
+            const AfcChannelAllowance& afcChannelAllowance);
     ndk::ScopedAStatus handleChipConfiguration(std::unique_lock<std::recursive_mutex>* lock,
                                                int32_t mode_id);
     ndk::ScopedAStatus registerDebugRingBufferCallback();