Merge "Add script to generate all *-base.h's."
diff --git a/light/2.0/vts/functional/Android.bp b/light/2.0/vts/functional/Android.bp
index b290b59..edb5ca9 100644
--- a/light/2.0/vts/functional/Android.bp
+++ b/light/2.0/vts/functional/Android.bp
@@ -26,8 +26,12 @@
],
static_libs: ["libgtest"],
cflags: [
+ "--coverage",
"-O0",
"-g",
],
+ ldflags: [
+ "--coverage"
+ ]
}
diff --git a/tests/baz/1.0/IBaz.hal b/tests/baz/1.0/IBaz.hal
index c8fe2b6..36d79cd 100644
--- a/tests/baz/1.0/IBaz.hal
+++ b/tests/baz/1.0/IBaz.hal
@@ -55,4 +55,6 @@
haveAStringVec(vec<string> vector) generates (vec<string> result);
returnABunchOfStrings() generates (string a, string b, string c);
+
+ returnABitField() generates (bitfield<BitField> good);
};
diff --git a/update-makefiles.sh b/update-makefiles.sh
index 0f89dfc..f153a84 100755
--- a/update-makefiles.sh
+++ b/update-makefiles.sh
@@ -5,6 +5,11 @@
exit 1;
fi
+if [ ! -d system/libhidl/transport ] ; then
+ echo "Where is system/libhidl/transport?";
+ exit 1;
+fi
+
packages=$(pushd hardware/interfaces > /dev/null; \
find . -type f -name \*.hal -exec dirname {} \; | sort -u | \
cut -c3- | \
diff --git a/wifi/1.0/default/wifi_chip.cpp b/wifi/1.0/default/wifi_chip.cpp
index 4f3c192..af19491 100644
--- a/wifi/1.0/default/wifi_chip.cpp
+++ b/wifi/1.0/default/wifi_chip.cpp
@@ -465,7 +465,9 @@
}
std::pair<WifiStatus, sp<IWifiApIface>> WifiChip::createApIfaceInternal() {
- // TODO(b/31997422): Disallow this based on the chip combination.
+ if (current_mode_id_ != kApChipModeId || ap_iface_.get()) {
+ return {createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE), {}};
+ }
std::string ifname = legacy_hal_.lock()->getApIfaceName();
ap_iface_ = new WifiApIface(ifname, legacy_hal_);
return {createWifiStatus(WifiStatusCode::SUCCESS), ap_iface_};
@@ -490,7 +492,11 @@
}
std::pair<WifiStatus, sp<IWifiNanIface>> WifiChip::createNanIfaceInternal() {
- // TODO(b/31997422): Disallow this based on the chip combination.
+ // Only 1 of NAN or P2P iface can be active at a time.
+ if (current_mode_id_ != kStaChipModeId || nan_iface_.get() ||
+ p2p_iface_.get()) {
+ return {createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE), {}};
+ }
std::string ifname = legacy_hal_.lock()->getNanIfaceName();
nan_iface_ = new WifiNanIface(ifname, legacy_hal_);
return {createWifiStatus(WifiStatusCode::SUCCESS), nan_iface_};
@@ -515,7 +521,11 @@
}
std::pair<WifiStatus, sp<IWifiP2pIface>> WifiChip::createP2pIfaceInternal() {
- // TODO(b/31997422): Disallow this based on the chip combination.
+ // Only 1 of NAN or P2P iface can be active at a time.
+ if (current_mode_id_ != kStaChipModeId || p2p_iface_.get() ||
+ nan_iface_.get()) {
+ return {createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE), {}};
+ }
std::string ifname = legacy_hal_.lock()->getP2pIfaceName();
p2p_iface_ = new WifiP2pIface(ifname, legacy_hal_);
return {createWifiStatus(WifiStatusCode::SUCCESS), p2p_iface_};
@@ -540,7 +550,9 @@
}
std::pair<WifiStatus, sp<IWifiStaIface>> WifiChip::createStaIfaceInternal() {
- // TODO(b/31997422): Disallow this based on the chip combination.
+ if (current_mode_id_ != kStaChipModeId || sta_iface_.get()) {
+ return {createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE), {}};
+ }
std::string ifname = legacy_hal_.lock()->getStaIfaceName();
sta_iface_ = new WifiStaIface(ifname, legacy_hal_);
return {createWifiStatus(WifiStatusCode::SUCCESS), sta_iface_};
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIface.hal b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
index 48a4f5b..0cdac2d 100644
--- a/wifi/supplicant/1.0/ISupplicantP2pIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
@@ -37,11 +37,7 @@
/**
* Keypad pin method configuration - pin is entered on device.
*/
- KEYPAD,
- /**
- * Label pin method configuration - pin is labelled on device.
- */
- LABEL
+ KEYPAD
};
enum GroupCapabilityMask : uint32_t {
@@ -55,6 +51,15 @@
};
/**
+ * Use to specify a range of frequencies.
+ * For example: 2412-2432,2462,5000-6000, etc.
+ */
+ struct FreqRange {
+ uint32_t min;
+ uint32_t max;
+ };
+
+ /**
* Register for callbacks from this interface.
*
* These callbacks are invoked for events that are specific to this interface.
@@ -97,7 +102,7 @@
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
*/
- setSsidPostfix(string postfix) generates (SupplicantStatus status);
+ setSsidPostfix(vec<uint8_t> postfix) generates (SupplicantStatus status);
/**
* Set the Maximum idle time in seconds for P2P groups.
@@ -106,6 +111,7 @@
* associated stations in the group. As a P2P client, this means no
* group owner seen in scan results.
*
+ * @param groupIfName Group interface name to use.
* @param timeoutInSec Timeout value in seconds.
* @return status Status of the operation.
* Possible status codes:
@@ -113,11 +119,13 @@
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
*/
- setGroupIdle(uint32_t timeoutInSec) generates (SupplicantStatus status);
+ setGroupIdle(string groupIfName, uint32_t timeoutInSec)
+ generates (SupplicantStatus status);
/**
* Turn on/off power save mode for the interface.
*
+ * @param groupIfName Group interface name to use.
* @param enable Indicate if power save is to be turned on/off.
* @return status Status of the operation.
* Possible status codes:
@@ -126,7 +134,8 @@
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
* |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
*/
- setPowerSave(bool enable) generates (SupplicantStatus status);
+ setPowerSave(string groupIfName, bool enable)
+ generates (SupplicantStatus status);
/**
* Initiate a P2P service discovery with an optional timeout.
@@ -192,11 +201,11 @@
*/
connect(MacAddress peerAddress,
WpsProvisionMethod provisionMethod,
- vec<uint8_t> preSelectedPin,
+ string preSelectedPin,
bool joinExistingGroup,
bool persistent,
uint32_t goIntent)
- generates (SupplicantStatus status, vec<uint8_t> generatedPin);
+ generates (SupplicantStatus status, string generatedPin);
/**
* Cancel an ongoing P2P group formation and joining-a-group related
@@ -358,6 +367,21 @@
generates (SupplicantStatus status);
/**
+ * Set P2P disallowed frequency ranges.
+ *
+ * Specify ranges of frequencies that are disallowed for any p2p operations.
+
+ * @param ranges List of ranges which needs to be disallowed.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+ */
+ setDisallowedFrequencies(vec<FreqRange> ranges)
+ generates (SupplicantStatus status);
+
+ /**
* Gets the operational SSID of the device.
*
* @param peerAddress MAC address of the peer.
diff --git a/wifi/supplicant/1.0/ISupplicantStaIface.hal b/wifi/supplicant/1.0/ISupplicantStaIface.hal
index 868758e..31706cd 100644
--- a/wifi/supplicant/1.0/ISupplicantStaIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaIface.hal
@@ -28,7 +28,7 @@
* Access Network Query Protocol info ID elements
* for IEEE Std 802.11u-2011.
*/
- enum AnqpInfoId : uint32_t {
+ enum AnqpInfoId : uint16_t {
VENUE_NAME = 258,
ROAMING_CONSORTIUM = 261,
IP_ADDR_TYPE_AVAILABILITY = 262,
@@ -42,7 +42,7 @@
* for Hotspot 2.0.
*/
enum Hs20AnqpSubtypes : uint32_t {
- OPERATOR_FRIENDLY_NAME = 2,
+ OPERATOR_FRIENDLY_NAME = 3,
WAN_METRICS = 4,
CONNECTION_CAPABILITY = 5,
OSU_PROVIDERS_LIST = 8,