Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
Merge tag 'LA.UM.7.2.c6-02600-sdm660.0' of https://source.codeaurora.…
Browse files Browse the repository at this point in the history
…org/quic/la/platform/vendor/qcom-opensource/wlan/fw-api into kernel.lnx.4.4.r40-rel

"LA.UM.7.2.c6-02600-sdm660.0"
  • Loading branch information
radcolor committed Dec 2, 2019
2 parents d3418b8 + 0ada8dd commit 3d6d8c7
Show file tree
Hide file tree
Showing 7 changed files with 940 additions and 26 deletions.
273 changes: 259 additions & 14 deletions drivers/staging/fw-api/fw/htt.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,13 @@
* 3.70 Add AST1-AST3 fields to HTT_T2H PEER_MAP_V2 msg
* 3.71 Add rx offload engine / flow search engine htt setup message defs for
* HTT_H2T_MSG_TYPE_RX_FSE_SETUP_CFG, HTT_H2T_MSG_TYPE_RX_FSE_OPERATION_CFG
* 3.72 Add tx_retry_cnt fields to htt_tx_offload_deliver_ind_hdr_t and
* htt_tx_data_hdr_information
* 3.73 Add channel pre-calibration data upload and download messages defs for
* HTT_T2H_MSG_TYPE_CHAN_CALDATA and HTT_H2T_MSG_TYPE_CHAN_CALDATA
*/
#define HTT_CURRENT_VERSION_MAJOR 3
#define HTT_CURRENT_VERSION_MINOR 71
#define HTT_CURRENT_VERSION_MINOR 73

#define HTT_NUM_TX_FRAG_DESC 1024

