This source file includes following definitions.
- set_oem_spec_val
- init_smt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 #include "h/types.h"
19 #include "h/fddi.h"
20 #include "h/smc.h"
21
22 #ifndef lint
23 static const char ID_sccs[] = "@(#)smtinit.c 1.15 97/05/06 (C) SK " ;
24 #endif
25
26 void init_fddi_driver(struct s_smc *smc, u_char *mac_addr);
27
28
29 #if defined(DEBUG) && !defined(DEBUG_BRD)
30 struct smt_debug debug;
31 #endif
32
33 #ifndef MULT_OEM
34 #define OEMID(smc,i) oem_id[i]
35 extern u_char oem_id[] ;
36 #else
37 #define OEMID(smc,i) smc->hw.oem_id->oi_mark[i]
38 extern struct s_oem_ids oem_ids[] ;
39 #endif
40
41
42
43
44
45
46
47 static void set_oem_spec_val(struct s_smc *smc)
48 {
49 struct fddi_mib *mib ;
50
51 mib = &smc->mib ;
52
53
54
55
56 if (OEMID(smc,0) == 'I') {
57 mib->fddiSMTConnectionPolicy = POLICY_MM ;
58 }
59 }
60
61
62
63
64 int init_smt(struct s_smc *smc, u_char *mac_addr)
65
66 {
67 int p ;
68
69 #if defined(DEBUG) && !defined(DEBUG_BRD)
70 debug.d_smt = 0 ;
71 debug.d_smtf = 0 ;
72 debug.d_rmt = 0 ;
73 debug.d_ecm = 0 ;
74 debug.d_pcm = 0 ;
75 debug.d_cfm = 0 ;
76
77 debug.d_plc = 0 ;
78 #ifdef ESS
79 debug.d_ess = 0 ;
80 #endif
81 #ifdef SBA
82 debug.d_sba = 0 ;
83 #endif
84 #endif
85
86
87 for ( p = 0; p < NUMPHYS; p ++ ) {
88 smc->y[p].mib = & smc->mib.p[p] ;
89 }
90
91 set_oem_spec_val(smc) ;
92 (void) smt_set_mac_opvalues(smc) ;
93 init_fddi_driver(smc,mac_addr) ;
94 smt_fixup_mib(smc) ;
95
96 ev_init(smc) ;
97 #ifndef SLIM_SMT
98 smt_init_evc(smc) ;
99 #endif
100 smt_timer_init(smc) ;
101 smt_agent_init(smc) ;
102
103 pcm_init(smc) ;
104 ecm_init(smc) ;
105 cfm_init(smc) ;
106 rmt_init(smc) ;
107
108 for (p = 0 ; p < NUMPHYS ; p++) {
109 pcm(smc,p,0) ;
110 }
111 ecm(smc,0) ;
112 cfm(smc,0) ;
113 rmt(smc,0) ;
114
115 smt_agent_task(smc) ;
116
117 PNMI_INIT(smc) ;
118
119 return 0;
120 }
121