wifi(interface): Use the "bitfield" type for masks am: 5c3a0d9666 am: 401016b548

am: e37d692c82

Change-Id: Ie599770041558133d44f49455f67c13b78dcb61d
This commit is contained in:
Roshan Pius
2017-01-19 23:00:05 +00:00
committed by android-build-merger
5 changed files with 51 additions and 45 deletions

View File

@@ -205,7 +205,8 @@ interface IWifiChip {
* |WifiStatusCode.ERROR_UNKNOWN| * |WifiStatusCode.ERROR_UNKNOWN|
* @return capabilities Bitset of |ChipCapabilityMask| values. * @return capabilities Bitset of |ChipCapabilityMask| values.
*/ */
getCapabilities() generates (WifiStatus status, uint32_t capabilities); getCapabilities()
generates (WifiStatus status, bitfield<ChipCapabilityMask> capabilities);
/** /**
* Get the set of operation modes that the chip supports. * Get the set of operation modes that the chip supports.

View File

@@ -120,7 +120,9 @@ interface IWifiStaIface extends IWifiIface {
* |WifiStatusCode.ERROR_UNKNOWN| * |WifiStatusCode.ERROR_UNKNOWN|
* @return capabilities Bitset of |StaIfaceCapabilityMask| values. * @return capabilities Bitset of |StaIfaceCapabilityMask| values.
*/ */
getCapabilities() generates (WifiStatus status, uint32_t capabilities); getCapabilities()
generates (WifiStatus status,
bitfield<StaIfaceCapabilityMask> capabilities);
/** /**
* Used to query additional information about the chip's APF capabilities. * Used to query additional information about the chip's APF capabilities.

View File

@@ -254,7 +254,7 @@ struct StaBackgroundScanCapabilities {
* Bands that can be specified in Background scan requests. * Bands that can be specified in Background scan requests.
*/ */
enum StaBackgroundScanBand : uint32_t { enum StaBackgroundScanBand : uint32_t {
BAND_UNSPECIFIED, BAND_UNSPECIFIED = 0,
/** /**
* 2.4 GHz. * 2.4 GHz.
*/ */
@@ -325,10 +325,10 @@ struct StaBackgroundScanBucketParameters {
*/ */
uint32_t periodInMs; uint32_t periodInMs;
/** /**
* Bitset of |BackgroundScanBucketEventReportSchemeMask| values controlling * Bitset of |StaBackgroundScanBucketEventReportSchemeMask| values controlling
* when events for this bucket must be reported. * when events for this bucket must be reported.
*/ */
uint32_t eventReportScheme; bitfield<StaBackgroundScanBucketEventReportSchemeMask> eventReportScheme;
/** /**
* For exponential back off. If |exponentialMaxPeriodInMs| is non zero or * For exponential back off. If |exponentialMaxPeriodInMs| is non zero or
* different than period, then this bucket is an exponential backoff bucket * different than period, then this bucket is an exponential backoff bucket
@@ -503,7 +503,7 @@ struct StaScanData {
/** /**
* Bitset containing |ScanDataFlagMask| values. * Bitset containing |ScanDataFlagMask| values.
*/ */
uint32_t flags; bitfield<StaScanDataFlagMask> flags;
/** /**
* Bitset where each bit indicates if the bucket with that index was * Bitset where each bit indicates if the bucket with that index was
* scanned. * scanned.
@@ -842,6 +842,23 @@ struct NanEnableRequest {
NanDebugConfig debugConfigs; NanDebugConfig debugConfigs;
}; };
/**
* Cipher suite flags - to be used as a bitmask.
*/
enum NanCipherSuiteType : uint32_t {
SHARED_KEY_128_MASK = 1 << 0,
SHARED_KEY_256_MASK = 1 << 1
};
/**
* Ranging in the context of discovery sessions indication controls - to be used as a bitmask.
*/
enum NanRangingIndication : uint32_t {
CONTINUOUS_INDICATION_MASK = 1 << 0,
INGRESS_MET_MASK = 1 << 1,
EGRESS_MET_MASK = 1 << 2
};
/** /**
* Configurations of NAN discovery sessions: common to publish and subscribe discovery. * Configurations of NAN discovery sessions: common to publish and subscribe discovery.
*/ */
@@ -921,7 +938,7 @@ struct NanDiscoveryCommonConfig {
* Cipher types supported in data-paths constructed in the context of this discovery session. The * Cipher types supported in data-paths constructed in the context of this discovery session. The
* |NanCipherSuiteType| bit fields are used to set this value. * |NanCipherSuiteType| bit fields are used to set this value.
*/ */
uint32_t supportedCipherTypes; bitfield<NanCipherSuiteType> supportedCipherTypes;
/** /**
* Optional PMK for data-paths constructed in the context of this discovery session. A PMK could * Optional PMK for data-paths constructed in the context of this discovery session. A PMK could
* also be provided during the actual construction of the data-path (which allows unique PMKs for * also be provided during the actual construction of the data-path (which allows unique PMKs for
@@ -949,7 +966,7 @@ struct NanDiscoveryCommonConfig {
* The type of ranging indication feedback to be provided by discovery session matches. Use * The type of ranging indication feedback to be provided by discovery session matches. Use
* bit-fields from |NanRangingIndication|. * bit-fields from |NanRangingIndication|.
*/ */
uint32_t configRangingIndications; bitfield<NanRangingIndication> configRangingIndications;
/** /**
* The ingress and egress distance in cm. If ranging is eanbled (|rangingEnabled| is true) then * The ingress and egress distance in cm. If ranging is eanbled (|rangingEnabled| is true) then
* \configRangingIndications\ is used to determine whether ingress and/or egress (or neither) * \configRangingIndications\ is used to determine whether ingress and/or egress (or neither)
@@ -959,23 +976,6 @@ struct NanDiscoveryCommonConfig {
uint32_t distanceEgressCm; uint32_t distanceEgressCm;
}; };
/**
* Cipher suite flags - to be used as a bitmask.
*/
enum NanCipherSuiteType : uint32_t {
SHARED_KEY_128_MASK = 1 << 0,
SHARED_KEY_256_MASK = 1 << 1
};
/**
* Ranging in the context of discovery sessions indication controls - to be used as a bitmask.
*/
enum NanRangingIndication : uint32_t {
CONTINUOUS_INDICATION_MASK = 1 << 0,
INGRESS_MET_MASK = 1 << 1,
EGRESS_MET_MASK = 1 << 2
};
/** /**
* Publish request: specifies a publish discovery operation. * Publish request: specifies a publish discovery operation.
*/ */
@@ -1111,7 +1111,7 @@ struct NanInitiateDataPathRequest {
* Cipher types supported in data-paths constructed in the context of this discovery session. The * Cipher types supported in data-paths constructed in the context of this discovery session. The
* |NanCipherSuiteType| bit fields are used to set this value. * |NanCipherSuiteType| bit fields are used to set this value.
*/ */
uint32_t supportedCipherTypes; bitfield<NanCipherSuiteType> supportedCipherTypes;
/** /**
* PMK of the data-path being requested (if |securityRequired| is true). * PMK of the data-path being requested (if |securityRequired| is true).
* Max length: 32 * Max length: 32
@@ -1150,7 +1150,7 @@ struct NanRespondToDataPathIndicationRequest {
* Cipher types supported in data-paths constructed in the context of this discovery session. The * Cipher types supported in data-paths constructed in the context of this discovery session. The
* |NanCipherSuiteType| bit fields are used to set this value. * |NanCipherSuiteType| bit fields are used to set this value.
*/ */
uint32_t supportedCipherTypes; bitfield<NanCipherSuiteType> supportedCipherTypes;
/** /**
* PMK of the data-path being requested (if |securityRequired| is true). * PMK of the data-path being requested (if |securityRequired| is true).
* Max length: 32 * Max length: 32
@@ -1243,7 +1243,7 @@ struct NanCapabilities {
/** /**
* The set of supported Cipher suites. The |NanCipherSuiteType| bit fields are used. * The set of supported Cipher suites. The |NanCipherSuiteType| bit fields are used.
*/ */
uint32_t supportedCipherSuites; bitfield<NanCipherSuiteType> supportedCipherSuites;
}; };
/** /**
@@ -1294,7 +1294,7 @@ struct NanMatchInd {
* Cipher types supported by the peer for data-paths constructed in the context of this discovery * Cipher types supported by the peer for data-paths constructed in the context of this discovery
* session. The |NanCipherSuiteType| bit fields are used to set this value. * session. The |NanCipherSuiteType| bit fields are used to set this value.
*/ */
uint32_t peerSupportedCipherTypes; bitfield<NanCipherSuiteType> peerSupportedCipherTypes;
/** /**
* Indicates whether or not the peer requires security enabled in any data-path (NDP) constructed * Indicates whether or not the peer requires security enabled in any data-path (NDP) constructed
* in the context of this discovery session. * in the context of this discovery session.
@@ -1327,7 +1327,7 @@ struct NanMatchInd {
* The ranging event(s) which triggered the ranging. Uses bit-fields from |NanRangingIndication|. * The ranging event(s) which triggered the ranging. Uses bit-fields from |NanRangingIndication|.
* E.g. can indicate that continuous ranging is required, or else that an ingress event occurred. * E.g. can indicate that continuous ranging is required, or else that an ingress event occurred.
*/ */
uint32_t rangingIndicationType; bitfield<NanRangingIndication> rangingIndicationType;
}; };
/** /**
@@ -1421,7 +1421,7 @@ struct NanBeaconSdfPayloadInd {
* Frames on which this vendor specific attribute was received. * Frames on which this vendor specific attribute was received.
* Mask |NanVsaRxFrameMask| defined above. * Mask |NanVsaRxFrameMask| defined above.
*/ */
uint8_t vsaReceivedOnFrames; bitfield<NanVsaRxFrameMask> vsaReceivedOnFrames;
/** /**
* Organizationally Unique Identifier (OUI) of the vendor-specific attribute. * Organizationally Unique Identifier (OUI) of the vendor-specific attribute.
*/ */
@@ -1811,12 +1811,12 @@ struct RttCapabilities {
* Bit mask indicates what preamble is supported by initiator. * Bit mask indicates what preamble is supported by initiator.
* Combination of |RttPreamble| values. * Combination of |RttPreamble| values.
*/ */
uint8_t preambleSupport; bitfield<RttPreamble> preambleSupport;
/** /**
* Bit mask indicates what BW is supported by initiator. * Bit mask indicates what BW is supported by initiator.
* Combination of |RttBw| values. * Combination of |RttBw| values.
*/ */
uint8_t bwSupport; bitfield<RttBw> bwSupport;
/** /**
* Draft 11mc spec version supported by chip. * Draft 11mc spec version supported by chip.
* For instance, version 4.0 must be 40 and version 4.3 must be 43 etc. * For instance, version 4.0 must be 40 and version 4.3 must be 43 etc.

View File

@@ -410,10 +410,11 @@ interface ISupplicantP2pIface extends ISupplicantIface {
* |SupplicantStatusCode.SUCCESS|, * |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_UNKNOWN|, * |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID| * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
* @return capabilityMask Combination of |GroupCapabilityMask| values. * @return capabilityMask Combination of |P2pGroupCapabilityMask| values.
*/ */
getGroupCapability(MacAddress peerAddress) getGroupCapability(MacAddress peerAddress)
generates (SupplicantStatus status, uint32_t capabilities); generates (SupplicantStatus status,
bitfield<P2pGroupCapabilityMask> capabilities);
/** /**
* This command can be used to add a bonjour service. * This command can be used to add a bonjour service.

View File

@@ -197,7 +197,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
* |SupplicantStatusCode.FAILURE_UNKNOWN|, * |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID| * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
*/ */
setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status); setKeyMgmt(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status);
/** /**
* Set proto mask for the network. * Set proto mask for the network.
@@ -211,7 +211,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
* |SupplicantStatusCode.FAILURE_UNKNOWN|, * |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID| * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
*/ */
setProto(uint32_t protoMask) generates (SupplicantStatus status); setProto(bitfield<ProtoMask> protoMask) generates (SupplicantStatus status);
/** /**
* Set auth alg mask for the network. * Set auth alg mask for the network.
@@ -225,7 +225,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
* |SupplicantStatusCode.FAILURE_UNKNOWN|, * |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID| * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
*/ */
setAuthAlg(uint32_t authAlgMask) generates (SupplicantStatus status); setAuthAlg(bitfield<AuthAlgMask> authAlgMask) generates (SupplicantStatus status);
/** /**
* Set group cipher mask for the network. * Set group cipher mask for the network.
@@ -239,7 +239,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
* |SupplicantStatusCode.FAILURE_UNKNOWN|, * |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID| * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
*/ */
setGroupCipher(uint32_t groupCipherMask) setGroupCipher(bitfield<GroupCipherMask> groupCipherMask)
generates (SupplicantStatus status); generates (SupplicantStatus status);
/** /**
@@ -254,7 +254,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
* |SupplicantStatusCode.FAILURE_UNKNOWN|, * |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID| * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
*/ */
setPairwiseCipher(uint32_t pairwiseCipherMask) setPairwiseCipher(bitfield<PairwiseCipherMask> pairwiseCipherMask)
generates (SupplicantStatus status); generates (SupplicantStatus status);
/** /**
@@ -568,7 +568,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
* @return keyMgmtMask Combination of |KeyMgmtMask| values. * @return keyMgmtMask Combination of |KeyMgmtMask| values.
*/ */
getKeyMgmt() getKeyMgmt()
generates (SupplicantStatus status, uint32_t keyMgmtMask); generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
/** /**
* Get the proto mask set for the network. * Get the proto mask set for the network.
@@ -579,7 +579,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID| * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
* @return protoMask Combination of |ProtoMask| values. * @return protoMask Combination of |ProtoMask| values.
*/ */
getProto() generates (SupplicantStatus status, uint32_t protoMask); getProto() generates (SupplicantStatus status, bitfield<ProtoMask> protoMask);
/** /**
* Get the auth alg mask set for the network. * Get the auth alg mask set for the network.
@@ -591,7 +591,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
* @return authAlgMask Combination of |AuthAlgMask| values. * @return authAlgMask Combination of |AuthAlgMask| values.
*/ */
getAuthAlg() getAuthAlg()
generates (SupplicantStatus status, uint32_t authAlgMask); generates (SupplicantStatus status, bitfield<AuthAlgMask> authAlgMask);
/** /**
* Get the group cipher mask set for the network. * Get the group cipher mask set for the network.
@@ -603,7 +603,8 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
* @return groupCipherMask Combination of |GroupCipherMask| values. * @return groupCipherMask Combination of |GroupCipherMask| values.
*/ */
getGroupCipher() getGroupCipher()
generates (SupplicantStatus status, uint32_t groupCipherMask); generates (SupplicantStatus status,
bitfield<GroupCipherMask> groupCipherMask);
/** /**
* Get the pairwise cipher mask set for the network. * Get the pairwise cipher mask set for the network.
@@ -615,7 +616,8 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
* @return pairwiseCipherMask Combination of |PairwiseCipherMask| values. * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
*/ */
getPairwiseCipher() getPairwiseCipher()
generates (SupplicantStatus status, uint32_t pairwiseCipherMask); generates (SupplicantStatus status,
bitfield<PairwiseCipherMask> pairwiseCipherMask);
/** /**
* Get passphrase for WPA_PSK network. * Get passphrase for WPA_PSK network.