wlan: Add Per packet stats.

As part of Per packet stats, periodical stats such
as data rate, rssi, seq. number, number of retries
etc would be sent to wifi hal layer for debugging.

Change-Id: I20651f38589abf031f04392f4c93d3511bdb3403
CRs-Fixed: 915570
diff --git a/riva/inc/wlan_hal_msg.h b/riva/inc/wlan_hal_msg.h
index a55950e..c3d332e 100644
--- a/riva/inc/wlan_hal_msg.h
+++ b/riva/inc/wlan_hal_msg.h
@@ -801,7 +801,8 @@
     HAL_GLOBAL_CLASS_B_STATS_INFO    = 0x00000004,
     HAL_GLOBAL_CLASS_C_STATS_INFO    = 0x00000008,
     HAL_GLOBAL_CLASS_D_STATS_INFO    = 0x00000010,
-    HAL_PER_STA_STATS_INFO           = 0x00000020
+    HAL_PER_STA_STATS_INFO           = 0x00000020,
+    HAL_PER_TX_PKT_STATS_INFO        = 0x00000040
 }eHalStatsMask;
 
 /* BT-AMP events type */
@@ -825,6 +826,7 @@
     PE_GLOBAL_CLASS_C_STATS_INFO    = 0x00000008,
     PE_GLOBAL_CLASS_D_STATS_INFO    = 0x00000010,
     PE_PER_STA_STATS_INFO           = 0x00000020,
+    PE_PER_TX_PKT_STATS_INFO        = 0x00000040,
     PE_STATS_TYPE_MAX = WLAN_HAL_MAX_ENUM_SIZE //This and beyond are invalid values
 }ePEStatsMask;
 
@@ -3212,6 +3214,15 @@
                                     //is transmitted
 }tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
 
+// The following stats are averaged over the time between two consecutive GET_STATS_REQ messages.
+typedef PACKED_PRE struct PACKED_POST
+{
+    tANI_U32 lastTxRate;           // 802.11 data rate at which the last data frame is transmitted.
+    tANI_U8  txAvgRetry;           // Average number of retries per 10 packets.
+    tANI_U32 reserved;
+    tANI_U32 reserved1;
+}tAniPerTxPktStatsInfo, *tpAniPerTxPktStatsInfo;
+
 typedef PACKED_PRE struct PACKED_POST
 {
    /* Success or Failure */
@@ -6783,6 +6794,7 @@
     ENHANCED_TXBD_COMPLETION = 54,
     LOGGING_ENHANCEMENT    = 55,
     MEMORY_DUMP_SUPPORTED  = 57,
+    PER_PKT_STATS_SUPPORTED  = 58,
     MAX_FEATURE_SUPPORTED  = 128,
 } placeHolderInCapBitmap;