XilinxProcessorIPLib/drivers/axiethernet/examples/avb/xavb.c
void XAvb_SetupRxFilterControlPcp(XAvb * InstancePtr,
                                  u32    VlanPriority,
                                  u8     SrClass) {
  u32 LocalData = 0;

  LocalData = XAvb_ReadReg(InstancePtr->Config.BaseAddress,
                           XAVB_RX_FILTER_CONTROL);

  if (SrClass == 0x0) {
     LocalData = LocalData | (VlanPriority & XAVB_RX_AV_VLAN_PRIORITY_A_MASK);
  } else {
     LocalData = LocalData | (VlanPriority & XAVB_RX_AV_VLAN_PRIORITY_B_MASK);
  }

  XAvb_WriteReg(InstancePtr->Config.BaseAddress,
                XAVB_RX_FILTER_CONTROL,
                LocalData);
}
/****************************************************************************/
/**
*
* A function to set the VLAN PCP field for either SR A or B traffic in the
* RX Filtering Control Register - such that AV traffic is correctly filtered
* by the RX Splitter.
*
* @param  InstancePtr is a pointer to the XAvb instance to be worked on
*
* @param  VlanPriority contains the 3-bit value to be written to the register
*         in the correct bit positions as defined in the address map
*
* @param  SrClass is '0' if VLAN Priority (PCP) A is to be updated and is
*                    '1' if VLAN Priority (PCP) B is to be updated
*
* @return None.
*
* @note   None.
*
*****************************************************************************/
A function to set the VLAN PCP field for either SR A or B traffic in the
RX Filtering Control Register - such that AV traffic is correctly filtered
by the RX Splitter.
A function to set the VLAN PCP field for either SR A or B traffic in the RX Filtering Control Register - such that AV traffic is correctly filtered by the RX Splitter .
void XAvb_SetupRxFilterControlPcp(XAvb * InstancePtr,
                                  u32    VlanPriority,
                                  u8     SrClass) {
  u32 LocalData = 0;
  LocalData = XAvb_ReadReg(InstancePtr->Config.BaseAddress,
                           XAVB_RX_FILTER_CONTROL);
  if (SrClass == 0x0) {
     LocalData = LocalData | (VlanPriority & XAVB_RX_AV_VLAN_PRIORITY_A_MASK);
  } else {
     LocalData = LocalData | (VlanPriority & XAVB_RX_AV_VLAN_PRIORITY_B_MASK);
  }
  XAvb_WriteReg(InstancePtr->Config.BaseAddress,
                XAVB_RX_FILTER_CONTROL,
                LocalData);
}
void XAvb_SetupRxFilterControlPcp ( XAvb * InstancePtr , u32 VlanPriority , u8 SrClass ) { u32 LocalData = 0 ; LocalData = XAvb_ReadReg ( InstancePtr -> Config . BaseAddress , XAVB_RX_FILTER_CONTROL ) ; if ( SrClass == 0x0 ) { LocalData = LocalData | ( VlanPriority & XAVB_RX_AV_VLAN_PRIORITY_A_MASK ) ; } else { LocalData = LocalData | ( VlanPriority & XAVB_RX_AV_VLAN_PRIORITY_B_MASK ) ; } XAvb_WriteReg ( InstancePtr -> Config . BaseAddress , XAVB_RX_FILTER_CONTROL , LocalData ) ; }
A function to set the VLAN PCP field for either SR A or B traffic in the
RX Filtering Control Register - such that AV traffic is correctly filtered
by the RX Splitter.
A function to set the VLAN PCP field for either SR A or B traffic in the RX Filtering Control Register - such that AV traffic is correctly filtered by the RX Splitter .