1 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
3 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
4 * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
7 #ifndef ATH12K_HAL_RX_H
8 #define ATH12K_HAL_RX_H
10 struct hal_rx_wbm_rel_info
{
12 enum hal_wbm_rel_src_module err_rel_src
;
13 enum hal_reo_dest_ring_push_reason push_reason
;
22 #define HAL_INVALID_PEERID 0xffff
23 #define VHT_SIG_SU_NSS_MASK 0x7
25 #define HAL_RX_MAX_MCS 12
26 #define HAL_RX_MAX_NSS 8
28 #define HAL_RX_MPDU_INFO_PN_GET_BYTE1(__val) \
29 le32_get_bits((__val), GENMASK(7, 0))
31 #define HAL_RX_MPDU_INFO_PN_GET_BYTE2(__val) \
32 le32_get_bits((__val), GENMASK(15, 8))
34 #define HAL_RX_MPDU_INFO_PN_GET_BYTE3(__val) \
35 le32_get_bits((__val), GENMASK(23, 16))
37 #define HAL_RX_MPDU_INFO_PN_GET_BYTE4(__val) \
38 le32_get_bits((__val), GENMASK(31, 24))
40 struct hal_rx_mon_status_tlv_hdr
{
45 enum hal_rx_su_mu_coding
{
46 HAL_RX_SU_MU_CODING_BCC
,
47 HAL_RX_SU_MU_CODING_LDPC
,
48 HAL_RX_SU_MU_CODING_MAX
,
68 enum hal_rx_preamble
{
77 enum hal_rx_reception_type
{
78 HAL_RX_RECEPTION_TYPE_SU
,
79 HAL_RX_RECEPTION_TYPE_MU_MIMO
,
80 HAL_RX_RECEPTION_TYPE_MU_OFDMA
,
81 HAL_RX_RECEPTION_TYPE_MU_OFDMA_MIMO
,
82 HAL_RX_RECEPTION_TYPE_MAX
,
85 enum hal_rx_legacy_rate
{
86 HAL_RX_LEGACY_RATE_1_MBPS
,
87 HAL_RX_LEGACY_RATE_2_MBPS
,
88 HAL_RX_LEGACY_RATE_5_5_MBPS
,
89 HAL_RX_LEGACY_RATE_6_MBPS
,
90 HAL_RX_LEGACY_RATE_9_MBPS
,
91 HAL_RX_LEGACY_RATE_11_MBPS
,
92 HAL_RX_LEGACY_RATE_12_MBPS
,
93 HAL_RX_LEGACY_RATE_18_MBPS
,
94 HAL_RX_LEGACY_RATE_24_MBPS
,
95 HAL_RX_LEGACY_RATE_36_MBPS
,
96 HAL_RX_LEGACY_RATE_48_MBPS
,
97 HAL_RX_LEGACY_RATE_54_MBPS
,
98 HAL_RX_LEGACY_RATE_INVALID
,
101 #define HAL_TLV_STATUS_PPDU_NOT_DONE 0
102 #define HAL_TLV_STATUS_PPDU_DONE 1
103 #define HAL_TLV_STATUS_BUF_DONE 2
104 #define HAL_TLV_STATUS_PPDU_NON_STD_DONE 3
105 #define HAL_RX_FCS_LEN 4
107 enum hal_rx_mon_status
{
108 HAL_RX_MON_STATUS_PPDU_NOT_DONE
,
109 HAL_RX_MON_STATUS_PPDU_DONE
,
110 HAL_RX_MON_STATUS_BUF_DONE
,
113 #define HAL_RX_MAX_MPDU 256
114 #define HAL_RX_NUM_WORDS_PER_PPDU_BITMAP (HAL_RX_MAX_MPDU >> 5)
116 struct hal_rx_user_status
{
120 ul_ofdma_ru_start_index
:7,
123 u32 ul_ofdma_user_v0_word0
;
124 u32 ul_ofdma_user_v0_word1
;
128 u16 tcp_ack_msdu_count
;
130 u16 other_msdu_count
;
132 u8 frame_control_info_valid
;
133 u8 data_sequence_control_info_valid
;
134 u16 first_data_seq_ctrl
;
142 u32 mpdu_cnt_fcs_err
;
143 u32 mpdu_fcs_ok_bitmap
[HAL_RX_NUM_WORDS_PER_PPDU_BITMAP
];
144 u32 mpdu_ok_byte_count
;
145 u32 mpdu_err_byte_count
;
148 #define HAL_MAX_UL_MU_USERS 37
150 struct hal_rx_mon_ppdu_info
{
155 u32 num_mpdu_fcs_err
;
161 u16 tcp_ack_msdu_count
;
163 u16 other_msdu_count
;
171 u8 vht_flag_values3
[4];
174 u16 vht_flag_values6
;
199 u8 frame_control_info_valid
;
202 u8 he_per_user_position
;
203 u8 he_per_user_known
;
216 u16 first_data_seq_ctrl
;
217 u8 monitor_direct_used
;
218 u8 data_sequence_control_info_valid
;
220 u8 rxpcu_filter_pass
;
223 u32 mpdu_fcs_ok_bitmap
[HAL_RX_NUM_WORDS_PER_PPDU_BITMAP
];
228 struct hal_rx_user_status userstats
[HAL_MAX_UL_MU_USERS
];
230 u16 ampdu_id
[HAL_MAX_UL_MU_USERS
];
231 bool first_msdu_in_mpdu
;
236 #define HAL_RX_PPDU_START_INFO0_PPDU_ID GENMASK(15, 0)
237 #define HAL_RX_PPDU_START_INFO1_CHAN_NUM GENMASK(15, 0)
238 #define HAL_RX_PPDU_START_INFO1_CHAN_FREQ GENMASK(31, 16)
240 struct hal_rx_ppdu_start
{
243 __le32 ppdu_start_ts_31_0
;
244 __le32 ppdu_start_ts_63_32
;
248 #define HAL_RX_PPDU_END_USER_STATS_INFO0_MPDU_CNT_FCS_ERR GENMASK(26, 16)
250 #define HAL_RX_PPDU_END_USER_STATS_INFO1_MPDU_CNT_FCS_OK GENMASK(10, 0)
251 #define HAL_RX_PPDU_END_USER_STATS_INFO1_FC_VALID BIT(11)
252 #define HAL_RX_PPDU_END_USER_STATS_INFO1_QOS_CTRL_VALID BIT(12)
253 #define HAL_RX_PPDU_END_USER_STATS_INFO1_HT_CTRL_VALID BIT(13)
254 #define HAL_RX_PPDU_END_USER_STATS_INFO1_PKT_TYPE GENMASK(24, 21)
256 #define HAL_RX_PPDU_END_USER_STATS_INFO2_AST_INDEX GENMASK(15, 0)
257 #define HAL_RX_PPDU_END_USER_STATS_INFO2_FRAME_CTRL GENMASK(31, 16)
259 #define HAL_RX_PPDU_END_USER_STATS_INFO3_QOS_CTRL GENMASK(31, 16)
261 #define HAL_RX_PPDU_END_USER_STATS_INFO4_UDP_MSDU_CNT GENMASK(15, 0)
262 #define HAL_RX_PPDU_END_USER_STATS_INFO4_TCP_MSDU_CNT GENMASK(31, 16)
264 #define HAL_RX_PPDU_END_USER_STATS_INFO5_OTHER_MSDU_CNT GENMASK(15, 0)
265 #define HAL_RX_PPDU_END_USER_STATS_INFO5_TCP_ACK_MSDU_CNT GENMASK(31, 16)
267 #define HAL_RX_PPDU_END_USER_STATS_INFO6_TID_BITMAP GENMASK(15, 0)
268 #define HAL_RX_PPDU_END_USER_STATS_INFO6_TID_EOSP_BITMAP GENMASK(31, 16)
270 #define HAL_RX_PPDU_END_USER_STATS_INFO7_MPDU_OK_BYTE_COUNT GENMASK(24, 0)
271 #define HAL_RX_PPDU_END_USER_STATS_INFO8_MPDU_ERR_BYTE_COUNT GENMASK(24, 0)
273 struct hal_rx_ppdu_end_user_stats
{
290 __le32 usr_resp_ref_ext
;
294 struct hal_rx_ppdu_end_user_stats_ext
{
304 #define HAL_RX_HT_SIG_INFO_INFO0_MCS GENMASK(6, 0)
305 #define HAL_RX_HT_SIG_INFO_INFO0_BW BIT(7)
307 #define HAL_RX_HT_SIG_INFO_INFO1_STBC GENMASK(5, 4)
308 #define HAL_RX_HT_SIG_INFO_INFO1_FEC_CODING BIT(6)
309 #define HAL_RX_HT_SIG_INFO_INFO1_GI BIT(7)
311 struct hal_rx_ht_sig_info
{
316 #define HAL_RX_LSIG_B_INFO_INFO0_RATE GENMASK(3, 0)
317 #define HAL_RX_LSIG_B_INFO_INFO0_LEN GENMASK(15, 4)
319 struct hal_rx_lsig_b_info
{
323 #define HAL_RX_LSIG_A_INFO_INFO0_RATE GENMASK(3, 0)
324 #define HAL_RX_LSIG_A_INFO_INFO0_LEN GENMASK(16, 5)
325 #define HAL_RX_LSIG_A_INFO_INFO0_PKT_TYPE GENMASK(27, 24)
327 struct hal_rx_lsig_a_info
{
331 #define HAL_RX_VHT_SIG_A_INFO_INFO0_BW GENMASK(1, 0)
332 #define HAL_RX_VHT_SIG_A_INFO_INFO0_STBC BIT(3)
333 #define HAL_RX_VHT_SIG_A_INFO_INFO0_GROUP_ID GENMASK(9, 4)
334 #define HAL_RX_VHT_SIG_A_INFO_INFO0_NSTS GENMASK(21, 10)
336 #define HAL_RX_VHT_SIG_A_INFO_INFO1_GI_SETTING GENMASK(1, 0)
337 #define HAL_RX_VHT_SIG_A_INFO_INFO1_SU_MU_CODING BIT(2)
338 #define HAL_RX_VHT_SIG_A_INFO_INFO1_MCS GENMASK(7, 4)
339 #define HAL_RX_VHT_SIG_A_INFO_INFO1_BEAMFORMED BIT(8)
341 struct hal_rx_vht_sig_a_info
{
346 enum hal_rx_vht_sig_a_gi_setting
{
347 HAL_RX_VHT_SIG_A_NORMAL_GI
= 0,
348 HAL_RX_VHT_SIG_A_SHORT_GI
= 1,
349 HAL_RX_VHT_SIG_A_SHORT_GI_AMBIGUITY
= 3,
361 #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_MCS GENMASK(6, 3)
362 #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_DCM BIT(7)
363 #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_BW GENMASK(20, 19)
364 #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_CP_LTF_SIZE GENMASK(22, 21)
365 #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_NSTS GENMASK(25, 23)
366 #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_BSS_COLOR GENMASK(13, 8)
367 #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_SPATIAL_REUSE GENMASK(18, 15)
368 #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_FORMAT_IND BIT(0)
369 #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_BEAM_CHANGE BIT(1)
370 #define HAL_RX_HE_SIG_A_SU_INFO_INFO0_DL_UL_FLAG BIT(2)
372 #define HAL_RX_HE_SIG_A_SU_INFO_INFO1_TXOP_DURATION GENMASK(6, 0)
373 #define HAL_RX_HE_SIG_A_SU_INFO_INFO1_CODING BIT(7)
374 #define HAL_RX_HE_SIG_A_SU_INFO_INFO1_LDPC_EXTRA BIT(8)
375 #define HAL_RX_HE_SIG_A_SU_INFO_INFO1_STBC BIT(9)
376 #define HAL_RX_HE_SIG_A_SU_INFO_INFO1_TXBF BIT(10)
377 #define HAL_RX_HE_SIG_A_SU_INFO_INFO1_PKT_EXT_FACTOR GENMASK(12, 11)
378 #define HAL_RX_HE_SIG_A_SU_INFO_INFO1_PKT_EXT_PE_DISAM BIT(13)
379 #define HAL_RX_HE_SIG_A_SU_INFO_INFO1_DOPPLER_IND BIT(15)
381 struct hal_rx_he_sig_a_su_info
{
386 #define HAL_RX_HE_SIG_A_MU_DL_INFO0_UL_FLAG BIT(1)
387 #define HAL_RX_HE_SIG_A_MU_DL_INFO0_MCS_OF_SIGB GENMASK(3, 1)
388 #define HAL_RX_HE_SIG_A_MU_DL_INFO0_DCM_OF_SIGB BIT(4)
389 #define HAL_RX_HE_SIG_A_MU_DL_INFO0_BSS_COLOR GENMASK(10, 5)
390 #define HAL_RX_HE_SIG_A_MU_DL_INFO0_SPATIAL_REUSE GENMASK(14, 11)
391 #define HAL_RX_HE_SIG_A_MU_DL_INFO0_TRANSMIT_BW GENMASK(17, 15)
392 #define HAL_RX_HE_SIG_A_MU_DL_INFO0_NUM_SIGB_SYMB GENMASK(21, 18)
393 #define HAL_RX_HE_SIG_A_MU_DL_INFO0_COMP_MODE_SIGB BIT(22)
394 #define HAL_RX_HE_SIG_A_MU_DL_INFO0_CP_LTF_SIZE GENMASK(24, 23)
395 #define HAL_RX_HE_SIG_A_MU_DL_INFO0_DOPPLER_INDICATION BIT(25)
397 #define HAL_RX_HE_SIG_A_MU_DL_INFO1_TXOP_DURATION GENMASK(6, 0)
398 #define HAL_RX_HE_SIG_A_MU_DL_INFO1_CODING BIT(7)
399 #define HAL_RX_HE_SIG_A_MU_DL_INFO1_NUM_LTF_SYMB GENMASK(10, 8)
400 #define HAL_RX_HE_SIG_A_MU_DL_INFO1_LDPC_EXTRA BIT(11)
401 #define HAL_RX_HE_SIG_A_MU_DL_INFO1_STBC BIT(12)
402 #define HAL_RX_HE_SIG_A_MU_DL_INFO1_TXBF BIT(10)
403 #define HAL_RX_HE_SIG_A_MU_DL_INFO1_PKT_EXT_FACTOR GENMASK(14, 13)
404 #define HAL_RX_HE_SIG_A_MU_DL_INFO1_PKT_EXT_PE_DISAM BIT(15)
406 struct hal_rx_he_sig_a_mu_dl_info
{
411 #define HAL_RX_HE_SIG_B1_MU_INFO_INFO0_RU_ALLOCATION GENMASK(7, 0)
413 struct hal_rx_he_sig_b1_mu_info
{
417 #define HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_ID GENMASK(10, 0)
418 #define HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_MCS GENMASK(18, 15)
419 #define HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_CODING BIT(20)
420 #define HAL_RX_HE_SIG_B2_MU_INFO_INFO0_STA_NSTS GENMASK(31, 29)
422 struct hal_rx_he_sig_b2_mu_info
{
426 #define HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_ID GENMASK(10, 0)
427 #define HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_NSTS GENMASK(13, 11)
428 #define HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_TXBF BIT(19)
429 #define HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_MCS GENMASK(18, 15)
430 #define HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_DCM BIT(19)
431 #define HAL_RX_HE_SIG_B2_OFDMA_INFO_INFO0_STA_CODING BIT(20)
433 struct hal_rx_he_sig_b2_ofdma_info
{
437 enum hal_rx_ul_reception_type
{
438 HAL_RECEPTION_TYPE_ULOFMDA
,
439 HAL_RECEPTION_TYPE_ULMIMO
,
440 HAL_RECEPTION_TYPE_OTHER
,
441 HAL_RECEPTION_TYPE_FRAMELESS
444 #define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RECEPTION GENMASK(3, 0)
445 #define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO0_RX_BW GENMASK(7, 5)
446 #define HAL_RX_PHYRX_RSSI_LEGACY_INFO_INFO1_RSSI_COMB GENMASK(15, 8)
448 struct hal_rx_phyrx_rssi_legacy_info
{
455 #define HAL_RX_MPDU_START_INFO0_PPDU_ID GENMASK(31, 16)
456 #define HAL_RX_MPDU_START_INFO1_PEERID GENMASK(31, 16)
457 #define HAL_RX_MPDU_START_INFO2_MPDU_LEN GENMASK(13, 0)
458 struct hal_rx_mpdu_start
{
467 #define HAL_RX_PPDU_END_DURATION GENMASK(23, 0)
468 struct hal_rx_ppdu_end_duration
{
474 struct hal_rx_rxpcu_classification_overview
{
478 struct hal_rx_msdu_desc_info
{
480 u16 msdu_len
; /* 14 bits for length */
483 #define HAL_RX_NUM_MSDU_DESC 6
484 struct hal_rx_msdu_list
{
485 struct hal_rx_msdu_desc_info msdu_info
[HAL_RX_NUM_MSDU_DESC
];
486 u32 sw_cookie
[HAL_RX_NUM_MSDU_DESC
];
487 u8 rbm
[HAL_RX_NUM_MSDU_DESC
];
490 #define HAL_RX_FBM_ACK_INFO0_ADDR1_31_0 GENMASK(31, 0)
491 #define HAL_RX_FBM_ACK_INFO1_ADDR1_47_32 GENMASK(15, 0)
492 #define HAL_RX_FBM_ACK_INFO1_ADDR2_15_0 GENMASK(31, 16)
493 #define HAL_RX_FBM_ACK_INFO2_ADDR2_47_16 GENMASK(31, 0)
495 struct hal_rx_frame_bitmap_ack
{
500 __le32 reserved1
[10];
503 #define HAL_RX_RESP_REQ_INFO0_PPDU_ID GENMASK(15, 0)
504 #define HAL_RX_RESP_REQ_INFO0_RECEPTION_TYPE BIT(16)
505 #define HAL_RX_RESP_REQ_INFO1_DURATION GENMASK(15, 0)
506 #define HAL_RX_RESP_REQ_INFO1_RATE_MCS GENMASK(24, 21)
507 #define HAL_RX_RESP_REQ_INFO1_SGI GENMASK(26, 25)
508 #define HAL_RX_RESP_REQ_INFO1_STBC BIT(27)
509 #define HAL_RX_RESP_REQ_INFO1_LDPC BIT(28)
510 #define HAL_RX_RESP_REQ_INFO1_IS_AMPDU BIT(29)
511 #define HAL_RX_RESP_REQ_INFO2_NUM_USER GENMASK(6, 0)
512 #define HAL_RX_RESP_REQ_INFO3_ADDR1_31_0 GENMASK(31, 0)
513 #define HAL_RX_RESP_REQ_INFO4_ADDR1_47_32 GENMASK(15, 0)
514 #define HAL_RX_RESP_REQ_INFO4_ADDR1_15_0 GENMASK(31, 16)
515 #define HAL_RX_RESP_REQ_INFO5_ADDR1_47_16 GENMASK(31, 0)
517 struct hal_rx_resp_req_info
{
529 #define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_0 0xDDBEEF
530 #define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_1 0xADBEEF
531 #define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_2 0xBDBEEF
532 #define REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_3 0xCDBEEF
534 #define HAL_RX_UL_OFDMA_USER_INFO_V0_W0_VALID BIT(30)
535 #define HAL_RX_UL_OFDMA_USER_INFO_V0_W0_VER BIT(31)
536 #define HAL_RX_UL_OFDMA_USER_INFO_V0_W1_NSS GENMASK(2, 0)
537 #define HAL_RX_UL_OFDMA_USER_INFO_V0_W1_MCS GENMASK(6, 3)
538 #define HAL_RX_UL_OFDMA_USER_INFO_V0_W1_LDPC BIT(7)
539 #define HAL_RX_UL_OFDMA_USER_INFO_V0_W1_DCM BIT(8)
540 #define HAL_RX_UL_OFDMA_USER_INFO_V0_W1_RU_START GENMASK(15, 9)
541 #define HAL_RX_UL_OFDMA_USER_INFO_V0_W1_RU_SIZE GENMASK(18, 16)
543 /* HE Radiotap data1 Mask */
544 #define HE_SU_FORMAT_TYPE 0x0000
545 #define HE_EXT_SU_FORMAT_TYPE 0x0001
546 #define HE_MU_FORMAT_TYPE 0x0002
547 #define HE_TRIG_FORMAT_TYPE 0x0003
548 #define HE_BEAM_CHANGE_KNOWN 0x0008
549 #define HE_DL_UL_KNOWN 0x0010
550 #define HE_MCS_KNOWN 0x0020
551 #define HE_DCM_KNOWN 0x0040
552 #define HE_CODING_KNOWN 0x0080
553 #define HE_LDPC_EXTRA_SYMBOL_KNOWN 0x0100
554 #define HE_STBC_KNOWN 0x0200
555 #define HE_DATA_BW_RU_KNOWN 0x4000
556 #define HE_DOPPLER_KNOWN 0x8000
557 #define HE_BSS_COLOR_KNOWN 0x0004
559 /* HE Radiotap data2 Mask */
560 #define HE_GI_KNOWN 0x0002
561 #define HE_TXBF_KNOWN 0x0010
562 #define HE_PE_DISAMBIGUITY_KNOWN 0x0020
563 #define HE_TXOP_KNOWN 0x0040
564 #define HE_LTF_SYMBOLS_KNOWN 0x0004
565 #define HE_PRE_FEC_PADDING_KNOWN 0x0008
566 #define HE_MIDABLE_PERIODICITY_KNOWN 0x0080
568 /* HE radiotap data3 shift values */
569 #define HE_BEAM_CHANGE_SHIFT 6
570 #define HE_DL_UL_SHIFT 7
571 #define HE_TRANSMIT_MCS_SHIFT 8
572 #define HE_DCM_SHIFT 12
573 #define HE_CODING_SHIFT 13
574 #define HE_LDPC_EXTRA_SYMBOL_SHIFT 14
575 #define HE_STBC_SHIFT 15
577 /* HE radiotap data4 shift values */
578 #define HE_STA_ID_SHIFT 4
580 /* HE radiotap data5 */
581 #define HE_GI_SHIFT 4
582 #define HE_LTF_SIZE_SHIFT 6
583 #define HE_LTF_SYM_SHIFT 8
584 #define HE_TXBF_SHIFT 14
585 #define HE_PE_DISAMBIGUITY_SHIFT 15
586 #define HE_PRE_FEC_PAD_SHIFT 12
588 /* HE radiotap data6 */
589 #define HE_DOPPLER_SHIFT 4
590 #define HE_TXOP_SHIFT 8
592 /* HE radiotap HE-MU flags1 */
593 #define HE_SIG_B_MCS_KNOWN 0x0010
594 #define HE_SIG_B_DCM_KNOWN 0x0040
595 #define HE_SIG_B_SYM_NUM_KNOWN 0x8000
596 #define HE_RU_0_KNOWN 0x0100
597 #define HE_RU_1_KNOWN 0x0200
598 #define HE_RU_2_KNOWN 0x0400
599 #define HE_RU_3_KNOWN 0x0800
600 #define HE_DCM_FLAG_1_SHIFT 5
601 #define HE_SPATIAL_REUSE_MU_KNOWN 0x0100
602 #define HE_SIG_B_COMPRESSION_FLAG_1_KNOWN 0x4000
604 /* HE radiotap HE-MU flags2 */
605 #define HE_SIG_B_COMPRESSION_FLAG_2_SHIFT 3
606 #define HE_BW_KNOWN 0x0004
607 #define HE_NUM_SIG_B_SYMBOLS_SHIFT 4
608 #define HE_SIG_B_COMPRESSION_FLAG_2_KNOWN 0x0100
609 #define HE_NUM_SIG_B_FLAG_2_SHIFT 9
610 #define HE_LTF_FLAG_2_SYMBOLS_SHIFT 12
611 #define HE_LTF_KNOWN 0x8000
613 /* HE radiotap per_user_1 */
614 #define HE_STA_SPATIAL_SHIFT 11
615 #define HE_TXBF_SHIFT 14
616 #define HE_RESERVED_SET_TO_1_SHIFT 19
617 #define HE_STA_CODING_SHIFT 20
619 /* HE radiotap per_user_2 */
620 #define HE_STA_MCS_SHIFT 4
621 #define HE_STA_DCM_SHIFT 5
623 /* HE radiotap per user known */
624 #define HE_USER_FIELD_POSITION_KNOWN 0x01
625 #define HE_STA_ID_PER_USER_KNOWN 0x02
626 #define HE_STA_NSTS_KNOWN 0x04
627 #define HE_STA_TX_BF_KNOWN 0x08
628 #define HE_STA_SPATIAL_CONFIG_KNOWN 0x10
629 #define HE_STA_MCS_KNOWN 0x20
630 #define HE_STA_DCM_KNOWN 0x40
631 #define HE_STA_CODING_KNOWN 0x80
633 #define HAL_RX_MPDU_ERR_FCS BIT(0)
634 #define HAL_RX_MPDU_ERR_DECRYPT BIT(1)
635 #define HAL_RX_MPDU_ERR_TKIP_MIC BIT(2)
636 #define HAL_RX_MPDU_ERR_AMSDU_ERR BIT(3)
637 #define HAL_RX_MPDU_ERR_OVERFLOW BIT(4)
638 #define HAL_RX_MPDU_ERR_MSDU_LEN BIT(5)
639 #define HAL_RX_MPDU_ERR_MPDU_LEN BIT(6)
640 #define HAL_RX_MPDU_ERR_UNENCRYPTED_FRAME BIT(7)
643 enum nl80211_he_ru_alloc
ath12k_he_ru_tones_to_nl80211_he_ru_alloc(u16 ru_tones
)
645 enum nl80211_he_ru_alloc ret
;
649 ret
= NL80211_RATE_INFO_HE_RU_ALLOC_52
;
652 ret
= NL80211_RATE_INFO_HE_RU_ALLOC_106
;
655 ret
= NL80211_RATE_INFO_HE_RU_ALLOC_242
;
658 ret
= NL80211_RATE_INFO_HE_RU_ALLOC_484
;
661 ret
= NL80211_RATE_INFO_HE_RU_ALLOC_996
;
666 ret
= NL80211_RATE_INFO_HE_RU_ALLOC_26
;
672 void ath12k_hal_reo_status_queue_stats(struct ath12k_base
*ab
,
673 struct hal_tlv_64_hdr
*tlv
,
674 struct hal_reo_status
*status
);
675 void ath12k_hal_reo_flush_queue_status(struct ath12k_base
*ab
,
676 struct hal_tlv_64_hdr
*tlv
,
677 struct hal_reo_status
*status
);
678 void ath12k_hal_reo_flush_cache_status(struct ath12k_base
*ab
,
679 struct hal_tlv_64_hdr
*tlv
,
680 struct hal_reo_status
*status
);
681 void ath12k_hal_reo_unblk_cache_status(struct ath12k_base
*ab
,
682 struct hal_tlv_64_hdr
*tlv
,
683 struct hal_reo_status
*status
);
684 void ath12k_hal_reo_flush_timeout_list_status(struct ath12k_base
*ab
,
685 struct hal_tlv_64_hdr
*tlv
,
686 struct hal_reo_status
*status
);
687 void ath12k_hal_reo_desc_thresh_reached_status(struct ath12k_base
*ab
,
688 struct hal_tlv_64_hdr
*tlv
,
689 struct hal_reo_status
*status
);
690 void ath12k_hal_reo_update_rx_reo_queue_status(struct ath12k_base
*ab
,
691 struct hal_tlv_64_hdr
*tlv
,
692 struct hal_reo_status
*status
);
693 void ath12k_hal_rx_msdu_link_info_get(struct hal_rx_msdu_link
*link
, u32
*num_msdus
,
695 enum hal_rx_buf_return_buf_manager
*rbm
);
696 void ath12k_hal_rx_msdu_link_desc_set(struct ath12k_base
*ab
,
697 struct hal_wbm_release_ring
*dst_desc
,
698 struct hal_wbm_release_ring
*src_desc
,
699 enum hal_wbm_rel_bm_act action
);
700 void ath12k_hal_rx_buf_addr_info_set(struct ath12k_buffer_addr
*binfo
,
701 dma_addr_t paddr
, u32 cookie
, u8 manager
);
702 void ath12k_hal_rx_buf_addr_info_get(struct ath12k_buffer_addr
*binfo
,
704 u32
*cookie
, u8
*rbm
);
705 int ath12k_hal_desc_reo_parse_err(struct ath12k_base
*ab
,
706 struct hal_reo_dest_ring
*desc
,
707 dma_addr_t
*paddr
, u32
*desc_bank
);
708 int ath12k_hal_wbm_desc_parse_err(struct ath12k_base
*ab
, void *desc
,
709 struct hal_rx_wbm_rel_info
*rel_info
);
710 void ath12k_hal_rx_reo_ent_paddr_get(struct ath12k_base
*ab
,
711 struct ath12k_buffer_addr
*buff_addr
,
712 dma_addr_t
*paddr
, u32
*cookie
);