dp_rx.h (3741B)
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 7 8#include "core.h" 9#include "rx_desc.h" 10#include "debug.h" 11 12#define DP_MAX_NWIFI_HDR_LEN 30 13 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) 22 23enum 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, 28}; 29 30struct ath11k_dp_amsdu_subframe_hdr { 31 u8 dst[ETH_ALEN]; 32 u8 src[ETH_ALEN]; 33 __be16 len; 34} __packed; 35 36struct 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; 43 44int ath11k_dp_rx_ampdu_start(struct ath11k *ar, 45 struct ieee80211_ampdu_params *params); 46int ath11k_dp_rx_ampdu_stop(struct ath11k *ar, 47 struct ieee80211_ampdu_params *params); 48int 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); 52void ath11k_peer_frags_flush(struct ath11k *ar, struct ath11k_peer *peer); 53void ath11k_peer_rx_tid_cleanup(struct ath11k *ar, struct ath11k_peer *peer); 54void ath11k_peer_rx_tid_delete(struct ath11k *ar, 55 struct ath11k_peer *peer, u8 tid); 56int ath11k_peer_rx_tid_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id, 57 u8 tid, u32 ba_win_sz, u16 ssn, 58 enum hal_pn_type pn_type); 59void ath11k_dp_htt_htc_t2h_msg_handler(struct ath11k_base *ab, 60 struct sk_buff *skb); 61int ath11k_dp_pdev_reo_setup(struct ath11k_base *ab); 62void ath11k_dp_pdev_reo_cleanup(struct ath11k_base *ab); 63int ath11k_dp_rx_pdev_alloc(struct ath11k_base *ab, int pdev_idx); 64void ath11k_dp_rx_pdev_free(struct ath11k_base *ab, int pdev_idx); 65void ath11k_dp_reo_cmd_list_cleanup(struct ath11k_base *ab); 66void ath11k_dp_process_reo_status(struct ath11k_base *ab); 67int ath11k_dp_process_rxdma_err(struct ath11k_base *ab, int mac_id, int budget); 68int ath11k_dp_rx_process_wbm_err(struct ath11k_base *ab, 69 struct napi_struct *napi, int budget); 70int ath11k_dp_process_rx_err(struct ath11k_base *ab, struct napi_struct *napi, 71 int budget); 72int ath11k_dp_process_rx(struct ath11k_base *ab, int mac_id, 73 struct napi_struct *napi, 74 int budget); 75int ath11k_dp_rxbufs_replenish(struct ath11k_base *ab, int mac_id, 76 struct dp_rxdma_ring *rx_ring, 77 int req_entries, 78 enum hal_rx_buf_return_buf_manager mgr); 79int ath11k_dp_htt_tlv_iter(struct ath11k_base *ab, const void *ptr, size_t len, 80 int (*iter)(struct ath11k_base *ar, u16 tag, u16 len, 81 const void *ptr, void *data), 82 void *data); 83int ath11k_dp_rx_process_mon_rings(struct ath11k_base *ab, int mac_id, 84 struct napi_struct *napi, int budget); 85int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id, 86 struct napi_struct *napi, int budget); 87int ath11k_dp_rx_mon_status_bufs_replenish(struct ath11k_base *ab, int mac_id, 88 struct dp_rxdma_ring *rx_ring, 89 int req_entries, 90 enum hal_rx_buf_return_buf_manager mgr); 91int ath11k_dp_rx_pdev_mon_detach(struct ath11k *ar); 92int ath11k_dp_rx_pdev_mon_attach(struct ath11k *ar); 93int ath11k_peer_rx_frag_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id); 94 95int ath11k_dp_rx_pktlog_start(struct ath11k_base *ab); 96int ath11k_dp_rx_pktlog_stop(struct ath11k_base *ab, bool stop_timer); 97 98#endif /* ATH11K_DP_RX_H */