Expand Down Expand Up @@ -534,6 +538,7 @@ enum htt_h2t_msg_type {
HTT_H2T_MSG_TYPE_PPDU_STATS_CFG = 0x11,
HTT_H2T_MSG_TYPE_RX_FSE_SETUP_CFG = 0x12,
HTT_H2T_MSG_TYPE_RX_FSE_OPERATION_CFG = 0x13,
HTT_H2T_MSG_TYPE_CHAN_CALDATA = 0x14,

/* keep this last */
HTT_H2T_NUM_MSGS
Expand Down Expand Up @@ -6338,6 +6343,7 @@ enum htt_t2h_msg_type {
* to provide to the monitor mode interface.
*/
HTT_T2H_MSG_TYPE_TX_OFFLOAD_DELIVER_IND = 0x25,
HTT_T2H_MSG_TYPE_CHAN_CALDATA = 0x26,

HTT_T2H_MSG_TYPE_TEST,
/* keep this last */
Expand Down Expand Up @@ -7855,7 +7861,9 @@ PREPACK struct htt_tx_offload_deliver_ind_hdr_t
status:3, /* [2:0] */
format:1, /* [3] 0: 802.3 format, 1: 802.11 format */
tx_mpdu_bytes:16, /* [19:4] */
reserved_4:12; /* [31:20] */
/* Indicates retry count of offloaded/local generated Data tx frames */
tx_retry_cnt:6, /* [25:20] */
reserved_4:6; /* [31:26] */
} POSTPACK;

/* FW offload deliver ind message header fields */
Expand Down Expand Up @@ -7905,6 +7913,8 @@ PREPACK struct htt_tx_offload_deliver_ind_hdr_t
#define HTT_FW_OFFLOAD_IND_FORMAT_S 3
#define HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_M 0x000ffff0
#define HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_S 4
#define HTT_FW_OFFLOAD_IND_TX_RETRY_CNT_M 0x03f00000
#define HTT_FW_OFFLOAD_IND_TX_RETRY_CNT_S 20

#define HTT_FW_OFFLOAD_IND_PHY_TIMESTAMP_L32_SET(word, value) \
do { \
Expand Down Expand Up @@ -8056,6 +8066,14 @@ PREPACK struct htt_tx_offload_deliver_ind_hdr_t
#define HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_GET(word) \
(((word) & HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_M) >> HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_S)

#define HTT_FW_OFFLOAD_IND_TX_RETRY_CNT_SET(word, value) \
do { \
HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_TX_RETRY_CNT, value); \
(word) |= (value) << HTT_FW_OFFLOAD_IND_TX_RETRY_CNT_S; \
} while (0)
#define HTT_FW_OFFLOAD_IND_TX_RETRY_CNT_GET(word) \
(((word) & HTT_FW_OFFLOAD_IND_TX_RETRY_CNT_M) >> HTT_FW_OFFLOAD_IND_TX_RETRY_CNT_S)


/*
* @brief target -> host rx reorder flush message definition
Expand Down Expand Up @@ -9500,7 +9518,10 @@ PREPACK struct htt_tx_data_hdr_information {
sgi : 1, /* [23] */
ldpc : 1, /* [24] */
beamformed: 1, /* [25] */
reserved_1: 6; /* [31:26] */
/* tx_retry_cnt:
* Indicates retry count of data tx frames provided by the host.
*/
tx_retry_cnt: 6; /* [31:26] */
A_UINT32 /* word 2 */
framectrl:16, /* [15: 0] */
seqno:16; /* [31:16] */
Expand Down Expand Up @@ -9690,6 +9711,8 @@ PREPACK struct htt_tx_compl_ind_append_tx_tsf64 {
#define HTT_FW_TX_DATA_HDR_LDPC_S 24
#define HTT_FW_TX_DATA_HDR_BEAMFORMED_M 0x02000000
#define HTT_FW_TX_DATA_HDR_BEAMFORMED_S 25
#define HTT_FW_TX_DATA_HDR_TX_RETRY_CNT_M 0xfc000000
#define HTT_FW_TX_DATA_HDR_TX_RETRY_CNT_S 26

/* DWORD two */
#define HTT_FW_TX_DATA_HDR_FRAMECTRL_M 0x0000ffff
Expand Down Expand Up @@ -9789,6 +9812,14 @@ PREPACK struct htt_tx_compl_ind_append_tx_tsf64 {
#define HTT_FW_TX_DATA_HDR_BEAMFORMED_GET(word) \
(((word) & HTT_FW_TX_DATA_HDR_BEAMFORMED_M) >> HTT_FW_TX_DATA_HDR_BEAMFORMED_S)

#define HTT_FW_TX_DATA_HDR_TX_RETRY_CNT_SET(word, value) \
do { \
HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_TX_RETRY_CNT, value); \
(word) |= (value) << HTT_FW_TX_DATA_HDR_TX_RETRY_CNT_S; \
} while (0)
#define HTT_FW_TX_DATA_HDR_TX_RETRY_CNT_GET(word) \
(((word) & HTT_FW_TX_DATA_HDR_TX_RETRY_CNT_M) >> HTT_FW_TX_DATA_HDR_TX_RETRY_CNT_S)

#define HTT_FW_TX_DATA_HDR_FRAMECTRL_SET(word, value) \
do { \
HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_FRAMECTRL, value); \
Expand Down Expand Up @@ -13019,27 +13050,39 @@ struct htt_ul_ofdma_user_info_v0 {
A_UINT32 word1;
};

#define HTT_UL_OFDMA_USER_INFO_V0_BITMAP_W0 \
A_UINT32 w0_fw_rsvd:30; \
A_UINT32 w0_valid:1; \
A_UINT32 w0_version:1;
struct htt_ul_ofdma_user_info_v0_bitmap_w0 {
HTT_UL_OFDMA_USER_INFO_V0_BITMAP_W0
};

#define HTT_UL_OFDMA_USER_INFO_V0_BITMAP_W1 \
A_UINT32 w1_nss:3; \
A_UINT32 w1_mcs:4; \
A_UINT32 w1_ldpc:1; \
A_UINT32 w1_dcm:1; \
A_UINT32 w1_ru_start:7; \
A_UINT32 w1_ru_size:3; \
A_UINT32 w1_trig_type:4; \
A_UINT32 w1_unused:9;
struct htt_ul_ofdma_user_info_v0_bitmap_w1 {
HTT_UL_OFDMA_USER_INFO_V0_BITMAP_W1
};

/* htt_up_ofdma_user_info_v0_bitmap shows what bitfields are within the info */
PREPACK struct htt_ul_ofdma_user_info_v0_bitmap {
union {
A_UINT32 word0;
struct {
A_UINT32 w0_fw_rsvd:30;
A_UINT32 w0_valid:1;
A_UINT32 w0_version:1;
HTT_UL_OFDMA_USER_INFO_V0_BITMAP_W0
};
};
union {
A_UINT32 word1;
struct {
A_UINT32 w1_nss:3;
A_UINT32 w1_mcs:4;
A_UINT32 w1_ldpc:1;
A_UINT32 w1_dcm:1;
A_UINT32 w1_ru_start:7;
A_UINT32 w1_ru_size:3;
A_UINT32 w1_trig_type:4;
A_UINT32 w1_unused:9;
HTT_UL_OFDMA_USER_INFO_V0_BITMAP_W1
};
};
} POSTPACK;
Expand Down Expand Up @@ -13191,5 +13234,207 @@ enum HTT_UL_OFDMA_TRIG_TYPE {
((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W1_RU_TRIG_TYP_S)); \
} while (0)

/**
* @brief target -> host channel calibration data message
* @brief host -> target channel calibration data message
*
* @details
* The following field definitions describe the format of the channel
* calibration data message sent from the target to the host when
* MSG_TYPE is HTT_T2H_MSG_TYPE_CHAN_CALDATA, and sent from the host
* to the target when MSG_TYPE is HTT_H2T_MSG_TYPE_CHAN_CALDATA.
* The message is defined as htt_chan_caldata_msg followed by a variable
* number of 32-bit character values.
*
* |31 21|20|19 16|15 13| 12|11 8|7 0|
* |------------------------------------------------------------------|
* | rsv | A| frag | rsv |ck_v| sub_type| msg type |
* |------------------------------------------------------------------|
* | payload size | mhz |
* |------------------------------------------------------------------|
* | center frequency 2 | center frequency 1 |
* |------------------------------------------------------------------|
* | check sum |
* |------------------------------------------------------------------|
* | payload |
* |------------------------------------------------------------------|
* message info field:
* - MSG_TYPE
* Bits 7:0
* Purpose: identifies this as a channel calibration data message
* Value: HTT_T2H_MSG_TYPE_CHAN_CALDATA (0x15) or
* HTT_H2T_MSG_TYPE_CHAN_CALDATA (0xb)
* - SUB_TYPE
* Bits 11:8
* Purpose: T2H: indicates whether target is providing chan cal data
* to the host to store, or requesting that the host
* download previously-stored data.
* H2T: indicates whether the host is providing the requested
* channel cal data, or if it is rejecting the data
* request because it does not have the requested data.
* Value: see HTT_T2H_MSG_CHAN_CALDATA_xxx defs
* - CHKSUM_VALID
* Bit 12
* Purpose: indicates if the checksum field is valid
* value:
* - FRAG
* Bit 19:16
* Purpose: indicates the fragment index for message
* value: 0 for first fragment, 1 for second fragment, ...
* - APPEND
* Bit 20
* Purpose: indicates if this is the last fragment
* value: 0 = final fragment, 1 = more fragments will be appended
*
* channel and payload size field
* - MHZ
* Bits 15:0
* Purpose: indicates the channel primary frequency
* Value:
* - PAYLOAD_SIZE
* Bits 31:16
* Purpose: indicates the bytes of calibration data in payload
* Value:
*
* center frequency field
* - CENTER FREQUENCY 1
* Bits 15:0
* Purpose: indicates the channel center frequency
* Value: channel center frequency, in MHz units
* - CENTER FREQUENCY 2
* Bits 31:16
* Purpose: indicates the secondary channel center frequency,
* only for 11acvht 80plus80 mode
* Value: secondary channel center frequeny, in MHz units, if applicable
*
* checksum field
* - CHECK_SUM
* Bits 31:0
* Purpose: check the payload data, it is just for this fragment.
* This is intended for the target to check that the channel
* calibration data returned by the host is the unmodified data
* that was previously provided to the host by the target.
* value: checksum of fragment payload
*/
PREPACK struct htt_chan_caldata_msg {
/* DWORD 0: message info */
A_UINT32
msg_type: 8,
sub_type: 4 ,
chksum_valid: 1, /** 1:valid, 0:invalid */
reserved1: 3,
frag_idx: 4, /** fragment index for calibration data */
appending: 1, /** 0: no fragment appending,
* 1: extra fragment appending */
reserved2: 11;

/* DWORD 1: channel and payload size */
A_UINT32
mhz: 16, /** primary 20 MHz channel frequency in mhz */
payload_size: 16; /** unit: bytes */

/* DWORD 2: center frequency */
A_UINT32
band_center_freq1: 16, /** Center frequency 1 in MHz */
band_center_freq2: 16; /** Center frequency 2 in MHz,
* valid only for 11acvht 80plus80 mode */

/* DWORD 3: check sum */
A_UINT32 chksum;

/* variable length for calibration data */
A_UINT32 payload[1/* or more */];
} POSTPACK;

/* T2H SUBTYPE */
#define HTT_T2H_MSG_CHAN_CALDATA_REQ 0
#define HTT_T2H_MSG_CHAN_CALDATA_UPLOAD 1

/* H2T SUBTYPE */
#define HTT_H2T_MSG_CHAN_CALDATA_REJ 0
#define HTT_H2T_MSG_CHAN_CALDATA_DOWNLOAD 1

#define HTT_CHAN_CALDATA_MSG_SUB_TYPE_S 8
#define HTT_CHAN_CALDATA_MSG_SUB_TYPE_M 0x00000f00
#define HTT_CHAN_CALDATA_MSG_SUB_TYPE_GET(_var) \
(((_var) & HTT_CHAN_CALDATA_MSG_SUB_TYPE_M) >> HTT_CHAN_CALDATA_MSG_SUB_TYPE_S)
#define HTT_CHAN_CALDATA_MSG_SUB_TYPE_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_CHAN_CALDATA_MSG_SUB_TYPE, _val); \
((_var) |= ((_val) << HTT_CHAN_CALDATA_MSG_SUB_TYPE_S)); \
} while (0)

#define HTT_CHAN_CALDATA_MSG_CHKSUM_V_S 12
#define HTT_CHAN_CALDATA_MSG_CHKSUM_V_M 0x00001000
#define HTT_CHAN_CALDATA_MSG_CHKSUM_V_GET(_var) \
(((_var) & HTT_CHAN_CALDATA_MSG_CHKSUM_V_M) >> HTT_CHAN_CALDATA_MSG_CHKSUM_V_S)
#define HTT_CHAN_CALDATA_MSG_CHKSUM_V_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_CHAN_CALDATA_MSG_CHKSUM_V, _val); \
((_var) |= ((_val) << HTT_CHAN_CALDATA_MSG_CHKSUM_V_S)); \
} while (0)


