diff options
Diffstat (limited to 'drivers/staging/bcm')
-rw-r--r-- | drivers/staging/bcm/Bcmchar.c | 2 | ||||
-rw-r--r-- | drivers/staging/bcm/CmHost.c | 150 | ||||
-rw-r--r-- | drivers/staging/bcm/CmHost.h | 54 | ||||
-rw-r--r-- | drivers/staging/bcm/InterfaceInit.c | 17 | ||||
-rw-r--r-- | drivers/staging/bcm/InterfaceInit.h | 33 | ||||
-rw-r--r-- | drivers/staging/bcm/Kconfig | 2 | ||||
-rw-r--r-- | drivers/staging/bcm/Misc.c | 5 | ||||
-rw-r--r-- | drivers/staging/bcm/PHSModule.c | 4 | ||||
-rw-r--r-- | drivers/staging/bcm/Prototypes.h | 2 | ||||
-rw-r--r-- | drivers/staging/bcm/Transmit.c | 234 | ||||
-rw-r--r-- | drivers/staging/bcm/cntrl_SignalingInterface.h | 704 | ||||
-rw-r--r-- | drivers/staging/bcm/hostmibs.c | 2 | ||||
-rw-r--r-- | drivers/staging/bcm/nvm.c | 4 | ||||
-rw-r--r-- | drivers/staging/bcm/target_params.h | 2 |
14 files changed, 532 insertions, 683 deletions
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index cf411d1706b1..3d02c2ebfb8d 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -820,6 +820,7 @@ cntrlEnd: if (copy_from_user(psFwInfo, IoBuffer.InputBuffer, IoBuffer.InputLength)) { up(&Adapter->fw_download_sema); + kfree(psFwInfo); return -EFAULT; } @@ -829,6 +830,7 @@ cntrlEnd: BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Something else is wrong %lu\n", psFwInfo->u32FirmwareLength); up(&Adapter->fw_download_sema); + kfree(psFwInfo); Status = -EINVAL; return Status; } diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index b54ec974477f..325b592fd41f 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -235,7 +235,7 @@ void ClearTargetDSXBuffer(struct bcm_mini_adapter *Adapter, B_UINT16 TID, BOOLEA * @ingroup ctrl_pkt_functions * copy classifier rule into the specified SF index */ -static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stConvergenceSLTypes *psfCSType, UINT uiSearchRuleIndex, UINT nClassifierIndex) +static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, struct bcm_convergence_types *psfCSType, UINT uiSearchRuleIndex, UINT nClassifierIndex) { struct bcm_classifier_rule *pstClassifierEntry = NULL; /* VOID *pvPhsContext = NULL; */ @@ -428,7 +428,7 @@ VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *Adapter, UINT uiSearchRu * @ingroup ctrl_pkt_functions */ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer to the Adapter structure */ - register pstServiceFlowParamSI psfLocalSet, /* <Pointer to the ServiceFlowParamSI structure */ + register struct bcm_connect_mgr_params *psfLocalSet, /* Pointer to the connection manager parameters structure */ register UINT uiSearchRuleIndex, /* <Index of Queue, to which this data belongs */ register UCHAR ucDsxType, stLocalSFAddIndicationAlt *pstAddIndication) { @@ -439,7 +439,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer enum E_CLASSIFIER_ACTION eClassifierAction = eInvalidClassifierAction; B_UINT16 u16PacketClassificationRuleIndex = 0; int i; - stConvergenceSLTypes *psfCSType = NULL; + struct bcm_convergence_types *psfCSType = NULL; S_PHS_RULE sPhsRule; USHORT uVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value; UINT UGIValue = 0; @@ -915,7 +915,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) if (!pstAddIndication->sfAuthorizedSet.bValid) pstAddIndication->sfAuthorizedSet.bValid = 1; for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) { - stConvergenceSLTypes *psfCSType = NULL; + struct bcm_convergence_types *psfCSType = NULL; psfCSType = &pstAddIndication->sfAuthorizedSet.cConvergenceSLTypes[nIndex]; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "psfCSType = %p", psfCSType); @@ -999,13 +999,10 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) #ifdef VERSION_D5 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLableLength: 0x%X ", psfCSType->cCPacketClassificationRule.u8IPv6FlowLableLength); - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLable[6]: 0x %02X %02X %02X %02X %02X %02X ", - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[0], - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[1], - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[2], - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[3], - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[4], - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[5]); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, + DBG_LVL_ALL, "u8IPv6FlowLable[6]: 0x%*ph ", + 6, psfCSType->cCPacketClassificationRule. + u8IPv6FlowLable); #endif } @@ -1015,13 +1012,9 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID: 0x%X", pstAddIndication->sfAdmittedSet.u16CID); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassNameLength: 0x%X", pstAddIndication->sfAdmittedSet.u8ServiceClassNameLength); - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassName: 0x %02X %02X %02X %02X %02X %02X", - pstAddIndication->sfAdmittedSet.u8ServiceClassName[0], - pstAddIndication->sfAdmittedSet.u8ServiceClassName[1], - pstAddIndication->sfAdmittedSet.u8ServiceClassName[2], - pstAddIndication->sfAdmittedSet.u8ServiceClassName[3], - pstAddIndication->sfAdmittedSet.u8ServiceClassName[4], - pstAddIndication->sfAdmittedSet.u8ServiceClassName[5]); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, + "u8ServiceClassName: 0x%*ph", + 6, pstAddIndication->sfAdmittedSet.u8ServiceClassName); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8MBSService: 0x%02X", pstAddIndication->sfAdmittedSet.u8MBSService); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8QosParamSet: 0x%02X", pstAddIndication->sfAdmittedSet.u8QosParamSet); @@ -1066,7 +1059,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF; for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) { - stConvergenceSLTypes *psfCSType = NULL; + struct bcm_convergence_types *psfCSType = NULL; psfCSType = &pstAddIndication->sfAdmittedSet.cConvergenceSLTypes[nIndex]; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " CCPacketClassificationRuleSI====>"); @@ -1074,10 +1067,10 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfServiceLength: 0x%02X", psfCSType->cCPacketClassificationRule.u8IPTypeOfServiceLength); - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPTypeOfService[3]: 0x%02X %02X %02X", - psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0], - psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1], - psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2]); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, + DBG_LVL_ALL, "u8IPTypeOfService[3]: 0x%*ph", + 3, psfCSType->cCPacketClassificationRule. + u8IPTypeOfService); for (uiLoopIndex = 0; uiLoopIndex < 1; uiLoopIndex++) BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Protocol: 0x%02X ", psfCSType->cCPacketClassificationRule.u8Protocol); @@ -1098,20 +1091,20 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRangeLength: 0x%02X ", psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength); - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: 0x %02X %02X %02X %02X ", - psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[0], - psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[1], - psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[2], - psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRange[3]); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, + DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: " + "0x%*ph ", 4, psfCSType-> + cCPacketClassificationRule. + u8ProtocolSourcePortRange); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolDestPortRangeLength: 0x%02X ", psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength); - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: 0x %02X %02X %02X %02X ", - psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[0], - psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[1], - psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[2], - psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRange[3]); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, + DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: " + "0x%*ph ", 4, psfCSType-> + cCPacketClassificationRule. + u8ProtocolDestPortRange); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthernetDestMacAddressLength: 0x%02X ", psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength); @@ -1130,10 +1123,10 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) u8EthernetSourceMACAddress); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8EthertypeLength: 0x%02X ", psfCSType->cCPacketClassificationRule.u8EthertypeLength); - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8Ethertype[3]: 0x%02X %02X %02X", - psfCSType->cCPacketClassificationRule.u8Ethertype[0], - psfCSType->cCPacketClassificationRule.u8Ethertype[1], - psfCSType->cCPacketClassificationRule.u8Ethertype[2]); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, + DBG_LVL_ALL, "u8Ethertype[3]: 0x%*ph", + 3, psfCSType->cCPacketClassificationRule. + u8Ethertype); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16UserPriority: 0x%X ", psfCSType->cCPacketClassificationRule.u16UserPriority); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16VLANID: 0x%X ", psfCSType->cCPacketClassificationRule.u16VLANID); @@ -1147,13 +1140,10 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) #ifdef VERSION_D5 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLableLength: 0x%X ", psfCSType->cCPacketClassificationRule.u8IPv6FlowLableLength); - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8IPv6FlowLable[6]: 0x %02X %02X %02X %02X %02X %02X ", - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[0], - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[1], - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[2], - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[3], - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[4], - psfCSType->cCPacketClassificationRule.u8IPv6FlowLable[5]); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, + DBG_LVL_ALL, "u8IPv6FlowLable[6]: 0x%*ph ", + 6, psfCSType->cCPacketClassificationRule. + u8IPv6FlowLable); #endif } @@ -1162,13 +1152,9 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u32SFID: 0x%X", pstAddIndication->sfActiveSet.u32SFID); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u16CID: 0x%X", pstAddIndication->sfActiveSet.u16CID); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassNameLength: 0x%X", pstAddIndication->sfActiveSet.u8ServiceClassNameLength); - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8ServiceClassName: 0x %02X %02X %02X %02X %02X %02X", - pstAddIndication->sfActiveSet.u8ServiceClassName[0], - pstAddIndication->sfActiveSet.u8ServiceClassName[1], - pstAddIndication->sfActiveSet.u8ServiceClassName[2], - pstAddIndication->sfActiveSet.u8ServiceClassName[3], - pstAddIndication->sfActiveSet.u8ServiceClassName[4], - pstAddIndication->sfActiveSet.u8ServiceClassName[5]); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, + "u8ServiceClassName: 0x%*ph", + 6, pstAddIndication->sfActiveSet.u8ServiceClassName); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8MBSService: 0x%02X", pstAddIndication->sfActiveSet.u8MBSService); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, "u8QosParamSet: 0x%02X", pstAddIndication->sfActiveSet.u8QosParamSet); @@ -1212,7 +1198,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) nCurClassifierCnt = MAX_CLASSIFIERS_IN_SF; for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) { - stConvergenceSLTypes *psfCSType = NULL; + struct bcm_convergence_types *psfCSType = NULL; psfCSType = &pstAddIndication->sfActiveSet.cConvergenceSLTypes[nIndex]; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, " CCPacketClassificationRuleSI====>"); @@ -1314,7 +1300,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) static inline ULONG RestoreSFParam(struct bcm_mini_adapter *Adapter, ULONG ulAddrSFParamSet, PUCHAR pucDestBuffer) { - UINT nBytesToRead = sizeof(stServiceFlowParamSI); + UINT nBytesToRead = sizeof(struct bcm_connect_mgr_params); if (ulAddrSFParamSet == 0 || NULL == pucDestBuffer) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Got Param address as 0!!"); @@ -1331,7 +1317,7 @@ static inline ULONG RestoreSFParam(struct bcm_mini_adapter *Adapter, ULONG ulAdd static ULONG StoreSFParam(struct bcm_mini_adapter *Adapter, PUCHAR pucSrcBuffer, ULONG ulAddrSFParamSet) { - UINT nBytesToWrite = sizeof(stServiceFlowParamSI); + UINT nBytesToWrite = sizeof(struct bcm_connect_mgr_params); int ret = 0; if (ulAddrSFParamSet == 0 || NULL == pucSrcBuffer) @@ -1348,8 +1334,8 @@ static ULONG StoreSFParam(struct bcm_mini_adapter *Adapter, PUCHAR pucSrcBuffer, ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBuffer, UINT *puBufferLength) { stLocalSFAddIndicationAlt *pstAddIndicationAlt = NULL; - stLocalSFAddIndication *pstAddIndication = NULL; - stLocalSFDeleteRequest *pstDeletionRequest; + struct bcm_add_indication *pstAddIndication = NULL; + struct bcm_del_request *pstDeletionRequest; UINT uiSearchRuleIndex; ULONG ulSFID; @@ -1360,7 +1346,7 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu * we can stop the further classifying the pkt for this SF. */ if (pstAddIndicationAlt->u8Type == DSD_REQ) { - pstDeletionRequest = (stLocalSFDeleteRequest *)pvBuffer; + pstDeletionRequest = (struct bcm_del_request *)pvBuffer; ulSFID = ntohl(pstDeletionRequest->u32SFID); uiSearchRuleIndex = SearchSfid(Adapter, ulSFID); @@ -1379,12 +1365,12 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu } /* For DSA_REQ, only up to "psfAuthorizedSet" parameter should be accessed by driver! */ - pstAddIndication = kmalloc(sizeof(*pstAddIndication), GFP_KERNEL); + pstAddIndication = kmalloc(sizeof(struct bcm_add_indication), GFP_KERNEL); if (pstAddIndication == NULL) return 0; /* AUTHORIZED SET */ - pstAddIndication->psfAuthorizedSet = (stServiceFlowParamSI *) + pstAddIndication->psfAuthorizedSet = (struct bcm_connect_mgr_params *) GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID); if (!pstAddIndication->psfAuthorizedSet) { kfree(pstAddIndication); @@ -1398,10 +1384,10 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu } /* this can't possibly be right */ - pstAddIndication->psfAuthorizedSet = (stServiceFlowParamSI *)ntohl((ULONG)pstAddIndication->psfAuthorizedSet); + pstAddIndication->psfAuthorizedSet = (struct bcm_connect_mgr_params *)ntohl((ULONG)pstAddIndication->psfAuthorizedSet); if (pstAddIndicationAlt->u8Type == DSA_REQ) { - stLocalSFAddRequest AddRequest; + struct bcm_add_request AddRequest; AddRequest.u8Type = pstAddIndicationAlt->u8Type; AddRequest.eConnectionDir = pstAddIndicationAlt->u8Direction; @@ -1409,8 +1395,8 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu AddRequest.u16CID = pstAddIndicationAlt->u16CID; AddRequest.u16VCID = pstAddIndicationAlt->u16VCID; AddRequest.psfParameterSet = pstAddIndication->psfAuthorizedSet; - (*puBufferLength) = sizeof(stLocalSFAddRequest); - memcpy(pvBuffer, &AddRequest, sizeof(stLocalSFAddRequest)); + (*puBufferLength) = sizeof(struct bcm_add_request); + memcpy(pvBuffer, &AddRequest, sizeof(struct bcm_add_request)); kfree(pstAddIndication); return 1; } @@ -1426,7 +1412,7 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu pstAddIndication->u8CC = pstAddIndicationAlt->u8CC; /* ADMITTED SET */ - pstAddIndication->psfAdmittedSet = (stServiceFlowParamSI *) + pstAddIndication->psfAdmittedSet = (struct bcm_connect_mgr_params *) GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID); if (!pstAddIndication->psfAdmittedSet) { kfree(pstAddIndication); @@ -1437,10 +1423,10 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu return 0; } - pstAddIndication->psfAdmittedSet = (stServiceFlowParamSI *)ntohl((ULONG)pstAddIndication->psfAdmittedSet); + pstAddIndication->psfAdmittedSet = (struct bcm_connect_mgr_params *)ntohl((ULONG)pstAddIndication->psfAdmittedSet); /* ACTIVE SET */ - pstAddIndication->psfActiveSet = (stServiceFlowParamSI *) + pstAddIndication->psfActiveSet = (struct bcm_connect_mgr_params *) GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID); if (!pstAddIndication->psfActiveSet) { kfree(pstAddIndication); @@ -1451,10 +1437,10 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu return 0; } - pstAddIndication->psfActiveSet = (stServiceFlowParamSI *)ntohl((ULONG)pstAddIndication->psfActiveSet); + pstAddIndication->psfActiveSet = (struct bcm_connect_mgr_params *)ntohl((ULONG)pstAddIndication->psfActiveSet); - (*puBufferLength) = sizeof(stLocalSFAddIndication); - *(stLocalSFAddIndication *)pvBuffer = *pstAddIndication; + (*puBufferLength) = sizeof(struct bcm_add_indication); + *(struct bcm_add_indication *)pvBuffer = *pstAddIndication; kfree(pstAddIndication); return 1; } @@ -1463,10 +1449,10 @@ static inline stLocalSFAddIndicationAlt *RestoreCmControlResponseMessage(register struct bcm_mini_adapter *Adapter, register PVOID pvBuffer) { ULONG ulStatus = 0; - stLocalSFAddIndication *pstAddIndication = NULL; + struct bcm_add_indication *pstAddIndication = NULL; stLocalSFAddIndicationAlt *pstAddIndicationDest = NULL; - pstAddIndication = (stLocalSFAddIndication *)(pvBuffer); + pstAddIndication = (struct bcm_add_indication *)(pvBuffer); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "=====>"); if ((pstAddIndication->u8Type == DSD_REQ) || (pstAddIndication->u8Type == DSD_RSP) || @@ -1553,7 +1539,7 @@ ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *Adapter) if (Adapter->astTargetDsxBuffer[0].ulTargetDsxBuffer) return 1; - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Size of Each DSX Buffer(Also size of ServiceFlowParamSI): %zx ", sizeof(stServiceFlowParamSI)); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Size of Each DSX Buffer(Also size of connection manager parameters): %zx ", sizeof(struct bcm_connect_mgr_params)); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Reading DSX buffer From Target location %x ", DSX_MESSAGE_EXCHANGE_BUFFER); Status = rdmalt(Adapter, DSX_MESSAGE_EXCHANGE_BUFFER, (PUINT)&ulTargetDsxBuffersBase, sizeof(UINT)); @@ -1564,7 +1550,7 @@ ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *Adapter) BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Base Address Of DSX Target Buffer : 0x%lx", ulTargetDsxBuffersBase); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Tgt Buffer is Now %lx :", ulTargetDsxBuffersBase); - ulCntTargetBuffers = DSX_MESSAGE_EXCHANGE_BUFFER_SIZE / sizeof(stServiceFlowParamSI); + ulCntTargetBuffers = DSX_MESSAGE_EXCHANGE_BUFFER_SIZE / sizeof(struct bcm_connect_mgr_params); Adapter->ulTotalTargetBuffersAvailable = ulCntTargetBuffers > MAX_TARGET_DSX_BUFFERS ? @@ -1576,7 +1562,7 @@ ULONG SetUpTargetDsxBuffers(struct bcm_mini_adapter *Adapter) Adapter->astTargetDsxBuffer[i].ulTargetDsxBuffer = ulTargetDsxBuffersBase; Adapter->astTargetDsxBuffer[i].valid = 1; Adapter->astTargetDsxBuffer[i].tid = 0; - ulTargetDsxBuffersBase += sizeof(stServiceFlowParamSI); + ulTargetDsxBuffersBase += sizeof(struct bcm_connect_mgr_params); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " Target DSX Buffer %lx setup at 0x%lx", i, Adapter->astTargetDsxBuffer[i].ulTargetDsxBuffer); } @@ -1647,7 +1633,7 @@ int FreeAdapterDsxBuffer(struct bcm_mini_adapter *Adapter) BOOLEAN CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to the Adapter structure */ PVOID pvBuffer /* Starting Address of the Buffer, that contains the AddIndication Data */) { - stServiceFlowParamSI *psfLocalSet = NULL; + struct bcm_connect_mgr_params *psfLocalSet = NULL; stLocalSFAddIndicationAlt *pstAddIndication = NULL; stLocalSFChangeIndicationAlt *pstChangeIndication = NULL; struct bcm_leader *pLeader = NULL; @@ -1658,7 +1644,7 @@ BOOLEAN CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer */ pstAddIndication = RestoreCmControlResponseMessage(Adapter, pvBuffer); if (pstAddIndication == NULL) { - ClearTargetDSXBuffer(Adapter, ((stLocalSFAddIndication *)pvBuffer)->u16TID, FALSE); + ClearTargetDSXBuffer(Adapter, ((struct bcm_add_indication *)pvBuffer)->u16TID, FALSE); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Error in restoring Service Flow param structure from DSx message"); return FALSE; } @@ -1870,10 +1856,10 @@ BOOLEAN CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer UINT uiSearchRuleIndex; ULONG ulSFID; - pLeader->PLength = sizeof(stLocalSFDeleteIndication); - *((stLocalSFDeleteIndication *)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *((stLocalSFDeleteIndication *)pstAddIndication); + pLeader->PLength = sizeof(struct bcm_del_indication); + *((struct bcm_del_indication *)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *((struct bcm_del_indication *)pstAddIndication); - ulSFID = ntohl(((stLocalSFDeleteIndication *)pstAddIndication)->u32SFID); + ulSFID = ntohl(((struct bcm_del_indication *)pstAddIndication)->u32SFID); uiSearchRuleIndex = SearchSfid(Adapter, ulSFID); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "DSD - Removing connection %x", uiSearchRuleIndex); @@ -1884,7 +1870,7 @@ BOOLEAN CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer } BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSD RESPONSE TO MAC"); - ((stLocalSFDeleteIndication *)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSD_RSP; + ((struct bcm_del_indication *)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSD_RSP; CopyBufferToControlPacket(Adapter, (PVOID)Adapter->caDsxReqResp); } case DSD_RSP: @@ -1927,7 +1913,7 @@ int get_dsx_sf_data_to_application(struct bcm_mini_adapter *Adapter, UINT uiSFId VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter, PUINT puiBuffer) { B_UINT32 u32NumofSFsinMsg = ntohl(*(puiBuffer + 1)); - stIM_SFHostNotify *pHostInfo = NULL; + struct bcm_stim_sfhostnotify *pHostInfo = NULL; UINT uiSearchRuleIndex = 0; ULONG ulSFID = 0; @@ -1936,7 +1922,7 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter, PUINT puiBuffer while (u32NumofSFsinMsg != 0 && u32NumofSFsinMsg < NO_OF_QUEUES) { u32NumofSFsinMsg--; - pHostInfo = (stIM_SFHostNotify *)puiBuffer; + pHostInfo = (struct bcm_stim_sfhostnotify *)puiBuffer; puiBuffer = (PUINT)(pHostInfo + 1); ulSFID = ntohl(pHostInfo->SFID); diff --git a/drivers/staging/bcm/CmHost.h b/drivers/staging/bcm/CmHost.h index 4cc6f93f2321..1c5a07c7bbe2 100644 --- a/drivers/staging/bcm/CmHost.h +++ b/drivers/staging/bcm/CmHost.h @@ -35,8 +35,7 @@ typedef struct stLocalSFAddRequestAlt{ B_UINT16 u16VCID; - /// \brief structure ParameterSet - stServiceFlowParamSI sfParameterSet; + struct bcm_connect_mgr_params sfParameterSet; //USE_MEMORY_MANAGER(); }stLocalSFAddRequestAlt; @@ -50,12 +49,9 @@ typedef struct stLocalSFAddIndicationAlt{ B_UINT16 u16CID; /// \brief 16bitVCID B_UINT16 u16VCID; - /// \brief structure AuthorizedSet - stServiceFlowParamSI sfAuthorizedSet; - /// \brief structure AdmittedSet - stServiceFlowParamSI sfAdmittedSet; - /// \brief structure ActiveSet - stServiceFlowParamSI sfActiveSet; + struct bcm_connect_mgr_params sfAuthorizedSet; + struct bcm_connect_mgr_params sfAdmittedSet; + struct bcm_connect_mgr_params sfActiveSet; B_UINT8 u8CC; /**< Confirmation Code*/ B_UINT8 u8Padd; /**< 8-bit Padding */ @@ -72,12 +68,9 @@ typedef struct stLocalSFAddConfirmationAlt{ B_UINT16 u16CID; /// \brief 16bitVCID B_UINT16 u16VCID; - /// \brief structure AuthorizedSet - stServiceFlowParamSI sfAuthorizedSet; - /// \brief structure AdmittedSet - stServiceFlowParamSI sfAdmittedSet; - /// \brief structure ActiveSet - stServiceFlowParamSI sfActiveSet; + struct bcm_connect_mgr_params sfAuthorizedSet; + struct bcm_connect_mgr_params sfAdmittedSet; + struct bcm_connect_mgr_params sfActiveSet; }stLocalSFAddConfirmationAlt; @@ -91,16 +84,13 @@ typedef struct stLocalSFChangeRequestAlt{ /// \brief 16bitVCID B_UINT16 u16VCID; /* - //Pointer location at which following Service Flow param Structure can be read - //from the target. We get only the address location and we need to read out the - //entire SF param structure at the given location on target + //Pointer location at which following connection manager param Structure can be read + //from the target. We only get the address location and we need to read out the + //entire connection manager param structure at the given location on target */ - /// \brief structure AuthorizedSet - stServiceFlowParamSI sfAuthorizedSet; - /// \brief structure AdmittedSet - stServiceFlowParamSI sfAdmittedSet; - /// \brief structure ParameterSet - stServiceFlowParamSI sfActiveSet; + struct bcm_connect_mgr_params sfAuthorizedSet; + struct bcm_connect_mgr_params sfAdmittedSet; + struct bcm_connect_mgr_params sfActiveSet; B_UINT8 u8CC; /**< Confirmation Code*/ B_UINT8 u8Padd; /**< 8-bit Padding */ @@ -117,12 +107,9 @@ typedef struct stLocalSFChangeConfirmationAlt{ B_UINT16 u16CID; /// \brief 16bitVCID B_UINT16 u16VCID; - /// \brief structure AuthorizedSet - stServiceFlowParamSI sfAuthorizedSet; - /// \brief structure AdmittedSet - stServiceFlowParamSI sfAdmittedSet; - /// \brief structure ActiveSet - stServiceFlowParamSI sfActiveSet; + struct bcm_connect_mgr_params sfAuthorizedSet; + struct bcm_connect_mgr_params sfAdmittedSet; + struct bcm_connect_mgr_params sfActiveSet; }stLocalSFChangeConfirmationAlt; @@ -135,12 +122,9 @@ typedef struct stLocalSFChangeIndicationAlt{ B_UINT16 u16CID; /// \brief 16bitVCID B_UINT16 u16VCID; - /// \brief structure AuthorizedSet - stServiceFlowParamSI sfAuthorizedSet; - /// \brief structure AdmittedSet - stServiceFlowParamSI sfAdmittedSet; - /// \brief structure ActiveSet - stServiceFlowParamSI sfActiveSet; + struct bcm_connect_mgr_params sfAuthorizedSet; + struct bcm_connect_mgr_params sfAdmittedSet; + struct bcm_connect_mgr_params sfActiveSet; B_UINT8 u8CC; /**< Confirmation Code*/ B_UINT8 u8Padd; /**< 8-bit Padding */ diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c index 8f85de6a57ba..b05f5f73548c 100644 --- a/drivers/staging/bcm/InterfaceInit.c +++ b/drivers/staging/bcm/InterfaceInit.c @@ -8,6 +8,7 @@ static struct usb_device_id InterfaceUsbtable[] = { { USB_DEVICE(BCM_USB_VENDOR_ID_ZTE, BCM_USB_PRODUCT_ID_226) }, { USB_DEVICE(BCM_USB_VENDOR_ID_FOXCONN, BCM_USB_PRODUCT_ID_1901) }, { USB_DEVICE(BCM_USB_VENDOR_ID_ZTE, BCM_USB_PRODUCT_ID_ZTE_TU25) }, + { USB_DEVICE(BCM_USB_VENDOR_ID_ZTE, BCM_USB_PRODUCT_ID_ZTE_226) }, { } }; MODULE_DEVICE_TABLE(usb, InterfaceUsbtable); @@ -669,16 +670,24 @@ struct class *bcm_class; static __init int bcm_init(void) { - printk(KERN_INFO "%s: %s, %s\n", DRV_NAME, DRV_DESCRIPTION, DRV_VERSION); - printk(KERN_INFO "%s\n", DRV_COPYRIGHT); + int retval; + + pr_info("%s: %s, %s\n", DRV_NAME, DRV_DESCRIPTION, DRV_VERSION); + pr_info("%s\n", DRV_COPYRIGHT); bcm_class = class_create(THIS_MODULE, DRV_NAME); if (IS_ERR(bcm_class)) { - printk(KERN_ERR DRV_NAME ": could not create class\n"); + pr_err(DRV_NAME ": could not create class\n"); return PTR_ERR(bcm_class); } - return usb_register(&usbbcm_driver); + retval = usb_register(&usbbcm_driver); + if (retval < 0) { + pr_err(DRV_NAME ": could not register usb driver\n"); + class_destroy(bcm_class); + return retval; + } + return 0; } static __exit void bcm_exit(void) diff --git a/drivers/staging/bcm/InterfaceInit.h b/drivers/staging/bcm/InterfaceInit.h index 058315a64c05..866924e35f9c 100644 --- a/drivers/staging/bcm/InterfaceInit.h +++ b/drivers/staging/bcm/InterfaceInit.h @@ -1,27 +1,26 @@ #ifndef _INTERFACE_INIT_H #define _INTERFACE_INIT_H -#define BCM_USB_VENDOR_ID_T3 0x198f -#define BCM_USB_VENDOR_ID_FOXCONN 0x0489 -#define BCM_USB_VENDOR_ID_ZTE 0x19d2 +#define BCM_USB_VENDOR_ID_T3 0x198f +#define BCM_USB_VENDOR_ID_FOXCONN 0x0489 +#define BCM_USB_VENDOR_ID_ZTE 0x19d2 -#define BCM_USB_PRODUCT_ID_T3 0x0300 -#define BCM_USB_PRODUCT_ID_T3B 0x0210 -#define BCM_USB_PRODUCT_ID_T3L 0x0220 -#define BCM_USB_PRODUCT_ID_SM250 0xbccd -#define BCM_USB_PRODUCT_ID_SYM 0x15E -#define BCM_USB_PRODUCT_ID_1901 0xe017 -#define BCM_USB_PRODUCT_ID_226 0x0132 -#define BCM_USB_PRODUCT_ID_ZTE_TU25 0x0007 +#define BCM_USB_PRODUCT_ID_T3 0x0300 +#define BCM_USB_PRODUCT_ID_T3B 0x0210 +#define BCM_USB_PRODUCT_ID_T3L 0x0220 +#define BCM_USB_PRODUCT_ID_SM250 0xbccd +#define BCM_USB_PRODUCT_ID_SYM 0x15E +#define BCM_USB_PRODUCT_ID_1901 0xe017 +#define BCM_USB_PRODUCT_ID_226 0x0132 /* not sure if this is valid */ +#define BCM_USB_PRODUCT_ID_ZTE_226 0x172 +#define BCM_USB_PRODUCT_ID_ZTE_TU25 0x0007 -#define BCM_USB_MINOR_BASE 192 +#define BCM_USB_MINOR_BASE 192 +int InterfaceInitialize(void); -INT InterfaceInitialize(void); +int InterfaceExit(void); -INT InterfaceExit(void); - -INT usbbcm_worker_thread(PS_INTERFACE_ADAPTER psIntfAdapter); +int usbbcm_worker_thread(PS_INTERFACE_ADAPTER psIntfAdapter); #endif - diff --git a/drivers/staging/bcm/Kconfig b/drivers/staging/bcm/Kconfig index 96adb1026c4f..83c9752504d4 100644 --- a/drivers/staging/bcm/Kconfig +++ b/drivers/staging/bcm/Kconfig @@ -1,6 +1,6 @@ config BCM_WIMAX tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support" - depends on USB && NET && EXPERIMENTAL + depends on USB && NET default N help This is an experimental driver for the Beceem WIMAX chipset used diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index f545716c666d..f13a9582a82f 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c @@ -752,7 +752,10 @@ VOID DumpPackInfo(struct bcm_mini_adapter *Adapter) BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "AuthzSet: %x\n", Adapter->PackInfo[uiLoopIndex].bAuthorizedSet); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "ClassifyPrority: %x\n", Adapter->PackInfo[uiLoopIndex].bClassifierPriority); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "uiMaxLatency: %x\n", Adapter->PackInfo[uiLoopIndex].uiMaxLatency); - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "ServiceClassName: %x %x %x %x\n", Adapter->PackInfo[uiLoopIndex].ucServiceClassName[0], Adapter->PackInfo[uiLoopIndex].ucServiceClassName[1], Adapter->PackInfo[uiLoopIndex].ucServiceClassName[2], Adapter->PackInfo[uiLoopIndex].ucServiceClassName[3]); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, + DBG_LVL_ALL, "ServiceClassName: %*ph\n", + 4, Adapter->PackInfo[uiLoopIndex]. + ucServiceClassName); /* BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "bHeaderSuppressionEnabled :%X\n", Adapter->PackInfo[uiLoopIndex].bHeaderSuppressionEnabled); * BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "uiTotalTxBytes:%X\n", Adapter->PackInfo[uiLoopIndex].uiTotalTxBytes); * BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "uiTotalRxBytes:%X\n", Adapter->PackInfo[uiLoopIndex].uiTotalRxBytes); diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c index 479574234e4c..6dc0bbcfeab0 100644 --- a/drivers/staging/bcm/PHSModule.c +++ b/drivers/staging/bcm/PHSModule.c @@ -66,7 +66,7 @@ Input parameters: IN struct bcm_mini_adapter *Adapter - Miniport Adapte BOOLEAN bHeaderSuppressionEnabled - indicates if header suprression is enabled for SF. Return: STATUS_SUCCESS - If the send was successful. - Other - If an error occured. + Other - If an error occurred. */ int PHSTransmit(struct bcm_mini_adapter *Adapter, @@ -346,7 +346,7 @@ int phs_init(PPHS_DEVICE_EXTENSION pPhsdeviceExtension, struct bcm_mini_adapter - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL, "\n phs_init Successfull"); + BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL, "\n phs_init Successful"); return STATUS_SUCCESS; } diff --git a/drivers/staging/bcm/Prototypes.h b/drivers/staging/bcm/Prototypes.h index 3c8cc5ba2e2e..3ec8f800a5b0 100644 --- a/drivers/staging/bcm/Prototypes.h +++ b/drivers/staging/bcm/Prototypes.h @@ -95,7 +95,7 @@ void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter); int bcm_ioctl_fw_download(struct bcm_mini_adapter *Adapter, struct bcm_firmware_info *psFwInfo); void CopyMIBSExtendedSFParameters(struct bcm_mini_adapter *Adapter, - CServiceFlowParamSI *psfLocalSet, UINT uiSearchRuleIndex); + struct bcm_connect_mgr_params *psfLocalSet, UINT uiSearchRuleIndex); VOID ResetCounters(struct bcm_mini_adapter *Adapter); diff --git a/drivers/staging/bcm/Transmit.c b/drivers/staging/bcm/Transmit.c index 5e603ce76fea..27e8c890777b 100644 --- a/drivers/staging/bcm/Transmit.c +++ b/drivers/staging/bcm/Transmit.c @@ -1,162 +1,149 @@ /** -@file Transmit.c -@defgroup tx_functions Transmission -@section Queueing -@dot -digraph transmit1 { -node[shape=box] -edge[weight=5;color=red] - -bcm_transmit->GetPacketQueueIndex[label="IP Packet"] -GetPacketQueueIndex->IpVersion4[label="IPV4"] -GetPacketQueueIndex->IpVersion6[label="IPV6"] -} - -@enddot - -@section De-Queueing -@dot -digraph transmit2 { -node[shape=box] -edge[weight=5;color=red] -interrupt_service_thread->transmit_packets -tx_pkt_hdler->transmit_packets -transmit_packets->CheckAndSendPacketFromIndex -transmit_packets->UpdateTokenCount -CheckAndSendPacketFromIndex->PruneQueue -CheckAndSendPacketFromIndex->IsPacketAllowedForFlow -CheckAndSendPacketFromIndex->SendControlPacket[label="control pkt"] -SendControlPacket->bcm_cmd53 -CheckAndSendPacketFromIndex->SendPacketFromQueue[label="data pkt"] -SendPacketFromQueue->SetupNextSend->bcm_cmd53 -} -@enddot -*/ + * @file Transmit.c + * @defgroup tx_functions Transmission + * @section Queueing + * @dot + * digraph transmit1 { + * node[shape=box] + * edge[weight=5;color=red] + * + * bcm_transmit->GetPacketQueueIndex[label="IP Packet"] + * GetPacketQueueIndex->IpVersion4[label="IPV4"] + * GetPacketQueueIndex->IpVersion6[label="IPV6"] + * } + * + * @enddot + * + * @section De-Queueing + * @dot + * digraph transmit2 { + * node[shape=box] + * edge[weight=5;color=red] + * interrupt_service_thread->transmit_packets + * tx_pkt_hdler->transmit_packets + * transmit_packets->CheckAndSendPacketFromIndex + * transmit_packets->UpdateTokenCount + * CheckAndSendPacketFromIndex->PruneQueue + * CheckAndSendPacketFromIndex->IsPacketAllowedForFlow + * CheckAndSendPacketFromIndex->SendControlPacket[label="control pkt"] + * SendControlPacket->bcm_cmd53 + * CheckAndSendPacketFromIndex->SendPacketFromQueue[label="data pkt"] + * SendPacketFromQueue->SetupNextSend->bcm_cmd53 + * } + * @enddot + */ #include "headers.h" - /** -@ingroup ctrl_pkt_functions -This function dispatches control packet to the h/w interface -@return zero(success) or -ve value(failure) -*/ -INT SendControlPacket(struct bcm_mini_adapter *Adapter, char *pControlPacket) + * @ingroup ctrl_pkt_functions + * This function dispatches control packet to the h/w interface + * @return zero(success) or -ve value(failure) + */ +int SendControlPacket(struct bcm_mini_adapter *Adapter, char *pControlPacket) { struct bcm_leader *PLeader = (struct bcm_leader *)pControlPacket; - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Tx"); - if(!pControlPacket || !Adapter) - { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Got NULL Control Packet or Adapter"); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Tx"); + if (!pControlPacket || !Adapter) { + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Got NULL Control Packet or Adapter"); + return STATUS_FAILURE; + } + if ((atomic_read(&Adapter->CurrNumFreeTxDesc) < + ((PLeader->PLength-1)/MAX_DEVICE_DESC_SIZE)+1)) { + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "NO FREE DESCRIPTORS TO SEND CONTROL PACKET"); return STATUS_FAILURE; } - if((atomic_read( &Adapter->CurrNumFreeTxDesc ) < - ((PLeader->PLength-1)/MAX_DEVICE_DESC_SIZE)+1)) - { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "NO FREE DESCRIPTORS TO SEND CONTROL PACKET"); - return STATUS_FAILURE; - } /* Update the netdevice statistics */ /* Dump Packet */ - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Leader Status: %x", PLeader->Status); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Leader VCID: %x",PLeader->Vcid); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Leader Length: %x",PLeader->PLength); - if(Adapter->device_removed) + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Leader Status: %x", PLeader->Status); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Leader VCID: %x", PLeader->Vcid); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Leader Length: %x", PLeader->PLength); + if (Adapter->device_removed) return 0; if (netif_msg_pktdata(Adapter)) print_hex_dump(KERN_DEBUG, PFX "tx control: ", DUMP_PREFIX_NONE, - 16, 1, pControlPacket, PLeader->PLength + LEADER_SIZE, 0); + 16, 1, pControlPacket, PLeader->PLength + LEADER_SIZE, 0); Adapter->interface_transmit(Adapter->pvInterfaceAdapter, - pControlPacket, (PLeader->PLength + LEADER_SIZE)); + pControlPacket, (PLeader->PLength + LEADER_SIZE)); atomic_dec(&Adapter->CurrNumFreeTxDesc); - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "<========="); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "<========="); return STATUS_SUCCESS; } /** -@ingroup tx_functions -This function despatches the IP packets with the given vcid -to the target via the host h/w interface. -@return zero(success) or -ve value(failure) -*/ -INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USHORT Vcid) + * @ingroup tx_functions + * This function despatches the IP packets with the given vcid + * to the target via the host h/w interface. + * @return zero(success) or -ve value(failure) + */ +int SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USHORT Vcid) { - int status=0; - BOOLEAN bHeaderSupressionEnabled = FALSE; - B_UINT16 uiClassifierRuleID; + int status = 0; + BOOLEAN bHeaderSupressionEnabled = FALSE; + B_UINT16 uiClassifierRuleID; u16 QueueIndex = skb_get_queue_mapping(Packet); - struct bcm_leader Leader={0}; + struct bcm_leader Leader = {0}; - if(Packet->len > MAX_DEVICE_DESC_SIZE) - { + if (Packet->len > MAX_DEVICE_DESC_SIZE) { status = STATUS_FAILURE; goto errExit; } /* Get the Classifier Rule ID */ - uiClassifierRuleID = *((UINT32*) (Packet->cb)+SKB_CB_CLASSIFICATION_OFFSET); + uiClassifierRuleID = *((UINT32 *) (Packet->cb) + SKB_CB_CLASSIFICATION_OFFSET); bHeaderSupressionEnabled = Adapter->PackInfo[QueueIndex].bHeaderSuppressionEnabled & Adapter->bPHSEnabled; - if(Adapter->device_removed) - { + if (Adapter->device_removed) { status = STATUS_FAILURE; goto errExit; - } + } status = PHSTransmit(Adapter, &Packet, Vcid, uiClassifierRuleID, bHeaderSupressionEnabled, - (UINT *)&Packet->len, Adapter->PackInfo[QueueIndex].bEthCSSupport); + (UINT *)&Packet->len, Adapter->PackInfo[QueueIndex].bEthCSSupport); - if(status != STATUS_SUCCESS) - { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "PHS Transmit failed..\n"); + if (status != STATUS_SUCCESS) { + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "PHS Transmit failed..\n"); goto errExit; } - Leader.Vcid = Vcid; + Leader.Vcid = Vcid; - if(TCP_ACK == *((UINT32*) (Packet->cb) + SKB_CB_TCPACK_OFFSET )) + if (TCP_ACK == *((UINT32 *) (Packet->cb) + SKB_CB_TCPACK_OFFSET)) Leader.Status = LEADER_STATUS_TCP_ACK; else Leader.Status = LEADER_STATUS; - if(Adapter->PackInfo[QueueIndex].bEthCSSupport) - { + if (Adapter->PackInfo[QueueIndex].bEthCSSupport) { Leader.PLength = Packet->len; - if(skb_headroom(Packet) < LEADER_SIZE) - { - if((status = skb_cow(Packet,LEADER_SIZE))) - { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"bcm_transmit : Failed To Increase headRoom\n"); + if (skb_headroom(Packet) < LEADER_SIZE) { + status = skb_cow(Packet, LEADER_SIZE); + if (status) { + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "bcm_transmit : Failed To Increase headRoom\n"); goto errExit; } } skb_push(Packet, LEADER_SIZE); memcpy(Packet->data, &Leader, LEADER_SIZE); - } - else - { + } else { Leader.PLength = Packet->len - ETH_HLEN; memcpy((struct bcm_leader *)skb_pull(Packet, (ETH_HLEN - LEADER_SIZE)), &Leader, LEADER_SIZE); } status = Adapter->interface_transmit(Adapter->pvInterfaceAdapter, - Packet->data, (Leader.PLength + LEADER_SIZE)); - if(status) - { + Packet->data, (Leader.PLength + LEADER_SIZE)); + if (status) { ++Adapter->dev->stats.tx_errors; if (netif_msg_tx_err(Adapter)) pr_info(PFX "%s: transmit error %d\n", Adapter->dev->name, status); - } - else - { + } else { struct net_device_stats *netstats = &Adapter->dev->stats; Adapter->PackInfo[QueueIndex].uiTotalTxBytes += Leader.PLength; @@ -175,7 +162,6 @@ INT SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USH atomic_dec(&Adapter->CurrNumFreeTxDesc); errExit: - dev_kfree_skb(Packet); return status; } @@ -188,73 +174,65 @@ static int tx_pending(struct bcm_mini_adapter *Adapter) } /** -@ingroup tx_functions -Transmit thread -*/ -int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter object*/ - ) + * @ingroup tx_functions + * Transmit thread + */ +int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter object*/) { int status = 0; - while(! kthread_should_stop()) { + while (!kthread_should_stop()) { /* FIXME - the timeout looks like workaround for racey usage of TxPktAvail */ - if(Adapter->LinkUpStatus) + if (Adapter->LinkUpStatus) wait_event_timeout(Adapter->tx_packet_wait_queue, - tx_pending(Adapter), msecs_to_jiffies(10)); + tx_pending(Adapter), msecs_to_jiffies(10)); else wait_event_interruptible(Adapter->tx_packet_wait_queue, - tx_pending(Adapter)); + tx_pending(Adapter)); if (Adapter->device_removed) break; - if(Adapter->downloadDDR == 1) - { - Adapter->downloadDDR +=1; + if (Adapter->downloadDDR == 1) { + Adapter->downloadDDR += 1; status = download_ddr_settings(Adapter); - if(status) + if (status) pr_err(PFX "DDR DOWNLOAD FAILED! %d\n", status); continue; } - //Check end point for halt/stall. - if(Adapter->bEndPointHalted == TRUE) - { + /* Check end point for halt/stall. */ + if (Adapter->bEndPointHalted == TRUE) { Bcm_clear_halt_of_endpoints(Adapter); Adapter->bEndPointHalted = FALSE; StartInterruptUrb((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter)); } - if(Adapter->LinkUpStatus && !Adapter->IdleMode) - { - if(atomic_read(&Adapter->TotalPacketCount)) - { + if (Adapter->LinkUpStatus && !Adapter->IdleMode) { + if (atomic_read(&Adapter->TotalPacketCount)) update_per_sf_desc_cnts(Adapter); - } } - if( atomic_read(&Adapter->CurrNumFreeTxDesc) && + if (atomic_read(&Adapter->CurrNumFreeTxDesc) && Adapter->LinkStatus == SYNC_UP_REQUEST && - !Adapter->bSyncUpRequestSent) - { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Calling LinkMessage"); + !Adapter->bSyncUpRequestSent) { + + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Calling LinkMessage"); LinkMessage(Adapter); } - if((Adapter->IdleMode || Adapter->bShutStatus) && atomic_read(&Adapter->TotalPacketCount)) - { - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Device in Low Power mode...waking up"); - Adapter->usIdleModePattern = ABORT_IDLE_MODE; - Adapter->bWakeUpDevice = TRUE; - wake_up(&Adapter->process_rx_cntrlpkt); + if ((Adapter->IdleMode || Adapter->bShutStatus) && atomic_read(&Adapter->TotalPacketCount)) { + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Device in Low Power mode...waking up"); + Adapter->usIdleModePattern = ABORT_IDLE_MODE; + Adapter->bWakeUpDevice = TRUE; + wake_up(&Adapter->process_rx_cntrlpkt); } transmit_packets(Adapter); - atomic_set(&Adapter->TxPktAvail, 0); } - BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Exiting the tx thread..\n"); + BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Exiting the tx thread..\n"); Adapter->transmit_packet_thread = NULL; return 0; } diff --git a/drivers/staging/bcm/cntrl_SignalingInterface.h b/drivers/staging/bcm/cntrl_SignalingInterface.h index 7619e4b819bd..990e809e9680 100644 --- a/drivers/staging/bcm/cntrl_SignalingInterface.h +++ b/drivers/staging/bcm/cntrl_SignalingInterface.h @@ -1,423 +1,311 @@ #ifndef CNTRL_SIGNALING_INTERFACE_ #define CNTRL_SIGNALING_INTERFACE_ - - - -#define DSA_REQ 11 -#define DSA_RSP 12 -#define DSA_ACK 13 -#define DSC_REQ 14 -#define DSC_RSP 15 -#define DSC_ACK 16 -#define DSD_REQ 17 -#define DSD_RSP 18 -#define DSD_ACK 19 -#define MAX_CLASSIFIERS_IN_SF 4 - - -#define MAX_STRING_LEN 20 -#define MAX_PHS_LENGTHS 255 -#define VENDOR_PHS_PARAM_LENGTH 10 -#define MAX_NUM_ACTIVE_BS 10 -#define AUTH_TOKEN_LENGTH 10 -#define NUM_HARQ_CHANNELS 16 //Changed from 10 to 16 to accommodate all HARQ channels -#define VENDOR_CLASSIFIER_PARAM_LENGTH 1 //Changed the size to 1 byte since we dnt use it -#define VENDOR_SPECIF_QOS_PARAM 1 -#define VENDOR_PHS_PARAM_LENGTH 10 -#define MBS_CONTENTS_ID_LENGTH 10 -#define GLOBAL_SF_CLASSNAME_LENGTH 6 - -#define TYPE_OF_SERVICE_LENGTH 3 -#define IP_MASKED_SRC_ADDRESS_LENGTH 32 -#define IP_MASKED_DEST_ADDRESS_LENGTH 32 -#define PROTOCOL_SRC_PORT_RANGE_LENGTH 4 -#define PROTOCOL_DEST_PORT_RANGE_LENGTH 4 -#define ETHERNET_DEST_MAC_ADDR_LENGTH 12 -#define ETHERNET_SRC_MAC_ADDR_LENGTH 12 -#define NUM_ETHERTYPE_BYTES 3 -#define NUM_IPV6_FLOWLABLE_BYTES 3 - - -//////////////////////////////////////////////////////////////////////////////// -////////////////////////structure Definitions/////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// -/// \brief class cCPacketClassificationRule -struct _stCPacketClassificationRuleSI{ - - /** 16bit UserPriority Of The Service Flow*/ - B_UINT16 u16UserPriority; - /** 16bit VLANID Of The Service Flow*/ - B_UINT16 u16VLANID; - /** 16bit Packet Classification RuleIndex Of The Service Flow*/ - B_UINT16 u16PacketClassificationRuleIndex; - /** 8bit Classifier Rule Priority Of The Service Flow*/ - B_UINT8 u8ClassifierRulePriority; - /** Length of IP TypeOfService field*/ - B_UINT8 u8IPTypeOfServiceLength; - /** 3bytes IP TypeOfService */ - B_UINT8 u8IPTypeOfService[TYPE_OF_SERVICE_LENGTH]; - /** Protocol used in classification of Service Flow*/ - B_UINT8 u8Protocol; - /** Length of IP Masked Source Address */ - B_UINT8 u8IPMaskedSourceAddressLength; - /** IP Masked Source Address used in classification for the Service Flow*/ - B_UINT8 u8IPMaskedSourceAddress[IP_MASKED_SRC_ADDRESS_LENGTH]; - /** Length of IP Destination Address */ - B_UINT8 u8IPDestinationAddressLength; - /** IP Destination Address used in classification for the Service Flow*/ - B_UINT8 u8IPDestinationAddress[IP_MASKED_DEST_ADDRESS_LENGTH]; - /** Length of Protocol Source Port Range */ - B_UINT8 u8ProtocolSourcePortRangeLength; - /** Protocol Source Port Range used in the Service Flow*/ - B_UINT8 u8ProtocolSourcePortRange[PROTOCOL_SRC_PORT_RANGE_LENGTH]; - /** Length of Protocol Dest Port Range */ - B_UINT8 u8ProtocolDestPortRangeLength; - /** Protocol Dest Port Range used in the Service Flow*/ - B_UINT8 u8ProtocolDestPortRange[PROTOCOL_DEST_PORT_RANGE_LENGTH]; - /** Length of Ethernet Destination MAC Address */ - B_UINT8 u8EthernetDestMacAddressLength; - /** Ethernet Destination MAC Address used in classification of the Service Flow*/ - B_UINT8 u8EthernetDestMacAddress[ETHERNET_DEST_MAC_ADDR_LENGTH]; - /** Length of Ethernet Source MAC Address */ - B_UINT8 u8EthernetSourceMACAddressLength; - /** Ethernet Source MAC Address used in classification of the Service Flow*/ - B_UINT8 u8EthernetSourceMACAddress[ETHERNET_SRC_MAC_ADDR_LENGTH]; - /** Length of Ethertype */ - B_UINT8 u8EthertypeLength; - /** 3bytes Ethertype Of The Service Flow*/ - B_UINT8 u8Ethertype[NUM_ETHERTYPE_BYTES]; - /** 8bit Associated PHSI Of The Service Flow*/ - B_UINT8 u8AssociatedPHSI; - /** Length of Vendor Specific Classifier Param length Of The Service Flow*/ - B_UINT8 u8VendorSpecificClassifierParamLength; - /** Vendor Specific Classifier Param Of The Service Flow*/ - B_UINT8 u8VendorSpecificClassifierParam[VENDOR_CLASSIFIER_PARAM_LENGTH]; - /** Length Of IPv6 Flow Lable of the Service Flow*/ - B_UINT8 u8IPv6FlowLableLength; - /** IPv6 Flow Lable Of The Service Flow*/ - B_UINT8 u8IPv6FlowLable[NUM_IPV6_FLOWLABLE_BYTES]; - /** Action associated with the classifier rule*/ - B_UINT8 u8ClassifierActionRule; - B_UINT16 u16ValidityBitMap; +#define DSA_REQ 11 +#define DSA_RSP 12 +#define DSA_ACK 13 +#define DSC_REQ 14 +#define DSC_RSP 15 +#define DSC_ACK 16 +#define DSD_REQ 17 +#define DSD_RSP 18 +#define DSD_ACK 19 +#define MAX_CLASSIFIERS_IN_SF 4 + +#define MAX_STRING_LEN 20 +#define MAX_PHS_LENGTHS 255 +#define VENDOR_PHS_PARAM_LENGTH 10 +#define MAX_NUM_ACTIVE_BS 10 +#define AUTH_TOKEN_LENGTH 10 +#define NUM_HARQ_CHANNELS 16 /* Changed from 10 to 16 to accommodate all HARQ channels */ +#define VENDOR_CLASSIFIER_PARAM_LENGTH 1 /* Changed the size to 1 byte since we dnt use it */ +#define VENDOR_SPECIF_QOS_PARAM 1 +#define VENDOR_PHS_PARAM_LENGTH 10 +#define MBS_CONTENTS_ID_LENGTH 10 +#define GLOBAL_SF_CLASSNAME_LENGTH 6 + +#define TYPE_OF_SERVICE_LENGTH 3 +#define IP_MASKED_SRC_ADDRESS_LENGTH 32 +#define IP_MASKED_DEST_ADDRESS_LENGTH 32 +#define PROTOCOL_SRC_PORT_RANGE_LENGTH 4 +#define PROTOCOL_DEST_PORT_RANGE_LENGTH 4 +#define ETHERNET_DEST_MAC_ADDR_LENGTH 12 +#define ETHERNET_SRC_MAC_ADDR_LENGTH 12 +#define NUM_ETHERTYPE_BYTES 3 +#define NUM_IPV6_FLOWLABLE_BYTES 3 + +struct bcm_packet_class_rules { + /* 16bit UserPriority Of The Service Flow */ + B_UINT16 u16UserPriority; + /* 16bit VLANID Of The Service Flow */ + B_UINT16 u16VLANID; + /* 16bit Packet Classification RuleIndex Of The Service Flow */ + B_UINT16 u16PacketClassificationRuleIndex; + /* 8bit Classifier Rule Priority Of The Service Flow */ + B_UINT8 u8ClassifierRulePriority; + /* Length of IP TypeOfService field */ + B_UINT8 u8IPTypeOfServiceLength; + /* 3bytes IP TypeOfService */ + B_UINT8 u8IPTypeOfService[TYPE_OF_SERVICE_LENGTH]; + /* Protocol used in classification of Service Flow */ + B_UINT8 u8Protocol; + /* Length of IP Masked Source Address */ + B_UINT8 u8IPMaskedSourceAddressLength; + /* IP Masked Source Address used in classification for the Service Flow */ + B_UINT8 u8IPMaskedSourceAddress[IP_MASKED_SRC_ADDRESS_LENGTH]; + /* Length of IP Destination Address */ + B_UINT8 u8IPDestinationAddressLength; + /* IP Destination Address used in classification for the Service Flow */ + B_UINT8 u8IPDestinationAddress[IP_MASKED_DEST_ADDRESS_LENGTH]; + /* Length of Protocol Source Port Range */ + B_UINT8 u8ProtocolSourcePortRangeLength; + /* Protocol Source Port Range used in the Service Flow */ + B_UINT8 u8ProtocolSourcePortRange[PROTOCOL_SRC_PORT_RANGE_LENGTH]; + /* Length of Protocol Dest Port Range */ + B_UINT8 u8ProtocolDestPortRangeLength; + /* Protocol Dest Port Range used in the Service Flow */ + B_UINT8 u8ProtocolDestPortRange[PROTOCOL_DEST_PORT_RANGE_LENGTH]; + /* Length of Ethernet Destination MAC Address */ + B_UINT8 u8EthernetDestMacAddressLength; + /* Ethernet Destination MAC Address used in classification of the Service Flow */ + B_UINT8 u8EthernetDestMacAddress[ETHERNET_DEST_MAC_ADDR_LENGTH]; + /* Length of Ethernet Source MAC Address */ + B_UINT8 u8EthernetSourceMACAddressLength; + /* Ethernet Source MAC Address used in classification of the Service Flow */ + B_UINT8 u8EthernetSourceMACAddress[ETHERNET_SRC_MAC_ADDR_LENGTH]; + /* Length of Ethertype */ + B_UINT8 u8EthertypeLength; + /* 3bytes Ethertype Of The Service Flow */ + B_UINT8 u8Ethertype[NUM_ETHERTYPE_BYTES]; + /* 8bit Associated PHSI Of The Service Flow */ + B_UINT8 u8AssociatedPHSI; + /* Length of Vendor Specific Classifier Param length Of The Service Flow */ + B_UINT8 u8VendorSpecificClassifierParamLength; + /* Vendor Specific Classifier Param Of The Service Flow */ + B_UINT8 u8VendorSpecificClassifierParam[VENDOR_CLASSIFIER_PARAM_LENGTH]; + /* Length Of IPv6 Flow Lable of the Service Flow */ + B_UINT8 u8IPv6FlowLableLength; + /* IPv6 Flow Lable Of The Service Flow */ + B_UINT8 u8IPv6FlowLable[NUM_IPV6_FLOWLABLE_BYTES]; + /* Action associated with the classifier rule */ + B_UINT8 u8ClassifierActionRule; + B_UINT16 u16ValidityBitMap; }; -typedef struct _stCPacketClassificationRuleSI CCPacketClassificationRuleSI,stCPacketClassificationRuleSI, *pstCPacketClassificationRuleSI; - -/// \brief class CPhsRuleSI -typedef struct _stPhsRuleSI { - /** 8bit PHS Index Of The Service Flow*/ - B_UINT8 u8PHSI; - /** PHSF Length Of The Service Flow*/ - B_UINT8 u8PHSFLength; - /** String of bytes containing header information to be suppressed by the sending CS and reconstructed by the receiving CS*/ - B_UINT8 u8PHSF[MAX_PHS_LENGTHS]; - /** PHSM Length Of The Service Flow*/ - B_UINT8 u8PHSMLength; - /** PHS Mask for the SF*/ - B_UINT8 u8PHSM[MAX_PHS_LENGTHS]; - /** 8bit Total number of bytes to be suppressed for the Service Flow*/ - B_UINT8 u8PHSS; - /** 8bit Indicates whether or not Packet Header contents need to be verified prior to suppression */ - B_UINT8 u8PHSV; - /** Vendor Specific PHS param Length Of The Service Flow*/ - B_UINT8 u8VendorSpecificPHSParamsLength; - /** Vendor Specific PHS param Of The Service Flow*/ - B_UINT8 u8VendorSpecificPHSParams[VENDOR_PHS_PARAM_LENGTH]; - - B_UINT8 u8Padding[2]; -}stPhsRuleSI,*pstPhsRuleSI; -typedef stPhsRuleSI CPhsRuleSI; -/// \brief structure cConvergenceSLTypes -struct _stConvergenceSLTypes{ - /** 8bit Phs Classfier Action Of The Service Flow*/ - B_UINT8 u8ClassfierDSCAction; - /** 8bit Phs DSC Action Of The Service Flow*/ - B_UINT8 u8PhsDSCAction; - /** 16bit Padding */ - B_UINT8 u8Padding[2]; - /// \brief class cCPacketClassificationRule - stCPacketClassificationRuleSI cCPacketClassificationRule; - /// \brief class CPhsRuleSI - struct _stPhsRuleSI cPhsRule; +struct bcm_phs_rules { + /* 8bit PHS Index Of The Service Flow */ + B_UINT8 u8PHSI; + /* PHSF Length Of The Service Flow */ + B_UINT8 u8PHSFLength; + /* String of bytes containing header information to be suppressed by the sending CS and reconstructed by the receiving CS */ + B_UINT8 u8PHSF[MAX_PHS_LENGTHS]; + /* PHSM Length Of The Service Flow */ + B_UINT8 u8PHSMLength; + /* PHS Mask for the SF */ + B_UINT8 u8PHSM[MAX_PHS_LENGTHS]; + /* 8bit Total number of bytes to be suppressed for the Service Flow */ + B_UINT8 u8PHSS; + /* 8bit Indicates whether or not Packet Header contents need to be verified prior to suppression */ + B_UINT8 u8PHSV; + /* Vendor Specific PHS param Length Of The Service Flow */ + B_UINT8 u8VendorSpecificPHSParamsLength; + /* Vendor Specific PHS param Of The Service Flow */ + B_UINT8 u8VendorSpecificPHSParams[VENDOR_PHS_PARAM_LENGTH]; + B_UINT8 u8Padding[2]; }; -typedef struct _stConvergenceSLTypes stConvergenceSLTypes,CConvergenceSLTypes, *pstConvergenceSLTypes; - - -/// \brief structure CServiceFlowParamSI -typedef struct _stServiceFlowParamSI{ - - /** 32bitSFID Of The Service Flow*/ - B_UINT32 u32SFID; - - /** 32bit Maximum Sustained Traffic Rate of the Service Flow*/ - B_UINT32 u32MaxSustainedTrafficRate; - - /** 32bit Maximum Traffic Burst allowed for the Service Flow*/ - B_UINT32 u32MaxTrafficBurst; - - /** 32bit Minimum Reserved Traffic Rate of the Service Flow*/ - B_UINT32 u32MinReservedTrafficRate; - - /** 32bit Tolerated Jitter of the Service Flow*/ - B_UINT32 u32ToleratedJitter; - - /** 32bit Maximum Latency of the Service Flow*/ - B_UINT32 u32MaximumLatency; - - /** 16bitCID Of The Service Flow*/ - B_UINT16 u16CID; - - /** 16bit SAID on which the service flow being set up shall be mapped*/ - B_UINT16 u16TargetSAID; - - /** 16bit ARQ window size negotiated*/ - B_UINT16 u16ARQWindowSize; - - /** 16bit Total Tx delay incl sending, receiving & processing delays */ - B_UINT16 u16ARQRetryTxTimeOut; - - /** 16bit Total Rx delay incl sending, receiving & processing delays */ - B_UINT16 u16ARQRetryRxTimeOut; - - /** 16bit ARQ block lifetime */ - B_UINT16 u16ARQBlockLifeTime; - - /** 16bit ARQ Sync loss timeout*/ - B_UINT16 u16ARQSyncLossTimeOut; - - /** 16bit ARQ Purge timeout */ - B_UINT16 u16ARQRxPurgeTimeOut; -//TODO::Remove this once we move to a new CORR2 driver - /// \brief Size of an ARQ block - B_UINT16 u16ARQBlockSize; - -//#endif - /** 16bit Nominal interval b/w consecutive SDU arrivals at MAC SAP*/ - B_UINT16 u16SDUInterArrivalTime; - - /** 16bit Specifies the time base for rate measurement */ - B_UINT16 u16TimeBase; - - /** 16bit Interval b/w Successive Grant oppurtunities*/ - B_UINT16 u16UnsolicitedGrantInterval; - - /** 16bit Interval b/w Successive Polling grant oppurtunities*/ - B_UINT16 u16UnsolicitedPollingInterval; - - /** internal var to get the overhead */ - B_UINT16 u16MacOverhead; - - /** MBS contents Identifier*/ - B_UINT16 u16MBSContentsID[MBS_CONTENTS_ID_LENGTH]; - - /** MBS contents Identifier length*/ - B_UINT8 u8MBSContentsIDLength; - - /** ServiceClassName Length Of The Service Flow*/ - B_UINT8 u8ServiceClassNameLength; - - /** 32bytes ServiceClassName Of The Service Flow*/ - B_UINT8 u8ServiceClassName[32]; - - /** 8bit Indicates whether or not MBS service is requested for this Serivce Flow*/ - B_UINT8 u8MBSService; - - /** 8bit QOS Parameter Set specifies proper application of QoS paramters to Provisioned, Admitted and Active sets*/ - B_UINT8 u8QosParamSet; - - /** 8bit Traffic Priority Of the Service Flow */ - B_UINT8 u8TrafficPriority; - - /** 8bit Uplink Grant Scheduling Type of The Service Flow */ - B_UINT8 u8ServiceFlowSchedulingType; - - /** 8bit Request transmission Policy of the Service Flow*/ - B_UINT8 u8RequesttransmissionPolicy; - - /** 8bit Specifies whether SDUs for this Service flow are of FixedLength or Variable length */ - B_UINT8 u8FixedLengthVSVariableLengthSDUIndicator; - - /** 8bit Length of the SDU for a fixed length SDU service flow*/ - B_UINT8 u8SDUSize; - /** 8bit Indicates whether or not ARQ is requested for this connection*/ - B_UINT8 u8ARQEnable; - - /**< 8bit Indicates whether or not data has tobe delivered in order to higher layer*/ - B_UINT8 u8ARQDeliverInOrder; - - /** 8bit Receiver ARQ ACK processing time */ - B_UINT8 u8RxARQAckProcessingTime; - - /** 8bit Convergence Sublayer Specification Of The Service Flow*/ - B_UINT8 u8CSSpecification; - - /** 8 bit Type of data delivery service*/ - B_UINT8 u8TypeOfDataDeliveryService; - - /** 8bit Specifies whether a service flow may generate Paging */ - B_UINT8 u8PagingPreference; - - /** 8bit Indicates the MBS Zone through which the connection or virtual connection is valid */ - B_UINT8 u8MBSZoneIdentifierassignment; - - /** 8bit Specifies whether traffic on SF should generate MOB_TRF_IND to MS in sleep mode*/ - B_UINT8 u8TrafficIndicationPreference; - - /** 8bit Speciifes the length of predefined Global QoS parameter set encoding for this SF */ - B_UINT8 u8GlobalServicesClassNameLength; - - /** 6 byte Speciifes the predefined Global QoS parameter set encoding for this SF */ - B_UINT8 u8GlobalServicesClassName[GLOBAL_SF_CLASSNAME_LENGTH]; - - /** 8bit Indicates whether or not SN feedback is enabled for the conn */ - B_UINT8 u8SNFeedbackEnabled; - - /** Indicates the size of the Fragment Sequence Number for the connection */ - B_UINT8 u8FSNSize; - - /** 8bit Number of CIDs in active BS list */ - B_UINT8 u8CIDAllocation4activeBSsLength; - - /** CIDs of BS in the active list */ - B_UINT8 u8CIDAllocation4activeBSs[MAX_NUM_ACTIVE_BS]; - - /** Specifies if PDU extended subheader should be applied on every PDU on this conn*/ - B_UINT8 u8PDUSNExtendedSubheader4HarqReordering; - - /** 8bit Specifies whether the connection uses HARQ or not */ - B_UINT8 u8HARQServiceFlows; - - /** Specifies the length of Authorization token*/ - B_UINT8 u8AuthTokenLength; - - /** Specifies the Authorization token*/ - B_UINT8 u8AuthToken[AUTH_TOKEN_LENGTH]; - - /** specifes Number of HARQ channels used to carry data length*/ - B_UINT8 u8HarqChannelMappingLength; - - /** specifes HARQ channels used to carry data*/ - B_UINT8 u8HARQChannelMapping[NUM_HARQ_CHANNELS]; - - /** 8bit Length of Vendor Specific QoS Params */ - B_UINT8 u8VendorSpecificQoSParamLength; - - /** 1byte Vendor Specific QoS Param Of The Service Flow*/ - B_UINT8 u8VendorSpecificQoSParam[VENDOR_SPECIF_QOS_PARAM]; - - // indicates total classifiers in the SF - B_UINT8 u8TotalClassifiers; /**< Total number of valid classifiers*/ - B_UINT8 bValid; /**< Validity flag */ - B_UINT8 u8Padding; /**< Padding byte*/ - -/** -Structure for Convergence SubLayer Types with a maximum of 4 classifiers -*/ - stConvergenceSLTypes cConvergenceSLTypes[MAX_CLASSIFIERS_IN_SF]; - -} stServiceFlowParamSI, *pstServiceFlowParamSI; -typedef stServiceFlowParamSI CServiceFlowParamSI; - -/** -structure stLocalSFAddRequest -*/ -typedef struct _stLocalSFAddRequest{ - - B_UINT8 u8Type; /**< Type*/ - B_UINT8 eConnectionDir; /**< Connection direction*/ - /// \brief 16 bit TID - B_UINT16 u16TID; /**< 16bit TID*/ - /// \brief 16bitCID - B_UINT16 u16CID; /**< 16bit CID*/ - /// \brief 16bitVCID - B_UINT16 u16VCID; /**< 16bit VCID*/ - /// \brief structure ParameterSet - - stServiceFlowParamSI *psfParameterSet; /**< structure ParameterSet*/ - -}stLocalSFAddRequest, *pstLocalSFAddRequest; - - -/** -structure stLocalSFAddIndication -*/ -typedef struct _stLocalSFAddIndication{ - - B_UINT8 u8Type; /**< Type*/ - B_UINT8 eConnectionDir; /**< Connection Direction*/ - /// \brief 16 bit TID - B_UINT16 u16TID; /**< TID*/ - /// \brief 16bitCID - B_UINT16 u16CID; /**< 16bitCID*/ - /// \brief 16bitVCID - B_UINT16 u16VCID; /**< 16bitVCID*/ - - - /// \brief structure AuthorizedSet - /// \brief structure AuthorizedSet - stServiceFlowParamSI *psfAuthorizedSet; /**< AuthorizedSet of type stServiceFlowParamSI*/ - /// \brief structure AdmittedSet - stServiceFlowParamSI *psfAdmittedSet; /**< AdmittedSet of type stServiceFlowParamSI*/ - /// \brief structure ActiveSet - stServiceFlowParamSI *psfActiveSet; /**< sfActiveSet of type stServiceFlowParamSI*/ - B_UINT8 u8CC; /**< Confirmation Code*/ - B_UINT8 u8Padd; /**< 8-bit Padding */ - - B_UINT16 u16Padd; /**< 16 bit Padding */ - -}stLocalSFAddIndication; +struct bcm_convergence_types { + /* 8bit Phs Classfier Action Of The Service Flow */ + B_UINT8 u8ClassfierDSCAction; + /* 8bit Phs DSC Action Of The Service Flow */ + B_UINT8 u8PhsDSCAction; + /* 16bit Padding */ + B_UINT8 u8Padding[2]; + /* Packet classification rules structure */ + struct bcm_packet_class_rules cCPacketClassificationRule; + /* Payload header suppression rules structure */ + struct bcm_phs_rules cPhsRule; +}; +struct bcm_connect_mgr_params { + /* 32bitSFID Of The Service Flow */ + B_UINT32 u32SFID; + /* 32bit Maximum Sustained Traffic Rate of the Service Flow */ + B_UINT32 u32MaxSustainedTrafficRate; + /* 32bit Maximum Traffic Burst allowed for the Service Flow */ + B_UINT32 u32MaxTrafficBurst; + /* 32bit Minimum Reserved Traffic Rate of the Service Flow */ + B_UINT32 u32MinReservedTrafficRate; + /* 32bit Tolerated Jitter of the Service Flow */ + B_UINT32 u32ToleratedJitter; + /* 32bit Maximum Latency of the Service Flow */ + B_UINT32 u32MaximumLatency; + /* 16bitCID Of The Service Flow */ + B_UINT16 u16CID; + /* 16bit SAID on which the service flow being set up shall be mapped */ + B_UINT16 u16TargetSAID; + /* 16bit ARQ window size negotiated */ + B_UINT16 u16ARQWindowSize; + /* 16bit Total Tx delay incl sending, receiving & processing delays */ + B_UINT16 u16ARQRetryTxTimeOut; + /* 16bit Total Rx delay incl sending, receiving & processing delays */ + B_UINT16 u16ARQRetryRxTimeOut; + /* 16bit ARQ block lifetime */ + B_UINT16 u16ARQBlockLifeTime; + /* 16bit ARQ Sync loss timeout */ + B_UINT16 u16ARQSyncLossTimeOut; + /* 16bit ARQ Purge timeout */ + B_UINT16 u16ARQRxPurgeTimeOut; + /* TODO::Remove this once we move to a new CORR2 driver + * brief Size of an ARQ block + */ + B_UINT16 u16ARQBlockSize; + /* #endif */ + /* 16bit Nominal interval b/w consecutive SDU arrivals at MAC SAP */ + B_UINT16 u16SDUInterArrivalTime; + /* 16bit Specifies the time base for rate measurement */ + B_UINT16 u16TimeBase; + /* 16bit Interval b/w Successive Grant oppurtunities */ + B_UINT16 u16UnsolicitedGrantInterval; + /* 16bit Interval b/w Successive Polling grant oppurtunities */ + B_UINT16 u16UnsolicitedPollingInterval; + /* internal var to get the overhead */ + B_UINT16 u16MacOverhead; + /* MBS contents Identifier */ + B_UINT16 u16MBSContentsID[MBS_CONTENTS_ID_LENGTH]; + /* MBS contents Identifier length */ + B_UINT8 u8MBSContentsIDLength; + /* ServiceClassName Length Of The Service Flow */ + B_UINT8 u8ServiceClassNameLength; + /* 32bytes ServiceClassName Of The Service Flow */ + B_UINT8 u8ServiceClassName[32]; + /* 8bit Indicates whether or not MBS service is requested for this Serivce Flow */ + B_UINT8 u8MBSService; + /* 8bit QOS Parameter Set specifies proper application of QoS parameters to Provisioned, Admitted and Active sets */ + B_UINT8 u8QosParamSet; + /* 8bit Traffic Priority Of the Service Flow */ + B_UINT8 u8TrafficPriority; + /* 8bit Uplink Grant Scheduling Type of The Service Flow */ + B_UINT8 u8ServiceFlowSchedulingType; + /* 8bit Request transmission Policy of the Service Flow */ + B_UINT8 u8RequesttransmissionPolicy; + /* 8bit Specifies whether SDUs for this Service flow are of FixedLength or Variable length */ + B_UINT8 u8FixedLengthVSVariableLengthSDUIndicator; + /* 8bit Length of the SDU for a fixed length SDU service flow */ + B_UINT8 u8SDUSize; + /* 8bit Indicates whether or not ARQ is requested for this connection */ + B_UINT8 u8ARQEnable; + /* < 8bit Indicates whether or not data has tobe delivered in order to higher layer */ + B_UINT8 u8ARQDeliverInOrder; + /* 8bit Receiver ARQ ACK processing time */ + B_UINT8 u8RxARQAckProcessingTime; + /* 8bit Convergence Sublayer Specification Of The Service Flow */ + B_UINT8 u8CSSpecification; + /* 8 bit Type of data delivery service */ + B_UINT8 u8TypeOfDataDeliveryService; + /* 8bit Specifies whether a service flow may generate Paging */ + B_UINT8 u8PagingPreference; + /* 8bit Indicates the MBS Zone through which the connection or virtual connection is valid */ + B_UINT8 u8MBSZoneIdentifierassignment; + /* 8bit Specifies whether traffic on SF should generate MOB_TRF_IND to MS in sleep mode */ + B_UINT8 u8TrafficIndicationPreference; + /* 8bit Speciifes the length of predefined Global QoS parameter set encoding for this SF */ + B_UINT8 u8GlobalServicesClassNameLength; + /* 6 byte Speciifes the predefined Global QoS parameter set encoding for this SF */ + B_UINT8 u8GlobalServicesClassName[GLOBAL_SF_CLASSNAME_LENGTH]; + /* 8bit Indicates whether or not SN feedback is enabled for the conn */ + B_UINT8 u8SNFeedbackEnabled; + /* Indicates the size of the Fragment Sequence Number for the connection */ + B_UINT8 u8FSNSize; + /* 8bit Number of CIDs in active BS list */ + B_UINT8 u8CIDAllocation4activeBSsLength; + /* CIDs of BS in the active list */ + B_UINT8 u8CIDAllocation4activeBSs[MAX_NUM_ACTIVE_BS]; + /* Specifies if PDU extended subheader should be applied on every PDU on this conn */ + B_UINT8 u8PDUSNExtendedSubheader4HarqReordering; + /* 8bit Specifies whether the connection uses HARQ or not */ + B_UINT8 u8HARQServiceFlows; + /* Specifies the length of Authorization token */ + B_UINT8 u8AuthTokenLength; + /* Specifies the Authorization token */ + B_UINT8 u8AuthToken[AUTH_TOKEN_LENGTH]; + /* specifes Number of HARQ channels used to carry data length */ + B_UINT8 u8HarqChannelMappingLength; + /* specifes HARQ channels used to carry data */ + B_UINT8 u8HARQChannelMapping[NUM_HARQ_CHANNELS]; + /* 8bit Length of Vendor Specific QoS Params */ + B_UINT8 u8VendorSpecificQoSParamLength; + /* 1byte Vendor Specific QoS Param Of The Service Flow */ + B_UINT8 u8VendorSpecificQoSParam[VENDOR_SPECIF_QOS_PARAM]; + /* indicates total classifiers in the SF */ + B_UINT8 u8TotalClassifiers; /* < Total number of valid classifiers */ + B_UINT8 bValid; /* < Validity flag */ + B_UINT8 u8Padding; /* < Padding byte */ + /* + * Structure for Convergence SubLayer Types with a maximum of 4 classifiers + */ + struct bcm_convergence_types cConvergenceSLTypes[MAX_CLASSIFIERS_IN_SF]; +}; -typedef struct _stLocalSFAddIndication *pstLocalSFAddIndication; -/** -structure stLocalSFChangeRequest is same as structure stLocalSFAddIndication -*/ -typedef struct _stLocalSFAddIndication stLocalSFChangeRequest, *pstLocalSFChangeRequest; -/** -structure stLocalSFChangeIndication is same as structure stLocalSFAddIndication -*/ -typedef struct _stLocalSFAddIndication stLocalSFChangeIndication, *pstLocalSFChangeIndication; +struct bcm_add_request { + B_UINT8 u8Type; /* < Type */ + B_UINT8 eConnectionDir; /* < Connection direction */ + /* brief 16 bit TID */ + B_UINT16 u16TID; /* < 16bit TID */ + /* brief 16bitCID */ + B_UINT16 u16CID; /* < 16bit CID */ + /* brief 16bitVCID */ + B_UINT16 u16VCID; /* < 16bit VCID */ + struct bcm_connect_mgr_params *psfParameterSet; /* < connection manager parameters */ +}; -/** -structure stLocalSFDeleteRequest -*/ -typedef struct _stLocalSFDeleteRequest{ - B_UINT8 u8Type; /**< Type*/ - B_UINT8 u8Padding; /**< Padding byte*/ - B_UINT16 u16TID; /**< TID*/ - /// \brief 32bitSFID - B_UINT32 u32SFID; /**< SFID*/ -}stLocalSFDeleteRequest, *pstLocalSFDeleteRequest; +struct bcm_add_indication { + B_UINT8 u8Type; /* < Type */ + B_UINT8 eConnectionDir; /* < Connection Direction */ + /* brief 16 bit TID */ + B_UINT16 u16TID; /* < TID */ + /* brief 16bitCID */ + B_UINT16 u16CID; /* < 16bitCID */ + /* brief 16bitVCID */ + B_UINT16 u16VCID; /* < 16bitVCID */ + struct bcm_connect_mgr_params *psfAuthorizedSet; /* Authorized set of connection manager parameters */ + struct bcm_connect_mgr_params *psfAdmittedSet; /* Admitted set of connection manager parameters */ + struct bcm_connect_mgr_params *psfActiveSet; /* Activeset of connection manager parameters */ + B_UINT8 u8CC; /* <Confirmation Code */ + B_UINT8 u8Padd; /* < 8-bit Padding */ + B_UINT16 u16Padd; /* < 16 bit Padding */ +}; -/** -structure stLocalSFDeleteIndication -*/ -typedef struct stLocalSFDeleteIndication{ - B_UINT8 u8Type; /**< Type */ - B_UINT8 u8Padding; /**< Padding */ - B_UINT16 u16TID; /**< TID */ - /// \brief 16bitCID - B_UINT16 u16CID; /**< CID */ - /// \brief 16bitVCID - B_UINT16 u16VCID; /**< VCID */ - /// \brief 32bitSFID - B_UINT32 u32SFID; /**< SFID */ - /// \brief 8bit Confirmation code - B_UINT8 u8ConfirmationCode; /**< Confirmation code */ - B_UINT8 u8Padding1[3]; /**< 3 byte Padding */ -}stLocalSFDeleteIndication; +struct bcm_del_request { + B_UINT8 u8Type; /* < Type */ + B_UINT8 u8Padding; /* < Padding byte */ + B_UINT16 u16TID; /* < TID */ + /* brief 32bitSFID */ + B_UINT32 u32SFID; /* < SFID */ +}; -typedef struct _stIM_SFHostNotify -{ - B_UINT32 SFID; //SFID of the service flow - B_UINT16 newCID; //the new/changed CID - B_UINT16 VCID; //Get new Vcid if the flow has been made active in CID update TLV, but was inactive earlier or the orig vcid - B_UINT8 RetainSF; //Indication to Host if the SF is to be retained or deleted; if TRUE-retain else delete - B_UINT8 QoSParamSet; //QoS paramset of the retained SF - B_UINT16 u16reserved; //For byte alignment +struct bcm_del_indication { + B_UINT8 u8Type; /* < Type */ + B_UINT8 u8Padding; /* < Padding */ + B_UINT16 u16TID; /* < TID */ + /* brief 16bitCID */ + B_UINT16 u16CID; /* < CID */ + /* brief 16bitVCID */ + B_UINT16 u16VCID; /* < VCID */ + /* brief 32bitSFID */ + B_UINT32 u32SFID; /* < SFID */ + /* brief 8bit Confirmation code */ + B_UINT8 u8ConfirmationCode; /* < Confirmation code */ + B_UINT8 u8Padding1[3]; /* < 3 byte Padding */ +}; -} stIM_SFHostNotify; +struct bcm_stim_sfhostnotify { + B_UINT32 SFID; /* SFID of the service flow */ + B_UINT16 newCID; /* the new/changed CID */ + B_UINT16 VCID; /* Get new Vcid if the flow has been made active in CID update TLV, but was inactive earlier or the orig vcid */ + B_UINT8 RetainSF; /* Indication to Host if the SF is to be retained or deleted; if TRUE-retain else delete */ + B_UINT8 QoSParamSet; /* QoS paramset of the retained SF */ + B_UINT16 u16reserved; /* For byte alignment */ +}; #endif diff --git a/drivers/staging/bcm/hostmibs.c b/drivers/staging/bcm/hostmibs.c index 08d13a4dfd70..10361bb35059 100644 --- a/drivers/staging/bcm/hostmibs.c +++ b/drivers/staging/bcm/hostmibs.c @@ -101,7 +101,7 @@ VOID GetDroppedAppCntrlPktMibs(S_MIBS_HOST_STATS_MIBS *pstHostMibs, struct bcm_t sizeof(S_MIBS_DROPPED_APP_CNTRL_MESSAGES)); } -VOID CopyMIBSExtendedSFParameters(struct bcm_mini_adapter *Adapter, CServiceFlowParamSI *psfLocalSet, UINT uiSearchRuleIndex) +VOID CopyMIBSExtendedSFParameters(struct bcm_mini_adapter *Adapter, struct bcm_connect_mgr_params *psfLocalSet, UINT uiSearchRuleIndex) { S_MIBS_EXTSERVICEFLOW_PARAMETERS *t = &Adapter->PackInfo[uiSearchRuleIndex].stMibsExtServiceFlowTable; diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c index b179dbab93b5..b034eb5fa6b1 100644 --- a/drivers/staging/bcm/nvm.c +++ b/drivers/staging/bcm/nvm.c @@ -577,7 +577,7 @@ static int FlashSectorErase(struct bcm_mini_adapter *Adapter, * the sector erase cycle is 500 ms to 40000 msec. hence sleeping 10 ms * won't hamper performance in any case. */ - udelay(10000); + mdelay(10); } while ((uiStatus & 0x1) && (iRetries < 400)); if (uiStatus & 0x1) { @@ -3932,7 +3932,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, PFLASH2X_READWRIT BcmGetSectionValStartOffset(Adapter, ISO_IMAGE2_PART3); } - /* since this uiSectEndoffset is the size of iso Image. hence for calculating the vitual endoffset + /* since this uiSectEndoffset is the size of iso Image. hence for calculating the virtual endoffset * it should be added in startoffset. so that check done in last of this function can be valued. */ uiSectEndOffset = uiSectStartOffset + uiSectEndOffset; diff --git a/drivers/staging/bcm/target_params.h b/drivers/staging/bcm/target_params.h index 14876388b879..ad7ec0054938 100644 --- a/drivers/staging/bcm/target_params.h +++ b/drivers/staging/bcm/target_params.h @@ -32,7 +32,7 @@ typedef struct _TARGET_PARAMS B_UINT32 m_u32PowerSavingModesEnable; //bit 1: 1 Idlemode enable; bit2: 1 Sleepmode Enable /* PowerSaving Mode Options: bit 0 = 1: CPE mode - to keep pcmcia if alive; - bit 1 = 1: CINR reporing in Idlemode Msg + bit 1 = 1: CINR reporting in Idlemode Msg bit 2 = 1: Default PSC Enable in sleepmode*/ B_UINT32 m_u32PowerSavingModeOptions; |