mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 13:49:45 +00:00
supplicant(interface): Add various WPS device params am: 4984f9ab80
am: bc5cbcded4
Change-Id: I38a95d39191b6d7cd34ebe450697b41916d40e30
This commit is contained in:
@@ -92,6 +92,25 @@ $(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WpsConfigMethods)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/supplicant/V1_0/WpsConfigMethods.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava \
|
||||
-randroid.hardware:hardware/interfaces \
|
||||
-randroid.hidl:system/libhidl/transport \
|
||||
android.hardware.wifi.supplicant@1.0::types.WpsConfigMethods
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicant.hal
|
||||
#
|
||||
@@ -452,6 +471,25 @@ $(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WpsConfigMethods)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/supplicant/V1_0/WpsConfigMethods.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava \
|
||||
-randroid.hardware:hardware/interfaces \
|
||||
-randroid.hidl:system/libhidl/transport \
|
||||
android.hardware.wifi.supplicant@1.0::types.WpsConfigMethods
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicant.hal
|
||||
#
|
||||
|
||||
@@ -23,6 +23,17 @@ import ISupplicantNetwork;
|
||||
* it controls.
|
||||
*/
|
||||
interface ISupplicantIface {
|
||||
/**
|
||||
* Size limits for some of the params used in this interface.
|
||||
*/
|
||||
enum ParamSizeLimits : uint32_t {
|
||||
WPS_DEVICE_NAME_MAX_LEN = 32,
|
||||
WPS_MANUFACTURER_MAX_LEN = 64,
|
||||
WPS_MODEL_NAME_MAX_LEN = 32,
|
||||
WPS_MODEL_NUMBER_MAX_LEN = 32,
|
||||
WPS_SERIAL_NUMBER_MAX_LEN = 32
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the name of the network interface.
|
||||
*
|
||||
@@ -105,9 +116,92 @@ interface ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* @return networkIds List of all network Id's controlled by the supplicant.
|
||||
*/
|
||||
listNetworks()
|
||||
generates (SupplicantStatus status, vec<SupplicantNetworkId> networkIds);
|
||||
|
||||
/**
|
||||
* Set the device name for WPS operations.
|
||||
* User-friendly description of device (up to |WPS_DEVICE_NAME_MAX_LEN|
|
||||
* octets encoded in UTF-8).
|
||||
*
|
||||
* @parm name Name to be set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
*/
|
||||
setWpsDeviceName(string name) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set the manufacturer for WPS operations.
|
||||
* The manufacturer of the device (up to |WPS_MANUFACTURER_MAX_LEN| ASCII
|
||||
* characters).
|
||||
*
|
||||
* @parm manufacturer Manufacture to be set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
*/
|
||||
setWpsManufacturer(string manufacturer) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set the model name for WPS operations.
|
||||
* Model of the device (up to |WPS_MODEL_NAME_MAX_LEN| ASCII characters).
|
||||
*
|
||||
* @parm modelName Model name to be set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
*/
|
||||
setWpsModelName(string modelName) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set the model number for WPS operations.
|
||||
* Additional device description (up to |WPS_MODEL_NUMBER_MAX_LEN| ASCII
|
||||
* characters).
|
||||
*
|
||||
* @parm modelNumber Model number to be set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
*/
|
||||
setWpsModelNumber(string modelNumber) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set the serial number for WPS operations.
|
||||
* Serial number of the device (up to |WPS_SERIAL_NUMBER_MAX_LEN| characters)
|
||||
*
|
||||
* @parm serialNumber Serial number to be set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
*/
|
||||
setWpsSerialNumber(string serialNumber) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set the list of supported config methods for WPS operations.
|
||||
*
|
||||
* @param configMethods Mask of WPS configuration methods supported by the
|
||||
* device.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
*/
|
||||
setWpsConfigMethods(bitfield<WpsConfigMethods> configMethods)
|
||||
generates (SupplicantStatus status);
|
||||
};
|
||||
|
||||
@@ -25,26 +25,6 @@ package android.hardware.wifi.supplicant@1.0;
|
||||
* corresponding |ISupplicantP2pIface.registerCallback| method.
|
||||
*/
|
||||
interface ISupplicantP2pIfaceCallback {
|
||||
/**
|
||||
* WPS config methods.
|
||||
*/
|
||||
enum WpsConfigMethods : uint16_t {
|
||||
USBA = 0x0001,
|
||||
ETHERNET = 0x0002,
|
||||
LABEL = 0x0004,
|
||||
DISPLAY = 0x0008,
|
||||
EXT_NFC_TOKEN = 0x0010,
|
||||
INT_NFC_TOKEN = 0x0020,
|
||||
NFC_INTERFACE = 0x0040,
|
||||
PUSHBUTTON = 0x0080,
|
||||
KEYPAD = 0x0100,
|
||||
VIRT_PUSHBUTTON = 0x0280,
|
||||
PHY_PUSHBUTTON = 0x0480,
|
||||
P2PS = 0x1000,
|
||||
VIRT_DISPLAY = 0x2008,
|
||||
PHY_DISPLAY = 0x4008
|
||||
};
|
||||
|
||||
/**
|
||||
* WPS Device Password ID
|
||||
*/
|
||||
|
||||
@@ -219,7 +219,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
* @return macAddr MAC address of the device.
|
||||
*/
|
||||
getMacAddress()
|
||||
@@ -231,7 +232,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
startRxFilter() generates (SupplicantStatus status);
|
||||
|
||||
@@ -241,7 +243,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
stopRxFilter() generates (SupplicantStatus status);
|
||||
|
||||
@@ -252,7 +255,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
addRxFilter(RxFilterType type)
|
||||
generates (SupplicantStatus status);
|
||||
@@ -264,7 +268,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
removeRxFilter(RxFilterType type)
|
||||
generates (SupplicantStatus status);
|
||||
@@ -276,7 +281,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
setBtCoexistenceMode(BtCoexistenceMode mode)
|
||||
generates (SupplicantStatus status);
|
||||
@@ -291,7 +297,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
setBtCoexistenceScanModeEnabled(bool enable)
|
||||
generates (SupplicantStatus status);
|
||||
@@ -303,7 +310,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
setSuspendModeEnabled(bool enable)
|
||||
generates (SupplicantStatus status);
|
||||
@@ -315,7 +323,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
setCountryCode(int8_t[2] code)
|
||||
generates (SupplicantStatus status);
|
||||
@@ -328,7 +337,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
startWpsRegistrar(Bssid bssid, string pin)
|
||||
generates (SupplicantStatus status);
|
||||
@@ -342,7 +352,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
startWpsPbc(Bssid bssid) generates (SupplicantStatus status);
|
||||
|
||||
@@ -353,7 +364,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
startWpsPinKeypad(string pin) generates (SupplicantStatus status);
|
||||
|
||||
@@ -364,7 +376,8 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
* @return generatedPin 8 digit pin generated.
|
||||
*/
|
||||
startWpsPinDisplay(Bssid bssid)
|
||||
@@ -376,7 +389,20 @@ interface ISupplicantStaIface extends ISupplicantIface {
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
cancelWps() generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Use external processing for SIM/USIM operations
|
||||
*
|
||||
* @param useExternalSim true to use external, false otherwise.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
setExternalSim(bool useExternalSim) generates (SupplicantStatus status);
|
||||
};
|
||||
|
||||
@@ -74,6 +74,9 @@ enum IfaceType : uint32_t {
|
||||
P2P
|
||||
};
|
||||
|
||||
/**
|
||||
* P2P group capability.
|
||||
*/
|
||||
enum P2pGroupCapabilityMask : uint32_t {
|
||||
GROUP_OWNER = 1 << 0,
|
||||
PERSISTENT_GROUP = 1 << 1,
|
||||
@@ -83,3 +86,25 @@ enum P2pGroupCapabilityMask : uint32_t {
|
||||
PERSISTENT_RECONN = 1 << 5,
|
||||
GROUP_FORMATION = 1 << 6
|
||||
};
|
||||
|
||||
/**
|
||||
* WPS config methods.
|
||||
* Refer to section 3 of IBSS with Wi-Fi Protected Setup
|
||||
* Technical Specification Version 1.0.0.
|
||||
*/
|
||||
enum WpsConfigMethods : uint16_t {
|
||||
USBA = 0x0001,
|
||||
ETHERNET = 0x0002,
|
||||
LABEL = 0x0004,
|
||||
DISPLAY = 0x0008,
|
||||
EXT_NFC_TOKEN = 0x0010,
|
||||
INT_NFC_TOKEN = 0x0020,
|
||||
NFC_INTERFACE = 0x0040,
|
||||
PUSHBUTTON = 0x0080,
|
||||
KEYPAD = 0x0100,
|
||||
VIRT_PUSHBUTTON = 0x0280,
|
||||
PHY_PUSHBUTTON = 0x0480,
|
||||
P2PS = 0x1000,
|
||||
VIRT_DISPLAY = 0x2008,
|
||||
PHY_DISPLAY = 0x4008
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user