#include <linux/atomic.h>
#include <linux/bitops.h>
#include <linux/completion.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/if_arp.h>
#include <linux/interrupt.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/soc/qcom/smem_state.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
#include <net/pkt_sched.h>
#define BAM_DMUX_BUFFER_SIZE …
#define BAM_DMUX_HDR_SIZE …
#define BAM_DMUX_MAX_DATA_SIZE …
#define BAM_DMUX_NUM_SKB …
#define BAM_DMUX_HDR_MAGIC …
#define BAM_DMUX_AUTOSUSPEND_DELAY …
#define BAM_DMUX_REMOTE_TIMEOUT …
enum { … };
enum { … };
struct bam_dmux_hdr { … };
struct bam_dmux_skb_dma { … };
struct bam_dmux { … };
struct bam_dmux_netdev { … };
static void bam_dmux_pc_vote(struct bam_dmux *dmux, bool enable)
{ … }
static void bam_dmux_pc_ack(struct bam_dmux *dmux)
{ … }
static bool bam_dmux_skb_dma_map(struct bam_dmux_skb_dma *skb_dma,
enum dma_data_direction dir)
{ … }
static void bam_dmux_skb_dma_unmap(struct bam_dmux_skb_dma *skb_dma,
enum dma_data_direction dir)
{ … }
static void bam_dmux_tx_wake_queues(struct bam_dmux *dmux)
{ … }
static void bam_dmux_tx_stop_queues(struct bam_dmux *dmux)
{ … }
static void bam_dmux_tx_done(struct bam_dmux_skb_dma *skb_dma)
{ … }
static void bam_dmux_tx_callback(void *data)
{ … }
static bool bam_dmux_skb_dma_submit_tx(struct bam_dmux_skb_dma *skb_dma)
{ … }
static struct bam_dmux_skb_dma *
bam_dmux_tx_queue(struct bam_dmux *dmux, struct sk_buff *skb)
{ … }
static int bam_dmux_send_cmd(struct bam_dmux_netdev *bndev, u8 cmd)
{ … }
static int bam_dmux_netdev_open(struct net_device *netdev)
{ … }
static int bam_dmux_netdev_stop(struct net_device *netdev)
{ … }
static unsigned int needed_room(unsigned int avail, unsigned int needed)
{ … }
static int bam_dmux_tx_prepare_skb(struct bam_dmux_netdev *bndev,
struct sk_buff *skb)
{ … }
static netdev_tx_t bam_dmux_netdev_start_xmit(struct sk_buff *skb,
struct net_device *netdev)
{ … }
static void bam_dmux_tx_wakeup_work(struct work_struct *work)
{ … }
static const struct net_device_ops bam_dmux_ops = …;
static const struct device_type wwan_type = …;
static void bam_dmux_netdev_setup(struct net_device *dev)
{ … }
static void bam_dmux_register_netdev_work(struct work_struct *work)
{ … }
static void bam_dmux_rx_callback(void *data);
static bool bam_dmux_skb_dma_submit_rx(struct bam_dmux_skb_dma *skb_dma)
{ … }
static bool bam_dmux_skb_dma_queue_rx(struct bam_dmux_skb_dma *skb_dma, gfp_t gfp)
{ … }
static void bam_dmux_cmd_data(struct bam_dmux_skb_dma *skb_dma)
{ … }
static void bam_dmux_cmd_open(struct bam_dmux *dmux, struct bam_dmux_hdr *hdr)
{ … }
static void bam_dmux_cmd_close(struct bam_dmux *dmux, struct bam_dmux_hdr *hdr)
{ … }
static void bam_dmux_rx_callback(void *data)
{ … }
static bool bam_dmux_power_on(struct bam_dmux *dmux)
{ … }
static void bam_dmux_free_skbs(struct bam_dmux_skb_dma skbs[],
enum dma_data_direction dir)
{ … }
static void bam_dmux_power_off(struct bam_dmux *dmux)
{ … }
static irqreturn_t bam_dmux_pc_irq(int irq, void *data)
{ … }
static irqreturn_t bam_dmux_pc_ack_irq(int irq, void *data)
{ … }
static int bam_dmux_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused bam_dmux_runtime_resume(struct device *dev)
{ … }
static int bam_dmux_probe(struct platform_device *pdev)
{ … }
static void bam_dmux_remove(struct platform_device *pdev)
{ … }
static const struct dev_pm_ops bam_dmux_pm_ops = …;
static const struct of_device_id bam_dmux_of_match[] = …;
MODULE_DEVICE_TABLE(of, bam_dmux_of_match);
static struct platform_driver bam_dmux_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;