linux/net/ncsi/ncsi-manage.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright Gavin Shan, IBM Corporation 2016.
 */

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/of.h>
#include <linux/platform_device.h>

#include <net/ncsi.h>
#include <net/net_namespace.h>
#include <net/sock.h>
#include <net/addrconf.h>
#include <net/ipv6.h>
#include <net/genetlink.h>

#include "internal.h"
#include "ncsi-pkt.h"
#include "ncsi-netlink.h"

LIST_HEAD();
DEFINE_SPINLOCK();

bool ncsi_channel_has_link(struct ncsi_channel *channel)
{}

bool ncsi_channel_is_last(struct ncsi_dev_priv *ndp,
			  struct ncsi_channel *channel)
{}

static void ncsi_report_link(struct ncsi_dev_priv *ndp, bool force_down)
{}

static void ncsi_channel_monitor(struct timer_list *t)
{}

void ncsi_start_channel_monitor(struct ncsi_channel *nc)
{}

void ncsi_stop_channel_monitor(struct ncsi_channel *nc)
{}

struct ncsi_channel *ncsi_find_channel(struct ncsi_package *np,
				       unsigned char id)
{}

struct ncsi_channel *ncsi_add_channel(struct ncsi_package *np, unsigned char id)
{}

static void ncsi_remove_channel(struct ncsi_channel *nc)
{}

struct ncsi_package *ncsi_find_package(struct ncsi_dev_priv *ndp,
				       unsigned char id)
{}

struct ncsi_package *ncsi_add_package(struct ncsi_dev_priv *ndp,
				      unsigned char id)
{}

void ncsi_remove_package(struct ncsi_package *np)
{}

void ncsi_find_package_and_channel(struct ncsi_dev_priv *ndp,
				   unsigned char id,
				   struct ncsi_package **np,
				   struct ncsi_channel **nc)
{}

/* For two consecutive NCSI commands, the packet IDs shouldn't
 * be same. Otherwise, the bogus response might be replied. So
 * the available IDs are allocated in round-robin fashion.
 */
struct ncsi_request *ncsi_alloc_request(struct ncsi_dev_priv *ndp,
					unsigned int req_flags)
{}

void ncsi_free_request(struct ncsi_request *nr)
{}

struct ncsi_dev *ncsi_find_dev(struct net_device *dev)
{}

static void ncsi_request_timeout(struct timer_list *t)
{}

static void ncsi_suspend_channel(struct ncsi_dev_priv *ndp)
{}

/* Check the VLAN filter bitmap for a set filter, and construct a
 * "Set VLAN Filter - Disable" packet if found.
 */
static int clear_one_vid(struct ncsi_dev_priv *ndp, struct ncsi_channel *nc,
			 struct ncsi_cmd_arg *nca)
{}

/* Find an outstanding VLAN tag and construct a "Set VLAN Filter - Enable"
 * packet.
 */
static int set_one_vid(struct ncsi_dev_priv *ndp, struct ncsi_channel *nc,
		       struct ncsi_cmd_arg *nca)
{}

static int ncsi_oem_keep_phy_intel(struct ncsi_cmd_arg *nca)
{}

/* NCSI OEM Command APIs */
static int ncsi_oem_gma_handler_bcm(struct ncsi_cmd_arg *nca)
{}

static int ncsi_oem_gma_handler_mlx(struct ncsi_cmd_arg *nca)
{}

static int ncsi_oem_smaf_mlx(struct ncsi_cmd_arg *nca)
{}

static int ncsi_oem_gma_handler_intel(struct ncsi_cmd_arg *nca)
{}

/* OEM Command handlers initialization */
static struct ncsi_oem_gma_handler {} ncsi_oem_gma_handlers[] =;

static int ncsi_gma_handler(struct ncsi_cmd_arg *nca, unsigned int mf_id)
{}

/* Determine if a given channel from the channel_queue should be used for Tx */
static bool ncsi_channel_is_tx(struct ncsi_dev_priv *ndp,
			       struct ncsi_channel *nc)
{}

/* Change the active Tx channel in a multi-channel setup */
int ncsi_update_tx_channel(struct ncsi_dev_priv *ndp,
			   struct ncsi_package *package,
			   struct ncsi_channel *disable,
			   struct ncsi_channel *enable)
{}

static void ncsi_configure_channel(struct ncsi_dev_priv *ndp)
{}

static int ncsi_choose_active_channel(struct ncsi_dev_priv *ndp)
{}

static bool ncsi_check_hwa(struct ncsi_dev_priv *ndp)
{}

static void ncsi_probe_channel(struct ncsi_dev_priv *ndp)
{}

static void ncsi_dev_work(struct work_struct *work)
{}

int ncsi_process_next_channel(struct ncsi_dev_priv *ndp)
{}

static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
{}

int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
{}
EXPORT_SYMBOL_GPL();

int ncsi_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)
{}
EXPORT_SYMBOL_GPL();

struct ncsi_dev *ncsi_register_dev(struct net_device *dev,
				   void (*handler)(struct ncsi_dev *ndev))
{}
EXPORT_SYMBOL_GPL();

int ncsi_start_dev(struct ncsi_dev *nd)
{}
EXPORT_SYMBOL_GPL();

void ncsi_stop_dev(struct ncsi_dev *nd)
{}
EXPORT_SYMBOL_GPL();

int ncsi_reset_dev(struct ncsi_dev *nd)
{}

void ncsi_unregister_dev(struct ncsi_dev *nd)
{}
EXPORT_SYMBOL_GPL();