File: sja1105_dynamic_config.h

package info (click to toggle)
linux 6.12.43-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie-proposed-updates
  • size: 1,676,260 kB
  • sloc: ansic: 25,921,022; asm: 269,579; sh: 136,424; python: 65,440; makefile: 55,721; perl: 37,752; xml: 19,284; cpp: 5,895; yacc: 4,927; lex: 2,939; awk: 1,594; sed: 28; ruby: 25
file content (41 lines) | stat: -rw-r--r-- 1,107 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2019, Vladimir Oltean <olteanv@gmail.com>
 */
#ifndef _SJA1105_DYNAMIC_CONFIG_H
#define _SJA1105_DYNAMIC_CONFIG_H

#include "sja1105.h"
#include <linux/packing.h>

/* Special index that can be used for sja1105_dynamic_config_read */
#define SJA1105_SEARCH		-1

struct sja1105_dyn_cmd;

struct sja1105_dynamic_table_ops {
	/* This returns size_t just to keep same prototype as the
	 * static config ops, of which we are reusing some functions.
	 */
	size_t (*entry_packing)(void *buf, void *entry_ptr, enum packing_op op);
	void (*cmd_packing)(void *buf, struct sja1105_dyn_cmd *cmd,
			    enum packing_op op);
	size_t max_entry_count;
	size_t packed_size;
	u64 addr;
	u8 access;
};

struct sja1105_mgmt_entry {
	u64 tsreg;
	u64 takets;
	u64 macaddr;
	u64 destports;
	u64 enfport;
	u64 index;
};

extern const struct sja1105_dynamic_table_ops sja1105et_dyn_ops[BLK_IDX_MAX_DYN];
extern const struct sja1105_dynamic_table_ops sja1105pqrs_dyn_ops[BLK_IDX_MAX_DYN];
extern const struct sja1105_dynamic_table_ops sja1110_dyn_ops[BLK_IDX_MAX_DYN];

#endif