diff options
author | Niranjan Pendharkar | 2017-01-26 12:31:20 -0600 |
---|---|---|
committer | Niranjan Pendharkar | 2017-04-27 15:43:41 -0500 |
commit | 257430b7839535341e76fecad62bf96c1b0026be (patch) | |
tree | f4a46952c235443abbcd8397d2f52f1e0becfcc3 /tetheroffload/config | |
parent | 9af336425e2172a9639480a5399ad0e55e3f43c1 (diff) | |
download | platform-hardware-interfaces-257430b7839535341e76fecad62bf96c1b0026be.tar.gz platform-hardware-interfaces-257430b7839535341e76fecad62bf96c1b0026be.tar.xz platform-hardware-interfaces-257430b7839535341e76fecad62bf96c1b0026be.zip |
Tether Offload HAL
Adds new interfaces to perform hardware optimized tethering offload.
Test: as follows
- built (bullhead)
- flashed
- booted
- "runtest frameworks-net" passes
Bug:34361337
Change-Id: I1ed756306e1efe98bd2703df9c9846a50a87ffcd
Diffstat (limited to 'tetheroffload/config')
-rw-r--r-- | tetheroffload/config/1.0/Android.bp | 60 | ||||
-rw-r--r-- | tetheroffload/config/1.0/IOffloadConfig.hal | 36 |
2 files changed, 96 insertions, 0 deletions
diff --git a/tetheroffload/config/1.0/Android.bp b/tetheroffload/config/1.0/Android.bp new file mode 100644 index 00000000..7eac6b00 --- /dev/null +++ b/tetheroffload/config/1.0/Android.bp | |||
@@ -0,0 +1,60 @@ | |||
1 | // This file is autogenerated by hidl-gen. Do not edit manually. | ||
2 | |||
3 | filegroup { | ||
4 | name: "android.hardware.tetheroffload.config@1.0_hal", | ||
5 | srcs: [ | ||
6 | "IOffloadConfig.hal", | ||
7 | ], | ||
8 | } | ||
9 | |||
10 | genrule { | ||
11 | name: "android.hardware.tetheroffload.config@1.0_genc++", | ||
12 | tools: ["hidl-gen"], | ||
13 | cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0", | ||
14 | srcs: [ | ||
15 | ":android.hardware.tetheroffload.config@1.0_hal", | ||
16 | ], | ||
17 | out: [ | ||
18 | "android/hardware/tetheroffload/config/1.0/OffloadConfigAll.cpp", | ||
19 | ], | ||
20 | } | ||
21 | |||
22 | genrule { | ||
23 | name: "android.hardware.tetheroffload.config@1.0_genc++_headers", | ||
24 | tools: ["hidl-gen"], | ||
25 | cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0", | ||
26 | srcs: [ | ||
27 | ":android.hardware.tetheroffload.config@1.0_hal", | ||
28 | ], | ||
29 | out: [ | ||
30 | "android/hardware/tetheroffload/config/1.0/IOffloadConfig.h", | ||
31 | "android/hardware/tetheroffload/config/1.0/IHwOffloadConfig.h", | ||
32 | "android/hardware/tetheroffload/config/1.0/BnHwOffloadConfig.h", | ||
33 | "android/hardware/tetheroffload/config/1.0/BpHwOffloadConfig.h", | ||
34 | "android/hardware/tetheroffload/config/1.0/BsOffloadConfig.h", | ||
35 | ], | ||
36 | } | ||
37 | |||
38 | cc_library_shared { | ||
39 | name: "android.hardware.tetheroffload.config@1.0", | ||
40 | generated_sources: ["android.hardware.tetheroffload.config@1.0_genc++"], | ||
41 | generated_headers: ["android.hardware.tetheroffload.config@1.0_genc++_headers"], | ||
42 | export_generated_headers: ["android.hardware.tetheroffload.config@1.0_genc++_headers"], | ||
43 | vendor_available: true, | ||
44 | shared_libs: [ | ||
45 | "libhidlbase", | ||
46 | "libhidltransport", | ||
47 | "libhwbinder", | ||
48 | "liblog", | ||
49 | "libutils", | ||
50 | "libcutils", | ||
51 | "android.hidl.base@1.0", | ||
52 | ], | ||
53 | export_shared_lib_headers: [ | ||
54 | "libhidlbase", | ||
55 | "libhidltransport", | ||
56 | "libhwbinder", | ||
57 | "libutils", | ||
58 | "android.hidl.base@1.0", | ||
59 | ], | ||
60 | } | ||
diff --git a/tetheroffload/config/1.0/IOffloadConfig.hal b/tetheroffload/config/1.0/IOffloadConfig.hal new file mode 100644 index 00000000..4d285da7 --- /dev/null +++ b/tetheroffload/config/1.0/IOffloadConfig.hal | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2017 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 | |||
17 | package android.hardware.tetheroffload.config@1.0; | ||
18 | |||
19 | |||
20 | /** | ||
21 | * Interface used for configuring the hardware management process | ||
22 | */ | ||
23 | interface IOffloadConfig { | ||
24 | /** | ||
25 | * Provides bound netlink file descriptors for use in the management process | ||
26 | * | ||
27 | * @param fd1 A file descriptor bound to the following netlink groups | ||
28 | * (NF_NETLINK_CONNTRACK_NEW | NF_NETLINK_CONNTRACK_DESTROY). | ||
29 | * @param fd2 A file descriptor bound to the following netlink groups | ||
30 | * (NF_NETLINK_CONNTRACK_UPDATE | NF_NETLINK_CONNTRACK_DESTROY). | ||
31 | * | ||
32 | * @return success true if successful, false otherwise | ||
33 | * @return errMsg a human readable string if eror has occured. | ||
34 | */ | ||
35 | setHandles(handle fd1, handle fd2) generates (bool success, string errMsg); | ||
36 | }; | ||