| 1 |
/* SPDX-License-Identifier: GPL-2.0 */ |
| 2 |
/* Copyright (C) 2020-2021 Texas Instruments Incorporated - https://www.ti.com |
| 3 |
*/ |
| 4 |
|
| 5 |
#ifndef __NET_TI_PRUETH_SWITCH_H |
| 6 |
#define __NET_TI_PRUETH_SWITCH_H |
| 7 |
|
| 8 |
#include <net/switchdev.h> |
| 9 |
|
| 10 |
#include "icssm_prueth.h" |
| 11 |
#include "icssm_prueth_fdb_tbl.h" |
| 12 |
#include "icssm_switchdev.h" |
| 13 |
|
| 14 |
void icssm_prueth_sw_set_stp_state(struct prueth *prueth, |
| 15 |
enum prueth_port port, u8 state); |
| 16 |
u8 icssm_prueth_sw_get_stp_state(struct prueth *prueth, |
| 17 |
enum prueth_port port); |
| 18 |
|
| 19 |
extern const struct prueth_queue_info sw_queue_infos[][4]; |
| 20 |
|
| 21 |
void icssm_prueth_sw_fdb_tbl_init(struct prueth *prueth); |
| 22 |
int icssm_prueth_sw_init_fdb_table(struct prueth *prueth); |
| 23 |
void icssm_prueth_sw_free_fdb_table(struct prueth *prueth); |
| 24 |
int icssm_prueth_sw_do_purge_fdb(struct prueth_emac *emac); |
| 25 |
void icssm_prueth_sw_fdb_add(struct prueth_emac *emac, |
| 26 |
struct switchdev_notifier_fdb_info *fdb); |
| 27 |
void icssm_prueth_sw_fdb_del(struct prueth_emac *emac, |
| 28 |
struct switchdev_notifier_fdb_info *fdb); |
| 29 |
int icssm_prueth_sw_learn_fdb(struct prueth_emac *emac, u8 *src_mac); |
| 30 |
int icssm_prueth_sw_purge_fdb(struct prueth_emac *emac); |
| 31 |
void icssm_prueth_sw_hostconfig(struct prueth *prueth); |
| 32 |
int icssm_prueth_sw_emac_config(struct prueth_emac *emac); |
| 33 |
int icssm_prueth_sw_boot_prus(struct prueth *prueth, struct net_device *ndev); |
| 34 |
int icssm_prueth_sw_shutdown_prus(struct prueth_emac *emac, |
| 35 |
struct net_device *ndev); |
| 36 |
|
| 37 |
#endif /* __NET_TI_PRUETH_SWITCH_H */ |