Loading wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiStaIface.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ interface IWifiStaIface { void stopBackgroundScan(in int cmdId); void stopRssiMonitoring(in int cmdId); void stopSendingKeepAlivePackets(in int cmdId); void setDtimMultiplier(in int multiplier); @Backing(type="int") @VintfStability enum StaIfaceCapabilityMask { APF = 1, Loading wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl +16 −0 Original line number Diff line number Diff line Loading @@ -552,4 +552,20 @@ interface IWifiStaIface { * |WifiStatusCode.ERROR_UNKNOWN| */ void stopSendingKeepAlivePackets(in int cmdId); /** * Set DTIM multiplier used when the system is in the suspended mode. * When STA is in the power saving mode and system is suspended, * the wake up interval will be set to: * 1) multiplier * DTIM period if multiplier > 0. * 2) the driver default value if multiplier <= 0. * Some implementations may apply an additional cap to wake up interval in the case of 1). * * @param multiplier integer DTIM multiplier value to set. * @throws ServiceSpecificException with one of the following values: * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, * |WifiStatusCode.ERROR_NOT_SUPPORTED|, * |WifiStatusCode.ERROR_UNKNOWN| */ void setDtimMultiplier(in int multiplier); } wifi/aidl/default/wifi_sta_iface.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,11 @@ ndk::ScopedAStatus WifiStaIface::setScanMode(bool in_enable) { &WifiStaIface::setScanModeInternal, in_enable); } ndk::ScopedAStatus WifiStaIface::setDtimMultiplier(int32_t in_multiplier) { return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID, &WifiStaIface::setDtimMultiplierInternal, in_multiplier); } std::pair<std::string, ndk::ScopedAStatus> WifiStaIface::getNameInternal() { return {ifname_, ndk::ScopedAStatus::ok()}; } Loading Loading @@ -552,6 +557,11 @@ ndk::ScopedAStatus WifiStaIface::setScanModeInternal(bool enable) { return createWifiStatus(WifiStatusCode::ERROR_NOT_SUPPORTED); } ndk::ScopedAStatus WifiStaIface::setDtimMultiplierInternal(const int multiplier) { legacy_hal::wifi_error legacy_status = legacy_hal_.lock()->setDtimConfig(ifname_, multiplier); return createWifiStatusFromLegacyError(legacy_status); } } // namespace wifi } // namespace hardware } // namespace android Loading wifi/aidl/default/wifi_sta_iface.h +2 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ class WifiStaIface : public BnWifiStaIface { ndk::ScopedAStatus setMacAddress(const std::array<uint8_t, 6>& in_mac) override; ndk::ScopedAStatus getFactoryMacAddress(std::array<uint8_t, 6>* _aidl_return) override; ndk::ScopedAStatus setScanMode(bool in_enable) override; ndk::ScopedAStatus setDtimMultiplier(int32_t in_multiplier) override; private: // Corresponding worker functions for the AIDL methods. Loading Loading @@ -133,6 +134,7 @@ class WifiStaIface : public BnWifiStaIface { ndk::ScopedAStatus setMacAddressInternal(const std::array<uint8_t, 6>& mac); std::pair<std::array<uint8_t, 6>, ndk::ScopedAStatus> getFactoryMacAddressInternal(); ndk::ScopedAStatus setScanModeInternal(bool enable); ndk::ScopedAStatus setDtimMultiplierInternal(const int multiplier); void setWeakPtr(std::weak_ptr<WifiStaIface> ptr); Loading Loading
wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiStaIface.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ interface IWifiStaIface { void stopBackgroundScan(in int cmdId); void stopRssiMonitoring(in int cmdId); void stopSendingKeepAlivePackets(in int cmdId); void setDtimMultiplier(in int multiplier); @Backing(type="int") @VintfStability enum StaIfaceCapabilityMask { APF = 1, Loading
wifi/aidl/android/hardware/wifi/IWifiStaIface.aidl +16 −0 Original line number Diff line number Diff line Loading @@ -552,4 +552,20 @@ interface IWifiStaIface { * |WifiStatusCode.ERROR_UNKNOWN| */ void stopSendingKeepAlivePackets(in int cmdId); /** * Set DTIM multiplier used when the system is in the suspended mode. * When STA is in the power saving mode and system is suspended, * the wake up interval will be set to: * 1) multiplier * DTIM period if multiplier > 0. * 2) the driver default value if multiplier <= 0. * Some implementations may apply an additional cap to wake up interval in the case of 1). * * @param multiplier integer DTIM multiplier value to set. * @throws ServiceSpecificException with one of the following values: * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, * |WifiStatusCode.ERROR_NOT_SUPPORTED|, * |WifiStatusCode.ERROR_UNKNOWN| */ void setDtimMultiplier(in int multiplier); }
wifi/aidl/default/wifi_sta_iface.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,11 @@ ndk::ScopedAStatus WifiStaIface::setScanMode(bool in_enable) { &WifiStaIface::setScanModeInternal, in_enable); } ndk::ScopedAStatus WifiStaIface::setDtimMultiplier(int32_t in_multiplier) { return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID, &WifiStaIface::setDtimMultiplierInternal, in_multiplier); } std::pair<std::string, ndk::ScopedAStatus> WifiStaIface::getNameInternal() { return {ifname_, ndk::ScopedAStatus::ok()}; } Loading Loading @@ -552,6 +557,11 @@ ndk::ScopedAStatus WifiStaIface::setScanModeInternal(bool enable) { return createWifiStatus(WifiStatusCode::ERROR_NOT_SUPPORTED); } ndk::ScopedAStatus WifiStaIface::setDtimMultiplierInternal(const int multiplier) { legacy_hal::wifi_error legacy_status = legacy_hal_.lock()->setDtimConfig(ifname_, multiplier); return createWifiStatusFromLegacyError(legacy_status); } } // namespace wifi } // namespace hardware } // namespace android Loading
wifi/aidl/default/wifi_sta_iface.h +2 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ class WifiStaIface : public BnWifiStaIface { ndk::ScopedAStatus setMacAddress(const std::array<uint8_t, 6>& in_mac) override; ndk::ScopedAStatus getFactoryMacAddress(std::array<uint8_t, 6>* _aidl_return) override; ndk::ScopedAStatus setScanMode(bool in_enable) override; ndk::ScopedAStatus setDtimMultiplier(int32_t in_multiplier) override; private: // Corresponding worker functions for the AIDL methods. Loading Loading @@ -133,6 +134,7 @@ class WifiStaIface : public BnWifiStaIface { ndk::ScopedAStatus setMacAddressInternal(const std::array<uint8_t, 6>& mac); std::pair<std::array<uint8_t, 6>, ndk::ScopedAStatus> getFactoryMacAddressInternal(); ndk::ScopedAStatus setScanModeInternal(bool enable); ndk::ScopedAStatus setDtimMultiplierInternal(const int multiplier); void setWeakPtr(std::weak_ptr<WifiStaIface> ptr); Loading