From cf5877a0d8321c6ed748fe0d17ad3a34045f4f90 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Tue, 22 Mar 2016 09:18:37 -0700 Subject: [PATCH] Add max tx levels to radio_stats Add a max tx level which the framework uses to limit the array and is needed to guard against unitialized value in |num_tx_levels|. BUG: 27227497 Change-Id: I2438bc1536c65a2c6230bfd6e1267532d9653c8b --- include/hardware_legacy/link_layer_stats.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hardware_legacy/link_layer_stats.h b/include/hardware_legacy/link_layer_stats.h index 281e6e5..a75804d 100644 --- a/include/hardware_legacy/link_layer_stats.h +++ b/include/hardware_legacy/link_layer_stats.h @@ -82,6 +82,9 @@ typedef struct { u32 cca_busy_time; // msecs the CCA register is busy (32 bits number accruing over time) } wifi_channel_stat; +// Max number of tx power levels. The actual number vary per device and is specified by |num_tx_levels| +#define RADIO_STAT_MAX_TX_LEVELS 64 + /* radio statistics */ typedef struct { wifi_radio radio; // wifi radio (if multiple radio supported) -- 2.11.0