linux/drivers/net/fddi/skfp/h/smt.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/******************************************************************************
 *
 *	(C)Copyright 1998,1999 SysKonnect,
 *	a business unit of Schneider & Koch & Co. Datensysteme GmbH.
 *
 *	The information in this file is provided "AS IS" without warranty.
 *
 ******************************************************************************/

/*
 *	SMT 7.2 frame definitions
 */

#ifndef	_SMT_
#define _SMT_

/* #define SMT5_10 */
#define SMT6_10
#define SMT7_20

#define OPT_PMF
#define OPT_SRF

/*
 * SMT frame version 5.1
 */

#define SMT_VID
#define SMT_VID_2

struct smt_sid {} ;

t_station_id ;

/*
 * note on alignment :
 * sizeof(struct smt_header) = 32
 * all parameters are long aligned
 * if struct smt_header starts at offset 0, all longs are aligned correctly
 * (FC starts at offset 3)
 */
_packed struct smt_header {} ;
#define SWAP_SMTHEADER

#if	0
/*
 * MAC FC values
 */
#define FC_SMT_INFO
#define FC_SMT_NSA
#endif


/*
 * type codes
 */
#define SMT_ANNOUNCE
#define SMT_REQUEST
#define SMT_REPLY

/*
 * class codes
 */
#define SMT_NIF
#define SMT_SIF_CONFIG
#define SMT_SIF_OPER
#define SMT_ECF
#define SMT_RAF
#define SMT_RDF
#define SMT_SRF
#define SMT_PMF_GET
#define SMT_PMF_SET
#define SMT_ESF

#define SMT_MAX_ECHO_LEN
#if	defined(CONC) || defined(CONC_II)
#define SMT_TEST_ECHO_LEN
#else
#define SMT_TEST_ECHO_LEN
#endif

#define SMT_MAX_INFO_LEN


/*
 * parameter types
 */

struct smt_para {} ;

#define PARA_LEN

#define SMTSETPARA(p,t)

/*
 * P01 : Upstream Neighbor Address, UNA
 */
#define SMT_P_UNA
#define SWAP_SMT_P_UNA

struct smt_p_una {} ;

/*
 * P02 : Station Descriptor
 */
#define SMT_P_SDE
#define SWAP_SMT_P_SDE

#define SMT_SDE_STATION
#define SMT_SDE_CONCENTRATOR

struct smt_p_sde {} ;

/*
 * P03 : Station State
 */
#define SMT_P_STATE
#define SWAP_SMT_P_STATE

struct smt_p_state {} ;
#define SMT_ST_WRAPPED
#define SMT_ST_UNATTACHED
#define SMT_ST_TWISTED_A
#define SMT_ST_TWISTED_B
#define SMT_ST_ROOTED_S
#define SMT_ST_SRF
#define SMT_ST_SYNC_SERVICE

#define SMT_ST_MY_DUPA
#define SMT_ST_UNA_DUPA

/*
 * P04 : timestamp
 */
#define SMT_P_TIMESTAMP
#define SWAP_SMT_P_TIMESTAMP
struct smt_p_timestamp {} ;

/*
 * P05 : station policies
 */
#define SMT_P_POLICY
#define SWAP_SMT_P_POLICY

struct smt_p_policy {} ;
#define SMT_PL_HOLD

/*
 * P06 : latency equivalent
 */
#define SMT_P_LATENCY
#define SWAP_SMT_P_LATENCY

/*
 * note: latency has two phy entries by definition
 * for a SAS, the 2nd one is null
 */
struct smt_p_latency {} ;

/*
 * P07 : MAC neighbors
 */
#define SMT_P_NEIGHBORS
#define SWAP_SMT_P_NEIGHBORS

struct smt_p_neighbor {} ;

/*
 * PHY record
 */
#define SMT_PHY_A
#define SMT_PHY_B
#define SMT_PHY_S
#define SMT_PHY_M

#define SMT_CS_DISABLED
#define SMT_CS_CONNECTING
#define SMT_CS_STANDBY
#define SMT_CS_ACTIVE

#define SMT_RM_NONE
#define SMT_RM_MAC

