From 45f15adece65909364df982e2863703decb1bc29 Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 27 Jan 2021 06:00:54 -0800 Subject: [PATCH] fw-api: CL 12694684 - update fw common interface files HTT stats: add PPDU stats RX_MGMTCTRL_PAYLOAD TLV struct + enum defs Change-Id: I89ce530fa83a0888efb764c32b3ea2f2e56eff72 CRs-Fixed: 2262693 --- fw/htt_ppdu_stats.h | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/fw/htt_ppdu_stats.h b/fw/htt_ppdu_stats.h index 3550d7c28a96..4ff2af44f646 100644 --- a/fw/htt_ppdu_stats.h +++ b/fw/htt_ppdu_stats.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -51,6 +51,7 @@ enum htt_ppdu_stats_tlv_tag { HTT_PPDU_STATS_USERS_INFO_TLV, /* htt_ppdu_stats_users_info_tlv */ HTT_PPDU_STATS_USR_MPDU_ENQ_BITMAP_1024_TLV, /* htt_ppdu_stats_enq_mpdu_bitmap_1024_tlv */ HTT_PPDU_STATS_USR_COMPLTN_BA_BITMAP_1024_TLV,/* htt_ppdu_stats_user_compltn_ba_bitmap_1024_tlv */ + HTT_PPDU_STATS_RX_MGMTCTRL_PAYLOAD_TLV, /* htt_ppdu_stats_rx_mgmtctrl_payload_tlv */ /* New TLV's are added above to this line */ HTT_PPDU_STATS_MAX_TAG, @@ -2353,6 +2354,48 @@ typedef struct { A_UINT32 payload[1]; } htt_ppdu_stats_tx_mgmtctrl_payload_tlv; +#define HTT_PPDU_STATS_RX_MGMTCTRL_TLV_FRAME_LENGTH_M 0x0000ffff +#define HTT_PPDU_STATS_RX_MGMTCTRL_TLV_FRAME_LENGTH_S 0 + +#define HTT_PPDU_STATS_RX_MGMTCTRL_TLV_FRAME_LENGTH_GET(_var) \ + (((_var) & HTT_PPDU_STATS_RX_MGMTCTRL_TLV_FRAME_LENGTH_M) >> \ + HTT_PPDU_STATS_RX_MGMTCTRL_TLV_FRAME_LENGTH_S) + +#define HTT_PPDU_STATS_RX_MGMTCTRL_TLV_FRAME_LENGTH_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_RX_MGMTCTRL_TLV_FRAME_LENGTH, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_RX_MGMTCTRL_TLV_FRAME_LENGTH_S)); \ + } while (0) + +typedef struct { + htt_tlv_hdr_t tlv_hdr; + + /* + * BIT [ 15 : 0] :- frame_length (in bytes) + * BIT [ 31 : 16] :- reserved1 + */ + union { + A_UINT32 rsvd__frame_length; + struct { + A_UINT32 frame_length: 16, + reserved1: 16; /* set to 0x0 */ + }; + }; + + /* Future purpose */ + A_UINT32 reserved2; /* set to 0x0 */ + A_UINT32 reserved3; /* set to 0x0 */ + + /* mgmt/ctrl frame payload + * The size of the actual mgmt payload (in bytes) can be obtained from + * the frame_length field. + * The size of entire payload including the padding for alignment + * (in bytes) can be derived from the length in tlv parametes, + * minus the 12 bytes of the above fields. + */ + A_UINT32 payload[1]; +} htt_ppdu_stats_rx_mgmtctrl_payload_tlv; + #define HTT_PPDU_STATS_USERS_INFO_TLV_MAX_USERS_M 0x000000ff #define HTT_PPDU_STATS_USERS_INFO_TLV_MAX_USERS_S 0