Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / net / wireless / ath / ath11k / dp_rx.h
blobbf399312b5ff5c26a3823b29fa7a9ca09b14c3a5
1 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
2 /*
3 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
4 */
5 #ifndef ATH11K_DP_RX_H
6 #define ATH11K_DP_RX_H
8 #include "core.h"
9 #include "rx_desc.h"
10 #include "debug.h"
12 #define DP_MAX_NWIFI_HDR_LEN 30
14 #define DP_RX_MPDU_ERR_FCS BIT(0)
15 #define DP_RX_MPDU_ERR_DECRYPT BIT(1)
16 #define DP_RX_MPDU_ERR_TKIP_MIC BIT(2)
17 #define DP_RX_MPDU_ERR_AMSDU_ERR BIT(3)
18 #define DP_RX_MPDU_ERR_OVERFLOW BIT(4)
19 #define DP_RX_MPDU_ERR_MSDU_LEN BIT(5)
20 #define DP_RX_MPDU_ERR_MPDU_LEN BIT(6)
21 #define DP_RX_MPDU_ERR_UNENCRYPTED_FRAME BIT(7)
23 enum dp_rx_decap_type {
24 DP_RX_DECAP_TYPE_RAW,
25 DP_RX_DECAP_TYPE_NATIVE_WIFI,
26 DP_RX_DECAP_TYPE_ETHERNET2_DIX,
27 DP_RX_DECAP_TYPE_8023,
30 struct ath11k_dp_amsdu_subframe_hdr {
31 u8 dst[ETH_ALEN];
32 u8 src[ETH_ALEN];
33 __be16 len;
34 } __packed;
36 struct ath11k_dp_rfc1042_hdr {
37 u8 llc_dsap;
38 u8 llc_ssap;
39 u8 llc_ctrl;
40 u8 snap_oui[3];
41 __be16 snap_type;
42 } __packed;
44 int ath11k_dp_rx_ampdu_start(struct ath11k *ar,
45 struct ieee80211_ampdu_params *params);
46 int ath11k_dp_rx_ampdu_stop(struct ath11k *ar,
47 struct ieee80211_ampdu_params *params);
48 int ath11k_dp_peer_rx_pn_replay_config(struct ath11k_vif *arvif,
49 const u8 *peer_addr,
50 enum set_key_cmd key_cmd,
51 struct ieee80211_key_conf *key);
52 void ath11k_peer_rx_tid_cleanup(struct ath11k *ar, struct ath11k_peer *peer);
53 void ath11k_peer_rx_tid_delete(struct ath11k *ar,
54 struct ath11k_peer *peer, u8 tid);
55 int ath11k_peer_rx_tid_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id,
56 u8 tid, u32 ba_win_sz, u16 ssn,
57 enum hal_pn_type pn_type);
58 void ath11k_dp_htt_htc_t2h_msg_handler(struct ath11k_base *ab,
59 struct sk_buff *skb);
60 int ath11k_dp_pdev_reo_setup(struct ath11k_base *ab);
61 void ath11k_dp_pdev_reo_cleanup(struct ath11k_base *ab);
62 int ath11k_dp_rx_pdev_alloc(struct ath11k_base *ab, int pdev_idx);
63 void ath11k_dp_rx_pdev_free(struct ath11k_base *ab, int pdev_idx);
64 void ath11k_dp_reo_cmd_list_cleanup(struct ath11k_base *ab);
65 void ath11k_dp_process_reo_status(struct ath11k_base *ab);
66 int ath11k_dp_process_rxdma_err(struct ath11k_base *ab, int mac_id, int budget);
67 int ath11k_dp_rx_process_wbm_err(struct ath11k_base *ab,
68 struct napi_struct *napi, int budget);
69 int ath11k_dp_process_rx_err(struct ath11k_base *ab, struct napi_struct *napi,
70 int budget);
71 int ath11k_dp_process_rx(struct ath11k_base *ab, int mac_id,
72 struct napi_struct *napi,
73 int budget);
74 int ath11k_dp_rxbufs_replenish(struct ath11k_base *ab, int mac_id,
75 struct dp_rxdma_ring *rx_ring,
76 int req_entries,
77 enum hal_rx_buf_return_buf_manager mgr);
78 int ath11k_dp_htt_tlv_iter(struct ath11k_base *ab, const void *ptr, size_t len,
79 int (*iter)(struct ath11k_base *ar, u16 tag, u16 len,
80 const void *ptr, void *data),
81 void *data);
82 int ath11k_dp_rx_process_mon_rings(struct ath11k_base *ab, int mac_id,
83 struct napi_struct *napi, int budget);
84 int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id,
85 struct napi_struct *napi, int budget);
86 int ath11k_dp_rx_mon_status_bufs_replenish(struct ath11k_base *ab, int mac_id,
87 struct dp_rxdma_ring *rx_ring,
88 int req_entries,
89 enum hal_rx_buf_return_buf_manager mgr);
90 int ath11k_dp_rx_pdev_mon_detach(struct ath11k *ar);
91 int ath11k_dp_rx_pdev_mon_attach(struct ath11k *ar);
92 int ath11k_peer_rx_frag_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id);
94 int ath11k_dp_rx_pktlog_start(struct ath11k_base *ab);
95 int ath11k_dp_rx_pktlog_stop(struct ath11k_base *ab, bool stop_timer);
97 #endif /* ATH11K_DP_RX_H */