wifi(interface): Add wifi host debug wake up reason stats
These stats are used to determine if the device is being woken up frequently by the wlan chipset. The stats structure describe all the various resons for which the host was woken up by the wlan chipset (firmware). Bug: 32221997 Test: ./hardware/interfaces/update-makefiles.sh Change-Id: Id52915348fef0283affcd834c6f1db5055e54ace
This commit is contained in:
parent
fe9ad36cb2
commit
e0724f98b0
3 changed files with 265 additions and 0 deletions
|
@ -1542,6 +1542,74 @@ $(GEN): $(LOCAL_PATH)/types.hal
|
|||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WifiDebugHostWakeReasonRxIcmpPacketDetails)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/WifiDebugHostWakeReasonRxIcmpPacketDetails.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.WifiDebugHostWakeReasonRxIcmpPacketDetails
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WifiDebugHostWakeReasonRxMulticastPacketDetails)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/WifiDebugHostWakeReasonRxMulticastPacketDetails.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.WifiDebugHostWakeReasonRxMulticastPacketDetails
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WifiDebugHostWakeReasonRxPacketDetails)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/WifiDebugHostWakeReasonRxPacketDetails.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.WifiDebugHostWakeReasonRxPacketDetails
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WifiDebugHostWakeReasonStats)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/WifiDebugHostWakeReasonStats.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.WifiDebugHostWakeReasonStats
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WifiDebugPacketFateFrameInfo)
|
||||
#
|
||||
|
@ -3769,6 +3837,74 @@ $(GEN): $(LOCAL_PATH)/types.hal
|
|||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WifiDebugHostWakeReasonRxIcmpPacketDetails)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/WifiDebugHostWakeReasonRxIcmpPacketDetails.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.WifiDebugHostWakeReasonRxIcmpPacketDetails
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WifiDebugHostWakeReasonRxMulticastPacketDetails)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/WifiDebugHostWakeReasonRxMulticastPacketDetails.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.WifiDebugHostWakeReasonRxMulticastPacketDetails
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WifiDebugHostWakeReasonRxPacketDetails)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/WifiDebugHostWakeReasonRxPacketDetails.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.WifiDebugHostWakeReasonRxPacketDetails
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WifiDebugHostWakeReasonStats)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/WifiDebugHostWakeReasonStats.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.WifiDebugHostWakeReasonStats
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (WifiDebugPacketFateFrameInfo)
|
||||
#
|
||||
|
|
|
@ -159,6 +159,10 @@ interface IWifiChip {
|
|||
* This mostly contains firmware event logs.
|
||||
*/
|
||||
DEBUG_RING_BUFFER_VENDOR_DATA_SUPPORTED = 1 << 5,
|
||||
/**
|
||||
* Host wake reasons stats collection.
|
||||
*/
|
||||
DEBUG_HOST_WAKE_REASON_STATS = 1 << 6,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -558,4 +562,22 @@ interface IWifiChip {
|
|||
* |WifiStatusCode.UNKNOWN|
|
||||
*/
|
||||
forceDumpToDebugRingBuffer(string ringName) generates (WifiStatus status);
|
||||
|
||||
/**
|
||||
* API to retrieve the wifi wake up reason stats for debugging.
|
||||
* The driver is expected to start maintaining these stats once the chip
|
||||
* is configured using |configureChip|. These stats must be reset whenever
|
||||
* the chip is reconfigured or the HAL is stopped.
|
||||
*
|
||||
* @return status WifiStatus of the operation.
|
||||
* Possible status codes:
|
||||
* |WifiStatusCode.SUCCESS|,
|
||||
* |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
|
||||
* |WifiStatusCode.ERROR_NOT_SUPPORTED|,
|
||||
* |WifiStatusCode.NOT_AVAILABLE|,
|
||||
* |WifiStatusCode.UNKNOWN|
|
||||
* @return stats Instance of |WifiDebugHostWakeReasonStats|.
|
||||
*/
|
||||
getDebugHostWakeReasonStats()
|
||||
generates (WifiStatus status, WifiDebugHostWakeReasonStats stats);
|
||||
};
|
||||
|
|
|
@ -3063,3 +3063,110 @@ struct WifiDebugRxPacketFateReport {
|
|||
WifiDebugRxPacketFate fate;
|
||||
WifiDebugPacketFateFrameInfo frameInfo;
|
||||
};
|
||||
|
||||
/**
|
||||
* Struct capturing the count of all rx packets that caused
|
||||
* host wakeup.
|
||||
*/
|
||||
struct WifiDebugHostWakeReasonRxPacketDetails {
|
||||
/**
|
||||
* Total rx unicast packet which woke up host.
|
||||
*/
|
||||
uint32_t rxUnicastCnt;
|
||||
/**
|
||||
* Total rx multicast packet which woke up host.
|
||||
*/
|
||||
uint32_t rxMulticastCnt;
|
||||
/**
|
||||
* Total rx broadcast packet which woke up host.
|
||||
*/
|
||||
uint32_t rxBroadcastCnt;
|
||||
};
|
||||
|
||||
/**
|
||||
* Struct capturing the count of all rx multicast packets that caused
|
||||
* host wakeup.
|
||||
*/
|
||||
struct WifiDebugHostWakeReasonRxMulticastPacketDetails {
|
||||
/**
|
||||
* Rx wake packet was ipv4 multicast.
|
||||
*/
|
||||
uint32_t ipv4RxMulticastAddrCnt;
|
||||
/**
|
||||
* Rx wake packet was ipv6 multicast.
|
||||
*/
|
||||
uint32_t ipv6RxMulticastAddrCnt;
|
||||
/**
|
||||
* Rx wake packet was non-ipv4 and non-ipv6.
|
||||
*/
|
||||
uint32_t otherRxMulticastAddrCnt;
|
||||
};
|
||||
|
||||
/**
|
||||
* Struct capturing the count of all rx ICMP packets that caused
|
||||
* host wakeup.
|
||||
*/
|
||||
struct WifiDebugHostWakeReasonRxIcmpPacketDetails {
|
||||
/**
|
||||
* Wake icmp packet count.
|
||||
*/
|
||||
uint32_t icmpPkt;
|
||||
/**
|
||||
* Wake icmp6 packet count.
|
||||
*/
|
||||
uint32_t icmp6Pkt;
|
||||
/**
|
||||
* Wake icmp6 RA packet count.
|
||||
*/
|
||||
uint32_t icmp6Ra;
|
||||
/**
|
||||
* Wake icmp6 NA packet count.
|
||||
*/
|
||||
uint32_t icmp6Na;
|
||||
/**
|
||||
* Wake icmp6 NS packet count.
|
||||
*/
|
||||
uint32_t icmp6Ns;
|
||||
};
|
||||
|
||||
/**
|
||||
* Structure capturing the count of all the wireless related host wakeup.
|
||||
* This is used to capture all the reasons why the host processor
|
||||
* (WLAN driver) was woken up by the WLAN firmware.
|
||||
* These stats may be used to debug any power issues caused due to frequent
|
||||
* wakeup of the host processor by the WLAN firmware.
|
||||
*/
|
||||
struct WifiDebugHostWakeReasonStats {
|
||||
/**
|
||||
* Total count of cmd/event wakes.
|
||||
* These must account for all wakeups due to WLAN management
|
||||
* commands/events received over the air.
|
||||
*/
|
||||
uint32_t totalCmdEventWakeCnt;
|
||||
/**
|
||||
* Vector of wake counts per cmd/event type.
|
||||
* The number of command types and their meaning is only understood by the
|
||||
* vendor.
|
||||
*/
|
||||
vec<uint32_t> cmdEventWakeCntPerType;
|
||||
/**
|
||||
* Total count of drive/fw wakes.
|
||||
* These must account for all wakeups due to local driver/firmware
|
||||
* interactions. These include all vendor implementation specific
|
||||
* interactions like any heart-beat monitoring, Bus management, etc.
|
||||
*/
|
||||
uint32_t totalDriverFwLocalWakeCnt;
|
||||
/**
|
||||
* Vector of wake counts per driver/firmware interaction type.
|
||||
* The number of command types and their meaning is only understood by the
|
||||
* vendor.
|
||||
*/
|
||||
vec<uint32_t> driverFwLocalWakeCntPerType;
|
||||
/**
|
||||
* Total data rx packets, that woke up host.
|
||||
*/
|
||||
uint32_t totalRxPacketWakeCnt;
|
||||
WifiDebugHostWakeReasonRxPacketDetails rxPktWakeDetails;
|
||||
WifiDebugHostWakeReasonRxMulticastPacketDetails rxMulticastPkWakeDetails;
|
||||
WifiDebugHostWakeReasonRxIcmpPacketDetails rxIcmpPkWakeDetails;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue