1 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
3 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
4 * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
13 #define DP_MAX_NWIFI_HDR_LEN 30
15 #define DP_RX_MPDU_ERR_FCS BIT(0)
16 #define DP_RX_MPDU_ERR_DECRYPT BIT(1)
17 #define DP_RX_MPDU_ERR_TKIP_MIC BIT(2)
18 #define DP_RX_MPDU_ERR_AMSDU_ERR BIT(3)
19 #define DP_RX_MPDU_ERR_OVERFLOW BIT(4)
20 #define DP_RX_MPDU_ERR_MSDU_LEN BIT(5)
21 #define DP_RX_MPDU_ERR_MPDU_LEN BIT(6)
22 #define DP_RX_MPDU_ERR_UNENCRYPTED_FRAME BIT(7)
24 enum dp_rx_decap_type
{
26 DP_RX_DECAP_TYPE_NATIVE_WIFI
,
27 DP_RX_DECAP_TYPE_ETHERNET2_DIX
,
28 DP_RX_DECAP_TYPE_8023
,
31 struct ath11k_dp_amsdu_subframe_hdr
{
37 struct ath11k_dp_rfc1042_hdr
{
45 int ath11k_dp_rx_ampdu_start(struct ath11k
*ar
,
46 struct ieee80211_ampdu_params
*params
);
47 int ath11k_dp_rx_ampdu_stop(struct ath11k
*ar
,
48 struct ieee80211_ampdu_params
*params
);
49 int ath11k_dp_peer_rx_pn_replay_config(struct ath11k_vif
*arvif
,
51 enum set_key_cmd key_cmd
,
52 struct ieee80211_key_conf
*key
);
53 void ath11k_peer_frags_flush(struct ath11k
*ar
, struct ath11k_peer
*peer
);
54 void ath11k_peer_rx_tid_cleanup(struct ath11k
*ar
, struct ath11k_peer
*peer
);
55 void ath11k_peer_rx_tid_delete(struct ath11k
*ar
,
56 struct ath11k_peer
*peer
, u8 tid
);
57 int ath11k_peer_rx_tid_setup(struct ath11k
*ar
, const u8
*peer_mac
, int vdev_id
,
58 u8 tid
, u32 ba_win_sz
, u16 ssn
,
59 enum hal_pn_type pn_type
);
60 void ath11k_dp_htt_htc_t2h_msg_handler(struct ath11k_base
*ab
,
62 int ath11k_dp_pdev_reo_setup(struct ath11k_base
*ab
);
63 void ath11k_dp_pdev_reo_cleanup(struct ath11k_base
*ab
);
64 int ath11k_dp_rx_pdev_alloc(struct ath11k_base
*ab
, int pdev_idx
);
65 void ath11k_dp_rx_pdev_free(struct ath11k_base
*ab
, int pdev_idx
);
66 void ath11k_dp_reo_cmd_list_cleanup(struct ath11k_base
*ab
);
67 void ath11k_dp_process_reo_status(struct ath11k_base
*ab
);
68 int ath11k_dp_process_rxdma_err(struct ath11k_base
*ab
, int mac_id
, int budget
);
69 int ath11k_dp_rx_process_wbm_err(struct ath11k_base
*ab
,
70 struct napi_struct
*napi
, int budget
);
71 int ath11k_dp_process_rx_err(struct ath11k_base
*ab
, struct napi_struct
*napi
,
73 int ath11k_dp_process_rx(struct ath11k_base
*ab
, int mac_id
,
74 struct napi_struct
*napi
,
76 int ath11k_dp_rxbufs_replenish(struct ath11k_base
*ab
, int mac_id
,
77 struct dp_rxdma_ring
*rx_ring
,
79 enum hal_rx_buf_return_buf_manager mgr
);
80 int ath11k_dp_htt_tlv_iter(struct ath11k_base
*ab
, const void *ptr
, size_t len
,
81 int (*iter
)(struct ath11k_base
*ar
, u16 tag
, u16 len
,
82 const void *ptr
, void *data
),
84 int ath11k_dp_rx_process_mon_rings(struct ath11k_base
*ab
, int mac_id
,
85 struct napi_struct
*napi
, int budget
);
86 int ath11k_dp_rx_process_mon_status(struct ath11k_base
*ab
, int mac_id
,
87 struct napi_struct
*napi
, int budget
);
88 int ath11k_dp_rx_mon_status_bufs_replenish(struct ath11k_base
*ab
, int mac_id
,
89 struct dp_rxdma_ring
*rx_ring
,
91 enum hal_rx_buf_return_buf_manager mgr
);
92 int ath11k_dp_rx_pdev_mon_detach(struct ath11k
*ar
);
93 int ath11k_dp_rx_pdev_mon_attach(struct ath11k
*ar
);
94 int ath11k_peer_rx_frag_setup(struct ath11k
*ar
, const u8
*peer_mac
, int vdev_id
);
96 int ath11k_dp_rx_pktlog_start(struct ath11k_base
*ab
);
97 int ath11k_dp_rx_pktlog_stop(struct ath11k_base
*ab
, bool stop_timer
);
99 int ath11k_dp_rx_crypto_mic_len(struct ath11k
*ar
, enum hal_encrypt_type enctype
);
101 #endif /* ATH11K_DP_RX_H */