wifi(interface): NAN HIDL interface

am: 120f94c594

Change-Id: I22788dd6cd85b18c06c7bca7de53e5c1fabf5d1f
This commit is contained in:
Roshan Pius 2016-11-17 00:56:43 +00:00 committed by android-build-merger
commit ea3058f9c1
7 changed files with 3954 additions and 11 deletions

View file

@ -13,6 +13,7 @@ genrule {
"IWifiEventCallback.hal",
"IWifiIface.hal",
"IWifiNanIface.hal",
"IWifiNanIfaceEventCallback.hal",
"IWifiP2pIface.hal",
"IWifiRttController.hal",
"IWifiStaIface.hal",
@ -27,6 +28,7 @@ genrule {
"android/hardware/wifi/1.0/WifiEventCallbackAll.cpp",
"android/hardware/wifi/1.0/WifiIfaceAll.cpp",
"android/hardware/wifi/1.0/WifiNanIfaceAll.cpp",
"android/hardware/wifi/1.0/WifiNanIfaceEventCallbackAll.cpp",
"android/hardware/wifi/1.0/WifiP2pIfaceAll.cpp",
"android/hardware/wifi/1.0/WifiRttControllerAll.cpp",
"android/hardware/wifi/1.0/WifiStaIfaceAll.cpp",
@ -47,6 +49,7 @@ genrule {
"IWifiEventCallback.hal",
"IWifiIface.hal",
"IWifiNanIface.hal",
"IWifiNanIfaceEventCallback.hal",
"IWifiP2pIface.hal",
"IWifiRttController.hal",
"IWifiStaIface.hal",
@ -89,6 +92,11 @@ genrule {
"android/hardware/wifi/1.0/BnWifiNanIface.h",
"android/hardware/wifi/1.0/BpWifiNanIface.h",
"android/hardware/wifi/1.0/BsWifiNanIface.h",
"android/hardware/wifi/1.0/IWifiNanIfaceEventCallback.h",
"android/hardware/wifi/1.0/IHwWifiNanIfaceEventCallback.h",
"android/hardware/wifi/1.0/BnWifiNanIfaceEventCallback.h",
"android/hardware/wifi/1.0/BpWifiNanIfaceEventCallback.h",
"android/hardware/wifi/1.0/BsWifiNanIfaceEventCallback.h",
"android/hardware/wifi/1.0/IWifiP2pIface.h",
"android/hardware/wifi/1.0/IHwWifiP2pIface.h",
"android/hardware/wifi/1.0/BnWifiP2pIface.h",

File diff suppressed because it is too large Load diff

View file

@ -17,10 +17,259 @@
package android.hardware.wifi@1.0;
import IWifiIface;
import IWifiNanIfaceEventCallback;
/**
* Interface used to represent a single NAN iface.
* Interface used to represent a single NAN(Neighbour Aware Network) iface.
*/
interface IWifiNanIface extends IWifiIface {
/** TODO(rpius): Add methods to the interface. */
/**
* Requests notifications of significant events on this iface. Multiple calls
* to this must register multiple callbacks each of which must receive all
* events.
*
* @param callback An instance of the |IWifiNanIfaceEventCallback| HIDL interface
* object.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
*/
registerEventCallback(IWifiNanIfaceEventCallback callback)
generates (WifiStatus status);
/**
* Enable NAN functionality.
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanEnableRequest|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
enableRequest(CommandId cmdId, NanEnableRequest msg)
generates (WifiStatus status);
/**
* Disable NAN functionality.
*
* @param cmdId command Id to use for this invocation.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
disableRequest(CommandId cmdId) generates (WifiStatus status);
/**
* Publish request to advertize a service.
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanPublishRequest|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
publishRequest(CommandId cmdId, NanPublishRequest msg)
generates (WifiStatus status);
/**
* Cancel previous publish requests.
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanPublishCancelRequest|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
publishCancelRequest(CommandId cmdId, NanPublishCancelRequest msg)
generates (WifiStatus status);
/**
* Subscribe request to search for a service.
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanSubscribeRequest|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
subscribeRequest(CommandId cmdId, NanSubscribeRequest msg)
generates (WifiStatus status);
/**
* Cancel previous subscribe requests.
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanSubscribeCancelRequest|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
subscribeCancelRequest(CommandId cmdId, NanSubscribeCancelRequest msg)
generates (WifiStatus status);
/**
* NAN transmit follow up request.
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanTransmitFollowupRequest|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
transmitFollowupRequest(CommandId cmdId, NanTransmitFollowupRequest msg)
generates (WifiStatus status);
/**
* NAN configuration request.
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanConfigRequest|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
configRequest(CommandId cmdId, NanConfigRequest msg)
generates (WifiStatus status);
/**
* Set NAN Beacon or sdf payload to discovery engine.
* This instructs the Discovery Engine to begin publishing the
* received payload in any Beacon or Service Discovery Frame transmitted
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanBeaconSdfPayloadRequest|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
beaconSdfPayloadRequest(CommandId cmdId, NanBeaconSdfPayloadRequest msg)
generates (WifiStatus status);
/**
* Get NAN HAL version.
*
* @param cmdId command Id to use for this invocation.
* @return version Instance of |NanVersion|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
getVersion() generates (WifiStatus status, NanVersion version);
/**
* Get NAN capabilities.
*
* @param cmdId command Id to use for this invocation.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
getCapabilities(CommandId cmdId) generates (WifiStatus status);
/**
* Create NAN Data Interface
*
* @param cmdId command Id to use for this invocation.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
dataInterfaceCreate(CommandId cmdId, string ifaceName)
generates (WifiStatus status);
/**
* Delete NAN Data Interface.
*
* @param cmdId command Id to use for this invocation.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
dataInterfaceDelete(CommandId cmdId, string ifaceName)
generates (WifiStatus status);
/**
* Initiate a NDP session: Initiator
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanDataPathInitiatorRequest|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
dataRequestInitiator(CommandId cmdId, NanDataPathInitiatorRequest msg)
generates (WifiStatus status);
/**
* Response to a data indication received corresponding to a NDP session. An indication
* is received with a data request and the responder will send a data response.
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanDataPathIndicationResponse|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
dataIndicationResponse(CommandId cmdId, NanDataPathIndicationResponse msg)
generates (WifiStatus status);
/**
* NDL termination request: from either Initiator/Responder.
*
* @param cmdId command Id to use for this invocation.
* @param msg Instance of |NanDataPathEndRequest|.
* @return status WifiStatus of the operation.
* Possible status codes:
* |WifiStatusCode.SUCCESS|,
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
* |WifiStatusCode.ERROR_INVALID_ARGS|,
* |WifiStatusCode.ERROR_UNKNOWN|
*/
dataEnd(CommandId cmdId, NanDataPathEndRequest msg)
generates (WifiStatus status);
};

View file

@ -0,0 +1,54 @@
/*
* Copyright 2016 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@1.0;
/**
* NAN Response and Event Callbacks.
*/
interface IWifiNanIfaceEventCallback {
/**
* NotifyResponse invoked to notify the status of the Request.
*/
oneway notifyResponse(CommandId id, NanResponseMsg rspData);
/**
* Callbacks for the various asynchornous NAN Events.
*/
oneway eventPublishTerminated(NanPublishTerminatedInd event);
oneway eventMatch(NanMatchInd event);
oneway eventMatchExpired(NanMatchExpiredInd event);
oneway eventSubscribeTerminated(NanSubscribeTerminatedInd event);
oneway eventFollowup(NanFollowupInd event);
oneway eventDiscEngEvent(NanDiscEngEventInd event);
oneway eventDisabled(NanDisabledInd event);
oneway eventBeaconSdfPayload(NanBeaconSdfPayloadInd event);
oneway eventDataRequest(NanDataPathRequestInd event);
oneway eventDataConfirm(NanDataPathConfirmInd event);
oneway eventDataEnd(NanDataPathEndInd event);
oneway eventTransmitFollowup(NanTransmitFollowupInd event);
};

View file

@ -151,7 +151,7 @@ interface IWifiStaIface extends IWifiIface {
* Channel frequencies (in Mhz) to scan if |band| is set to
* |UNSPECIFIED|.
*/
vec<uint32_t> frequenciesInMhz;
vec<WifiChannelInMhz> frequencies;
/**
* Period at which this bucket must be scanned (in milliseconds). Must be an integer
* multiple of the |basePeriodInMs| specified in the BackgroundScanParameters.
@ -395,10 +395,10 @@ interface IWifiStaIface extends IWifiIface {
* |WifiStatusCode.ERROR_NOT_SUPPORTED|,
* |WifiStatusCode.ERROR_NOT_AVAILABLE|,
* |WifiStatusCode.ERROR_UNKNOWN|
* @return frequenciesInMhz vector of valid frequencies for the provided band.
* @return frequencies vector of valid frequencies for the provided band.
*/
getValidFrequenciesForBackgroundScan(BackgroundScanBand band)
generates (WifiStatus status, vec<uint32_t> frequenciesInMhz);
generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
/**
* Start a background scan using the given cmdId as an identifier. Only one

View file

@ -26,11 +26,6 @@ interface IWifiStaIfaceEventCallback {
vec<uint8_t> data;
};
/**
* BSSID type. 6 octets representing the physical address of an AP.
*/
typedef uint8_t[6] Bssid;
/**
* Structure describing all the information about a single access point seen
* during the scan.
@ -39,8 +34,8 @@ interface IWifiStaIfaceEventCallback {
int64_t timeStampInUs;
vec<uint8_t> ssid;
Bssid bssid;
uint32_t frequencyInMhz;
int8_t rssi;
WifiChannelInMhz frequency;
uint16_t beaconPeriodInMs;
uint16_t capability;
vec<InformationElement> informationElements;

File diff suppressed because it is too large Load diff