mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Wifi: Add getConnectionCapabilities API
This commit adds the API for getConnectionCapabilities() in ISupplicantStaIface HAL. This is used to return the Wifi support for the connection on this STA interface. Bug: 138634524 Bug: 140168755 Test: Manual Test: VTS test Change-Id: I24ff3c16434067e41491298e41041bdfdf06452a
This commit is contained in:
12
current.txt
12
current.txt
@@ -589,12 +589,12 @@ fd65298e1e09e0e3c781ab18305920d757dbe55a3b459ce17814ec5cf6dfee99 android.hardwar
|
||||
74049a402be913963edfdd80828a53736570e9d8124a1bf18166b6ed46a6b0ab android.hardware.boot@1.1::types
|
||||
34515afa2bb792d3c6d8495a5f5d907d179c8507ca5e55c10050d02ae1d516ef android.hardware.neuralnetworks@1.3::IDevice
|
||||
b74fe72cfe438f50e772e6a307657ff449d5bde83c15dd1f140ff2edbe73499c android.hardware.neuralnetworks@1.3::types
|
||||
04395b26be33db17747c3d3b0e8066d323f891ff4f9f3b3ddb490b2f3f844a18 android.hardware.wifi@1.4::IWifi
|
||||
270f0eb670dfd9bc5cd718e09711f2534fa8425f54d06c1a46523ca156b509e2 android.hardware.wifi.supplicant@1.3::ISupplicant
|
||||
dd4b7cfbb6e1c6ff011c33920762ad89dd02240c63a4d3a3d5037f154eae3e3b android.hardware.wifi.supplicant@1.3::ISupplicantStaIface
|
||||
619fc9839ec6e369cfa9b28e3e9412e6885720ff8f9b5750c1b6ffb905120391 android.hardware.wifi.supplicant@1.3::ISupplicantStaIfaceCallback
|
||||
6fe09b18e913608579638594788198ec45bb2369e567d7df661db46c4f0e5f08 android.hardware.wifi.supplicant@1.3::ISupplicantStaNetwork
|
||||
91931b05bd70ea6bdffbe075086183f803379571788564e28854207620eb75cf android.hardware.wifi.supplicant@1.3::types
|
||||
544049dcda3f943ad67d83d5277f06681a3782982a9af5a78b5d4e8d295d061a android.hardware.vibrator@1.4::IVibrator
|
||||
5e1c12efbbba89c9143d10b1b90eceff8bc79aa079f5106215b528e104fef101 android.hardware.vibrator@1.4::IVibratorCallback
|
||||
033eae03c09ebc75e82db37bc39995dfaa9086745577b44d9e14e9ccb48bd8cc android.hardware.vibrator@1.4::types
|
||||
3e01d4446cd69fd1c48f8572efd97487bc179564b32bd795800b97bbe10be37b android.hardware.wifi@1.4::IWifi
|
||||
a64467bae843569f0d465c5be7f0c7a5b987985b55a3ef4794dd5afc68538650 android.hardware.wifi.supplicant@1.3::ISupplicant
|
||||
0a7ff83fd0326b82232e1609da98f34960be11335df72fc407ad238d7bd0e081 android.hardware.wifi.supplicant@1.3::ISupplicantStaIface
|
||||
619fc9839ec6e369cfa9b28e3e9412e6885720ff8f9b5750c1b6ffb905120391 android.hardware.wifi.supplicant@1.3::ISupplicantStaIfaceCallback
|
||||
c9273429fcf98d797d3bb07fdba6f1be95bf960f9255cde169fd1ca4db85f856 android.hardware.wifi.supplicant@1.3::ISupplicantStaNetwork
|
||||
b0f8c9cd61a45a8c1b4a8e40913ecaea0921011cbe2305a6fa5a2feaa0d36c30 android.hardware.wifi.supplicant@1.3::types
|
||||
|
||||
@@ -24,5 +24,4 @@ import @1.3::IWifi;
|
||||
* module loaded in the system.
|
||||
* IWifi.getChip() must return @1.2::IWifiChip
|
||||
*/
|
||||
interface IWifi extends @1.3::IWifi {
|
||||
};
|
||||
interface IWifi extends @1.3::IWifi {};
|
||||
|
||||
@@ -26,5 +26,4 @@ import @1.2::ISupplicant;
|
||||
* 1.2 HAL. For example V1_2::ISupplicant::addIface() adds V1_2::ISupplicantIface,
|
||||
* which can be cast to V1_3::ISupplicantStaIface.
|
||||
*/
|
||||
interface ISupplicant extends @1.2::ISupplicant {
|
||||
};
|
||||
interface ISupplicant extends @1.2::ISupplicant {};
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.hardware.wifi.supplicant@1.3;
|
||||
|
||||
import @1.0::SupplicantStatus;
|
||||
import @1.2::ISupplicantStaIface;
|
||||
import @1.3::ISupplicantStaIfaceCallback;
|
||||
import ISupplicantStaIfaceCallback;
|
||||
|
||||
/**
|
||||
* Interface exposed by the supplicant for each station mode network
|
||||
@@ -43,4 +43,15 @@ interface ISupplicantStaIface extends @1.2::ISupplicantStaIface {
|
||||
*/
|
||||
registerCallback_1_3(ISupplicantStaIfaceCallback callback)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Get Connection capabilities
|
||||
*
|
||||
* @return status Status of the operation, and connection capabilities.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
*/
|
||||
getConnectionCapabilities()
|
||||
generates (SupplicantStatus status, ConnectionCapabilities capabilities);
|
||||
};
|
||||
|
||||
@@ -60,6 +60,5 @@ interface ISupplicantStaNetwork extends @1.2::ISupplicantStaNetwork {
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setPmkCache(vec<uint8_t> serializedEntry)
|
||||
generates (SupplicantStatus status);
|
||||
setPmkCache(vec<uint8_t> serializedEntry) generates (SupplicantStatus status);
|
||||
};
|
||||
|
||||
@@ -25,3 +25,36 @@ enum OcspType : uint32_t {
|
||||
REQUIRE_CERT_STATUS,
|
||||
REQUIRE_ALL_CERTS_STATUS,
|
||||
};
|
||||
|
||||
/**
|
||||
* Wifi Technologies
|
||||
*/
|
||||
enum WifiTechnology : uint32_t {
|
||||
UNKNOWN = 0,
|
||||
/**
|
||||
* For 802.11a/b/g
|
||||
*/
|
||||
LEGACY = 1,
|
||||
/**
|
||||
* For 802.11n
|
||||
*/
|
||||
HT = 2,
|
||||
/**
|
||||
* For 802.11ac
|
||||
*/
|
||||
VHT = 3,
|
||||
/**
|
||||
* For 802.11ax
|
||||
*/
|
||||
HE = 4,
|
||||
};
|
||||
|
||||
/**
|
||||
* Connection Capabilities.
|
||||
*/
|
||||
struct ConnectionCapabilities {
|
||||
/**
|
||||
* Wifi Technology
|
||||
*/
|
||||
WifiTechnology technology;
|
||||
};
|
||||
|
||||
@@ -37,6 +37,7 @@ using ::android::hardware::wifi::supplicant::V1_0::SupplicantStatusCode;
|
||||
using ::android::hardware::wifi::supplicant::V1_2::DppAkm;
|
||||
using ::android::hardware::wifi::supplicant::V1_2::DppFailureCode;
|
||||
using ::android::hardware::wifi::supplicant::V1_2::DppProgressCode;
|
||||
using ::android::hardware::wifi::supplicant::V1_3::ConnectionCapabilities;
|
||||
using ::android::hardware::wifi::supplicant::V1_3::ISupplicantStaIface;
|
||||
using ::android::hardware::wifi::supplicant::V1_3::ISupplicantStaIfaceCallback;
|
||||
using ::android::hardware::wifi::supplicant::V1_3::ISupplicantStaNetwork;
|
||||
@@ -179,3 +180,14 @@ TEST_F(SupplicantStaIfaceHidlTest, RegisterCallback_1_3) {
|
||||
EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* getConnectionCapabilities
|
||||
*/
|
||||
TEST_F(SupplicantStaIfaceHidlTest, GetConnectionCapabilities) {
|
||||
sta_iface_->getConnectionCapabilities(
|
||||
[&](const SupplicantStatus& status,
|
||||
ConnectionCapabilities /* capabilities */) {
|
||||
EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user