treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / net / fddi / skfp / h / sba.h
blobf30301fcd022c0a9ab5ec48d6ff9298d4b6e50fd
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /******************************************************************************
4 * (C)Copyright 1998,1999 SysKonnect,
5 * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
7 * The information in this file is provided "AS IS" without warranty.
9 ******************************************************************************/
12 * Synchronous Bandwidth Allocation (SBA) structs
15 #ifndef _SBA_
16 #define _SBA_
18 #include "mbuf.h"
19 #include "sba_def.h"
21 #ifdef SBA
23 /* Timer Cell Template */
24 struct timer_cell {
25 struct timer_cell *next_ptr ;
26 struct timer_cell *prev_ptr ;
27 u_long start_time ;
28 struct s_sba_node_vars *node_var ;
29 } ;
32 * Node variables
34 struct s_sba_node_vars {
35 u_char change_resp_flag ;
36 u_char report_resp_flag ;
37 u_char change_req_flag ;
38 u_char report_req_flag ;
39 long change_amount ;
40 long node_overhead ;
41 long node_payload ;
42 u_long node_status ;
43 u_char deallocate_status ;
44 u_char timer_state ;
45 u_short report_cnt ;
46 long lastrep_req_tranid ;
47 struct fddi_addr mac_address ;
48 struct s_sba_sessions *node_sessions ;
49 struct timer_cell timer ;
50 } ;
53 * Session variables
55 struct s_sba_sessions {
56 u_long deallocate_status ;
57 long session_overhead ;
58 u_long min_segment_size ;
59 long session_payload ;
60 u_long session_status ;
61 u_long sba_category ;
62 long lastchg_req_tranid ;
63 u_short session_id ;
64 u_char class ;
65 u_char fddi2 ;
66 u_long max_t_neg ;
67 struct s_sba_sessions *next_session ;
68 } ;
70 struct s_sba {
72 struct s_sba_node_vars node[MAX_NODES] ;
73 struct s_sba_sessions session[MAX_SESSIONS] ;
75 struct s_sba_sessions *free_session ; /* points to the first */
76 /* free session */
78 struct timer_cell *tail_timer ; /* points to the last timer cell */
81 * variables for allocation actions
83 long total_payload ; /* Total Payload */
84 long total_overhead ; /* Total Overhead */
85 long sba_allocatable ; /* allocatable sync bandwidth */
88 * RAF message receive parameters
90 long msg_path_index ; /* Path Type */
91 long msg_sba_pl_req ; /* Payload Request */
92 long msg_sba_ov_req ; /* Overhead Request */
93 long msg_mib_pl ; /* Current Payload for this Path */
94 long msg_mib_ov ; /* Current Overhead for this Path*/
95 long msg_category ; /* Category of the Allocation */
96 u_long msg_max_t_neg ; /* longest T_Neg acceptable */
97 u_long msg_min_seg_siz ; /* minimum segement size */
98 struct smt_header *sm ; /* points to the rec message */
99 struct fddi_addr *msg_alloc_addr ; /* Allocation Address */
102 * SBA variables
104 u_long sba_t_neg ; /* holds the last T_NEG */
105 long sba_max_alloc ; /* the parsed value of SBAAvailable */
108 * SBA state machine variables
110 short sba_next_state ; /* the next state of the SBA */
111 char sba_command ; /* holds the execuded SBA cmd */
112 u_char sba_available ; /* parsed value after possible check */
115 #endif /* SBA */
118 * variables for the End Station Support
120 struct s_ess {
123 * flags and counters
125 u_char sync_bw_available ; /* is set if sync bw is allocated */
126 u_char local_sba_active ; /* set when a local sba is available */
127 char raf_act_timer_poll ; /* activate the timer to send allc req */
128 char timer_count ; /* counts every timer function call */
130 SMbuf *sba_reply_pend ; /* local reply for the sba is pending */
133 * variables for the ess bandwidth control
135 long sync_bw ; /* holds the allocaed sync bw */
136 u_long alloc_trans_id ; /* trans id of the last alloc req */
138 #endif