Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6b0cbc9 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 44449813 on remote branch

Change-Id: I6eed62b055583cd66d3d218d3293647fe10e72b0
parents 8cb65e1e 44449813
Loading
Loading
Loading
Loading
+5564 −3293

File changed.

Preview size limit exceeded, changes collapsed.

+131 −20
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -612,6 +612,58 @@ typedef enum HTT_PPDU_STATS_SPATIAL_REUSE HTT_PPDU_STATS_SPATIAL_REUSE;
            ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_BSS_COLOR_ID_S)); \
    } while (0)

#define HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_VALID_M     0x00020000
#define HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_VALID_S             17

#define HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_VALID_GET(_var) \
    (((_var) & HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_VALID_M) >> \
    HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_VALID_S)

#define HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_VALID_SET(_var, _val) \
    do { \
        HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_VALID, _val); \
        ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_VALID_S)); \
    } while (0)

#define HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_M     0x000c0000
#define HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_S             18

#define HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_GET(_var) \
    (((_var) & HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_M) >> \
    HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_S)

#define HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_SET(_var, _val) \
    do { \
        HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_AC_VALID, _val); \
        ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_BACKOFF_AC_S)); \
    } while (0)

#define HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_VALID_M     0x00100000
#define HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_VALID_S             20

#define HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_VALID_GET(_var) \
    (((_var) & HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_VALID_M) >> \
    HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_VALID_S)

#define HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_VALID_SET(_var, _val) \
    do { \
        HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_VALID, _val); \
        ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_VALID_S)); \
    } while (0)

#define HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_M     0x1fe00000
#define HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_S             21

#define HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_GET(_var) \
    (((_var) & HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_M) >> \
    HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_S)

#define HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_SET(_var, _val) \
    do { \
        HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_VALID, _val); \
        ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_NUM_UL_USER_RESPONSES_S)); \
    } while (0)

#define HTT_PPDU_STATS_COMMON_TRIG_COOKIE_M    0x0000ffff
#define HTT_PPDU_STATS_COMMON_TRIG_COOKIE_S    0

@@ -760,9 +812,22 @@ typedef struct {
     *               by which SRG/Non-SRG based spatial reuse opportunity
     *               was created.
     * BIT [16:16] - PPDU transmitted using PSR opportunity
     * BIT [31:17] - reserved
     * BIT [17:17] - backoff_ac_valid
     * BIT [19:18] - backoff_ac: WMM ACI Value of the backoff engine used for
     *               this transmission. Only valid if backoff_ac_valid is set
     *               to 1. Typically this would match the default tid
     *               number -> AC mapping. For frames in the middle of a SIFS
     *               burst, the backoff_ac_valid will be 0.
     * BIT [20:20] - num_ul_user_responses_valid
     * BIT [21:28] - num_ul_user_responses: The number of user responses
     *               detected by the MAC layer. This value can be compared with
     *               the "num_ul_expected_users" field to see whether this frame
     *               had a complete or partial response failure. Only valid if
     *               num_ul_user_responses_valid is set to 1.
     * BIT [31:29] - reserved
     */
    union {
        A_UINT32 reserved__num_ul_user_responses__num_ul_user_responses_valid__backoff_ac__backoff_ac_valid__psr_tx__aborted_obss_rssi__srg_tx__non_srg_tx__bss_color_id;
        A_UINT32 reserved__psr_tx__aborted_obss_rssi__srg_tx__non_srg_tx___bss_color_id;
        A_UINT32 reserved__aborted_obss_rssi__srg_tx__non_srg_tx___bss_color_id;
        A_UINT32 reserved__bss_color_id;
@@ -772,7 +837,11 @@ typedef struct {
                     srg_tx:                      1,
                     aborted_obss_rssi:           8,
                     psr_tx:                      1,
                     reserved2:         15;
                     backoff_ac_valid:            1,
                     backoff_ac:                  2,
                     num_ul_user_responses_valid: 1,
                     num_ul_user_responses:       8,
                     reserved2:                   3;
        };
    };

@@ -787,16 +856,18 @@ typedef struct {
    };

    /*
     * htt_seq_type field is added for backward compatibility with
     * pktlog decoder, host driver or any third party tool interpreting
     * ppdu sequence type. If field 'htt_seq_type'is not present or is
     * present but set to WAL_PPDU_SEQ_TYPE, decoder should interpret
     * the seq type as WAL_TXSEND_PPDU_SEQUENCE.
     * BIT [0 : 0] - htt_seq_type field is added for backward compatibility
     *               with pktlog decoder, host driver or any third party tool
     *               interpreting ppdu sequence type. If field 'htt_seq_type'
     *               is not present or is present but set to WAL_PPDU_SEQ_TYPE,
     *               decoder should interpret the seq type as
     *               WAL_TXSEND_PPDU_SEQUENCE.
     *               If the new field htt_seq_type is present and is set to
     * HTT_PPDU_SEQ_TYPE then decoder should interpret the seq type as
     * HTT_PPDU_STATS_SEQ_TYPE. htt_seq_type field will be set to
     * HTT_PPDU_SEQ_TYPE in firmware versions where this field is
     * defined.
     *               HTT_PPDU_SEQ_TYPE then decoder should interpret the
     *               seq type as HTT_PPDU_STATS_SEQ_TYPE.
     *               htt_seq_type field will be set to HTT_PPDU_SEQ_TYPE in
     *               firmware versions where this field is defined.
     * BIT [31: 1] - reserved
     */
    union {
        A_UINT32 reserved__htt_seq_type;
@@ -805,6 +876,11 @@ typedef struct {
                     reserved3:     31;
        };
    };
    /* is_manual_ulofdma_trigger:
     * Flag to indicate if a given UL OFDMA trigger is manually triggered
     * from the Host
     */
    A_UINT32 is_manual_ulofdma_trigger;
} htt_ppdu_stats_common_tlv;

