Skip to content

Commit

Permalink
Merge branch 'wlan-api.lnx.1.0.r4-rel' of https://source.codeaurora.o…
Browse files Browse the repository at this point in the history
  • Loading branch information
PainKiller3 committed Mar 27, 2020
2 parents ad51b8e + 0defad5 commit b273cca
Show file tree
Hide file tree
Showing 11 changed files with 4,478 additions and 2,499 deletions.
341 changes: 340 additions & 1 deletion drivers/staging/fw-api/fw/htt.h

Large diffs are not rendered by default.

119 changes: 117 additions & 2 deletions drivers/staging/fw-api/fw/htt_ppdu_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ enum htt_ppdu_stats_tlv_tag {
HTT_PPDU_STATS_USR_COMMON_ARRAY_TLV, /* htt_ppdu_stats_usr_common_array_tlv_v */
HTT_PPDU_STATS_INFO_TLV, /* htt_ppdu_stats_info */
HTT_PPDU_STATS_TX_MGMTCTRL_PAYLOAD_TLV, /* htt_ppdu_stats_tx_mgmtctrl_payload_tlv */
HTT_PPDU_STATS_USERS_INFO_TLV, /* htt_ppdu_stats_users_info_tlv */

/* New TLV's are added above to this line */
HTT_PPDU_STATS_MAX_TAG,
Expand Down Expand Up @@ -535,6 +536,54 @@ typedef enum HTT_PPDU_STATS_SEQ_TYPE HTT_PPDU_STATS_SEQ_TYPE;
((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_BEAM_CHANGE_S)); \
} while (0)

#define HTT_PPDU_STATS_COMMON_TLV_DOPPLER_INDICATION_M 0x02000000
#define HTT_PPDU_STATS_COMMON_TLV_DOPPLER_INDICATION_S 25

#define HTT_PPDU_STATS_COMMON_TLV_DOPPLER_INDICATION_GET(_var) \
(((_var) & HTT_PPDU_STATS_COMMON_TLV_DOPPLER_INDICATION_M) >> \
HTT_PPDU_STATS_COMMON_TLV_DOPPLER_INDICATION_S)

#define HTT_PPDU_STATS_COMMON_TLV_DOPPLER_INDICATION_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_DOPPLER_INDICATION, _val); \
((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_DOPPLER_INDICATION_S)); \
} while (0)

enum HTT_PPDU_STATS_SPATIAL_REUSE {
HTT_SRP_DISALLOW = 0,
/* values 1-12 are reserved */
HTT_SR_RESTRICTED = 13,
HTT_SR_DELAY = 14,
HTT_SRP_AND_NON_SRG_OBSS_PD_PROHIBITED = 15,
};
typedef enum HTT_PPDU_STATS_SPATIAL_REUSE HTT_PPDU_STATS_SPATIAL_REUSE;

#define HTT_PPDU_STATS_COMMON_TLV_SPATIAL_REUSE_M 0x3c000000
#define HTT_PPDU_STATS_COMMON_TLV_SPATIAL_REUSE_S 26

#define HTT_PPDU_STATS_COMMON_TLV_SPATIAL_REUSE_GET(_var) \
(((_var) & HTT_PPDU_STATS_COMMON_TLV_SPATIAL_REUSE_M) >> \
HTT_PPDU_STATS_COMMON_TLV_SPATIAL_REUSE_S)

#define HTT_PPDU_STATS_COMMON_TLV_SPATIAL_REUSE_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_SPATIAL_REUSE, _val); \
((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_SPATIAL_REUSE_S)); \
} while (0)

#define HTT_PPDU_STATS_COMMON_TLV_BSS_COLOR_ID_M 0x0000003f
#define HTT_PPDU_STATS_COMMON_TLV_BSS_COLOR_ID_S 0

#define HTT_PPDU_STATS_COMMON_TLV_BSS_COLOR_ID_GET(_var) \
(((_var) & HTT_PPDU_STATS_COMMON_TLV_BSS_COLOR_ID_M) >> \
HTT_PPDU_STATS_COMMON_TLV_BSS_COLOR_ID_S)

#define HTT_PPDU_STATS_COMMON_TLV_BSS_COLOR_ID_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_BSS_COLOR_ID, _val); \
((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_BSS_COLOR_ID_S)); \
} while (0)

