Lines Matching refs:pRPort

757 	SK_RLMT_PORT	*pRPort;  in SkRlmtSend()  local
759 pRPort = &pAC->Rlmt.Port[PortNumber]; in SkRlmtSend()
761 if (pRPort->CheckingState & (SK_RLMT_PCS_TX | SK_RLMT_PCS_RX)) { in SkRlmtSend()
774 for (j = 0; j < pRPort->PortsChecked; j++) { in SkRlmtSend()
777 &pRPort->PortCheck[j].CheckAddr)) != NULL) { in SkRlmtSend()
793 pRPort->RootIdSet = SK_FALSE; in SkRlmtSend()
823 SK_RLMT_PORT *pRPort; in SkRlmtPortReceives() local
826 pRPort = &pAC->Rlmt.Port[PortNumber]; in SkRlmtPortReceives()
827 pRPort->PortNoRx = SK_FALSE; in SkRlmtPortReceives()
829 if ((pRPort->PortState == SK_RLMT_PS_DOWN) && in SkRlmtPortReceives()
830 !(pRPort->CheckingState & SK_RLMT_PCS_TX)) { in SkRlmtPortReceives()
838 pRPort->PortState = SK_RLMT_PS_GOING_UP; in SkRlmtPortReceives()
839 pRPort->GuTimeStamp = SkOsGetTime(pAC); in SkRlmtPortReceives()
842 SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL, in SkRlmtPortReceives()
844 pRPort->CheckingState &= ~SK_RLMT_PCS_RX; in SkRlmtPortReceives()
846 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtPortReceives()
848 else if (pRPort->CheckingState & SK_RLMT_PCS_RX) { in SkRlmtPortReceives()
851 SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); in SkRlmtPortReceives()
852 pRPort->CheckingState &= ~SK_RLMT_PCS_RX; in SkRlmtPortReceives()
854 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtPortReceives()
887 SK_RLMT_PORT *pRPort; in SkRlmtPacketReceive() local
894 pRPort = &pAC->Rlmt.Port[PortNumber]; in SkRlmtPacketReceive()
906 if ((pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot) != 0) { in SkRlmtPacketReceive()
935 if (pRPort->Random[i] != pRPacket->Random[i]) { in SkRlmtPacketReceive()
972 if (pRPort->PortsSuspect > 0) { in SkRlmtPacketReceive()
973 for (j = 0; j < pRPort->PortsChecked; j++) { in SkRlmtPacketReceive()
974 if (pRPort->PortCheck[j].SuspectTx && in SkRlmtPacketReceive()
976 pRPacket->SrcAddr, pRPort->PortCheck[j].CheckAddr.a)) { in SkRlmtPacketReceive()
977 pRPort->PortCheck[j].SuspectTx = SK_FALSE; in SkRlmtPacketReceive()
978 pRPort->PortsSuspect--; in SkRlmtPacketReceive()
1022 if (pRPort->CheckingState & SK_RLMT_PCS_TX) { in SkRlmtPacketReceive()
1023 pRPort->CheckingState &= ~SK_RLMT_PCS_TX; in SkRlmtPacketReceive()
1024 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); in SkRlmtPacketReceive()
1027 if ((pRPort->PortState == SK_RLMT_PS_DOWN) && in SkRlmtPacketReceive()
1028 !(pRPort->CheckingState & SK_RLMT_PCS_RX)) { in SkRlmtPacketReceive()
1029 pRPort->PortState = SK_RLMT_PS_GOING_UP; in SkRlmtPacketReceive()
1030 pRPort->GuTimeStamp = SkOsGetTime(pAC); in SkRlmtPacketReceive()
1032 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); in SkRlmtPacketReceive()
1036 SkTimerStart(pAC, IoC, &pRPort->UpTimer, in SkRlmtPacketReceive()
1049 pRPort->RxHelloCts++; in SkRlmtPacketReceive()
1069 pRPort->CheckingState |= SK_RLMT_PCS_TX; in SkRlmtPacketReceive()
1074 SkTimerStart(pAC, IoC, &pRPort->DownTxTimer, in SkRlmtPacketReceive()
1092 SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber); in SkRlmtPacketReceive()
1111 pRPort->RxSpHelloCts++; in SkRlmtPacketReceive()
1119 if (!SK_ADDR_EQUAL(&pSPacket->RootId[2], &pRPort->Root.Id[2]) && in SkRlmtPacketReceive()
1130 pRPort->Root.Id[i] = pSPacket->RootId[i]; in SkRlmtPacketReceive()
1132 pRPort->RootIdSet = SK_TRUE; in SkRlmtPacketReceive()
1137 pRPort->Root.Id[0], pRPort->Root.Id[1], in SkRlmtPacketReceive()
1138 pRPort->Root.Id[2], pRPort->Root.Id[3], in SkRlmtPacketReceive()
1139 pRPort->Root.Id[4], pRPort->Root.Id[5], in SkRlmtPacketReceive()
1140 pRPort->Root.Id[6], pRPort->Root.Id[7])) in SkRlmtPacketReceive()
1225 SK_RLMT_PORT *pRPort; in SkRlmtCheckPort() local
1228 pRPort = &pAC->Rlmt.Port[PortNumber]; in SkRlmtCheckPort()
1230 if ((pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot) == 0) { in SkRlmtCheckPort()
1233 PortNumber, pRPort->PacketsPerTimeSlot)) in SkRlmtCheckPort()
1241 if (pRPort->PortNoRx && (pAC->Rlmt.Port[PortNumber].Net->LinksUp > 1) && in SkRlmtCheckPort()
1250 pRPort->PortsSuspect, pRPort->CheckingState & SK_RLMT_PCS_RX)) in SkRlmtCheckPort()
1252 if (pRPort->PortState != SK_RLMT_PS_DOWN) { in SkRlmtCheckPort()
1258 if (!(pRPort->CheckingState & SK_RLMT_PCS_RX)) { in SkRlmtCheckPort()
1260 pRPort->CheckingState |= SK_RLMT_PCS_RX; in SkRlmtCheckPort()
1267 SkTimerStart(pAC, IoC, &pRPort->DownRxTimer, in SkRlmtCheckPort()
1271 for (i = 0; i < pRPort->PortsChecked; i++) { in SkRlmtCheckPort()
1272 if (pRPort->PortCheck[i].SuspectTx) { in SkRlmtCheckPort()
1275 pRPort->PortCheck[i].SuspectTx = SK_TRUE; in SkRlmtCheckPort()
1276 pRPort->PortsSuspect++; in SkRlmtCheckPort()
1280 &pRPort->PortCheck[i].CheckAddr)) != NULL) { in SkRlmtCheckPort()
1289 pRPort->PortNoRx = SK_TRUE; in SkRlmtCheckPort()
1295 pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot, in SkRlmtCheckPort()
1296 pRPort->PacketsPerTimeSlot)) in SkRlmtCheckPort()
1300 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtCheckPort()
2015 SK_RLMT_PORT *pRPort; in SkRlmtEvtLinkUp() local
2021 pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; in SkRlmtEvtLinkUp()
2022 if (!pRPort->PortStarted) { in SkRlmtEvtLinkUp()
2030 if (!pRPort->LinkDown) { in SkRlmtEvtLinkUp()
2037 SkTimerStop(pAC, IoC, &pRPort->UpTimer); in SkRlmtEvtLinkUp()
2038 SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); in SkRlmtEvtLinkUp()
2039 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); in SkRlmtEvtLinkUp()
2043 pRPort->LinkDown = SK_FALSE; in SkRlmtEvtLinkUp()
2044 pRPort->PortState = SK_RLMT_PS_GOING_UP; in SkRlmtEvtLinkUp()
2045 pRPort->GuTimeStamp = SkOsGetTime(pAC); in SkRlmtEvtLinkUp()
2046 pRPort->BcTimeStamp = 0; in SkRlmtEvtLinkUp()
2047 pRPort->Net->LinksUp++; in SkRlmtEvtLinkUp()
2048 if (pRPort->Net->LinksUp == 1) { in SkRlmtEvtLinkUp()
2055 for (i = 0; i < pRPort->Net->NumPorts; i++) { in SkRlmtEvtLinkUp()
2056 if (!pRPort->Net->Port[i]->PortStarted) { in SkRlmtEvtLinkUp()
2057 SkRlmtPortStart(pAC, IoC, pRPort->Net->Port[i]->PortNumber); in SkRlmtEvtLinkUp()
2061 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtEvtLinkUp()
2063 if (pRPort->Net->LinksUp >= 2) { in SkRlmtEvtLinkUp()
2064 if (pRPort->Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) { in SkRlmtEvtLinkUp()
2066 SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber); in SkRlmtEvtLinkUp()
2071 if (pRPort->Net->NumPorts > 1 && pRPort->Net->LinksUp == 1 && in SkRlmtEvtLinkUp()
2072 (pRPort->Net->RlmtMode & SK_RLMT_CHECK_OTHERS) != 0) { in SkRlmtEvtLinkUp()
2073 Para2.Para32[0] = pRPort->Net->NetNumber; in SkRlmtEvtLinkUp()
2075 SkTimerStart(pAC, IoC, &pRPort->Net->LocTimer, in SkRlmtEvtLinkUp()
2076 pRPort->Net->TimeoutValue, SKGE_RLMT, SK_RLMT_TIM, Para2); in SkRlmtEvtLinkUp()
2081 SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL, in SkRlmtEvtLinkUp()
2085 if ((pRPort->Net->RlmtMode & SK_RLMT_TRANSPARENT) == 0 && in SkRlmtEvtLinkUp()
2086 (pRPort->Net->RlmtMode & SK_RLMT_CHECK_LINK) != 0 && in SkRlmtEvtLinkUp()
2095 if (pRPort->Net->RlmtMode & SK_RLMT_CHECK_SEG) { in SkRlmtEvtLinkUp()
2099 pRPort->Net->CheckingState |= in SkRlmtEvtLinkUp()
2105 SkTimerStart(pAC, IoC, &pRPort->Net->SegTimer, in SkRlmtEvtLinkUp()
2134 SK_RLMT_PORT *pRPort; in SkRlmtEvtPortUpTim() local
2147 pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; in SkRlmtEvtPortUpTim()
2148 if (pRPort->LinkDown || (pRPort->PortState == SK_RLMT_PS_UP)) { in SkRlmtEvtPortUpTim()
2154 pRPort->PortDown = SK_FALSE; in SkRlmtEvtPortUpTim()
2155 pRPort->PortState = SK_RLMT_PS_UP; in SkRlmtEvtPortUpTim()
2156 pRPort->Net->PortsUp++; in SkRlmtEvtPortUpTim()
2157 if (pRPort->Net->RlmtState != SK_RLMT_RS_INIT) { in SkRlmtEvtPortUpTim()
2159 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtEvtPortUpTim()
2189 SK_RLMT_PORT *pRPort; in SkRlmtEvtPortDownX() local
2203 pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; in SkRlmtEvtPortDownX()
2204 if (!pRPort->PortStarted || (Event == SK_RLMT_PORTDOWN_TX_TIM && in SkRlmtEvtPortDownX()
2205 !(pRPort->CheckingState & SK_RLMT_PCS_TX))) { in SkRlmtEvtPortDownX()
2212 SkTimerStop(pAC, IoC, &pRPort->UpTimer); in SkRlmtEvtPortDownX()
2213 SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); in SkRlmtEvtPortDownX()
2214 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); in SkRlmtEvtPortDownX()
2216 if (pRPort->PortState != SK_RLMT_PS_LINK_DOWN) { in SkRlmtEvtPortDownX()
2217 pRPort->PortState = SK_RLMT_PS_DOWN; in SkRlmtEvtPortDownX()
2220 if (!pRPort->PortDown) { in SkRlmtEvtPortDownX()
2221 pRPort->Net->PortsUp--; in SkRlmtEvtPortDownX()
2222 pRPort->PortDown = SK_TRUE; in SkRlmtEvtPortDownX()
2226 pRPort->PacketsPerTimeSlot = 0; in SkRlmtEvtPortDownX()
2228 pRPort->BpduPacketsPerTimeSlot = 0; in SkRlmtEvtPortDownX()
2229 pRPort->BcTimeStamp = 0; in SkRlmtEvtPortDownX()
2235 if (pRPort->Net->RlmtState != SK_RLMT_RS_INIT) { in SkRlmtEvtPortDownX()
2237 pRPort->Net->Port[pRPort->Net->ActivePort]->PortNumber) { in SkRlmtEvtPortDownX()
2239 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtEvtPortDownX()
2267 SK_RLMT_PORT *pRPort; in SkRlmtEvtLinkDown() local
2269 pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; in SkRlmtEvtLinkDown()
2274 pRPort->Net->LinksUp--; in SkRlmtEvtLinkDown()
2275 pRPort->LinkDown = SK_TRUE; in SkRlmtEvtLinkDown()
2276 pRPort->PortState = SK_RLMT_PS_LINK_DOWN; in SkRlmtEvtLinkDown()
2279 if ((pRPort->Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) != 0) { in SkRlmtEvtLinkDown()
2281 SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber); in SkRlmtEvtLinkDown()
2314 SK_RLMT_PORT *pRPort; in SkRlmtEvtPortAddr() local
2339 pRPort = &pAC->Rlmt.Port[i]; in SkRlmtEvtPortAddr()
2340 for (j = 0; j < pRPort->PortsChecked; j++) { in SkRlmtEvtPortAddr()
2342 pRPort->PortCheck[j].CheckAddr.a, pOldMacAddr->a)) { in SkRlmtEvtPortAddr()
2343 pRPort->PortCheck[j].CheckAddr = *pNewMacAddr; in SkRlmtEvtPortAddr()
2553 SK_RLMT_PORT *pRPort; in SkRlmtEvtTim() local
2586 pRPort = &pAC->Rlmt.Port[PortNumber]; in SkRlmtEvtTim()
2587 if (!pRPort->LinkDown) { in SkRlmtEvtTim()
2597 pRPort->PacketsPerTimeSlot = 0; in SkRlmtEvtTim()
2599 pRPort->BpduPacketsPerTimeSlot = 0; in SkRlmtEvtTim()
2786 SK_RLMT_PORT *pRPort; in SkRlmtEvtStatsClear() local
2809 pRPort = in SkRlmtEvtStatsClear()
2811 pRPort->TxHelloCts = 0; in SkRlmtEvtStatsClear()
2812 pRPort->RxHelloCts = 0; in SkRlmtEvtStatsClear()
2813 pRPort->TxSpHelloReqCts = 0; in SkRlmtEvtStatsClear()
2814 pRPort->RxSpHelloCts = 0; in SkRlmtEvtStatsClear()