#define HTT_CHAN_CALDATA_MSG_FRAG_IDX_S 16
#define HTT_CHAN_CALDATA_MSG_FRAG_IDX_M 0x000f0000
#define HTT_CHAN_CALDATA_MSG_FRAG_IDX_GET(_var) \
(((_var) & HTT_CHAN_CALDATA_MSG_FRAG_IDX_M) >> HTT_CHAN_CALDATA_MSG_FRAG_IDX_S)
#define HTT_CHAN_CALDATA_MSG_FRAG_IDX_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_CHAN_CALDATA_MSG_FRAG_IDX, _val); \
((_var) |= ((_val) << HTT_CHAN_CALDATA_MSG_FRAG_IDX_S)); \
} while (0)

#define HTT_CHAN_CALDATA_MSG_APPENDING_S 20
#define HTT_CHAN_CALDATA_MSG_APPENDING_M 0x00100000
#define HTT_CHAN_CALDATA_MSG_APPENDING_GET(_var) \
(((_var) & HTT_CHAN_CALDATA_MSG_APPENDING_M) >> HTT_CHAN_CALDATA_MSG_APPENDING_S)
#define HTT_CHAN_CALDATA_MSG_APPENDING_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_CHAN_CALDATA_MSG_APPENDING, _val); \
((_var) |= ((_val) << HTT_CHAN_CALDATA_MSG_APPENDING_S)); \
} while (0)

