summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2016-12-15 22:38:00 -0800
committerRoshan Pius <rpius@google.com>2016-12-16 14:08:30 -0800
commita2d369dd033541e77ca27df9bcfbbf9d7b3e701c (patch)
tree560e5f0f88c366c913c8c0010930ced8dd91281d
parent48185b2a2d267a248001448574905b58ea84845d (diff)
wifi: Add remaining capability flags from legacy HAL
While there, 1. Remove the _SUPPORTED flag from all the capabailities to make it consistent. 2. Correct the docstring for |create*Iface|. Bug: 33673826 Test: Compiles Change-Id: I26f6de3d681dec133b51ba5dd7f21a29c92ea238
-rw-r--r--wifi/1.0/IWifiChip.hal20
-rw-r--r--wifi/1.0/IWifiStaIface.hal24
-rw-r--r--wifi/1.0/default/hidl_struct_util.cpp31
3 files changed, 55 insertions, 20 deletions
diff --git a/wifi/1.0/IWifiChip.hal b/wifi/1.0/IWifiChip.hal
index 72b2c3224c..d790404325 100644
--- a/wifi/1.0/IWifiChip.hal
+++ b/wifi/1.0/IWifiChip.hal
@@ -137,28 +137,28 @@ interface IWifiChip {
/**
* Memory dump of Firmware.
*/
- DEBUG_MEMORY_FIRMWARE_DUMP_SUPPORTED = 1 << 0,
+ DEBUG_MEMORY_FIRMWARE_DUMP = 1 << 0,
/**
* Memory dump of Driver.
*/
- DEBUG_MEMORY_DRIVER_DUMP_SUPPORTED = 1 << 1,
+ DEBUG_MEMORY_DRIVER_DUMP = 1 << 1,
/**
* Connectivity events reported via debug ring buffer.
*/
- DEBUG_RING_BUFFER_CONNECT_EVENT_SUPPORTED = 1 << 2,
+ DEBUG_RING_BUFFER_CONNECT_EVENT = 1 << 2,
/**
* Power events reported via debug ring buffer.
*/
- DEBUG_RING_BUFFER_POWER_EVENT_SUPPORTED = 1 << 3,
+ DEBUG_RING_BUFFER_POWER_EVENT = 1 << 3,
/**
* Wakelock events reported via debug ring buffer.
*/
- DEBUG_RING_BUFFER_WAKELOCK_EVENT_SUPPORTED = 1 << 4,
+ DEBUG_RING_BUFFER_WAKELOCK_EVENT = 1 << 4,
/**
* Vendor data reported via debug ring buffer.
* This mostly contains firmware event logs.
*/
- DEBUG_RING_BUFFER_VENDOR_DATA_SUPPORTED = 1 << 5,
+ DEBUG_RING_BUFFER_VENDOR_DATA = 1 << 5,
/**
* Host wake reasons stats collection.
*/
@@ -292,7 +292,7 @@ interface IWifiChip {
* Create an AP iface on the chip.
*
* Depending on the mode the chip is configured in, the interface creation
- * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
+ * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
* allowed (specified in |ChipIfaceCombination|) number of ifaces of the AP
* type.
*
@@ -352,7 +352,7 @@ interface IWifiChip {
* Create a NAN iface on the chip.
*
* Depending on the mode the chip is configured in, the interface creation
- * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
+ * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
* allowed (specified in |ChipIfaceCombination|) number of ifaces of the NAN
* type.
*
@@ -412,7 +412,7 @@ interface IWifiChip {
* Create a P2P iface on the chip.
*
* Depending on the mode the chip is configured in, the interface creation
- * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
+ * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
* allowed (specified in |ChipIfaceCombination|) number of ifaces of the P2P
* type.
*
@@ -472,7 +472,7 @@ interface IWifiChip {
* Create an STA iface on the chip.
*
* Depending on the mode the chip is configured in, the interface creation
- * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
+ * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
* allowed (specified in |ChipIfaceCombination|) number of ifaces of the STA
* type.
*
diff --git a/wifi/1.0/IWifiStaIface.hal b/wifi/1.0/IWifiStaIface.hal
index 8c7ac4af88..98af043ce2 100644
--- a/wifi/1.0/IWifiStaIface.hal
+++ b/wifi/1.0/IWifiStaIface.hal
@@ -61,9 +61,29 @@ interface IWifiStaIface extends IWifiIface {
*/
SCAN_RAND = 1 << 6,
/**
- * Tracks connection packets' fate.
+ * Support for 5 GHz Band.
*/
- DEBUG_PACKET_FATE_SUPPORTED = 1 << 7
+ STA_5G = 1 << 7,
+ /**
+ * Support for GAS/ANQP queries.
+ */
+ HOTSPOT = 1 << 8,
+ /**
+ * Support for Preferred Network Offload.
+ */
+ PNO = 1 << 9,
+ /**
+ * Support for Tunneled Direct Link Setup.
+ */
+ TDLS = 1 << 10,
+ /**
+ * Support for Tunneled Direct Link Setup off channel.
+ */
+ TDLS_OFFCHANNEL = 1 << 11,
+ /**
+ * Support for tracking connection packets' fate.
+ */
+ DEBUG_PACKET_FATE = 1 << 12
};
/**
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 0aee372f21..a94d812d1a 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -31,15 +31,15 @@ IWifiChip::ChipCapabilityMask convertLegacyLoggerFeatureToHidlChipCapability(
using HidlChipCaps = IWifiChip::ChipCapabilityMask;
switch (feature) {
case legacy_hal::WIFI_LOGGER_MEMORY_DUMP_SUPPORTED:
- return HidlChipCaps::DEBUG_MEMORY_FIRMWARE_DUMP_SUPPORTED;
+ return HidlChipCaps::DEBUG_MEMORY_FIRMWARE_DUMP;
case legacy_hal::WIFI_LOGGER_DRIVER_DUMP_SUPPORTED:
- return HidlChipCaps::DEBUG_MEMORY_DRIVER_DUMP_SUPPORTED;
+ return HidlChipCaps::DEBUG_MEMORY_DRIVER_DUMP;
case legacy_hal::WIFI_LOGGER_CONNECT_EVENT_SUPPORTED:
- return HidlChipCaps::DEBUG_RING_BUFFER_CONNECT_EVENT_SUPPORTED;
+ return HidlChipCaps::DEBUG_RING_BUFFER_CONNECT_EVENT;
case legacy_hal::WIFI_LOGGER_POWER_EVENT_SUPPORTED:
- return HidlChipCaps::DEBUG_RING_BUFFER_POWER_EVENT_SUPPORTED;
+ return HidlChipCaps::DEBUG_RING_BUFFER_POWER_EVENT;
case legacy_hal::WIFI_LOGGER_WAKE_LOCK_SUPPORTED:
- return HidlChipCaps::DEBUG_RING_BUFFER_WAKELOCK_EVENT_SUPPORTED;
+ return HidlChipCaps::DEBUG_RING_BUFFER_WAKELOCK_EVENT;
};
CHECK(false) << "Unknown legacy feature: " << feature;
return {};
@@ -50,7 +50,7 @@ convertLegacyLoggerFeatureToHidlStaIfaceCapability(uint32_t feature) {
using HidlStaIfaceCaps = IWifiStaIface::StaIfaceCapabilityMask;
switch (feature) {
case legacy_hal::WIFI_LOGGER_PACKET_FATE_SUPPORTED:
- return HidlStaIfaceCaps::DEBUG_PACKET_FATE_SUPPORTED;
+ return HidlStaIfaceCaps::DEBUG_PACKET_FATE;
};
CHECK(false) << "Unknown legacy feature: " << feature;
return {};
@@ -72,6 +72,16 @@ convertLegacyFeatureToHidlStaIfaceCapability(uint32_t feature) {
return HidlStaIfaceCaps::PROBE_IE_WHITELIST;
case WIFI_FEATURE_SCAN_RAND:
return HidlStaIfaceCaps::SCAN_RAND;
+ case WIFI_FEATURE_INFRA_5G:
+ return HidlStaIfaceCaps::STA_5G;
+ case WIFI_FEATURE_HOTSPOT:
+ return HidlStaIfaceCaps::HOTSPOT;
+ case WIFI_FEATURE_PNO:
+ return HidlStaIfaceCaps::PNO;
+ case WIFI_FEATURE_TDLS:
+ return HidlStaIfaceCaps::TDLS;
+ case WIFI_FEATURE_TDLS_OFFCHANNEL:
+ return HidlStaIfaceCaps::TDLS_OFFCHANNEL;
};
CHECK(false) << "Unknown legacy feature: " << feature;
return {};
@@ -95,7 +105,7 @@ bool convertLegacyFeaturesToHidlChipCapabilities(
}
// There are no flags for these 3 in the legacy feature set. Adding them to
// the set because all the current devices support it.
- *hidl_caps |= HidlChipCaps::DEBUG_RING_BUFFER_VENDOR_DATA_SUPPORTED;
+ *hidl_caps |= HidlChipCaps::DEBUG_RING_BUFFER_VENDOR_DATA;
*hidl_caps |= HidlChipCaps::DEBUG_HOST_WAKE_REASON_STATS;
*hidl_caps |= HidlChipCaps::DEBUG_ERROR_ALERTS;
return true;
@@ -224,7 +234,12 @@ bool convertLegacyFeaturesToHidlStaCapabilities(
WIFI_FEATURE_RSSI_MONITOR,
WIFI_FEATURE_CONTROL_ROAMING,
WIFI_FEATURE_IE_WHITELIST,
- WIFI_FEATURE_SCAN_RAND}) {
+ WIFI_FEATURE_SCAN_RAND,
+ WIFI_FEATURE_INFRA_5G,
+ WIFI_FEATURE_HOTSPOT,
+ WIFI_FEATURE_PNO,
+ WIFI_FEATURE_TDLS,
+ WIFI_FEATURE_TDLS_OFFCHANNEL}) {
if (feature & legacy_feature_set) {
*hidl_caps |= convertLegacyFeatureToHidlStaIfaceCapability(feature);
}