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

Commit 0bad28f0 authored by lesl's avatar lesl
Browse files

IHostapd: Add hostapd 1.2

Add new API: forceClientDisconnect

Bug:142752869
Test: Manual Test
Test: VTS: VtsHalWifiHostapdV1_2Target
Change-Id: Ia05ec993815c16731aa9be1f257f941eacf1575f
parent 05031623
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -512,7 +512,7 @@
    </hal>
    <hal format="hidl" optional="true">
        <name>android.hardware.wifi.hostapd</name>
        <version>1.0-1</version>
        <version>1.0-2</version>
        <interface>
            <name>IHostapd</name>
            <instance>default</instance>
+20 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen -Landroidbp.

hidl_interface {
    name: "android.hardware.wifi.hostapd@1.2",
    root: "android.hardware",
    vndk: {
        enabled: true,
    },
    srcs: [
        "types.hal",
        "IHostapd.hal",
    ],
    interfaces: [
        "android.hardware.wifi.hostapd@1.0",
        "android.hardware.wifi.hostapd@1.1",
        "android.hardware.wifi.supplicant@1.0",
        "android.hidl.base@1.0",
    ],
    gen_java: true,
}
+42 −0
Original line number Diff line number Diff line
/*
 * Copyright 2019 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.hostapd@1.2;

import @1.1::IHostapd;
import HostapdStatus;
import MacAddress;
import Ieee80211ReasonCode;

/**
 * Top-level object for managing SoftAPs.
 */
interface IHostapd extends @1.1::IHostapd {
    /**
     * force one of the hotspot clients disconnect..
     *
     * @param ifaceName Name of the interface.
     * @param clientAddress Mac Address of the hotspot client.
     * @param reasonCode One of disconnect reason code which defined by 802.11.
     * @return status Status of the operation.
     *         Possible status codes:
     *         |HostapdStatusCode.SUCCESS|,
     *         |HostapdStatusCode.FAILURE_IFACE_UNKNOWN|
     *         |HostapdStatusCode.FAILURE_CLIENT_UNKNOWN|
     */
    forceClientDisconnect(string ifaceName, MacAddress clientAddress,
        Ieee80211ReasonCode reasonCode) generates (HostapdStatus status);
};
+55 −0
Original line number Diff line number Diff line
/*
 * Copyright 2019 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.hostapd@1.2;

import @1.0::HostapdStatusCode;

/**
 * Enum values indicating the status of any hostapd operation.
 */
enum HostapdStatusCode : @1.0::HostapdStatusCode {
    /**
     * Failure because unknown the client.
     */
    FAILURE_CLIENT_UNKNOWN,
};

/**
 * Enum values indicating the reason code for disconnect packet.
 * Reason codes (IEEE Std 802.11-2016, 9.4.1.7, Table 9-45).
 */
enum Ieee80211ReasonCode : uint16_t {
    WLAN_REASON_UNSPECIFIED = 1,
    WLAN_REASON_PREV_AUTH_NOT_VALID = 2,
    WLAN_REASON_DISASSOC_AP_BUSY = 5,
};

typedef uint8_t[6] MacAddress;

/**
 * Generic structure to return the status of any hostapd operation.
 */
struct HostapdStatus {
    HostapdStatusCode code;

    /**
     * A vendor-specific error message to provide more information beyond the
     * status code.
     * This must be used for debugging purposes only.
     */
    string debugMessage;
};
+2 −0
Original line number Diff line number Diff line
rpius@google.com
etancohen@google.com
Loading