linux/net/caif/caif_dev.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * CAIF Interface registration.
 * Copyright (C) ST-Ericsson AB 2010
 * Author:	Sjur Brendeland
 *
 * Borrowed heavily from file: pn_dev.c. Thanks to Remi Denis-Courmont
 *  and Sakari Ailus <[email protected]>
 */

#define pr_fmt(fmt)

#include <linux/kernel.h>
#include <linux/if_arp.h>
#include <linux/net.h>
#include <linux/netdevice.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <net/netns/generic.h>
#include <net/net_namespace.h>
#include <net/pkt_sched.h>
#include <net/caif/caif_device.h>
#include <net/caif/caif_layer.h>
#include <net/caif/caif_dev.h>
#include <net/caif/cfpkt.h>
#include <net/caif/cfcnfg.h>
#include <net/caif/cfserl.h>

MODULE_DESCRIPTION();
MODULE_LICENSE();

/* Used for local tracking of the CAIF net devices */
struct caif_device_entry {};

struct caif_device_entry_list {};

struct caif_net {};

static unsigned int caif_net_id;
static int q_high =; /* Percent */

struct cfcnfg *get_cfcnfg(struct net *net)
{}
EXPORT_SYMBOL();

static struct caif_device_entry_list *caif_device_list(struct net *net)
{}

static void caifd_put(struct caif_device_entry *e)
{}

static void caifd_hold(struct caif_device_entry *e)
{}

static int caifd_refcnt_read(struct caif_device_entry *e)
{}

/* Allocate new CAIF device. */
static struct caif_device_entry *caif_device_alloc(struct net_device *dev)
{}

static struct caif_device_entry *caif_get(struct net_device *dev)
{}

static void caif_flow_cb(struct sk_buff *skb)
{}

static int transmit(struct cflayer *layer, struct cfpkt *pkt)
{}

/*
 * Stuff received packets into the CAIF stack.
 * On error, returns non-zero and releases the skb.
 */
static int receive(struct sk_buff *skb, struct net_device *dev,
		   struct packet_type *pkttype, struct net_device *orig_dev)
{}

static struct packet_type caif_packet_type __read_mostly =;

static void dev_flowctrl(struct net_device *dev, int on)
{}

int caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev,
		     struct cflayer *link_support, int head_room,
		     struct cflayer **layer,
		     int (**rcv_func)(struct sk_buff *, struct net_device *,
				      struct packet_type *,
				      struct net_device *))
{}
EXPORT_SYMBOL();

/* notify Caif of device events */
static int caif_device_notify(struct notifier_block *me, unsigned long what,
			      void *ptr)
{}

static struct notifier_block caif_device_notifier =;

/* Per-namespace Caif devices handling */
static int caif_init_net(struct net *net)
{}

static void caif_exit_net(struct net *net)
{}

static struct pernet_operations caif_net_ops =;

/* Initialize Caif devices list */
static int __init caif_device_init(void)
{}

static void __exit caif_device_exit(void)
{}

module_init();
module_exit(caif_device_exit);