blob: d65b33bb2bf3ea8c9315ed59ddf52d9bb35fc680 [file] [log] [blame]
Bernie Innocentibd94b432018-03-02 12:49:40 +09001/*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.wifi@1.2;
18
19import @1.0::WifiStatus;
Jong Wook Kimb9f0ff92018-03-16 16:21:49 -070020import @1.0::MacAddress;
Bernie Innocentibd94b432018-03-02 12:49:40 +090021import @1.0::IWifiStaIface;
22
23/**
24 * Interface used to represent a single STA iface.
25 *
Ahmed ElArabawy1845b8e2020-01-31 16:53:04 -080026 * IWifiChip.createStaIface() must return a @1.2::IWifiStaIface when supported.
Bernie Innocentibd94b432018-03-02 12:49:40 +090027 */
28interface IWifiStaIface extends @1.0::IWifiStaIface {
29 /**
30 * Fetches a consistent snapshot of the entire APF program and working
31 * memory buffer and returns it to the host. The returned buffer contains
32 * both code and data. Its length must match the most recently returned
33 * |StaApfPacketFilterCapabilities.maxLength|.
34 *
35 * While the snapshot is being fetched, the APF intepreter must not execute
36 * and all incoming packets must be passed to the host as if there was no
37 * APF program installed.
38 *
39 * Must fail with |WifiStatusCode.ERROR_NOT_SUPPORTED| if
40 * |StaIfaceCapabilityMask.APF| is not set.
41 *
42 * @return status WifiStatus of the operation.
43 * Possible status codes:
44 * |WifiStatusCode.SUCCESS|,
45 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
46 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
47 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
48 * |WifiStatusCode.ERROR_UNKNOWN|
49 * @return data The entire APF working memory buffer when status is
50 * |WifiStatusCode.SUCCESS|, empty otherwise.
51 * @see getApfPacketFilterCapabilities()
52 * @see installApfPacketFilter()
53 */
54 readApfPacketFilterData() generates (WifiStatus status, vec<uint8_t> data);
Jong Wook Kimb9f0ff92018-03-16 16:21:49 -070055
56 /**
57 * Changes the MAC address of the Sta Interface to the given
58 * MAC address.
59 *
60 * @param mac MAC address to change into.
61 * @return status WifiStatus of the operation.
62 * Possible status codes:
63 * |WifiStatusCode.SUCCESS|,
64 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
65 * |WifiStatusCode.ERROR_UNKNOWN|
66 */
67 setMacAddress(MacAddress mac) generates (WifiStatus status);
Bernie Innocentibd94b432018-03-02 12:49:40 +090068};