Skip to content

Commit

Permalink
[nes]: BRIDGE + HAL changes ...
Browse files Browse the repository at this point in the history
  • Loading branch information
nes-repo committed Dec 18, 2014
1 parent 61dd251 commit e8d2d71
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
38 changes: 37 additions & 1 deletion bridge/bridgeUtils.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ bridge_pipEnableModify (
}


static bool
ieee8021PbbCbpSidRowStatus_halUpdate (
ieee8021PbbCbpServiceMappingEntry_t *poEntry, uint8_t u8RowStatus);


bool
ieee8021PbVlanStaticTable_vlanHandler (
ieee8021BridgeBaseEntry_t *poComponent,
Expand Down Expand Up @@ -806,6 +811,11 @@ ieee8021PbbCbpServiceMappingRowStatus_update (

ieee8021PbbCbpServiceMappingRowStatus_update_updateLocal:

if (u8RowStatus != xRowStatus_active_c && !ieee8021PbbCbpSidRowStatus_halUpdate (poEntry, u8RowStatus))
{
goto ieee8021PbbCbpServiceMappingRowStatus_update_cleanup;
}


if (poCbpPort->bExternal ||
(poEntry->pOldEntry != NULL && poEntry->pOldEntry->u32LocalSid == poEntry->u32LocalSid))
Expand Down Expand Up @@ -857,7 +867,12 @@ ieee8021PbbCbpServiceMappingRowStatus_update (

ieee8021PbbCbpServiceMappingRowStatus_update_sidDone:

/* TODO */

if (u8RowStatus == xRowStatus_active_c && !ieee8021PbbCbpSidRowStatus_halUpdate (poEntry, u8RowStatus))
{
goto ieee8021PbbCbpServiceMappingRowStatus_update_cleanup;
}


ieee8021PbbCbpServiceMappingRowStatus_update_success:

Expand All @@ -880,6 +895,27 @@ ieee8021PbbCbpServiceMappingRowStatus_update (
return bRetCode;
}

bool
ieee8021PbbCbpSidRowStatus_halUpdate (
ieee8021PbbCbpServiceMappingEntry_t *poEntry, uint8_t u8RowStatus)
{
register bool bRetCode = false;
register uint8_t u8HalOpCode =
u8RowStatus == xRowStatus_active_c && poEntry->u8RowStatus != xRowStatus_active_c ? halEthernet_sidEnable_c:
u8RowStatus != xRowStatus_active_c && poEntry->u8RowStatus == xRowStatus_active_c ? halEthernet_sidDisable_c: halEthernet_sidNone_c;

if (u8HalOpCode != halEthernet_sidNone_c && !halEthernet_cbpSidConfigure (poEntry, u8HalOpCode, NULL))
{
goto ieee8021PbbCbpSidRowStatus_halUpdate_cleanup;
}

bRetCode = true;

ieee8021PbbCbpSidRowStatus_halUpdate_cleanup:

return bRetCode;
}

bool
ieee8021PbbCbpRowStatus_update (
ieee8021BridgeBaseEntry_t *poComponent,
Expand Down
7 changes: 7 additions & 0 deletions hal/halEthernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ halEthernet_vlanConfigure ()
return false;
}

bool
halEthernet_cbpSidConfigure ()
{
/* TODO */
return false;
}

bool
halEthernet_ifNotify ()
{
Expand Down
6 changes: 6 additions & 0 deletions hal/halEthernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ enum
halEthernet_vlanEnable_c,
halEthernet_vlanOperState_c,
halEthernet_vlanDisable_c,

halEthernet_sidNone_c,
halEthernet_sidEnable_c,
halEthernet_sidDisable_c,
};

typedef struct halEthernet_portEntry_t
Expand All @@ -72,6 +76,8 @@ extern bool
halEthernet_ifConfigure ();
extern bool
halEthernet_vlanConfigure ();
extern bool
halEthernet_cbpSidConfigure ();


# ifdef __cplusplus
Expand Down

0 comments on commit e8d2d71

Please sign in to comment.