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

Commit fda43ac8 authored by Sunil Ravi's avatar Sunil Ravi
Browse files

Wifi: Modified API for addGroupWithConfig

Deprecated the existing addGroupWithConfig API
which is used to setup a P2P group owner or join a group as a group client
with the specified configuration(SSID, password, band/group). Added a new modified API called
addGroupWithConfigurationParams to include the authentication key
management used to setup a connection.

Bug: 297426719
Test: Build successfully
Change-Id: Iafc692bbbaac9f4d98f5983951dc87dc4438988a
parent aeba4a25
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ package android.hardware.wifi.supplicant;
interface ISupplicantP2pIface {
  void addBonjourService(in byte[] query, in byte[] response);
  void addGroup(in boolean persistent, in int persistentNetworkId);
  /**
   * @deprecated This method is deprecated from AIDL v3, newer HALs should use addGroupWithConfigurationParams.
   */
  void addGroupWithConfig(in byte[] ssid, in String pskPassphrase, in boolean persistent, in int freq, in byte[] peerAddress, in boolean joinExistingGroup);
  @PropagateAllowBlocking android.hardware.wifi.supplicant.ISupplicantP2pNetwork addNetwork();
  void addUpnpService(in int version, in String serviceName);
@@ -115,4 +118,5 @@ interface ISupplicantP2pIface {
  String connectWithParams(in android.hardware.wifi.supplicant.P2pConnectInfo connectInfo);
  void findWithParams(in android.hardware.wifi.supplicant.P2pDiscoveryInfo discoveryInfo);
  void configureExtListenWithParams(in android.hardware.wifi.supplicant.P2pExtListenInfo extListenInfo);
  void addGroupWithConfigurationParams(in android.hardware.wifi.supplicant.P2pAddGroupConfigurationParams groupConfigurationParams);
}
+1 −0
Original line number Diff line number Diff line
@@ -51,4 +51,5 @@ enum KeyMgmtMask {
  WAPI_CERT = (1 << 13) /* 8192 */,
  FILS_SHA256 = (1 << 18) /* 262144 */,
  FILS_SHA384 = (1 << 19) /* 524288 */,
  PASN = (1 << 25) /* 33554432 */,
}
+44 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.wifi.supplicant;
@VintfStability
parcelable P2pAddGroupConfigurationParams {
  byte[] ssid;
  String passphrase;
  boolean isPersistent;
  int frequencyMHzOrBand;
  byte[6] goInterfaceAddress;
  boolean joinExistingGroup;
  int keyMgmtMask;
}
+16 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.hardware.wifi.supplicant.ISupplicantP2pIfaceCallback;
import android.hardware.wifi.supplicant.ISupplicantP2pNetwork;
import android.hardware.wifi.supplicant.IfaceType;
import android.hardware.wifi.supplicant.MiracastMode;
import android.hardware.wifi.supplicant.P2pAddGroupConfigurationParams;
import android.hardware.wifi.supplicant.P2pConnectInfo;
import android.hardware.wifi.supplicant.P2pDiscoveryInfo;
import android.hardware.wifi.supplicant.P2pExtListenInfo;
@@ -74,6 +75,9 @@ interface ISupplicantP2pIface {
     * whose network name and group owner's MAC address matches the specified SSID
     * and peer address without WPS process. If peerAddress is 00:00:00:00:00:00, the first found
     * group whose network name matches the specified SSID is joined.
     * <p>
     * @deprecated This method is deprecated from AIDL v3, newer HALs should use
     * addGroupWithConfigurationParams.
     *
     * @param ssid The SSID of this group.
     * @param pskPassphrase The passphrase of this group.
@@ -903,4 +907,16 @@ interface ISupplicantP2pIface {
     *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
     */
    void configureExtListenWithParams(in P2pExtListenInfo extListenInfo);

    /**
     * Set up a P2P group owner or join a group as a group client
     * with the specified configuration.
     *
     * @param groupConfigurationParams Parameters associated with this add group operation.
     * @throws ServiceSpecificException with one of the following values:
     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
     *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
     */
    void addGroupWithConfigurationParams(
            in P2pAddGroupConfigurationParams groupConfigurationParams);
}
+4 −0
Original line number Diff line number Diff line
@@ -71,4 +71,8 @@ enum KeyMgmtMask {
     * FILS shared key authentication with sha-384
     */
    FILS_SHA384 = 1 << 19,
    /**
     * Pre-Association Security Negotiation (PASN) Key management
     */
    PASN = 1 << 25,
}
Loading