linux/include/linux/soc/mediatek/mtk_wed.h

#ifndef __MTK_WED_H
#define __MTK_WED_H

#include <linux/kernel.h>
#include <linux/rcupdate.h>
#include <linux/regmap.h>
#include <linux/pci.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>

#define MTK_WED_TX_QUEUES
#define MTK_WED_RX_QUEUES
#define MTK_WED_RX_PAGE_QUEUES

#define WED_WO_STA_REC

struct mtk_wed_hw;
struct mtk_wdma_desc;

enum mtk_wed_wo_cmd {};

struct mtk_wed_bm_desc {} __packed __aligned();

enum mtk_wed_bus_tye {};

#define MTK_WED_RING_CONFIGURED
struct mtk_wed_ring {};

struct mtk_wed_wo_rx_stats {};

struct mtk_wed_buf {};

struct mtk_wed_device {};

struct mtk_wed_ops {};

extern const struct mtk_wed_ops __rcu *mtk_soc_wed_ops;

static inline int
mtk_wed_device_attach(struct mtk_wed_device *dev)
{}

static inline bool mtk_wed_get_rx_capa(struct mtk_wed_device *dev)
{}

static inline bool mtk_wed_is_amsdu_supported(struct mtk_wed_device *dev)
{}

#ifdef CONFIG_NET_MEDIATEK_SOC_WED
#define mtk_wed_device_active(_dev)
#define mtk_wed_device_detach(_dev)
#define mtk_wed_device_start(_dev, _mask)
#define mtk_wed_device_tx_ring_setup(_dev, _ring, _regs, _reset)
#define mtk_wed_device_txfree_ring_setup(_dev, _regs)
#define mtk_wed_device_reg_read(_dev, _reg)
#define mtk_wed_device_reg_write(_dev, _reg, _val)
#define mtk_wed_device_irq_get(_dev, _mask)
#define mtk_wed_device_irq_set_mask(_dev, _mask)
#define mtk_wed_device_rx_ring_setup(_dev, _ring, _regs, _reset)
#define mtk_wed_device_ppe_check(_dev, _skb, _reason, _hash)
#define mtk_wed_device_update_msg(_dev, _id, _msg, _len)
#define mtk_wed_device_stop(_dev)
#define mtk_wed_device_dma_reset(_dev)
#define mtk_wed_device_setup_tc(_dev, _netdev, _type, _type_data)
#define mtk_wed_device_start_hw_rro(_dev, _mask, _reset)
#define mtk_wed_device_rro_rx_ring_setup(_dev, _ring, _regs)
#define mtk_wed_device_msdu_pg_rx_ring_setup(_dev, _ring, _regs)
#define mtk_wed_device_ind_rx_ring_setup(_dev, _regs)

#else
static inline bool mtk_wed_device_active(struct mtk_wed_device *dev)
{
	return false;
}
#define mtk_wed_device_detach
#define mtk_wed_device_start
#define mtk_wed_device_tx_ring_setup
#define mtk_wed_device_txfree_ring_setup
#define mtk_wed_device_reg_read
#define mtk_wed_device_reg_write
#define mtk_wed_device_irq_get
#define mtk_wed_device_irq_set_mask
#define mtk_wed_device_rx_ring_setup
#define mtk_wed_device_ppe_check
#define mtk_wed_device_update_msg
#define mtk_wed_device_stop
#define mtk_wed_device_dma_reset
#define mtk_wed_device_setup_tc
#define mtk_wed_device_start_hw_rro
#define mtk_wed_device_rro_rx_ring_setup
#define mtk_wed_device_msdu_pg_rx_ring_setup
#define mtk_wed_device_ind_rx_ring_setup
#endif

#endif