linux/drivers/net/hyperv/rndis_filter.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2009, Microsoft Corporation.
 *
 * Authors:
 *   Haiyang Zhang <[email protected]>
 *   Hank Janssen  <[email protected]>
 */
#include <linux/ethtool.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/highmem.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/if_ether.h>
#include <linux/netdevice.h>
#include <linux/if_vlan.h>
#include <linux/nls.h>
#include <linux/vmalloc.h>
#include <linux/rtnetlink.h>
#include <linux/ucs2_string.h>
#include <linux/string.h>

#include "hyperv_net.h"
#include "netvsc_trace.h"

static void rndis_set_multicast(struct work_struct *w);

#define RNDIS_EXT_LEN
struct rndis_request {};

static const u8 netvsc_hash_key[NETVSC_HASH_KEYLEN] =;

static struct rndis_device *get_rndis_device(void)
{}

static struct rndis_request *get_rndis_request(struct rndis_device *dev,
					     u32 msg_type,
					     u32 msg_len)
{}

static void put_rndis_request(struct rndis_device *dev,
			    struct rndis_request *req)
{}

static void dump_rndis_message(struct net_device *netdev,
			       const struct rndis_message *rndis_msg,
			       const void *data)
{}

static int rndis_filter_send_request(struct rndis_device *dev,
				  struct rndis_request *req)
{}

static void rndis_set_link_state(struct rndis_device *rdev,
				 struct rndis_request *request)
{}

static void rndis_filter_receive_response(struct net_device *ndev,
					  struct netvsc_device *nvdev,
					  struct rndis_message *resp,
					  void *data)
{}

/*
 * Get the Per-Packet-Info with the specified type
 * return NULL if not found.
 */
static inline void *rndis_get_ppi(struct net_device *ndev,
				  struct rndis_packet *rpkt,
				  u32 rpkt_len, u32 type, u8 internal,
				  u32 ppi_size, void *data)
{}

static inline
void rsc_add_data(struct netvsc_channel *nvchan,
		  const struct ndis_pkt_8021q_info *vlan,
		  const struct ndis_tcp_ip_checksum_info *csum_info,
		  const u32 *hash_info,
		  void *data, u32 len)
{}

static int rndis_filter_receive_data(struct net_device *ndev,
				     struct netvsc_device *nvdev,
				     struct netvsc_channel *nvchan,
				     struct rndis_message *msg,
				     void *data, u32 data_buflen)
{}

int rndis_filter_receive(struct net_device *ndev,
			 struct netvsc_device *net_dev,
			 struct netvsc_channel *nvchan,
			 void *data, u32 buflen)
{}

static int rndis_filter_query_device(struct rndis_device *dev,
				     struct netvsc_device *nvdev,
				     u32 oid, void *result, u32 *result_size)
{}

/* Get the hardware offload capabilities */
static int
rndis_query_hwcaps(struct rndis_device *dev, struct netvsc_device *net_device,
		   struct ndis_offload *caps)
{}

static int rndis_filter_query_device_mac(struct rndis_device *dev,
					 struct netvsc_device *net_device)
{}

#define NWADR_STR
#define NWADR_STRLEN

int rndis_filter_set_device_mac(struct netvsc_device *nvdev,
				const char *mac)
{}

int
rndis_filter_set_offload_params(struct net_device *ndev,
				struct netvsc_device *nvdev,
				struct ndis_offload_params *req_offloads)
{}

static int rndis_set_rss_param_msg(struct rndis_device *rdev,
				   const u8 *rss_key, u16 flag)
{}

int rndis_filter_set_rss_param(struct rndis_device *rdev,
			       const u8 *rss_key)
{}

static int rndis_filter_query_device_link_status(struct rndis_device *dev,
						 struct netvsc_device *net_device)
{}

static int rndis_filter_query_link_speed(struct rndis_device *dev,
					 struct netvsc_device *net_device)
{}

static int rndis_filter_set_packet_filter(struct rndis_device *dev,
					  u32 new_filter)
{}

static void rndis_set_multicast(struct work_struct *w)
{}

void rndis_filter_update(struct netvsc_device *nvdev)
{}

static int rndis_filter_init_device(struct rndis_device *dev,
				    struct netvsc_device *nvdev)
{}

static bool netvsc_device_idle(const struct netvsc_device *nvdev)
{}

static void rndis_filter_halt_device(struct netvsc_device *nvdev,
				     struct rndis_device *dev)
{}

static int rndis_filter_open_device(struct rndis_device *dev)
{}

static int rndis_filter_close_device(struct rndis_device *dev)
{}

static void netvsc_sc_open(struct vmbus_channel *new_sc)
{}

/* Open sub-channels after completing the handling of the device probe.
 * This breaks overlap of processing the host message for the
 * new primary channel with the initialization of sub-channels.
 */
int rndis_set_subchannel(struct net_device *ndev,
			 struct netvsc_device *nvdev,
			 struct netvsc_device_info *dev_info)
{}

static int rndis_netdev_set_hwcaps(struct rndis_device *rndis_device,
				   struct netvsc_device *nvdev)
{}

static void rndis_get_friendly_name(struct net_device *net,
				    struct rndis_device *rndis_device,
				    struct netvsc_device *net_device)
{}

struct netvsc_device *rndis_filter_device_add(struct hv_device *dev,
				      struct netvsc_device_info *device_info)
{}

void rndis_filter_device_remove(struct hv_device *dev,
				struct netvsc_device *net_dev)
{}

int rndis_filter_open(struct netvsc_device *nvdev)
{}

int rndis_filter_close(struct netvsc_device *nvdev)
{}