struct smt_phy_rec {} ;

/*
 * MAC record
 */
struct smt_mac_rec {} ;

/*
 * P08 : path descriptors
 * should be really an array ; however our environment has a fixed number of
 * PHYs and MACs
 */
#define SMT_P_PATH
#define SWAP_SMT_P_PATH

struct smt_p_path {} ;

/*
 * P09 : MAC status
 */
#define SMT_P_MAC_STATUS
#define SWAP_SMT_P_MAC_STATUS

struct smt_p_mac_status {} ;

/*
 * P0A : PHY link error rate monitoring
 */
#define SMT_P_LEM
#define SWAP_SMT_P_LEM
/*
 * units of lem_cutoff,lem_alarm,lem_estimate : 10**-x
 */
struct smt_p_lem {} ;

/*
 * P0B : MAC frame counters
 */
#define SMT_P_MAC_COUNTER
#define SWAP_SMT_P_MAC_COUNTER

struct smt_p_mac_counter {} ;

/*
 * P0C : MAC frame not copied counter
 */
#define SMT_P_MAC_FNC
#define SWAP_SMT_P_MAC_FNC

struct smt_p_mac_fnc {} ;


/*
 * P0D : MAC priority values
 */
#define SMT_P_PRIORITY
#define SWAP_SMT_P_PRIORITY

struct smt_p_priority {} ;

/*
 * P0E : PHY elasticity buffer status
 */
#define SMT_P_EB
#define SWAP_SMT_P_EB

struct smt_p_eb {} ;

/*
 * P0F : manufacturer field
 */
#define SMT_P_MANUFACTURER
#define SWAP_SMT_P_MANUFACTURER

struct smp_p_manufacturer {} ;

/*
 * P10 : user field
 */
#define SMT_P_USER
#define SWAP_SMT_P_USER

struct smp_p_user {} ;



/*
 * P11 : echo data
 */
#define SMT_P_ECHODATA
#define SWAP_SMT_P_ECHODATA

struct smt_p_echo {} ;

/*
 * P12 : reason code
 */
#define SMT_P_REASON
#define SWAP_SMT_P_REASON

struct smt_p_reason {} ;
#define SMT_RDF_CLASS
#define SMT_RDF_VERSION
#define SMT_RDF_SUCCESS
#define SMT_RDF_BADSET
#define SMT_RDF_ILLEGAL
#define SMT_RDF_NOPARAM
#define SMT_RDF_RANGE
#define SMT_RDF_AUTHOR
#define SMT_RDF_LENGTH
#define SMT_RDF_TOOLONG
#define SMT_RDF_SBA

/*
 * P13 : refused frame beginning
 */
#define SMT_P_REFUSED
#define SWAP_SMT_P_REFUSED

struct smt_p_refused {} ;

/*
 * P14 : supported SMT versions
 */
#define SMT_P_VERSION
#define SWAP_SMT_P_VERSION

struct smt_p_version {} ;

/*
 * P15 : Resource Type
 */
#define SWAP_SMT_P0015

struct smt_p_0015 {} ;

#define SYNC_BW

/*
 * P16 : SBA Command
 */
#define SWAP_SMT_P0016

struct smt_p_0016 {} ;

#define REQUEST_ALLOCATION
#define REPORT_ALLOCATION
#define CHANGE_ALLOCATION
					/* width to change its current allo-*/
					/* cation */

/*
 * P17 : SBA Payload Request
 */
#define SWAP_SMT_P0017

struct smt_p_0017 {} ;					/* bytes per 125 us */

/*
 * P18 : SBA Overhead Request
 */
#define SWAP_SMT_P0018

struct smt_p_0018 {} ;					/* measured in bytes per T_Neg */

/*
 * P19 : SBA Allocation Address
 */
#define SWAP_SMT_P0019

struct smt_p_0019 {} ;

/*
 * P1A : SBA Category
 */
#define SWAP_SMT_P001A

struct smt_p_001a {} ;

/*
 * P1B : Maximum T_Neg
 */
#define SWAP_SMT_P001B

struct smt_p_001b {} ;

/*
 * P1C : Minimum SBA Segment Size
 */
#define SWAP_SMT_P001C