#define HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM_M     0x000000ff
@@ -1169,6 +1245,19 @@ typedef struct {
     * value is larger than A_INT8.
     */
    A_UINT32 alt_tx_pwr[HTT_STATS_MAX_CHAINS / HTT_PPDU_STATS_USER_COMMON_TLV_TX_PWR_CHAINS_PER_U32];

    /*
     * A bitmap indicating the MSDUQs that the scheduler is attempting to
     * transmit in this PPDU. Note that in some cases, the scheduler's notion
     * of what MSDUQs are being transmitted from may not be fully accurate,
     * such as when MPDUs are retried, or when some previously generated MPDUs
     * that were not attempted OTA yet are tried.
     *
     * The valid bit indices for this bitmap are defined by the HTT_MSDUQ_INDEX
     * enum (in htt.h). For example, (1 << HTT_MSDUQ_INDEX_UDP) would
     * correspond to the default UDP msduq.
     */
    A_UINT32 msduq_bitmap;
} htt_ppdu_stats_user_common_tlv;

#define HTT_PPDU_STATS_USER_RATE_TLV_TID_NUM_M     0x000000ff
@@ -1712,6 +1801,19 @@ typedef enum HTT_PPDU_STATS_RESP_PPDU_TYPE HTT_PPDU_STATS_RESP_PPDU_TYPE;
        ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_PUNC_PATTERN_BITMAP_S)); \
    } while (0)

#define HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_M  0x00010000
#define HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_S          16

#define HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_GET(_var) \
    (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_M) >> \
    HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_S)

#define HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_SET (_var , _val) \
    do { \
        HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF, _val); \
        ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_S)); \
    } while (0)

