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

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

Merge 0da2b18f on remote branch

Change-Id: I20981cf57a198ede6a9940f4c20c01d11af042a2
parents dc20c6b0 0da2b18f
Loading
Loading
Loading
Loading
+43 −8
Original line number Diff line number Diff line
@@ -185,9 +185,10 @@
 *      for a MSDU.
 * 3.66 Add HTT_T2H_MSG_TYPE_TX_OFFLOAD_DELIVER_IND msg.
 *      Add PKT_CAPTURE_MODE flag within HTT_T2H TX_I_ORD_PADDR_IND msg.
 * 3.67 Add drop threshold field to HTT_H2T RX_RING_SELECTION_CFG msg.
 */
#define HTT_CURRENT_VERSION_MAJOR 3
#define HTT_CURRENT_VERSION_MINOR 66
#define HTT_CURRENT_VERSION_MINOR 67
#define HTT_NUM_TX_FRAG_DESC  1024
@@ -4793,9 +4794,9 @@ enum htt_srng_ring_id {
 *
 *    The message would appear as follows:
 *
 *    |31    27|26|25|24|23            16|15             8|7             0|
 *    |-----------------+----------------+----------------+---------------|
 *    |  rsvd1 |OV|PS|SS|     ring_id    |     pdev_id    |    msg_type   |
 *    |31 28|27|26|25|24|23            16|15          |9 8|7             0|
 *    |-----+--+--+--+--+----------------+------------+---+---------------|
 *    |rsvd1|DT|OV|PS|SS|     ring_id    |     pdev_id    |    msg_type   |
 *    |-------------------------------------------------------------------|
 *    |              rsvd2               |           ring_buffer_size     |
 *    |-------------------------------------------------------------------|
@@ -4817,10 +4818,13 @@ enum htt_srng_ring_id {
 *    |-------------------------------------------------------------------|
 *    |              rsvd3               |      rx_attention_offset       |
 *    |-------------------------------------------------------------------|
 *    |              rsvd4                            | rx_drop_threshold |
 *    |-------------------------------------------------------------------|
 * Where:
 *     PS = pkt_swap
 *     SS = status_swap
 *     OV = rx_offsets_valid
 *     DT = drop_thresh_valid
 * The message is interpreted as follows:
 * dword0 - b'0:7   - msg_type: This will be set to
 *                    HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG
@@ -4837,7 +4841,9 @@ enum htt_srng_ring_id {
 *                    e.g. wmac_top_reg_seq_hwioreg.h
 *          b'26    - rx_offset_valid (OV): flag to indicate rx offsets
 *                    configuration fields are valid
 *          b'27:31 - rsvd1:  reserved for future use
 *          b'27    - drop_thresh_valid (DT): flag to indicate if the
 *                    rx_drop_threshold field is valid
 *          b'28:31 - rsvd1:  reserved for future use
 * dword1 - b'0:16  - ring_buffer_size: size of bufferes referenced by rx ring,
 *                    in byte units.
 *                    Valid only for HW_TO_SW_RING and SW_TO_HW_RING
@@ -4901,7 +4907,11 @@ enum htt_srng_ring_id {
 *                    A value of 0 will be considered as ignore this config.
 *                    Refer to BUF_RING_CFG_4 defs within HW .h files,
 *                    e.g. wmac_top_reg_seq_hwioreg.h
 *        - b'16-31 - rsvd3 for future use
 *        - b'16:31 - rsvd3 for future use
 * dword11- b'9:0 -   rx_drop_threshold: Threshold configured in monitor mode
 *                    to source rings. Consumer drops packets if the available
 *                    words in the ring falls below the configured threshold
 *                    value.
 */
PREPACK struct htt_rx_ring_selection_cfg_t {
    A_UINT32 msg_type:          8,
@@ -4910,7 +4920,8 @@ PREPACK struct htt_rx_ring_selection_cfg_t {
             status_swap:       1,
             pkt_swap:          1,
             rx_offsets_valid:  1,
             rsvd1:             5;
             drop_thresh_valid: 1,
             rsvd1:             4;
    A_UINT32 ring_buffer_size: 16,
             rsvd2:            16;
    A_UINT32 packet_type_enable_flags_0;
@@ -4926,6 +4937,8 @@ PREPACK struct htt_rx_ring_selection_cfg_t {
             rx_msdu_start_offset: 16;
    A_UINT32 rx_attn_offset:       16,
             rsvd3:                16;
    A_UINT32 rx_drop_threshold:    10,
             rsvd4:                22;
} POSTPACK;
#define HTT_RX_RING_SELECTION_CFG_SZ    (sizeof(struct htt_rx_ring_selection_cfg_t))
@@ -4985,6 +4998,17 @@ PREPACK struct htt_rx_ring_selection_cfg_t {
                ((_var) |= ((_val) << HTT_RX_RING_SELECTION_CFG_RX_OFFSETS_VALID_S)); \
            } while (0)
#define HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_M       0x08000000
#define HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_S       27
#define HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_GET(_var) \
            (((_var) & HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_M) >> \
                    HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_S)
#define HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_SET(_var, _val) \
            do { \
                HTT_CHECK_SET_VAL(HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID, _val); \
                ((_var) |= ((_val) << HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_S)); \
            } while (0)
#define HTT_RX_RING_SELECTION_CFG_RING_BUFFER_SIZE_M           0x0000ffff
#define HTT_RX_RING_SELECTION_CFG_RING_BUFFER_SIZE_S           0
#define HTT_RX_RING_SELECTION_CFG_RING_BUFFER_SIZE_GET(_var) \
@@ -5128,6 +5152,17 @@ PREPACK struct htt_rx_ring_selection_cfg_t {
                ((_var) |= ((_val) << HTT_RX_RING_SELECTION_CFG_RX_ATTENTION_OFFSET_S)); \
            } while (0)
#define HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_M         0x000003ff
#define HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_S         0
#define HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_GET(_var) \
            (((_var) & HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_M) >> \
                    HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_S)
#define HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_SET(_var, _val) \
            do { \
                HTT_CHECK_SET_VAL(HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD, _val); \
                ((_var) |= ((_val) << HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_S)); \
            } while (0)
/*
 * Subtype based MGMT frames enable bits.
 * FP: Filter_Pass, MD: Monitor_Direct MO: Monitor_Other
+25 −27
Original line number Diff line number Diff line
@@ -256,36 +256,34 @@ typedef struct {
    struct htt_tx_ppdu_stats_info tx_ppdu_stats_info[1/*number_of_ppdu_stats*/];
} htt_ppdu_stats_usr_common_array_tlv_v;

#define HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT \
    struct { \
        htt_tlv_hdr_t tlv_hdr; \
        /* Refer bmi_msg.h */ \
        A_UINT32 target_type; \
    }

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
     */
    htt_tlv_hdr_t tlv_hdr;
    union {
        htt_ppdu_stats_sch_cmd_tlv_hdr_t hdr;
        HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT;
    };
        /* DEPRECATED (target_type)
         * The target_type field is not actually present in the HTT messages
         * produced by the FW.  However, it cannot be removed (yet), due to
         * FW code that refers to this field.
         * As a workaround, this target_type field is being moved into a
         * union with the "hw" field that actually is present in the message.
         * This makes the message definitions become consistent with the
         * actual message contents, while not breaking the compilation of
         * code that refers to the target_type field.
         * Overlaying the memory for "target_type" and "hw" does not cause
         * problems, because the FW code that refers to target_type first
         * writes a value into the target_type field, then writes data into
         * the hw field.
         * Once all FW references to the target_type field have been removed,
         * the target_type field def and the encapsulating anonymous union
         * will be removed from this htt_ppdu_stats_sch_cmd_tlv_v struct def.
         */
        A_UINT32 target_type;

        /*
         * 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
+76 −0
Original line number Diff line number Diff line
@@ -276,6 +276,15 @@ enum htt_dbg_ext_stats_type {
     */
    HTT_DBG_EXT_STATS_RING_BACKPRESSURE_STATS = 24,

    /* HTT_DBG_EXT_STATS_LATENCY_PROF_STATS
     *  PARAMS:
     *
     *  RESP MSG:
     *    - htt_soc_latency_prof_t
     */
    HTT_DBG_EXT_STATS_LATENCY_PROF_STATS = 25,


    /* keep this last */
    HTT_DBG_NUM_EXT_STATS = 256,
};
@@ -372,6 +381,9 @@ typedef enum {
    HTT_STATS_PDEV_OBSS_PD_TAG                     = 88, /* htt_pdev_obss_pd_stats_tlv */
    HTT_STATS_HW_WAR_TAG                           = 89, /* htt_hw_war_stats_tlv */
    HTT_STATS_RING_BACKPRESSURE_STATS_TAG          = 90, /* htt_ring_backpressure_stats_tlv */
    HTT_STATS_LATENCY_PROF_STATS_TAG               = 91, /* htt_latency_prof_stats_tlv */
    HTT_STATS_LATENCY_CTX_TAG                      = 92, /* htt_latency_prof_ctx_tlv */
    HTT_STATS_LATENCY_CNT_TAG                      = 93, /* htt_latency_prof_cnt_tlv */

    HTT_STATS_MAX_TAG,
} htt_tlv_tag_t;
@@ -3835,4 +3847,68 @@ typedef struct {
    } r[1]; /* variable-length array */
} htt_ring_backpressure_stats_t;

#define HTT_LATENCY_PROFILE_MAX_HIST        3
#define HTT_STATS_MAX_PROF_STATS_NAME_LEN  32
typedef struct {
    htt_tlv_hdr_t   tlv_hdr;
    /* print_header:
     * This field suggests whether the host should print a header when
     * displaying the TLV (because this is the first latency_prof_stats
     * TLV within a series), or if only the TLV contents should be displayed
     * without a header (because this is not the first TLV within the series).
     */
    A_UINT32 print_header;
    A_UINT8 latency_prof_name[HTT_STATS_MAX_PROF_STATS_NAME_LEN];
    A_UINT32 cnt; /* number of data values included in the tot sum */
    A_UINT32 min; /* time in us */
    A_UINT32 max; /* time in us */
    A_UINT32 last;
    A_UINT32 tot; /* time in us */
    A_UINT32 avg; /* time in us */
    /* hist_intvl:
     * Histogram interval, i.e. the latency range covered by each
     * bin of the histogram, in microsecond units.
     * hist[0] counts how many latencies were between 0 to hist_intvl
     * hist[1] counts how many latencies were between hist_intvl to 2*hist_intvl
     * hist[2] counts how many latencies were more than 2*hist_intvl
     */
    A_UINT32 hist_intvl;
    A_UINT32 hist[HTT_LATENCY_PROFILE_MAX_HIST];
} htt_latency_prof_stats_tlv;

typedef struct {
    htt_tlv_hdr_t   tlv_hdr;
    /* duration:
     * Time period over which counts were gathered, units = microseconds.
     */
    A_UINT32 duration;
    A_UINT32 tx_msdu_cnt;
    A_UINT32 tx_mpdu_cnt;
    A_UINT32 tx_ppdu_cnt;
    A_UINT32 rx_msdu_cnt;
    A_UINT32 rx_mpdu_cnt;
} htt_latency_prof_ctx_tlv;

typedef struct {
    htt_tlv_hdr_t   tlv_hdr;
    A_UINT32 prof_enable_cnt; /* count of enabled profiles */
} htt_latency_prof_cnt_tlv;

/* STATS_TYPE : HTT_DBG_EXT_STATS_LATENCY_PROF_STATS
 * TLV_TAGS:
 *      HTT_STATS_LATENCY_PROF_STATS_TAG / htt_latency_prof_stats_tlv
 *      HTT_STATS_LATENCY_CTX_TAG / htt_latency_prof_ctx_tlv
 *      HTT_STATS_LATENCY_CNT_TAG / htt_latency_prof_cnt_tlv
 */
/* NOTE:
 * This structure is for documentation, and cannot be safely used directly.
 * Instead, use the constituent TLV structures to fill/parse.
 */
typedef struct {
    htt_latency_prof_stats_tlv latency_prof_stat;
    htt_latency_prof_ctx_tlv latency_ctx_stat;
    htt_latency_prof_cnt_tlv latency_cnt_stat;
} htt_soc_latency_stats_t;


#endif /* __HTT_STATS_H__ */
+12 −12
Original line number Diff line number Diff line
@@ -24880,8 +24880,8 @@ typedef struct {
    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */
    /**
     * [3:0]  : channel metric -  0 = unusable, 1 = worst, 10 = best
     * [4:7]  : channel BW -
     * [7:0]  : channel metric -  0 = unusable, 1 = worst, 100 = best
     * [11:8] : channel BW -
     *          0 = 20MHz
     *          1 = 40MHz
     *          2 = 80MHz
@@ -24890,34 +24890,34 @@ typedef struct {
     *          11 = 5MHz
     *          12 = 10MHz
     *          (13-15 unused)
     * [15:8 ]: Reserved
     * [15:12]: Reserved
     * [31:16]: Frequency - Center frequency of the channel for which
     *          the RF characterisation info applies (MHz)
     */
    A_UINT32 freq_info;
} WMI_CHAN_RF_CHARACTERIZATION_INFO;
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC   0x0000000f
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC   0x000000ff
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW            0x000000f0
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S          4
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW            0x00000f00
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S          8
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ          0xffff0000
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S        16
#define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \
            WMI_F_RMW((dword)->freq_info,(val) & 0xff,          \
            WMI_F_RMW((dword)->freq_info,(val), \
            WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
#define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \
            WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
#define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \
            WMI_F_RMW((dword)->freq_info,(val) & 0xf0, \
            WMI_F_RMW((dword)->freq_info,(val), \
            WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
#define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \
            WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \
            WMI_F_RMW((dword)->freq_info,(val) & 0xffff, \
            WMI_F_RMW((dword)->freq_info,(val), \
            WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
#define __WMI_VER_MINOR_    0
/** WMI revision number has to be incremented when there is a
 *  change that may or may not break compatibility. */
#define __WMI_REVISION_ 663
#define __WMI_REVISION_ 664

/** The Version Namespace should not be normally changed. Only
 *  host and firmware of the same WMI namespace will work