struct smt_p_001c {} ;

/*
 * P1D : SBA Allocatable
 */
#define SWAP_SMT_P001D

struct smt_p_001d {} ;

/*
 * P20 0B : frame status capabilities
 * NOTE: not in swap table, is used by smt.c AND PMF table
 */
#define SMT_P_FSC
/* #define SWAP_SMT_P_FSC	"ssss" */

struct smt_p_fsc {} ;

#define FSC_TYPE0
#define FSC_TYPE1
#define FSC_TYPE2

/*
 * P00 21 : user defined authorization (see pmf.c)
 */
#define SMT_P_AUTHOR

/*
 * notification parameters
 */
#define SWAP_SMT_P1048
struct smt_p_1048 {} ;

/*
 * NOTE: all 2xxx 3xxx and 4xxx must include the INDEX in the swap string,
 *	even so the INDEX is NOT part of the struct.
 *	INDEX is already swapped in pmf.c, format in string is '4'
 */
#define SWAP_SMT_P208C
struct smt_p_208c {} ;

#define SWAP_SMT_P208D
struct smt_p_208d {} ;

#define SWAP_SMT_P208E
struct smt_p_208e {} ;

#define SWAP_SMT_P208F

struct smt_p_208f {} ;

#define SWAP_SMT_P2090

struct smt_p_2090 {} ;

/*
 * NOTE:
 * special kludge for parameters 320b,320f,3210
 * these parameters are part of RAF frames
 * RAF frames are parsed in SBA.C and must be swapped
 * PMF.C has special code to avoid double swapping
 */
#ifdef	LITTLE_ENDIAN
#define SBAPATHINDEX
#else
#define SBAPATHINDEX
#endif

#define SWAP_SMT_P320B

struct	smt_p_320b {} ;

#define SWAP_SMT_P320F

struct	smt_p_320f {} ;

#define SWAP_SMT_P3210

struct	smt_p_3210 {} ;

#define SWAP_SMT_P4050

struct smt_p_4050 {} ;

#define SWAP_SMT_P4051
struct smt_p_4051 {} ;

#define SWAP_SMT_P4052
struct smt_p_4052 {} ;

#define SWAP_SMT_P4053

struct smt_p_4053 {} ;


#define SMT_P_SETCOUNT
#define SWAP_SMT_P_SETCOUNT

struct smt_p_setcount {} ;

/*
 * SMT FRAMES
 */

/*
 * NIF : neighbor information frames
 */
struct smt_nif {} ;

/*
 * SIF : station information frames
 */
struct smt_sif_config {} ;
#define SIZEOF_SMT_SIF_CONFIG

struct smt_sif_operation {} ;

/*
 * ECF : echo frame
 */
struct smt_ecf {} ;
#define SMT_ECF_LEN

/*
 * RDF : request denied frame
 */
struct smt_rdf {} ;

/*
 * SBA Request Allocation Response Frame
 */
struct smt_sba_alc_res {} ;

/*
 * SBA Request Allocation Request Frame
 */
struct smt_sba_alc_req {} ;

/*
 * SBA Change Allocation Request Frame
 */
struct smt_sba_chg {} ;

/*
 * SBA Report Allocation Request Frame
 */
struct smt_sba_rep_req {} ;

/*
 * SBA Report Allocation Response Frame
 */
struct smt_sba_rep_res {} ;

/*
 * actions
 */
#define SMT_STATION_ACTION
#define SMT_STATION_ACTION_CONNECT
#define SMT_STATION_ACTION_DISCONNECT
#define SMT_STATION_ACTION_PATHTEST
#define SMT_STATION_ACTION_SELFTEST
#define SMT_STATION_ACTION_DISABLE_A
#define SMT_STATION_ACTION_DISABLE_B
#define SMT_STATION_ACTION_DISABLE_M

#define SMT_PORT_ACTION
#define SMT_PORT_ACTION_MAINT
#define SMT_PORT_ACTION_ENABLE
#define SMT_PORT_ACTION_DISABLE
#define SMT_PORT_ACTION_START
#define SMT_PORT_ACTION_STOP

#endif	/* _SMT_ */