linux/net/nfc/netlink.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2011 Instituto Nokia de Tecnologia
 *
 * Authors:
 *    Lauro Ramos Venancio <[email protected]>
 *    Aloisio Almeida Jr <[email protected]>
 *
 * Vendor commands implementation based on net/wireless/nl80211.c
 * which is:
 *
 * Copyright 2006-2010	Johannes Berg <[email protected]>
 * Copyright 2013-2014  Intel Mobile Communications GmbH
 */

#define pr_fmt(fmt)

#include <net/genetlink.h>
#include <linux/nfc.h>
#include <linux/slab.h>

#include "nfc.h"
#include "llcp.h"

static const struct genl_multicast_group nfc_genl_mcgrps[] =;

static struct genl_family nfc_genl_family;
static const struct nla_policy nfc_genl_policy[NFC_ATTR_MAX + 1] =;

static const struct nla_policy nfc_sdp_genl_policy[NFC_SDP_ATTR_MAX + 1] =;

static int nfc_genl_send_target(struct sk_buff *msg, struct nfc_target *target,
				struct netlink_callback *cb, int flags)
{}

static struct nfc_dev *__get_device_from_cb(struct netlink_callback *cb)
{}

static int nfc_genl_dump_targets(struct sk_buff *skb,
				 struct netlink_callback *cb)
{}

static int nfc_genl_dump_targets_done(struct netlink_callback *cb)
{}

int nfc_genl_targets_found(struct nfc_dev *dev)
{}

int nfc_genl_target_lost(struct nfc_dev *dev, u32 target_idx)
{}

int nfc_genl_tm_activated(struct nfc_dev *dev, u32 protocol)
{}

int nfc_genl_tm_deactivated(struct nfc_dev *dev)
{}

static int nfc_genl_setup_device_added(struct nfc_dev *dev, struct sk_buff *msg)
{}

int nfc_genl_device_added(struct nfc_dev *dev)
{}

int nfc_genl_device_removed(struct nfc_dev *dev)
{}

int nfc_genl_llc_send_sdres(struct nfc_dev *dev, struct hlist_head *sdres_list)
{}

int nfc_genl_se_added(struct nfc_dev *dev, u32 se_idx, u16 type)
{}

int nfc_genl_se_removed(struct nfc_dev *dev, u32 se_idx)
{}

int nfc_genl_se_transaction(struct nfc_dev *dev, u8 se_idx,
			    struct nfc_evt_transaction *evt_transaction)
{}

int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
{}

static int nfc_genl_send_device(struct sk_buff *msg, struct nfc_dev *dev,
				u32 portid, u32 seq,
				struct netlink_callback *cb,
				int flags)
{}

static int nfc_genl_dump_devices(struct sk_buff *skb,
				 struct netlink_callback *cb)
{}

static int nfc_genl_dump_devices_done(struct netlink_callback *cb)
{}

int nfc_genl_dep_link_up_event(struct nfc_dev *dev, u32 target_idx,
			       u8 comm_mode, u8 rf_mode)
{}

int nfc_genl_dep_link_down_event(struct nfc_dev *dev)
{}

static int nfc_genl_get_device(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_dev_up(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_dev_down(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_start_poll(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_stop_poll(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_activate_target(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_deactivate_target(struct sk_buff *skb,
				      struct genl_info *info)
{}

static int nfc_genl_dep_link_up(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_dep_link_down(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_send_params(struct sk_buff *msg,
				struct nfc_llcp_local *local,
				u32 portid, u32 seq)
{}

static int nfc_genl_llc_get_params(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_llc_set_params(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_llc_sdreq(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_fw_download(struct sk_buff *skb, struct genl_info *info)
{}

int nfc_genl_fw_download_done(struct nfc_dev *dev, const char *firmware_name,
			      u32 result)
{}

static int nfc_genl_enable_se(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_disable_se(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_send_se(struct sk_buff *msg, struct nfc_dev *dev,
				u32 portid, u32 seq,
				struct netlink_callback *cb,
				int flags)
{}

static int nfc_genl_dump_ses(struct sk_buff *skb,
				 struct netlink_callback *cb)
{}

static int nfc_genl_dump_ses_done(struct netlink_callback *cb)
{}

static int nfc_se_io(struct nfc_dev *dev, u32 se_idx,
		     u8 *apdu, size_t apdu_length,
		     se_io_cb_t cb, void *cb_context)
{}

struct se_io_ctx {};

static void se_io_cb(void *context, u8 *apdu, size_t apdu_len, int err)
{}

static int nfc_genl_se_io(struct sk_buff *skb, struct genl_info *info)
{}

static int nfc_genl_vendor_cmd(struct sk_buff *skb,
			       struct genl_info *info)
{}

/* message building helper */
static inline void *nfc_hdr_put(struct sk_buff *skb, u32 portid, u32 seq,
				int flags, u8 cmd)
{}

static struct sk_buff *
__nfc_alloc_vendor_cmd_skb(struct nfc_dev *dev, int approxlen,
			   u32 portid, u32 seq,
			   enum nfc_attrs attr,
			   u32 oui, u32 subcmd, gfp_t gfp)
{}

struct sk_buff *__nfc_alloc_vendor_cmd_reply_skb(struct nfc_dev *dev,
						 enum nfc_attrs attr,
						 u32 oui, u32 subcmd,
						 int approxlen)
{}
EXPORT_SYMBOL();

int nfc_vendor_cmd_reply(struct sk_buff *skb)
{}
EXPORT_SYMBOL();

static const struct genl_ops nfc_genl_ops[] =;

static struct genl_family nfc_genl_family __ro_after_init =;


struct urelease_work {};

static void nfc_urelease_event_work(struct work_struct *work)
{}

static int nfc_genl_rcv_nl_event(struct notifier_block *this,
				 unsigned long event, void *ptr)
{}

void nfc_genl_data_init(struct nfc_genl_data *genl_data)
{}

void nfc_genl_data_exit(struct nfc_genl_data *genl_data)
{}

static struct notifier_block nl_notifier =;

/**
 * nfc_genl_init() - Initialize netlink interface
 *
 * This initialization function registers the nfc netlink family.
 */
int __init nfc_genl_init(void)
{}

/**
 * nfc_genl_exit() - Deinitialize netlink interface
 *
 * This exit function unregisters the nfc netlink family.
 */
void nfc_genl_exit(void)
{}