Loading wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AvailableAfcFrequencyInfo.aidl 0 → 100644 +40 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /////////////////////////////////////////////////////////////////////////////// // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // /////////////////////////////////////////////////////////////////////////////// // This file is a snapshot of an AIDL file. Do not edit it manually. There are // two cases: // 1). this is a frozen version file - do not edit this in any case. // 2). this is a 'current' file. If you make a backwards compatible change to // the interface (from the latest frozen version), the build system will // prompt you to update this file with `m <name>-update-api`. // // You must not make a backward incompatible change to any AIDL file built // with the aidl_interface module type with versions property set. The module // type is used to build AIDL files in a way that they can be used across // independently updatable components of the system. If a device is shipped // with such a backward incompatible change, it has a high risk of breaking // later when a module using the interface is updated, e.g., Mainline modules. package android.hardware.wifi; @VintfStability parcelable AvailableAfcFrequencyInfo { int startFrequencyMhz; int endFrequencyMhz; int maxPsd; } wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ interface IWifiChip { android.hardware.wifi.WifiRadioCombinationMatrix getSupportedRadioCombinationsMatrix(); android.hardware.wifi.WifiChipCapabilities getWifiChipCapabilities(); android.hardware.wifi.WifiUsableChannel[] getUsableChannels(in android.hardware.wifi.WifiBand band, in android.hardware.wifi.WifiIfaceMode ifaceModeMask, in android.hardware.wifi.IWifiChip.UsableChannelFilter filterMask); void setAfcChannelAllowance(in android.hardware.wifi.AvailableAfcFrequencyInfo[] availableAfcFrequencyInfo); void registerEventCallback(in android.hardware.wifi.IWifiChipEventCallback callback); void removeApIface(in String ifname); void removeIfaceInstanceFromBridgedApIface(in String brIfaceName, in String ifaceInstanceName); Loading Loading @@ -99,6 +100,7 @@ interface IWifiChip { SET_LATENCY_MODE = (1 << 12), P2P_RAND_MAC = (1 << 13), WIGIG = (1 << 14), SET_AFC_CHANNEL_ALLOWANCE = (1 << 15), } @VintfStability parcelable ChipConcurrencyCombinationLimit { Loading wifi/aidl/android/hardware/wifi/AvailableAfcFrequencyInfo.aidl 0 → 100644 +41 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.wifi; /** * Defines the maximum permissible power spectral density on a range of * frequencies to support 6Ghz with standard power for AFC. * The format of the data follows spec from the Wi-Fi Alliance AFC System to * AFC Device Interface Specification: AvailableFrequencyInfo object. */ @VintfStability parcelable AvailableAfcFrequencyInfo { /** * Defines the lowest frequency included in this 6Ghz frequency range. */ int startFrequencyMhz; /** * Defines the highest frequency included in this 6Ghz frequency range. */ int endFrequencyMhz; /** * The maximum permissible EIRP available in any one MHz bin within the * frequency range specified. The limit is expressed as a power spectral * density with units of dBm per MHz. */ int maxPsd; } wifi/aidl/android/hardware/wifi/IWifiChip.aidl +18 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.hardware.wifi; import android.hardware.wifi.AvailableAfcFrequencyInfo; import android.hardware.wifi.IWifiApIface; import android.hardware.wifi.IWifiChipEventCallback; import android.hardware.wifi.IWifiNanIface; Loading Loading @@ -105,6 +106,11 @@ interface IWifiChip { * Chip can operate in the 60GHz band (WiGig chip). */ WIGIG = 1 << 14, /** * Chip supports setting allowed channels along with PSD in 6GHz band * for AFC purposes. */ SET_AFC_CHANNEL_ALLOWANCE = 1 << 15, } /** Loading Loading @@ -835,6 +841,18 @@ interface IWifiChip { WifiUsableChannel[] getUsableChannels( in WifiBand band, in WifiIfaceMode ifaceModeMask, in UsableChannelFilter filterMask); /* * Set the max power level the chip is allowed to transmit on for 6Ghz AFC * using an array of AvailableAfcFrequencyInfo. The max power for * frequencies not included in the input frequency ranges will be reset to * their respective default values. * @param availableAfcFrequencyInfo The list of frequency ranges and * corresponding max allowed power. * @throws ServiceSpecificException with one of the following values: * |WifiStatusCode.ERROR_NOT_SUPPORTED| */ void setAfcChannelAllowance(in AvailableAfcFrequencyInfo[] availableAfcFrequencyInfo); /** * Requests notifications of significant events on this chip. Multiple calls * to this must register multiple callbacks, each of which must receive all Loading wifi/aidl/default/wifi_chip.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -670,6 +670,12 @@ ndk::ScopedAStatus WifiChip::getUsableChannels(WifiBand in_band, WifiIfaceMode i in_ifaceModeMask, in_filterMask); } ndk::ScopedAStatus WifiChip::setAfcChannelAllowance( const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo) { return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID, &WifiChip::setAfcChannelAllowanceInternal, availableAfcFrequencyInfo); } ndk::ScopedAStatus WifiChip::triggerSubsystemRestart() { return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID, &WifiChip::triggerSubsystemRestartInternal); Loading Loading @@ -1394,6 +1400,12 @@ std::pair<std::vector<WifiUsableChannel>, ndk::ScopedAStatus> WifiChip::getUsabl return {aidl_usable_channels, ndk::ScopedAStatus::ok()}; } ndk::ScopedAStatus WifiChip::setAfcChannelAllowanceInternal( const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo) { LOG(INFO) << "setAfcChannelAllowance is not yet supported " << availableAfcFrequencyInfo.size(); return createWifiStatus(WifiStatusCode::ERROR_NOT_SUPPORTED); } std::pair<WifiRadioCombinationMatrix, ndk::ScopedAStatus> WifiChip::getSupportedRadioCombinationsMatrixInternal() { legacy_hal::wifi_error legacy_status; Loading Loading
wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/AvailableAfcFrequencyInfo.aidl 0 → 100644 +40 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /////////////////////////////////////////////////////////////////////////////// // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // /////////////////////////////////////////////////////////////////////////////// // This file is a snapshot of an AIDL file. Do not edit it manually. There are // two cases: // 1). this is a frozen version file - do not edit this in any case. // 2). this is a 'current' file. If you make a backwards compatible change to // the interface (from the latest frozen version), the build system will // prompt you to update this file with `m <name>-update-api`. // // You must not make a backward incompatible change to any AIDL file built // with the aidl_interface module type with versions property set. The module // type is used to build AIDL files in a way that they can be used across // independently updatable components of the system. If a device is shipped // with such a backward incompatible change, it has a high risk of breaking // later when a module using the interface is updated, e.g., Mainline modules. package android.hardware.wifi; @VintfStability parcelable AvailableAfcFrequencyInfo { int startFrequencyMhz; int endFrequencyMhz; int maxPsd; }
wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ interface IWifiChip { android.hardware.wifi.WifiRadioCombinationMatrix getSupportedRadioCombinationsMatrix(); android.hardware.wifi.WifiChipCapabilities getWifiChipCapabilities(); android.hardware.wifi.WifiUsableChannel[] getUsableChannels(in android.hardware.wifi.WifiBand band, in android.hardware.wifi.WifiIfaceMode ifaceModeMask, in android.hardware.wifi.IWifiChip.UsableChannelFilter filterMask); void setAfcChannelAllowance(in android.hardware.wifi.AvailableAfcFrequencyInfo[] availableAfcFrequencyInfo); void registerEventCallback(in android.hardware.wifi.IWifiChipEventCallback callback); void removeApIface(in String ifname); void removeIfaceInstanceFromBridgedApIface(in String brIfaceName, in String ifaceInstanceName); Loading Loading @@ -99,6 +100,7 @@ interface IWifiChip { SET_LATENCY_MODE = (1 << 12), P2P_RAND_MAC = (1 << 13), WIGIG = (1 << 14), SET_AFC_CHANNEL_ALLOWANCE = (1 << 15), } @VintfStability parcelable ChipConcurrencyCombinationLimit { Loading
wifi/aidl/android/hardware/wifi/AvailableAfcFrequencyInfo.aidl 0 → 100644 +41 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.wifi; /** * Defines the maximum permissible power spectral density on a range of * frequencies to support 6Ghz with standard power for AFC. * The format of the data follows spec from the Wi-Fi Alliance AFC System to * AFC Device Interface Specification: AvailableFrequencyInfo object. */ @VintfStability parcelable AvailableAfcFrequencyInfo { /** * Defines the lowest frequency included in this 6Ghz frequency range. */ int startFrequencyMhz; /** * Defines the highest frequency included in this 6Ghz frequency range. */ int endFrequencyMhz; /** * The maximum permissible EIRP available in any one MHz bin within the * frequency range specified. The limit is expressed as a power spectral * density with units of dBm per MHz. */ int maxPsd; }
wifi/aidl/android/hardware/wifi/IWifiChip.aidl +18 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.hardware.wifi; import android.hardware.wifi.AvailableAfcFrequencyInfo; import android.hardware.wifi.IWifiApIface; import android.hardware.wifi.IWifiChipEventCallback; import android.hardware.wifi.IWifiNanIface; Loading Loading @@ -105,6 +106,11 @@ interface IWifiChip { * Chip can operate in the 60GHz band (WiGig chip). */ WIGIG = 1 << 14, /** * Chip supports setting allowed channels along with PSD in 6GHz band * for AFC purposes. */ SET_AFC_CHANNEL_ALLOWANCE = 1 << 15, } /** Loading Loading @@ -835,6 +841,18 @@ interface IWifiChip { WifiUsableChannel[] getUsableChannels( in WifiBand band, in WifiIfaceMode ifaceModeMask, in UsableChannelFilter filterMask); /* * Set the max power level the chip is allowed to transmit on for 6Ghz AFC * using an array of AvailableAfcFrequencyInfo. The max power for * frequencies not included in the input frequency ranges will be reset to * their respective default values. * @param availableAfcFrequencyInfo The list of frequency ranges and * corresponding max allowed power. * @throws ServiceSpecificException with one of the following values: * |WifiStatusCode.ERROR_NOT_SUPPORTED| */ void setAfcChannelAllowance(in AvailableAfcFrequencyInfo[] availableAfcFrequencyInfo); /** * Requests notifications of significant events on this chip. Multiple calls * to this must register multiple callbacks, each of which must receive all Loading
wifi/aidl/default/wifi_chip.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -670,6 +670,12 @@ ndk::ScopedAStatus WifiChip::getUsableChannels(WifiBand in_band, WifiIfaceMode i in_ifaceModeMask, in_filterMask); } ndk::ScopedAStatus WifiChip::setAfcChannelAllowance( const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo) { return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID, &WifiChip::setAfcChannelAllowanceInternal, availableAfcFrequencyInfo); } ndk::ScopedAStatus WifiChip::triggerSubsystemRestart() { return validateAndCall(this, WifiStatusCode::ERROR_WIFI_CHIP_INVALID, &WifiChip::triggerSubsystemRestartInternal); Loading Loading @@ -1394,6 +1400,12 @@ std::pair<std::vector<WifiUsableChannel>, ndk::ScopedAStatus> WifiChip::getUsabl return {aidl_usable_channels, ndk::ScopedAStatus::ok()}; } ndk::ScopedAStatus WifiChip::setAfcChannelAllowanceInternal( const std::vector<AvailableAfcFrequencyInfo>& availableAfcFrequencyInfo) { LOG(INFO) << "setAfcChannelAllowance is not yet supported " << availableAfcFrequencyInfo.size(); return createWifiStatus(WifiStatusCode::ERROR_NOT_SUPPORTED); } std::pair<WifiRadioCombinationMatrix, ndk::ScopedAStatus> WifiChip::getSupportedRadioCombinationsMatrixInternal() { legacy_hal::wifi_error legacy_status; Loading