#define HTT_CHAN_CALDATA_MSG_MHZ_S 0
#define HTT_CHAN_CALDATA_MSG_MHZ_M 0x0000ffff
#define HTT_CHAN_CALDATA_MSG_MHZ_GET(_var) \
(((_var) & HTT_CHAN_CALDATA_MSG_MHZ_M) >> HTT_CHAN_CALDATA_MSG_MHZ_S)
#define HTT_CHAN_CALDATA_MSG_MHZ_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_CHAN_CALDATA_MSG_MHZ, _val); \
((_var) |= ((_val) << HTT_CHAN_CALDATA_MSG_MHZ_S)); \
} while (0)


#define HTT_CHAN_CALDATA_MSG_PLD_SIZE_S 16
#define HTT_CHAN_CALDATA_MSG_PLD_SIZE_M 0xffff0000
#define HTT_CHAN_CALDATA_MSG_PLD_SIZE_GET(_var) \
(((_var) & HTT_CHAN_CALDATA_MSG_PLD_SIZE_M) >> HTT_CHAN_CALDATA_MSG_PLD_SIZE_S)
#define HTT_CHAN_CALDATA_MSG_PLD_SIZE_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_CHAN_CALDATA_MSG_PLD_SIZE, _val); \
((_var) |= ((_val) << HTT_CHAN_CALDATA_MSG_PLD_SIZE_S)); \
} while (0)


