Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0be7ca7 authored by Bernie Innocenti's avatar Bernie Innocenti Committed by Android (Google) Code Review
Browse files

Merge "Add a wifi hal interface to read-back the APF memory."

parents 24775d8b bd94b43b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ hidl_interface {
        "IWifiChipEventCallback.hal",
        "IWifiNanIface.hal",
        "IWifiNanIfaceEventCallback.hal",
        "IWifiStaIface.hal",
    ],
    interfaces: [
        "android.hardware.wifi@1.0",
+54 −0
Original line number Diff line number Diff line
/*
 * Copyright 2018 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@1.2;

import @1.0::WifiStatus;
import @1.0::IWifiStaIface;

/**
 * Interface used to represent a single STA iface.
 *
 * IWifiChip.createStaIface() may return a @1.2::IWifiStaIface when supported.
 */
interface IWifiStaIface extends @1.0::IWifiStaIface {
    /**
     * Fetches a consistent snapshot of the entire APF program and working
     * memory buffer and returns it to the host. The returned buffer contains
     * both code and data. Its length must match the most recently returned
     * |StaApfPacketFilterCapabilities.maxLength|.
     *
     * While the snapshot is being fetched, the APF intepreter must not execute
     * and all incoming packets must be passed to the host as if there was no
     * APF program installed.
     *
     * Must fail with |WifiStatusCode.ERROR_NOT_SUPPORTED| if
     * |StaIfaceCapabilityMask.APF| is not set.
     *
     * @return status WifiStatus of the operation.
     *         Possible status codes:
     *         |WifiStatusCode.SUCCESS|,
     *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
     *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
     *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
     *         |WifiStatusCode.ERROR_UNKNOWN|
     * @return data The entire APF working memory buffer when status is
     *         |WifiStatusCode.SUCCESS|, empty otherwise.
     * @see getApfPacketFilterCapabilities()
     * @see installApfPacketFilter()
     */
    readApfPacketFilterData() generates (WifiStatus status, vec<uint8_t> data);
};