wifi(interface): Use the "bitfield" type for masks
Change all the variables representing masks to the new bitfield type in all the Wifi HIDL interfaces. The generated code will still produce the underlying type of enum as param. So, no changes are needed in the implementation. Bug: 33358724 Test: Compiles Change-Id: Id2e5dee2ce1f1ec8e744aa1c81d3cb9c66e7fc39
This commit is contained in:
parent
2d50db95b4
commit
5c3a0d9666
5 changed files with 51 additions and 45 deletions
|
@ -205,7 +205,8 @@ interface IWifiChip {
|
|||
* |WifiStatusCode.ERROR_UNKNOWN|
|
||||
* @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.
|
||||
|
|
|
@ -120,7 +120,9 @@ interface IWifiStaIface extends IWifiIface {
|
|||
* |WifiStatusCode.ERROR_UNKNOWN|
|
||||
* @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.
|
||||
|
|
|
@ -254,7 +254,7 @@ struct StaBackgroundScanCapabilities {
|
|||
* Bands that can be specified in Background scan requests.
|
||||
*/
|
||||
enum StaBackgroundScanBand : uint32_t {
|
||||
BAND_UNSPECIFIED,
|
||||
BAND_UNSPECIFIED = 0,
|
||||
/**
|
||||
* 2.4 GHz.
|
||||
*/
|
||||
|
@ -325,10 +325,10 @@ struct StaBackgroundScanBucketParameters {
|
|||
*/
|
||||
uint32_t periodInMs;
|
||||
/**
|
||||
* Bitset of |BackgroundScanBucketEventReportSchemeMask| values controlling
|
||||
* Bitset of |StaBackgroundScanBucketEventReportSchemeMask| values controlling
|
||||
* when events for this bucket must be reported.
|
||||
*/
|
||||
uint32_t eventReportScheme;
|
||||
bitfield<StaBackgroundScanBucketEventReportSchemeMask> eventReportScheme;
|
||||
/**
|
||||
* For exponential back off. If |exponentialMaxPeriodInMs| is non zero or
|
||||
* different than period, then this bucket is an exponential backoff bucket
|
||||
|
@ -503,7 +503,7 @@ struct StaScanData {
|
|||
/**
|
||||
* Bitset containing |ScanDataFlagMask| values.
|
||||
*/
|
||||
uint32_t flags;
|
||||
bitfield<StaScanDataFlagMask> flags;
|
||||
/**
|
||||
* Bitset where each bit indicates if the bucket with that index was
|
||||
* scanned.
|
||||
|
@ -842,6 +842,23 @@ struct NanEnableRequest {
|
|||
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.
|
||||
*/
|
||||
|
@ -921,7 +938,7 @@ struct NanDiscoveryCommonConfig {
|
|||
* Cipher types supported in data-paths constructed in the context of this discovery session. The
|
||||
* |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
|
||||
* 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
|
||||
* 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
|
||||
* \configRangingIndications\ is used to determine whether ingress and/or egress (or neither)
|
||||
|
@ -959,23 +976,6 @@ struct NanDiscoveryCommonConfig {
|
|||
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.
|
||||
*/
|
||||
|
@ -1111,7 +1111,7 @@ struct NanInitiateDataPathRequest {
|
|||
* Cipher types supported in data-paths constructed in the context of this discovery session. The
|
||||
* |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).
|
||||
* Max length: 32
|
||||
|
@ -1150,7 +1150,7 @@ struct NanRespondToDataPathIndicationRequest {
|
|||
* Cipher types supported in data-paths constructed in the context of this discovery session. The
|
||||
* |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).
|
||||
* Max length: 32
|
||||
|
@ -1243,7 +1243,7 @@ struct NanCapabilities {
|
|||
/**
|
||||
* 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
|
||||
* 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
|
||||
* 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|.
|
||||
* 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.
|
||||
* Mask |NanVsaRxFrameMask| defined above.
|
||||
*/
|
||||
uint8_t vsaReceivedOnFrames;
|
||||
bitfield<NanVsaRxFrameMask> vsaReceivedOnFrames;
|
||||
/**
|
||||
* Organizationally Unique Identifier (OUI) of the vendor-specific attribute.
|
||||
*/
|
||||
|
@ -1811,12 +1811,12 @@ struct RttCapabilities {
|
|||
* Bit mask indicates what preamble is supported by initiator.
|
||||
* Combination of |RttPreamble| values.
|
||||
*/
|
||||
uint8_t preambleSupport;
|
||||
bitfield<RttPreamble> preambleSupport;
|
||||
/**
|
||||
* Bit mask indicates what BW is supported by initiator.
|
||||
* Combination of |RttBw| values.
|
||||
*/
|
||||
uint8_t bwSupport;
|
||||
bitfield<RttBw> bwSupport;
|
||||
/**
|
||||
* Draft 11mc spec version supported by chip.
|
||||
* For instance, version 4.0 must be 40 and version 4.3 must be 43 etc.
|
||||
|
|
|
@ -410,10 +410,11 @@ interface ISupplicantP2pIface extends ISupplicantIface {
|
|||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
* @return capabilityMask Combination of |GroupCapabilityMask| values.
|
||||
* @return capabilityMask Combination of |P2pGroupCapabilityMask| values.
|
||||
*/
|
||||
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.
|
||||
|
|
|
@ -197,7 +197,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
|
|||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status);
|
||||
setKeyMgmt(bitfield<KeyMgmtMask> keyMgmtMask) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set proto mask for the network.
|
||||
|
@ -211,7 +211,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
|
|||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |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.
|
||||
|
@ -225,7 +225,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
|
|||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |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.
|
||||
|
@ -239,7 +239,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
|
|||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setGroupCipher(uint32_t groupCipherMask)
|
||||
setGroupCipher(bitfield<GroupCipherMask> groupCipherMask)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
|
@ -254,7 +254,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
|
|||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setPairwiseCipher(uint32_t pairwiseCipherMask)
|
||||
setPairwiseCipher(bitfield<PairwiseCipherMask> pairwiseCipherMask)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
|
@ -568,7 +568,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
|
|||
* @return keyMgmtMask Combination of |KeyMgmtMask| values.
|
||||
*/
|
||||
getKeyMgmt()
|
||||
generates (SupplicantStatus status, uint32_t keyMgmtMask);
|
||||
generates (SupplicantStatus status, bitfield<KeyMgmtMask> keyMgmtMask);
|
||||
|
||||
/**
|
||||
* Get the proto mask set for the network.
|
||||
|
@ -579,7 +579,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
|
|||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @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.
|
||||
|
@ -591,7 +591,7 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
|
|||
* @return authAlgMask Combination of |AuthAlgMask| values.
|
||||
*/
|
||||
getAuthAlg()
|
||||
generates (SupplicantStatus status, uint32_t authAlgMask);
|
||||
generates (SupplicantStatus status, bitfield<AuthAlgMask> authAlgMask);
|
||||
|
||||
/**
|
||||
* Get the group cipher mask set for the network.
|
||||
|
@ -603,7 +603,8 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
|
|||
* @return groupCipherMask Combination of |GroupCipherMask| values.
|
||||
*/
|
||||
getGroupCipher()
|
||||
generates (SupplicantStatus status, uint32_t groupCipherMask);
|
||||
generates (SupplicantStatus status,
|
||||
bitfield<GroupCipherMask> groupCipherMask);
|
||||
|
||||
/**
|
||||
* Get the pairwise cipher mask set for the network.
|
||||
|
@ -615,7 +616,8 @@ interface ISupplicantStaNetwork extends ISupplicantNetwork {
|
|||
* @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
|
||||
*/
|
||||
getPairwiseCipher()
|
||||
generates (SupplicantStatus status, uint32_t pairwiseCipherMask);
|
||||
generates (SupplicantStatus status,
|
||||
bitfield<PairwiseCipherMask> pairwiseCipherMask);
|
||||
|
||||
/**
|
||||
* Get passphrase for WPA_PSK network.
|
||||
|
|
Loading…
Reference in a new issue