fw-api: CL 6431411 - update fw common interface files

fix HTT_PPDU_STATS_SEQ_TYPE start val; clean up HTT stats defs used w. pktlog
The HTT_PPDU_STATS_SEQ_TYPE enum values currently start with 0, which results in an inability to distinguish between the ppdu_seq_type not being specified (and thus defaulting to 0x0), versus being specified as HTT_SEQTYPE_SU, which currently has a value of 0.This change introduces a HTT_SEQTYPE_UNSPECIFIED = 0 enum value, and adds 1 to all current enum values.This change is not backwards compatible, but this is acceptable because neither host SW nor target FW have started using these new HTT_PDDU_STATS_SEQ_TYPE enums yet.This change also makes the following clean-ups within the HTT stats defs that are used within pktlog logging: Add htt_t2h_ppdu_stats_ind_hdr_t struct def (for use within FW, where endianness is known).Provide a struct def for the initial, non-HW dependent part of htt_ppdu_stats_sch_cmd_tlv_v.Change the array elements in htt_ppdu_stats_usr_common_array_tlv_v from A_UINT32 to htt_tx_ppdu_stats_info.Use union to show tag and length bitfields wtihin tag__length A_UINT32 field of htt_tlv_hdr_t.

Change-Id: If8c4dc098a870c01cbdd6d1aeef10fb3542f1ea2
CRs-Fixed: 2262693
This commit is contained in:
spuligil 2019-02-04 04:18:28 -08:00
commit 950638560b
3 changed files with 82 additions and 22 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -10333,6 +10333,27 @@ enum htt_dbg_ext_stats_status {
(((word) & HTT_T2H_PPDU_STATS_PPDU_ID_M) >> \
HTT_T2H_PPDU_STATS_PPDU_ID_S)
/* htt_t2h_ppdu_stats_ind_hdr_t
* This struct contains the fields within the header of the
* HTT_T2H_PPDU_STATS_IND message, preceding the type-specific
* stats info.
* This struct assumes little-endian layout, and thus is only
* suitable for use within processors known to be little-endian
* (such as the target).
* In contrast, the above macros provide endian-portable methods
* to get and set the bitfields within this PPDU_STATS_IND header.
*/
typedef struct {
A_UINT32 msg_type: 8, /* bits 7:0 */
mac_id: 2, /* bits 9:8 */
pdev_id: 2, /* bits 11:10 */
reserved1: 4, /* bits 15:12 */
payload_size: 16; /* bits 31:16 */
A_UINT32 ppdu_id;
A_UINT32 timestamp_us;
A_UINT32 reserved2;
} htt_t2h_ppdu_stats_ind_hdr_t;
/**
* @brief target -> host extended statistics upload
*

View file

@ -234,15 +234,39 @@ typedef struct {
* tx_ppdu_stats_info is variable length, with length =
* number_of_ppdu_stats * sizeof (struct htt_tx_ppdu_stats_info)
*/
A_UINT32 tx_ppdu_stats_info[1/*number_of_ppdu_stats*/];
struct htt_tx_ppdu_stats_info tx_ppdu_stats_info[1/*number_of_ppdu_stats*/];
} htt_ppdu_stats_usr_common_array_tlv_v;
typedef struct {
htt_tlv_hdr_t tlv_hdr;
#define HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT \
struct { \
htt_tlv_hdr_t tlv_hdr; \
/* Refer bmi_msg.h */ \
A_UINT32 target_type; \
}
/* Refer bmi_msg.h */
A_UINT32 target_type;
A_UINT32 hw[1]; /* Variable length, refer to struct scheduler_cmd_status */
typedef HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT htt_ppdu_stats_sch_cmd_tlv_hdr_t;
typedef struct {
/*
* Use a union to allow the HW-independent header portion of this struct
* to be accessed either within a hdr struct, or directly within the
* htt_ppdu_stats_sch_cmd_tlv_v struct.
* For example, the target_type field can be accessed either as
* htt_ppdu_stats_sch_cmd_tlv_v.target_type
* or
* htt_ppdu_stats_sch_cmd_tlv_v.hdr.target_type
*/
union {
htt_ppdu_stats_sch_cmd_tlv_hdr_t hdr;
HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT;
};
/*
* The hw portion of this struct contains a scheduler_command_status
* struct, whose definition is different for different target HW types.
* The target_type field within the header can, if set correctly,
* clarify which definition of scheduler_command_status is being used.
*/
A_UINT32 hw[1];
} htt_ppdu_stats_sch_cmd_tlv_v;
#define HTT_PPDU_STATS_COMMON_TLV_SCH_CMDID_M 0x0000ffff
@ -369,15 +393,16 @@ enum HTT_PPDU_STATS_BW {
typedef enum HTT_PPDU_STATS_BW HTT_PPDU_STATS_BW;
enum HTT_PPDU_STATS_SEQ_TYPE {
HTT_SEQTYPE_SU = 0,
HTT_SEQTYPE_AC_MU_MIMO = 1,
HTT_SEQTYPE_AX_MU_MIMO = 2,
HTT_SEQTYPE_MU_OFDMA = 3,
HTT_SEQTYPE_UL_TRIG = 4,
HTT_SEQTYPE_BURST_BCN = 5,
HTT_SEQTYPE_UL_BSR_RESP = 6,
HTT_SEQTYPE_UL_BSR_TRIG = 7,
HTT_SEQTYPE_UL_RESP = 8,
HTT_SEQTYPE_UNSPECIFIED = 0,
HTT_SEQTYPE_SU = 1,
HTT_SEQTYPE_AC_MU_MIMO = 2,
HTT_SEQTYPE_AX_MU_MIMO = 3,
HTT_SEQTYPE_MU_OFDMA = 4,
HTT_SEQTYPE_UL_TRIG = 5,
HTT_SEQTYPE_BURST_BCN = 6,
HTT_SEQTYPE_UL_BSR_RESP = 7,
HTT_SEQTYPE_UL_BSR_TRIG = 8,
HTT_SEQTYPE_UL_RESP = 9,
};
typedef enum HTT_PPDU_STATS_SEQ_TYPE HTT_PPDU_STATS_SEQ_TYPE;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019 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
@ -393,11 +393,25 @@ typedef enum {
} while (0)
typedef struct {
/* BIT [11 : 0] :- tag
* BIT [23 : 12] :- length
* BIT [31 : 24] :- reserved
*/
A_UINT32 tag__length;
union {
/* BIT [11 : 0] :- tag
* BIT [23 : 12] :- length
* BIT [31 : 24] :- reserved
*/
A_UINT32 tag__length;
/*
* The following struct is not endian-portable.
* It is suitable for use within the target, which is known to be
* little-endian.
* The host should use the above endian-portable macros to access
* the tag and length bitfields in an endian-neutral manner.
*/
struct {
A_UINT32 tag: 12, /* BIT [11 : 0] */
length: 12, /* BIT [23 : 12] */
reserved: 8; /* BIT [31 : 24] */
};
};
} htt_tlv_hdr_t;
#define HTT_STATS_MAX_STRING_SZ32 4