#define HTT_CHAN_CALDATA_MSG_FREQ1_S 0
#define HTT_CHAN_CALDATA_MSG_FREQ1_M 0x0000ffff
#define HTT_CHAN_CALDATA_MSG_FREQ1_GET(_var) \
(((_var) & HTT_CHAN_CALDATA_MSG_FREQ1_M) >> HTT_CHAN_CALDATA_MSG_FREQ1_S)
#define HTT_CHAN_CALDATA_MSG_FREQ1_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_CHAN_CALDATA_MSG_FREQ1, _val); \
((_var) |= ((_val) << HTT_CHAN_CALDATA_MSG_FREQ1_S)); \
} while (0)

#define HTT_CHAN_CALDATA_MSG_FREQ2_S 16
#define HTT_CHAN_CALDATA_MSG_FREQ2_M 0xffff0000
#define HTT_CHAN_CALDATA_MSG_FREQ2_GET(_var) \
(((_var) & HTT_CHAN_CALDATA_MSG_FREQ2_M) >> HTT_CHAN_CALDATA_MSG_FREQ2_S)
#define HTT_CHAN_CALDATA_MSG_FREQ2_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_CHAN_CALDATA_MSG_FREQ2, _val); \
((_var) |= ((_val) << HTT_CHAN_CALDATA_MSG_FREQ2_S)); \
} while (0)

#endif
Loading

0 comments on commit 3d6d8c7

Please sign in to comment.