typedef struct {
htt_tlv_hdr_t tlv_hdr;

Expand Down Expand Up @@ -634,24 +683,46 @@ typedef struct {
* then beam_change = 0.
* If we apply TxBF only starting from HE portion,
* then beam_change = 1.
* BIT [31 : 25] - reserved
* BIT [25 : 25] - doppler_indication
* BIT [29 : 26] - spatial_reuse for HE_SU,HE_MU and HE_EXT_SU format PPDU
* HTT_PPDU_STATS_SPATIAL_REUSE
* BIT [31 : 30] - reserved
*/
union {
A_UINT32 reserved__ppdu_tx_time_us;
A_UINT32 reserved__num_ul_expected_users__ppdu_tx_time_us;
A_UINT32 reserved__spatial_reuse__doppler_indication__beam_change__num_ul_expected_users__ppdu_tx_time_us;
struct {
A_UINT32 phy_ppdu_tx_time_us: 16,
num_ul_expected_users: 8,
beam_change: 1,
reserved1: 7;
doppler_indication: 1,
spatial_reuse: 4,
reserved1: 2;
};
};

/* ppdu_start_tstmp_u32_us:
* Upper 32 bits of the PPDU start timestamp.
* This field can be combined with the ppdu_start_tstmp_us field's
* lower 32 bits of the PPDU start timestamp to form a 64-bit timestamp.
*/
A_UINT32 ppdu_start_tstmp_u32_us;

/*
* BIT [5 : 0] - bss_color_id indicates he_bss_color which is an identifier
* of the BSS and is used to assist a receiving STA in
* identifying the BSS from which a PPDU originates.
* Value in the range 0 to 63
* BIT [31 : 6] -reserved
*/
union {
A_UINT32 reserved__bss_color_id;
struct {
A_UINT32 bss_color_id: 6,
reserved2: 26;
};
};
} htt_ppdu_stats_common_tlv;

#define HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM_M 0x000000ff
Expand Down Expand Up @@ -2188,5 +2259,49 @@ typedef struct {
A_UINT32 payload[1];
} htt_ppdu_stats_tx_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

#define HTT_PPDU_STATS_USERS_INFO_TLV_MAX_USERS_GET(_var) \
(((_var) & HTT_PPDU_STATS_USERS_INFO_TLV_MAX_USERS_M) >> \
HTT_PPDU_STATS_USERS_INFO_TLV_MAX_USERS_S)

#define HTT_PPDU_STATS_USERS_INFO_TLV_MAX_USERS_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USERS_INFO_TLV_MAX_USERS, _val); \
((_var) |= ((_val) << HTT_PPDU_STATS_USERS_INFO_TLV_MAX_USERS_S)); \
} while (0)

#define HTT_PPDU_STATS_USERS_INFO_TLV_FRAME_TYPE_M 0x0000ff00
#define HTT_PPDU_STATS_USERS_INFO_TLV_FRAME_TYPE_S 8

#define HTT_PPDU_STATS_USERS_INFO_TLV_FRAME_TYPE_GET(_var) \
(((_var) & HTT_PPDU_STATS_USERS_INFO_TLV_FRAME_TYPE_M) >> \
HTT_PPDU_STATS_USERS_INFO_TLV_FRAME_TYPE_S)

#define HTT_PPDU_STATS_USERS_INFO_TLV_FRAME_TYPE_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USERS_INFO_TLV_FRAME_TYPE, _val); \
((_var) |= ((_val) << HTT_PPDU_STATS_USERS_INFO_TLV_FRAME_TYPE_S)); \
} while (0)

typedef struct {
htt_tlv_hdr_t tlv_hdr;

/*
* BIT [ 7 : 0] :- max_users
* BIT [ 15 : 8] :- frame_type (HTT_STATS_FTYPE)
* BIT [ 31 : 16] :- reserved1
*/
union {
A_UINT32 rsvd__frame_type__max_users;
struct {
A_UINT32 max_users: 8,
frame_type: 8,
reserved1: 16;
};
};
} htt_ppdu_stats_users_info_tlv;


#endif //__HTT_PPDU_STATS_H__
Loading

0 comments on commit b273cca

Please sign in to comment.