Lines Matching refs:mib
67 #define GO_STATE(x) (mib->fddiPORTPCMState = (x)|AFLAG)
68 #define ACTIONS_DONE() (mib->fddiPORTPCMState &= ~AFLAG)
231 struct fddi_mib_p *mib ; in pcm_init() local
235 mib = phy->mib ; in pcm_init()
236 mib->fddiPORTPCMState = ACTIONS(PC0_OFF) ; in pcm_init()
241 mib->fddiPORTMy_Type = (np == PS) ? TS : TM ; in pcm_init()
244 mib->fddiPORTMy_Type = (np == PA) ? TA : in pcm_init()
248 mib->fddiPORTMy_Type = TM ; in pcm_init()
252 mib->fddiPORTMy_Type = (np == PS) ? TS : TNONE ; in pcm_init()
253 mib->fddiPORTHardwarePresent = (np == PS) ? TRUE : in pcm_init()
256 smc->y[PA].mib->fddiPORTPCMState = PC0_OFF ; in pcm_init()
258 smc->y[PB].mib->fddiPORTPCMState = PC0_OFF ; in pcm_init()
262 mib->fddiPORTMy_Type = (np == PB) ? TB : TA ; in pcm_init()
272 mib->fddiPORTPMDClass = MIB_PMDCLASS_MULTI ; in pcm_init()
275 mib->fddiPORTPMDClass = MIB_PMDCLASS_LCF ; in pcm_init()
278 mib->fddiPORTPMDClass = MIB_PMDCLASS_TP ; in pcm_init()
281 mib->fddiPORTPMDClass = MIB_PMDCLASS_TP ; in pcm_init()
285 mib->fddiPORTPMDClass = MIB_PMDCLASS_TP ; in pcm_init()
289 mib->fddiPORTPMDClass = MIB_PMDCLASS_SINGLE1 ; in pcm_init()
292 mib->fddiPORTPMDClass = MIB_PMDCLASS_SINGLE2 ; in pcm_init()
295 mib->fddiPORTPMDClass = MIB_PMDCLASS_SINGLE2 ; in pcm_init()
298 mib->fddiPORTPMDClass = MIB_PMDCLASS_SINGLE1 ; in pcm_init()
301 mib->fddiPORTPMDClass = MIB_PMDCLASS_UNKNOWN ; in pcm_init()
304 mib->fddiPORTPMDClass = MIB_PMDCLASS_TP ; in pcm_init()
307 mib->fddiPORTPMDClass = MIB_PMDCLASS_TP ; in pcm_init()
310 mib->fddiPORTPMDClass = MIB_PMDCLASS_UNKNOWN ; in pcm_init()
316 switch (mib->fddiPORTMy_Type) { in pcm_init()
318 mib->fddiPORTAvailablePaths |= MIB_PATH_S ; in pcm_init()
319 mib->fddiPORTRequestedPaths[1] = MIB_P_PATH_LOCAL ; in pcm_init()
320 mib->fddiPORTRequestedPaths[2] = in pcm_init()
324 mib->fddiPORTRequestedPaths[3] = in pcm_init()
331 mib->fddiPORTAvailablePaths |= MIB_PATH_S ; in pcm_init()
332 mib->fddiPORTRequestedPaths[1] = MIB_P_PATH_LOCAL ; in pcm_init()
333 mib->fddiPORTRequestedPaths[2] = in pcm_init()
336 mib->fddiPORTRequestedPaths[3] = in pcm_init()
343 mib->fddiPORTAvailablePaths |= MIB_PATH_S ; in pcm_init()
344 mib->fddiPORTRequestedPaths[1] = MIB_P_PATH_LOCAL ; in pcm_init()
345 mib->fddiPORTRequestedPaths[2] = in pcm_init()
349 mib->fddiPORTRequestedPaths[3] = in pcm_init()
355 mib->fddiPORTRequestedPaths[1] = MIB_P_PATH_LOCAL ; in pcm_init()
356 mib->fddiPORTRequestedPaths[2] = in pcm_init()
360 mib->fddiPORTRequestedPaths[3] = 0 ; in pcm_init()
365 mib->fddiPORTPCMStateX = mib->fddiPORTPCMState ; in pcm_init()
366 mib->fddiPORTLCTFail_Ct = 0 ; in pcm_init()
367 mib->fddiPORTBS_Flag = 0 ; in pcm_init()
368 mib->fddiPORTCurrentPath = MIB_PATH_ISOLATED ; in pcm_init()
369 mib->fddiPORTNeighborType = TNONE ; in pcm_init()
589 struct fddi_mib_p *mib ; in pcm() local
599 mib = phy->mib ; in pcm()
600 oldstate = mib->fddiPORTPCMState ; in pcm()
604 mib->fddiPORTPCMState & AFLAG ? "ACTIONS " : "", in pcm()
605 pcm_states[mib->fddiPORTPCMState & ~AFLAG], in pcm()
607 state = mib->fddiPORTPCMState ; in pcm()
610 } while (state != mib->fddiPORTPCMState) ; in pcm()
618 mib->fddiPORTPCMStateX = PC3_CONNECT ; in pcm()
620 mib->fddiPORTPCMStateX = state ; in pcm()
626 if ( mib->fddiPORTPCMState != oldstate && in pcm()
627 ((oldstate == PC8_ACTIVE) || (mib->fddiPORTPCMState == PC8_ACTIVE))) { in pcm()
636 if ( mib->fddiPORTPCMState != oldstate ) { in pcm()
638 DB_SNMP ("PCM from %d to %d\n", oldstate, mib->fddiPORTPCMState); in pcm()
639 if ( mib->fddiPORTPCMState == PC0_OFF ) { in pcm()
641 snmp_fddi_trap (smc, 1, (int) mib->fddiPORTIndex ); in pcm()
644 snmp_fddi_trap (smc, 2, (int) mib->fddiPORTIndex ); in pcm()
645 } else if ( mib->fddiPORTPCMState != PC2_TRACE && in pcm()
648 snmp_fddi_trap (smc, 3, (int) mib->fddiPORTIndex ); in pcm()
649 } else if ( mib->fddiPORTPCMState == PC8_ACTIVE ) { in pcm()
651 snmp_fddi_trap (smc, 4, (int) mib->fddiPORTIndex ); in pcm()
667 struct fddi_mib_p *mib ; in pcm_fsm() local
673 mib = phy->mib ; in pcm_fsm()
681 if (mib->fddiPORTPCMState != PC9_MAINT) { in pcm_fsm()
690 if (mib->fddiPORTPCMState != PC9_MAINT) in pcm_fsm()
708 switch(mib->fddiPORTPCMState) { in pcm_fsm()
719 mib->fddiPORTConnectState = PCM_DISABLED ; in pcm_fsm()
751 if (mib->fddiPORTPC_Withhold == PC_WH_NONE) in pcm_fsm()
752 mib->fddiPORTConnectState = PCM_CONNECTING ; in pcm_fsm()
975 mib->fddiPORTConnectState = PCM_ACTIVE ; in pcm_fsm()
1002 mib->fddiPORTConnectState = PCM_DISABLED ; in pcm_fsm()
1004 sm_ph_linestate(smc,np,(int) MIB2LS(mib->fddiPORTMaint_LS)) ; in pcm_fsm()
1059 phy->mib->fddiPORTLer_Estimate = 15 ; in reset_lem_struct()
1071 struct fddi_mib_p *mib ; in lem_evaluate() local
1074 mib = phy->mib ; in lem_evaluate()
1081 mib->fddiPORTLem_Ct += errors ; in lem_evaluate()
1112 mib->fddiPORTLer_Estimate = lem->lem_float_ber / 100 ; in lem_evaluate()
1113 if (mib->fddiPORTLer_Estimate < 4) { in lem_evaluate()
1114 mib->fddiPORTLer_Estimate = 4 ; in lem_evaluate()
1120 DB_PCMN(1, "sum_errors : %ld", mib->fddiPORTLem_Ct); in lem_evaluate()
1123 DB_PCMN(1, "avg. BER : 10E-%d", mib->fddiPORTLer_Estimate); in lem_evaluate()
1129 cond = (mib->fddiPORTLer_Estimate <= mib->fddiPORTLer_Alarm) ? in lem_evaluate()
1134 if (cond != mib->fddiPORTLerFlag) { in lem_evaluate()
1140 if ( mib->fddiPORTLer_Estimate <= mib->fddiPORTLer_Cutoff) { in lem_evaluate()
1142 mib->fddiPORTLem_Reject_Ct++ ; in lem_evaluate()
1152 phy->np, mib->fddiPORTLer_Cutoff); in lem_evaluate()
1176 struct fddi_mib_p *mib ; in lem_check_lct() local
1179 mib = phy->mib ; in lem_check_lct()
1184 mib->fddiPORTLem_Ct += errors ; in lem_check_lct()
1207 mib->fddiPORTLCTFail_Ct++ ; in lem_check_lct()
1208 mib->fddiPORTLem_Reject_Ct++ ; in lem_check_lct()
1211 mib->fddiPORTLCTFail_Ct = 0 ; in lem_check_lct()
1254 struct fddi_mib_p *mib ; in pc_rcode_actions() local
1256 mib = phy->mib ; in pc_rcode_actions()
1268 mib->fddiPORTNeighborType = TA ; in pc_rcode_actions()
1270 mib->fddiPORTNeighborType = TB ; in pc_rcode_actions()
1272 mib->fddiPORTNeighborType = TS ; in pc_rcode_actions()
1274 mib->fddiPORTNeighborType = TM ; in pc_rcode_actions()
1277 if (mib->fddiPORTMy_Type == TM && in pc_rcode_actions()
1278 mib->fddiPORTNeighborType == TM) { in pc_rcode_actions()
1281 mib->fddiPORTPC_Withhold = PC_WH_M_M ; in pc_rcode_actions()
1285 mib->fddiPORTPC_Withhold = PC_WH_NONE ; in pc_rcode_actions()
1286 if (mib->fddiPORTMy_Type == TM || in pc_rcode_actions()
1287 mib->fddiPORTNeighborType == TM) in pc_rcode_actions()
1296 mib->fddiPORTPC_Withhold = PC_WH_PATH ; in pc_rcode_actions()
1300 mib->fddiPORTPC_Withhold = PC_WH_OTHER ; in pc_rcode_actions()
1305 phy->twisted = ((mib->fddiPORTMy_Type != TS) && in pc_rcode_actions()
1306 (mib->fddiPORTMy_Type != TM) && in pc_rcode_actions()
1307 (mib->fddiPORTNeighborType == in pc_rcode_actions()
1308 mib->fddiPORTMy_Type)) ; in pc_rcode_actions()
1376 mib->fddiPORTMacIndicated.R_val = TRUE ; in pc_rcode_actions()
1380 mib->fddiPORTMacIndicated.R_val = FALSE ; in pc_rcode_actions()
1392 struct fddi_mib_p *mib ; in pc_tcode_actions() local
1394 mib = phy->mib ; in pc_tcode_actions()
1401 if (mib->fddiPORTMy_Type == TS || mib->fddiPORTMy_Type == TM) in pc_tcode_actions()
1407 if (mib->fddiPORTMy_Type == TB || mib->fddiPORTMy_Type == TM) in pc_tcode_actions()
1417 type = mib->fddiPORTMy_Type ; in pc_tcode_actions()
1418 ne = mib->fddiPORTNeighborType ; in pc_tcode_actions()
1419 policy = smc->mib.fddiSMTConnectionPolicy ; in pc_tcode_actions()
1473 if (mib->fddiPORTPC_Withhold == PC_WH_NONE) { in pc_tcode_actions()
1480 if (mib->fddiPORTLCTFail_Ct > 0) in pc_tcode_actions()
1493 mib->fddiPORTConnectState = PCM_CONNECTING ; in pc_tcode_actions()
1496 mib->fddiPORTConnectState = PCM_STANDBY ; in pc_tcode_actions()
1522 if ((mib->fddiPORTPC_Withhold != PC_WH_NONE) || in pc_tcode_actions()
1535 (smc->y[PB].mib->fddiPORTConnectState != in pc_tcode_actions()
1558 mib->fddiPORTMacIndicated.T_val = phy->t_val[9] ; in pc_tcode_actions()
1572 if (smc->y[PA].twisted && (smc->y[PA].mib->fddiPORTPCMState == PC8_ACTIVE)) in pcm_status_twisted()
1574 if (smc->y[PB].twisted && (smc->y[PB].mib->fddiPORTPCMState == PC8_ACTIVE)) in pcm_status_twisted()
1590 struct fddi_mib_p *mib ; in pcm_status_state() local
1592 mib = phy->mib ; in pcm_status_state()
1596 *type = mib->fddiPORTMy_Type ; /* our PHY type */ in pcm_status_state()
1597 *state = mib->fddiPORTConnectState ; in pcm_status_state()
1598 *remote = mib->fddiPORTNeighborType ; in pcm_status_state()
1600 switch(mib->fddiPORTPCMState) { in pcm_status_state()
1602 *mac = mib->fddiPORTMacIndicated.R_val ; in pcm_status_state()
1615 if (smc->y[n].mib->fddiPORTPCMState == PC8_ACTIVE && in pcm_rooted_station()
1616 smc->y[n].mib->fddiPORTNeighborType == TM) in pcm_rooted_station()
1644 if (!plc->ebuf_cont && phy->mib->fddiPORTPCMState == PC8_ACTIVE){ in plc_irq()
1651 phy->mib->fddiPORTEBError_Ct ++ ; in plc_irq()
1729 phy->mib->fddiPORTLem_Ct += i ; in plc_irq()
1793 np, smc->mib.fddiSMTECMState); in plc_irq()
1803 if ((cmd & PL_SELF_TEST) && (phy->mib->fddiPORTPCMState == PC2_TRACE)) { in plc_irq()
1808 phy->mib->fddiPORTPCMState); in plc_irq()
1816 if (phy->mib->fddiPORTPCMState == PC8_ACTIVE) { in plc_irq()
1854 struct fddi_mib_p *mib ; in pcm_get_state() local
1858 mib = phy->mib ; in pcm_get_state()
1859 pcs->pcm_type = (u_char) mib->fddiPORTMy_Type ; in pcm_get_state()
1860 pcs->pcm_state = (u_char) mib->fddiPORTPCMState ; in pcm_get_state()
1862 pcs->pcm_neighbor = (u_char) mib->fddiPORTNeighborType ; in pcm_get_state()
1863 pcs->pcm_bsf = mib->fddiPORTBS_Flag ; in pcm_get_state()
1865 pcs->pcm_lct_fail = (u_char) mib->fddiPORTLCTFail_Ct ; in pcm_get_state()
1978 struct fddi_mib_p *mib ; in pcm_lem_dump() local
1987 mib = phy->mib ; in pcm_lem_dump()
1990 mib->fddiPORTLem_Ct, in pcm_lem_dump()
1991 mib->fddiPORTLer_Estimate) ; in pcm_lem_dump()