Commit 39bedc16 authored by Horatiu Vultur's avatar Horatiu Vultur Committed by Paolo Abeni
Browse files

net: lan966x: Add is2 vcap model to vcap API.



This provides the lan966x is2 model and adds it to the vcap control
instance that will be provided to the vcap API.

Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent b0531225
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ lan966x-switch-objs := lan966x_main.o lan966x_phylink.o lan966x_port.o \
			lan966x_tc.o lan966x_mqprio.o lan966x_taprio.o \
			lan966x_tbf.o lan966x_cbs.o lan966x_ets.o \
			lan966x_tc_matchall.o lan966x_police.o lan966x_mirror.o \
			lan966x_xdp.o lan966x_vcap_impl.o
			lan966x_xdp.o lan966x_vcap_impl.o lan966x_vcap_ag_api.o

# Provide include files
ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/vcap
+1608 −0

File added.

Preview size limit exceeded, changes collapsed.

+11 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: BSD-3-Clause */

#ifndef __LAN966X_VCAP_AG_API_H__
#define __LAN966X_VCAP_AG_API_H__

#include "vcap_api.h"

extern const struct vcap_info lan966x_vcaps[];
extern const struct vcap_statistics lan966x_vcap_stats;

#endif /* __LAN966X_VCAP_AG_API_H__ */
+4 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0+

#include "lan966x_main.h"
#include "lan966x_vcap_ag_api.h"
#include "vcap_api.h"

int lan966x_vcap_init(struct lan966x *lan966x)
@@ -11,6 +12,9 @@ int lan966x_vcap_init(struct lan966x *lan966x)
	if (!ctrl)
		return -ENOMEM;

	ctrl->vcaps = lan966x_vcaps;
	ctrl->stats = &lan966x_vcap_stats;

	lan966x->vcap_ctrl = ctrl;

	return 0;