typedef enum HTT_PPDU_STATS_RU_SIZE {
    HTT_PPDU_STATS_RU_26,
    HTT_PPDU_STATS_RU_52,
@@ -1897,9 +1999,12 @@ typedef struct {
    /*
     * BIT [15:0]  :- Punctured BW bitmap pattern to indicate which BWs are
     *                punctured.
     * BIT 16      :- flag showing whether EHT extra LTF is applied
     *                for current PPDU
     */
    A_UINT32 punc_pattern_bitmap: 16,
             reserved4:           16;
             extra_eht_ltf:       1,
             reserved4:           15;
} htt_ppdu_stats_user_rate_tlv;

#define HTT_PPDU_STATS_USR_RATE_VALID_M     0x80000000
@@ -2342,7 +2447,7 @@ typedef struct {

    /*
     * Max rates configured per BW:
     * for BW supported by Smart Antenna - 20MHZ, 40MHZ and 80MHZ and 160MHZ
     * for BW supported by Smart Antenna - 20MHZ, 40MHZ, 80MHZ and 160MHZ
     * (Note: 160 MHz is currently not supported by Smart Antenna)
     */
    A_UINT32 max_rates[HTT_STATS_NUM_SUPPORTED_BW_SMART_ANTENNA];
@@ -2363,6 +2468,12 @@ typedef struct {
             sw_rts_failure:    1,
             cts_rcvd_diff_bw:  1,
             reserved2:        28;

    /*
     * Max rates configured per BW:
     * for BW supported by Smart Antenna - 320 MHZ
     */
    A_UINT32 max_rates_ext;
} htt_ppdu_stats_user_cmpltn_common_tlv;

#define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_TID_NUM_M     0x000000ff
+180 −4
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -148,6 +148,7 @@ enum htt_dbg_ext_stats_type {
     *           6 bit htt_msdu_flow_stats_tlv
     *           7 bit htt_peer_sched_stats_tlv
     *           8 bit htt_peer_ax_ofdma_stats_tlv
     *           9 bit htt_peer_be_ofdma_stats_tlv
     *   - config_param2: [Bit31 : Bit0] mac_addr31to0
     *   - config_param3: [Bit15 : Bit0] mac_addr47to32
     *                    [Bit 16] If this bit is set, reset per peer stats
@@ -511,6 +512,22 @@ enum htt_dbg_ext_stats_type {
     */
    HTT_DBG_EXT_STATS_PDEV_BW_MGR = 53,

    /** HTT_DBG_PDEV_MBSSID_CTRL_FRAME_STATS
     * PARAMS:
     *   - No Params
     * RESP MSG:
     *   - htt_pdev_mbssid_ctrl_frame_stats
     */
    HTT_DBG_PDEV_MBSSID_CTRL_FRAME_STATS = 54,

    /** HTT_DBG_SOC_SSR_STATS
     * PARAMS:
     *    - No Params
     * RESP MSG:
     *    - htt_umac_ssr_stats_tlv
     */
    HTT_DBG_SOC_SSR_STATS = 55,


    /* keep this last */
    HTT_DBG_NUM_EXT_STATS = 256,
@@ -920,6 +937,20 @@ typedef struct {
    A_UINT32      flush_errs[1]; /* HTT_TX_PDEV_MAX_FLUSH_REASON_STATS */
} htt_tx_pdev_stats_flush_tlv_v;

#define HTT_TX_PDEV_STATS_MLO_ABORT_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
/* NOTE: Variable length TLV, use length spec to infer array size */
typedef struct {
    htt_tlv_hdr_t tlv_hdr;
    A_UINT32      mlo_abort_cnt[]; /* HTT_TX_PDEV_MAX_MLO_ABORT_REASON_STATS */
} htt_tx_pdev_stats_mlo_abort_tlv_v;

#define HTT_TX_PDEV_STATS_MLO_TXOP_ABORT_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
/* NOTE: Variable length TLV, use length spec to infer array size */
typedef struct {
    htt_tlv_hdr_t tlv_hdr;
    A_UINT32      mlo_txop_abort_cnt[]; /* HTT_TX_PDEV_MAX_MLO_ABORT_REASON_STATS */
} htt_tx_pdev_stats_mlo_txop_abort_tlv_v;

#define HTT_TX_PDEV_STATS_SIFS_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems))
/* NOTE: Variable length TLV, use length spec to infer array size */
typedef struct {
@@ -1459,6 +1490,17 @@ typedef struct _htt_tx_tid_stats_v1_tlv {
    A_UINT32 mlo_flush_partner_info_high;
    A_UINT32 mlo_flush_initator_info_low;
    A_UINT32 mlo_flush_initator_info_high;
    /*
     * head_msdu_tqm_timestamp_us:
     *     MSDU enqueue timestamp (TQM reference timestamp) for the MSDU
     *     at the head of the MPDU queue
     * head_msdu_tqm_latency_us:
     *     The age of the MSDU that is at the head of the MPDU queue,
     *     i.e. the delta between the current TQM time and the MSDU's
     *     enqueue timestamp.
     */
    A_UINT32 head_msdu_tqm_timestamp_us;
    A_UINT32 head_msdu_tqm_latency_us;
} htt_tx_tid_stats_v1_tlv;

#define HTT_RX_TID_STATS_SW_PEER_ID_M 0x0000ffff
@@ -1825,6 +1867,7 @@ typedef enum {
    HTT_MSDU_FLOW_STATS_TLV     = 6,
    HTT_PEER_SCHED_STATS_TLV    = 7,
    HTT_PEER_AX_OFDMA_STATS_TLV = 8,
    HTT_PEER_BE_OFDMA_STATS_TLV = 9,

    HTT_PEER_STATS_MAX_TLV      = 31,
} htt_peer_stats_tlv_enum;
@@ -1868,8 +1911,20 @@ typedef struct {
    /* Last updated value of DL and UL queue depths for each peer per AC */
    A_UINT32 last_updated_dl_qdepth[HTT_NUM_AC_WMM];
    A_UINT32 last_updated_ul_qdepth[HTT_NUM_AC_WMM];
    /* Per peer Manual 11ax UL OFDMA trigger and trigger error counts */
    A_UINT32 ax_manual_ulofdma_trig_count;
    A_UINT32 ax_manual_ulofdma_trig_err_count;
} htt_peer_ax_ofdma_stats_tlv;

typedef struct {
    htt_tlv_hdr_t tlv_hdr;
    A_UINT32 peer_id;
    /* Per peer Manual 11be UL OFDMA trigger and trigger error counts */
    A_UINT32 be_manual_ulofdma_trig_count;
    A_UINT32 be_manual_ulofdma_trig_err_count;
} htt_peer_be_ofdma_stats_tlv;


/* config_param0 */

#define HTT_DBG_EXT_PEER_CTRL_PATH_TXRX_STATS_IS_MAC_ADDR_M 0x00000001
@@ -1959,6 +2014,7 @@ typedef struct _htt_peer_stats {
    htt_tx_tid_stats_v1_tlv    tx_tid_stats_v1[1];
    htt_peer_sched_stats_tlv   peer_sched_stats;
    htt_peer_ax_ofdma_stats_tlv ax_ofdma_stats;
    htt_peer_be_ofdma_stats_tlv be_ofdma_stats;
} htt_peer_stats_t;

/* =========== ACTIVE PEER LIST ========== */
@@ -2477,6 +2533,14 @@ typedef struct {
    A_UINT32 standalone_ax_bsr_trigger_tried[HTT_NUM_AC_WMM];
    /** 11AX HE MU Standalone Freq. BSRP Trigger completed with error(s) */
    A_UINT32 standalone_ax_bsr_trigger_err[HTT_NUM_AC_WMM];
    /** 11AX HE Manual Single-User UL OFDMA Trigger frame sent over the air */
    A_UINT32 manual_ax_su_ulofdma_basic_trigger[HTT_NUM_AC_WMM];
    /** 11AX HE Manual Single-User UL OFDMA Trigger completed with error(s) */
    A_UINT32 manual_ax_su_ulofdma_basic_trigger_err[HTT_NUM_AC_WMM];
    /** 11AX HE Manual Multi-User UL OFDMA Trigger frame sent over the air */
    A_UINT32 manual_ax_mu_ulofdma_basic_trigger[HTT_NUM_AC_WMM];
    /** 11AX HE Manual Multi-User UL OFDMA Trigger completed with error(s) */
    A_UINT32 manual_ax_mu_ulofdma_basic_trigger_err[HTT_NUM_AC_WMM];
} htt_tx_selfgen_ax_stats_tlv;

typedef struct {
@@ -2524,6 +2588,14 @@ typedef struct {
    A_UINT32 standalone_be_bsr_trigger_tried[HTT_NUM_AC_WMM];
    /** 11BE EHT MU Standalone Freq. BSRP Trigger completed with error(s) */
    A_UINT32 standalone_be_bsr_trigger_err[HTT_NUM_AC_WMM];
    /** 11BE EHT Manual Single-User UL OFDMA Trigger frame sent over the air */
    A_UINT32 manual_be_su_ulofdma_basic_trigger[HTT_NUM_AC_WMM];
    /** 11BE EHT Manual Single-User UL OFDMA Trigger completed with error(s) */
    A_UINT32 manual_be_su_ulofdma_basic_trigger_err[HTT_NUM_AC_WMM];
    /** 11BE EHT Manual Multi-User UL OFDMA Trigger frame sent over the air */
    A_UINT32 manual_be_mu_ulofdma_basic_trigger[HTT_NUM_AC_WMM];
    /** 11BE EHT Manual Multi-User UL OFDMA Trigger completed with error(s) */
    A_UINT32 manual_be_mu_ulofdma_basic_trigger_err[HTT_NUM_AC_WMM];
} htt_tx_selfgen_be_stats_tlv;

typedef struct { /* DEPRECATED */
@@ -3877,6 +3949,7 @@ typedef struct {
    A_UINT32 total_get_mpdu_head_info_cmds_by_sched_algo_la_query;
    A_UINT32 total_get_mpdu_head_info_cmds_by_tac;
    A_UINT32 total_gen_mpdu_cmds_by_sched_algo_la_query;
    A_UINT32 high_prio_q_not_empty;
} htt_tx_tqm_cmn_stats_tlv;

typedef struct {
@@ -4957,6 +5030,8 @@ typedef struct {
    A_UINT32 ax_su_embedded_trigger_data_ppdu_err;
    /** sta side trigger stats */
    A_UINT32 trigger_type_11be[HTT_TX_PDEV_STATS_NUM_11BE_TRIGGER_TYPES];
    /** Stats for Extra EHT LTF */
    A_UINT32 extra_eht_ltf;
} htt_tx_pdev_rate_stats_tlv;

typedef struct {
@@ -6209,9 +6284,12 @@ typedef struct {
     */
} htt_pdev_cca_stats_hist_v1_tlv;

#define HTT_TWT_SESSION_FLAG_FLOW_ID_M 0x0000ffff
#define HTT_TWT_SESSION_FLAG_FLOW_ID_M 0x0000000f
#define HTT_TWT_SESSION_FLAG_FLOW_ID_S 0

#define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_M 0x0000fff0
#define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_S 4

#define HTT_TWT_SESSION_FLAG_BCAST_TWT_M 0x00010000
#define HTT_TWT_SESSION_FLAG_BCAST_TWT_S 16

@@ -6231,6 +6309,16 @@ typedef struct {
        ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_FLOW_ID_S)); \
    } while (0)

#define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_GET(_var) \
    (((_var) & HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_M) >> \
     HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_S)

#define HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_SET(_var, _val) \
    do { \
        HTT_CHECK_SET_VAL(HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT, _val); \
        ((_var) |= ((_val) << HTT_TWT_SESSION_FLAG_BTWT_PEER_CNT_S)); \
    } while (0)

#define HTT_TWT_SESSION_FLAG_BCAST_TWT_GET(_var) \
    (((_var) & HTT_TWT_SESSION_FLAG_BCAST_TWT_M) >> \
     HTT_TWT_SESSION_FLAG_BCAST_TWT_S)
@@ -6936,6 +7024,7 @@ typedef enum {
    HTT_STATS_RC_MODE_DLMUMIMO = 1,
    HTT_STATS_RC_MODE_DLOFDMA  = 2,
    HTT_STATS_RC_MODE_ULMUMIMO = 3,
    HTT_STATS_RC_MODE_ULOFDMA  = 4,
} htt_stats_rc_mode;

typedef struct {
@@ -7352,6 +7441,11 @@ typedef struct {
#define HTT_MAX_RX_PKT_CRC_PASS_CNT 8
#define HTT_MAX_PER_BLK_ERR_CNT 20
#define HTT_MAX_RX_OTA_ERR_CNT 14
#define HTT_MAX_RX_PKT_CNT_EXT 4
#define HTT_MAX_RX_PKT_CRC_PASS_CNT_EXT 4
#define HTT_MAX_RX_PKT_MU_CNT 14
#define HTT_MAX_TX_PKT_CNT 10
#define HTT_MAX_PHY_TX_ABORT_CNT 10

typedef enum {
    HTT_STATS_CHANNEL_HALF_RATE          = 0x0001,   /* Half rate */
@@ -7466,13 +7560,13 @@ typedef struct {
    /** rx_pkt_cnt -
     * Received EOP (end-of-packet) count per packet type;
     * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF
     * [6-7]=RSVD
     * [6] = EHT; [7]=RSVD; [6] = Applicable only for BE
     */
    A_UINT32 rx_pkt_cnt[HTT_MAX_RX_PKT_CNT];
    /** rx_pkt_crc_pass_cnt -
     * Received EOP (end-of-packet) count per packet type;
     * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF
     * [6-7]=RSVD
     * [6] = EHT; [7]=RSVD; [6] = Applicable only for BE
     */
    A_UINT32 rx_pkt_crc_pass_cnt[HTT_MAX_RX_PKT_CRC_PASS_CNT];
    /** per_blk_err_cnt -
@@ -7492,6 +7586,38 @@ typedef struct {
     * [9-13]=RSVD
     */
    A_UINT32 rx_ota_err_cnt[HTT_MAX_RX_OTA_ERR_CNT];
    /** rx_pkt_cnt_ext -
     * Received EOP (end-of-packet) count per packet type for BE;
     * [0] = WUR; [1] = AZ; [2-3]=RVSD
     */
    A_UINT32 rx_pkt_cnt_ext[HTT_MAX_RX_PKT_CNT_EXT];
    /** rx_pkt_crc_pass_cnt_ext -
     * Received EOP (end-of-packet) count per packet type for BE;
     * [0] = WUR; [1] = AZ; [2-3]=RVSD
     */
    A_UINT32 rx_pkt_crc_pass_cnt_ext[HTT_MAX_RX_PKT_CRC_PASS_CNT_EXT];
    /** rx_pkt_mu_cnt -
     * RX MU MIMO+OFDMA packet count per packet type for BE;
     * [0] = 11ax OFDMA; [1] = 11ax OFDMA+MUMIMO; [2] = 11be OFDMA;
     * [3] = 11be OFDMA+MUMIMO; [4] = 11ax MIMO; [5] = 11be MIMO;
     * [6] = 11ax OFDMA; [7] = 11ax OFDMA+MUMIMO; [8] = 11be OFDMA;
     * [9] = 11be OFDMA+MUMIMO; [10] = 11ax MIMO; [11] = 11be MIMO;
     * [12-13]=RSVD
     */
    A_UINT32 rx_pkt_mu_cnt[HTT_MAX_RX_PKT_MU_CNT];
    /** tx_pkt_cnt -
     * num of transfered packet count per packet type;
     * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF;
     * [6]= EHT; [7] = WUR; [8] = AZ; [9]=RSVD; [6-8] = Applicable only for BE
     */
    A_UINT32 tx_pkt_cnt[HTT_MAX_TX_PKT_CNT];
    /** phy_tx_abort_cnt -
     * phy tx abort after each tlv;
     * [0] = PRE-PHY desc tlv; [1] = PHY desc tlv; [2] = LSIGA tlv;
     * [3] = LSIGB tlv; [4] = Per User tlv; [5] = HESIGB tlv;
     * [6] = Service tlv; [7] = Tx Packet End tlv; [8-9]=RSVD;
     */
    A_UINT32 phy_tx_abort_cnt[HTT_MAX_PHY_TX_ABORT_CNT];
} htt_phy_counters_tlv;

typedef struct {
@@ -8594,6 +8720,25 @@ typedef struct {
    A_UINT32 dlofdma_disabled_consec_no_mpdus_success[HTT_NUM_AC_WMM];
} htt_pdev_sched_algo_ofdma_stats_tlv;

typedef struct {
    htt_tlv_hdr_t tlv_hdr;
    /** mac_id__word:
     * BIT [ 7 :  0]   :- mac_id
     *                    Use the HTT_STATS_CMN_MAC_ID_GET,_SET macros to
     *                    read/write this bitfield.
     * BIT [31 :  8]   :- reserved
     */
    A_UINT32 mac_id__word;
    A_UINT32 basic_trigger_across_bss;
    A_UINT32 basic_trigger_within_bss;
    A_UINT32 bsr_trigger_across_bss;
    A_UINT32 bsr_trigger_within_bss;
    A_UINT32 mu_rts_across_bss;
    A_UINT32 mu_rts_within_bss;
    A_UINT32 ul_mumimo_trigger_across_bss;
    A_UINT32 ul_mumimo_trigger_within_bss;
} htt_pdev_mbssid_ctrl_frame_stats_tlv;

/*======= Bandwidth Manager stats ====================*/

#define HTT_BW_MGR_STATS_MAC_ID_M               0x000000ff
@@ -8728,5 +8873,36 @@ typedef struct {
    htt_pdev_bw_mgr_stats_tlv bw_mgr_tlv;
} htt_pdev_bw_mgr_stats_t;

typedef struct {
    A_UINT32 total_done;
    A_UINT32 trigger_requests_count;
    A_UINT32 total_trig_dropped;
    A_UINT32 umac_disengaged_count;
    A_UINT32 umac_soft_reset_count;
    A_UINT32 umac_engaged_count;
    A_UINT32 last_trigger_request_ms;
    A_UINT32 last_start_ms;
    A_UINT32 last_start_disengage_umac_ms;
    A_UINT32 last_enter_ssr_platform_thread_ms;
    A_UINT32 last_exit_ssr_platform_thread_ms;
    A_UINT32 last_start_engage_umac_ms;
    A_UINT32 last_done_successful_ms;
    A_UINT32 last_e2e_delta_ms;
    A_UINT32 max_e2e_delta_ms;
    A_UINT32 trigger_count_for_umac_hang;
    A_UINT32 trigger_count_for_mlo_quick_ssr;
    A_UINT32 trigger_count_for_unknown_signature;
    A_UINT32 post_reset_tqm_sync_cmd_completion_ms;
    A_UINT32 htt_sync_mlo_initiate_umac_recovery_ms;
    A_UINT32 htt_sync_do_pre_reset_ms;
    A_UINT32 htt_sync_do_post_reset_start_ms;
    A_UINT32 htt_sync_do_post_reset_complete_ms;
} htt_umac_ssr_stats_t;

typedef struct {
    htt_tlv_hdr_t tlv_hdr;
    htt_umac_ssr_stats_t stats;
} htt_umac_ssr_stats_tlv;


#endif /* __HTT_STATS_H__ */
+31 −11
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2016, 2018-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
@@ -149,7 +149,7 @@ typedef enum {
    MODE_11AX_HE80_2G = 23,
#endif

#if defined(SUPPORT_11BE) && SUPPORT_11BE
#if (defined(SUPPORT_11BE) && SUPPORT_11BE) || defined(SUPPORT_11BE_ROM)
    MODE_11BE_EHT20 = 24,
    MODE_11BE_EHT40 = 25,
    MODE_11BE_EHT80 = 26,
@@ -248,7 +248,7 @@ typedef enum {
        ((mode) == MODE_11AX_HE80_2G))
#endif /* SUPPORT_11AX */

#if defined(SUPPORT_11BE) && SUPPORT_11BE
#if (defined(SUPPORT_11BE) && SUPPORT_11BE) || defined(SUPPORT_11BE_ROM)
#define IS_MODE_EHT(mode) (((mode) == MODE_11BE_EHT20) || \
        ((mode) == MODE_11BE_EHT40)     || \
        ((mode) == MODE_11BE_EHT80)     || \
@@ -458,6 +458,10 @@ typedef struct {
    A_UINT32 low_5ghz_chan;
    A_UINT32 high_5ghz_chan;
    A_UINT32 wireless_modes_ext; /* REGDMN MODE ext */
    A_UINT32 low_2ghz_chan_ext;
    A_UINT32 high_2ghz_chan_ext;
    A_UINT32 low_5ghz_chan_ext;
    A_UINT32 high_5ghz_chan_ext;
} HAL_REG_CAPABILITIES;

#ifdef NUM_SPATIAL_STREAM
@@ -972,7 +976,6 @@ struct wlan_dbg_mem_stats {
};

struct wlan_dbg_peer_stats {

    A_INT32 dummy; /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
};

@@ -1760,11 +1763,17 @@ A_COMPILE_TIME_ASSERT(check_mlo_glb_per_chip_crash_info,
        (((sizeof(mlo_glb_per_chip_crash_info) % sizeof(A_UINT64) == 0x0))));

/** Helper macro for params GET/SET of mlo_glb_chip_crash_info */
#define MLO_SHMEM_CHIP_CRASH_INFO_PARAM_NO_OF_CHIPS_GET(chip_info) MLO_SHMEM_GET_BITS(chip_info, 0, 2)
#define MLO_SHMEM_CHIP_CRASH_INFO_PARAM_NO_OF_CHIPS_SET(chip_info, value) MLO_SHMEM_SET_BITS(chip_info, 0, 2, value)
#define MLO_SHMEM_CHIP_CRASH_INFO_PARAM_NO_OF_CHIPS_GET(chip_info) \
    (MLO_SHMEM_GET_BITS(chip_info, 0, 2) + \
     (MLO_SHMEM_GET_BITS(chip_info, 12, 4) << 2))
#define MLO_SHMEM_CHIP_CRASH_INFO_PARAM_NO_OF_CHIPS_SET(chip_info, value) \
    do { \
       MLO_SHMEM_SET_BITS(chip_info, 0, 2, ((value) & 0x03)); \
       MLO_SHMEM_SET_BITS(chip_info, 12, 4, ((value) >> 2)); \
} while (0)

#define MLO_SHMEM_CHIP_CRASH_INFO_PARAM_VALID_CHIP_BMAP_GET(chip_info) MLO_SHMEM_GET_BITS(chip_info, 2, 3)
#define MLO_SHMEM_CHIP_CRASH_INFO_PARAM_VALID_CHIP_BMAP_SET(chip_info, value) MLO_SHMEM_SET_BITS(chip_info, 2, 3, value)
#define MLO_SHMEM_CHIP_CRASH_INFO_PARAM_VALID_CHIP_BMAP_GET(chip_info) MLO_SHMEM_GET_BITS(chip_info, 2, 8)
#define MLO_SHMEM_CHIP_CRASH_INFO_PARAM_VALID_CHIP_BMAP_SET(chip_info, value) MLO_SHMEM_SET_BITS(chip_info, 2, 8, value)

typedef struct {
    /* TLV tag and len; tag equals MLO_SHMEM_TLV_STRUCT_MLO_GLB_CHIP_CRASH_INFO */
@@ -1775,7 +1784,18 @@ typedef struct {
     *
     * [1:0]:  no_of_chips
     * [4:2]:  valid_chip_bmap
     * [31:6]: reserved
     * For number of chips beyond 3, extension fields are added.
     * To maintain backward compatibility, with 3 chip board and
     * old host driver, valid chip bmap is extended in continuation from
     * existing bit 4 onwards, while extending no_of_chips information
     * would overlap with old valid_chip_bmap, hence extended from
     * bit 12:15. Now no_of_chip will have two parts, lower 2 bits from 0-1 and
     * upper 4 bits from 12-15. SET-GET macros are modified accordingly.
     * This helps in no change in respective processing files and don't need
     * to maintain two copy of information for backward compatibility.
     * [9:5]:  valid_chip_bmap_ext
     * [15:12]: no_of_chips_ext
     * [31:16]: reserved
     */
    A_UINT32 chip_info;
    /*  This TLV is followed by array of mlo_glb_per_chip_crash_info:
+1 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ typedef enum {
  WLAN_MODULE_SCHED_ALGO_SAWF,          /* 0x6f */
  WLAN_MODULE_BAR,                      /* 0x70 */
  WLAN_MODULE_SMART_TX,                 /* 0x71 */
  WLAN_MODULE_BRIDGE_PEER,              /* 0x72 */


  WLAN_MODULE_ID_MAX,
Loading