Ejemplo n.º 1
0
/* Function Name:
 *      rtl8367b_setAsicPortDos
 * Description:
 *      Set DOS function
 * Input:
 *      type 	- DOS type
 *      drop 	- 0: permit; 1: drop
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 			- Success
 *      RT_ERR_SMI  		- SMI access error
 *      RT_ERR_OUT_OF_RANGE - Invalid payload index
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicPortDos(rtk_uint32 type, rtk_uint32 drop)
{
	if(type >= DOS_END)
		return RT_ERR_OUT_OF_RANGE;

	return rtl8367b_setAsicRegBit(RTL8367B_REG_DOS_CFG, RTL8367B_DROP_DAEQSA_OFFSET + type, drop);
}
Ejemplo n.º 2
0
/* Function Name:
 *      rtl8367b_setAsicPortEnableAll
 * Description:
 *      Set ALL ports enable.
 * Input:
 *      enable - enable all ports.
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 			- Success
 *      RT_ERR_SMI  		- SMI access error
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicPortEnableAll(rtk_uint32 enable)
{
    if(enable >= 2)
        return RT_ERR_INPUT;

    return rtl8367b_setAsicRegBit(RTL8367B_REG_PHY_AD, RTL8367B_PDNPHY_OFFSET, !enable);
}
Ejemplo n.º 3
0
/*
@func ret_t | rtl8367b_setAsicRldp_mode | Set RLDP transmitting mode.
@parm uint32 | mode | 1: Periodically send RLDP packet, 0: Send RLDP packet when SA moving is detected.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
    This API Set RLDP transmitting mode. When set to RLDP_TRANSMIT_MODE_0, Asic will send RLDP packet
    when SA moving is detected. When set to RLDP_TRANSMIT_MODE_1, Asic will send RLDP packet periodically.
*/
ret_t rtl8367b_setAsicRldp_mode(rtk_uint32 mode)
{
    if(mode > 2)
        return RT_ERR_INPUT;

    return rtl8367b_setAsicRegBit(RTL8367B_RLDP_CTRL0_REG, RTL8367B_RLDP_MODE_OFFSET, mode);
}
Ejemplo n.º 4
0
/* Function Name:
 *      rtl8367b_setAsicPortBlockSpa
 * Description:
 *      Set disabling blocking frame if source port and destination port are the same
 * Input:
 *      port 	- Physical port number (0~7)
 *      permit 	- 0: block; 1: permit
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicPortBlockSpa(rtk_uint32 port, rtk_uint32 permit)
{
	if(port >= RTL8367B_PORTNO)
		return RT_ERR_PORT_ID;

	return rtl8367b_setAsicRegBit(RTL8367B_SOURCE_PORT_BLOCK_REG, port, permit);
}
Ejemplo n.º 5
0
/* Function Name:
 *      rtl8367b_setAsic1xPBOpdirConfig
 * Description:
 *      Set 802.1x port-based operational direction
 * Input:
 *      port 	- Physical port number (0~7)
 *      opdir 	- Operation direction 1: IN, 0:BOTH
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsic1xPBOpdirConfig(rtk_uint32 port, rtk_uint32 opdir)
{
	if(port >= RTL8367B_PORTNO)
		return RT_ERR_PORT_ID;

	return rtl8367b_setAsicRegBit(RTL8367B_DOT1X_PORT_OPDIR_REG, port, opdir);
}
Ejemplo n.º 6
0
/* Function Name:
 *      rtl8367b_setAsic1xPBAuthConfig
 * Description:
 *      Set 802.1x port-based authorised port configuration
 * Input:
 *      port 	- Physical port number (0~7)
 *      auth 	- 1: authorised, 0: non-authorised
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsic1xPBAuthConfig(rtk_uint32 port, rtk_uint32 auth)
{
	if(port >= RTL8367B_PORTNO)
		return RT_ERR_PORT_ID;
	
	return rtl8367b_setAsicRegBit(RTL8367B_DOT1X_PORT_AUTH_REG, port, auth);
}
Ejemplo n.º 7
0
/* Function Name:
 *      rtl8367b_setAsicGpioOutput
 * Description:
 *      Set gpio output
 * Input:
 *      gpioPin 		- GPIO pin number
 *      gpioOutput 		- GPIO output
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 				- Success
 *      RT_ERR_SMI  			- SMI access error
 *      RT_ERR_OUT_OF_RANGE 	- input out of range.
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicGpioOutput(rtk_uint32 gpioPin, rtk_uint32 gpioOutput)
{
	if(gpioPin >= RTL8367B_GPIOPINNO)
		return RT_ERR_OUT_OF_RANGE;
	
    return rtl8367b_setAsicRegBit(RTL8367B_REG_CTRL_GPIO, gpioPin, gpioOutput);
}
Ejemplo n.º 8
0
/* Function Name:
 *      rtl8367b_setAsicMIBsLoggingType
 * Description:
 *      MIB logging counter type
 * Input:
 *      index 	- logging counter mode index (0~15)
 *      type 	- 0:Packet count 1:Byte count
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 				- Success
 *      RT_ERR_SMI  			- SMI access error
 *      RT_ERR_OUT_OF_RANGE 	- input parameter out of range
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicMIBsLoggingType(rtk_uint32 index, rtk_uint32 type)
{
	if(index > RTL8367B_MIB_MAX_LOG_MODE_IDX)
		return RT_ERR_OUT_OF_RANGE;

    return rtl8367b_setAsicRegBit(RTL8367B_REG_MIB_CTRL5, index,type);        
}
/* Function Name:
 *      rtl8367b_setAsicPortBasedFidEn
 * Description:
 *      Set port based FID selection enable
 * Input:
 *      port 	- Physical port number (0~7)
 *      enabled - 1: enabled, 0: disabled
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicPortBasedFidEn(rtk_uint32 port, rtk_uint32 enabled)
{
    if(port > RTL8367B_PORTIDMAX)
        return RT_ERR_PORT_ID;

    return rtl8367b_setAsicRegBit(RTL8367B_REG_PORT_PBFIDEN,port, enabled);
}
Ejemplo n.º 10
0
/* Function Name:
 *      rtl8367b_setAsicGpioAclEnClear
 * Description:
 *      Set gpio control 
 * Input:
 *      gpioPin 		- GPIO pin number
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 				- Success
 *      RT_ERR_SMI  			- SMI access error
 *      RT_ERR_OUT_OF_RANGE 	- input out of range.
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicGpioAclEnClear(rtk_uint32 gpioPin)
{
	if(gpioPin >= RTL8367B_GPIOPINNO)
		return RT_ERR_OUT_OF_RANGE;
	
    return rtl8367b_setAsicRegBit(RTL8367B_REG_ACL_GPIO, gpioPin, 1);
}
Ejemplo n.º 11
0
/* Function Name:
 *      rtl8367b_setAsicGreenHighPriorityTraffic
 * Description:
 *      Set indicator which ASIC had received high priority traffic
 * Input:
 *      port 			- Physical port number (0~7)
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicGreenHighPriorityTraffic(rtk_uint32 port)
{
    if(port > RTL8367B_PORTIDMAX)
        return RT_ERR_PORT_ID;

    return rtl8367b_setAsicRegBit(RTL8367B_REG_HIGHPRI_INDICATOR, port, 1);
}
Ejemplo n.º 12
0
/*
@func rtk_int32 | rtl8367b_setAsicGreenEthernet | Set green ethernet function.
@parm rtk_uint32 | green | Green feature function usage 1:enable 0:disable.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error. 
@comm
 	The API can set Green Ethernet function to reduce power consumption. While green feature is enabled, ASIC will automatic
 detect the cable length and then select different power mode for best performance with minimums power consumption. Link down
 ports will enter power savining mode in 10 seconds after the cable disconnected if power saving function is enabled.
*/
ret_t rtl8367b_setAsicGreenEthernet(rtk_uint32 green)
{
    if (green > 1)
        return RT_ERR_INPUT;

	return rtl8367b_setAsicRegBit(RTL8367B_REG_PHY_AD,RTL8367B_EN_PHY_GREEN_OFFSET,green);
}
Ejemplo n.º 13
0
/* Function Name:
 *      rtl8367b_setAsicFlowControlEgressPortIndep
 * Description:
 *      Set per-port egress flow control independent 
 * Input:
 *      port 		- Physical port number (0~7)
 *      enabled     - Egress port flow control usage 1:enable 0:disable.
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicFlowControlEgressPortIndep(rtk_uint32 port, rtk_uint32 enable)
{
    if(port > RTL8367B_PORTIDMAX)
        return RT_ERR_PORT_ID;

    return rtl8367b_setAsicRegBit(RTL8367B_REG_PORT0_MISC_CFG + (port *0x20), RTL8367B_PORT0_MISC_CFG_FLOWCTRL_INDEP_OFFSET,enable);
}
/* Function Name:
 *      rtl8367b_setAsicVlanIngressFilter
 * Description:
 *      Set VLAN Ingress Filter
 * Input:
 *      port 		- Physical port number (0~7)
 *      enabled 	- Enable or disable Ingress filter
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicVlanIngressFilter(rtk_uint32 port, rtk_uint32 enabled)
{
    if(port > RTL8367B_PORTIDMAX)
        return RT_ERR_PORT_ID;

    return rtl8367b_setAsicRegBit(RTL8367BG_VLAN_INGRESS_REG, port, enabled);
}
Ejemplo n.º 15
0
/* Function Name:
 *      rtl8367b_setAsicCputagMode
 * Description:
 *      Set cpu tag mode
 * Input:
 *      mode - 1: 4bytes mode, 0: 8bytes mode
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_INPUT 	- Invalid input parameters
 * Note:
 *      If CPU tag function is disabled, CPU tag will not be added to frame
 *    	forwarded to CPU port, and all ports cannot parse CPU tag.
 */
ret_t rtl8367b_setAsicCputagMode(rtk_uint32 mode)
{
    if(mode > 1)
        return RT_ERR_INPUT;
    
    return rtl8367b_setAsicRegBit(RTL8367B_REG_CPU_CTRL, RTL8367B_CPU_TAG_FORMAT_OFFSET, mode);
}
Ejemplo n.º 16
0
/* Function Name:
 *      rtl8367b_setAsicPortLoopback
 * Description:
 *      Set MAC loopback
 * Input:
 *      port 	- Physical port number (0~7)
 *      enable 	- 0: Disable, 1: enable
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicPortLoopback(rtk_uint32 port, rtk_uint32 enable)
{
    if(port >= RTL8367B_PORTNO)
		return RT_ERR_PORT_ID;

    return rtl8367b_setAsicRegBit(RTL8367B_PORT_MISC_CFG_REG(port), RTL8367B_PORT0_MISC_CFG_MAC_LOOPBACK_OFFSET, enable);
}
Ejemplo n.º 17
0
/* Function Name:
 *      rtl8367b_setAsicCputagRxMinLength
 * Description:
 *      Set cpu tag mode
 * Input:
 *      mode - 1: 64bytes, 0: 72bytes
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_INPUT 	- Invalid input parameters
 * Note:
 *      If CPU tag function is disabled, CPU tag will not be added to frame
 *    	forwarded to CPU port, and all ports cannot parse CPU tag.
 */
ret_t rtl8367b_setAsicCputagRxMinLength(rtk_uint32 mode)
{
    if(mode > 1)
        return RT_ERR_INPUT;
    
    return rtl8367b_setAsicRegBit(RTL8367B_REG_CPU_CTRL, RTL8367B_CPU_TAG_RXBYTECOUNT_OFFSET, mode);
}
/* Function Name:
 *      rtl8367b_setAsicEeepRxEnable
 * Description:
 *      Set per-port EEEP Rx function enable/disable
 * Input:
 *      port 		- Physical port number (0~7)
 *      enabled 	- 1: enabled, 0: disabled
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicEeepRxEnable(rtk_uint32 port, rtk_uint32 enabled)
{
	if(port >= RTL8367B_PORTNO)
		return RT_ERR_PORT_ID;
	
    return rtl8367b_setAsicRegBit(RTL8367B_EEEP_CFG_REG(port), RTL8367B_PORT0_EEECFG_EEEP_ENABLE_RX_OFFSET, enabled);
}
Ejemplo n.º 19
0
/* Function Name:
 *      rtl8367b_setAsicCputagEnable
 * Description:
 *      Set cpu tag function enable/disable
 * Input:
 *      enabled - 1: enabled, 0: disabled
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_ENABLE  	- Invalid enable/disable input
 * Note:
 *      If CPU tag function is disabled, CPU tag will not be added to frame
 *    	forwarded to CPU port, and all ports cannot parse CPU tag.
 */
ret_t rtl8367b_setAsicCputagEnable(rtk_uint32 enabled)
{
    if(enabled > 1)
        return RT_ERR_ENABLE;
    
    return rtl8367b_setAsicRegBit(RTL8367B_REG_CPU_CTRL, RTL8367B_CPU_EN_OFFSET, enabled);
}
Ejemplo n.º 20
0
/* Function Name:
 *      rtl8367b_setAsic1xPBEnConfig
 * Description:
 *      Set 802.1x port-based port enable configuration
 * Input:
 *      port 	- Physical port number (0~7)
 *      enabled - 1: enabled, 0: disabled
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsic1xPBEnConfig(rtk_uint32 port, rtk_uint32 enabled)
{
	if(port >= RTL8367B_PORTNO)
		return RT_ERR_PORT_ID;
    
	return rtl8367b_setAsicRegBit(RTL8367B_DOT1X_PORT_ENABLE_REG, port, enabled);
}
Ejemplo n.º 21
0
/* Function Name:
 *      rtl8367b_setAsicPortSmallIpg
 * Description:
 *      Set small ipg egress mode
 * Input:
 *      port 	- Physical port number (0~7)
 *      enable 	- 0: normal, 1: small
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicPortSmallIpg(rtk_uint32 port, rtk_uint32 enable)
{
	if(port >= RTL8367B_PORTNO)
		return RT_ERR_PORT_ID;

	return rtl8367b_setAsicRegBit(RTL8367B_PORT_SMALL_IPG_REG(port), RTL8367B_PORT0_MISC_CFG_SMALL_TAG_IPG_OFFSET, enable);
}
Ejemplo n.º 22
0
/* Function Name:
 *      rtl8367b_setAsicLutCamTbUsage
 * Description:
 *      Configure Lut CAM table usage
 * Input:
 *      enabled - L2 CAM table usage 1: enabled, 0: disabled
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 	- Success
 *      RT_ERR_SMI  - SMI access error
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicLutCamTbUsage(rtk_uint32 enabled)
{
	ret_t retVal;

	retVal = rtl8367b_setAsicRegBit(RTL8367B_REG_LUT_CFG, RTL8367B_BCAM_DISABLE_OFFSET, enabled ? 0 : 1);

	return retVal;
}
Ejemplo n.º 23
0
/* Function Name:
 *      rtl8367b_setAsicGreenTrafficType
 * Description:
 *      Set traffic type for each priority
 * Input:
 *      priority 	- internal priority (0~7)
 *      traffictype - high/low traffic type, 1:high priority traffic type, 0:low priority traffic type
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 				- Success
 *      RT_ERR_SMI  			- SMI access error
 *      RT_ERR_QOS_INT_PRIORITY - Invalid priority
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicGreenTrafficType(rtk_uint32 priority, rtk_uint32 traffictype)
{

    if(priority > RTL8367B_PRIMAX)
        return RT_ERR_QOS_INT_PRIORITY;

    return rtl8367b_setAsicRegBit(RTL8367B_REG_HIGHPRI_CFG, priority, (traffictype?1:0));
}
Ejemplo n.º 24
0
/* Function Name:
 *      rtl8367b_setAsicIgmp
 * Description:
 *      Set IGMP/MLD state
 * Input:
 *      enabled 	- 1: enabled, 0: disabled
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 	- Success
 *      RT_ERR_SMI  - SMI access error
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicIgmp(rtk_uint32 enabled)
{
    ret_t retVal;

    /* Enable/Disable H/W IGMP/MLD */
    retVal = rtl8367b_setAsicRegBit(RTL8367B_REG_IGMP_MLD_CFG0, RTL8367B_IGMP_MLD_EN_OFFSET, enabled);

    return retVal;
}
Ejemplo n.º 25
0
/* Function Name:
 *      rtl8367b_setAsicFlowControlQueueEgressEnable
 * Description:
 *      Set flow control ability for each queue
 * Input:
 *      port 	- Physical port number (0~7)
 *      qid 	- Queue id
 *      enabled - 1: enabled, 0: disabled
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 *      RT_ERR_PORT_ID  - Invalid port number
 *      RT_ERR_QUEUE_ID - Invalid queue id
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicFlowControlQueueEgressEnable(rtk_uint32 port, rtk_uint32 qid, rtk_uint32 enabled)
{
    if(port > RTL8367B_PORTIDMAX)
        return RT_ERR_PORT_ID;

    if(qid > RTL8367B_QIDMAX) 
		return RT_ERR_QUEUE_ID;
    
    return rtl8367b_setAsicRegBit(RTL8367B_FLOWCRTL_EGRESS_QUEUE_ENABLE_REG(port), RTL8367B_FLOWCRTL_EGRESS_QUEUE_ENABLE_REG_OFFSET(port)+ qid, enabled);
}
Ejemplo n.º 26
0
/* Function Name:
 *      rtl8367b_setAsicIGMPDropLeaveZero
 * Description:
 *      Set the function of droppping Leave packet with group IP = 0.0.0.0
 * Input:
 *      drop    - 1: Drop, 0:Bypass
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicIGMPDropLeaveZero(rtk_uint32 drop)
{
    ret_t   retVal;

    retVal = rtl8367b_setAsicRegBit(RTL8367B_REG_IGMP_MLD_CFG1, RTL8367B_DROP_LEAVE_ZERO_OFFSET, drop);
    if(retVal != RT_ERR_OK)
		return retVal;

	return RT_ERR_OK;
}
Ejemplo n.º 27
0
/*
@func ret_t | rtl8367b_setAsicEeeGiga | Set eee force mode function enable/disable.
@parm rtk_uint32 | port | The port number.
@parm rtk_uint32 | enabled | 1: enabled, 0: disabled.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error. 
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
    This API set the 100M EEE enable function.

*/
ret_t rtl8367b_setAsicEeeGiga(rtk_uint32 port, rtk_uint32 enable)
{
    if(port >= RTL8367B_PORTNO)
        return RT_ERR_PORT_ID;
	
    if (enable > 1)
        return RT_ERR_INPUT;
    
    return rtl8367b_setAsicRegBit(RTL8367B_PORT_EEE_CFG_REG(port), RTL8367B_PORT_EEE_GIGA_OFFSET, enable);
}
Ejemplo n.º 28
0
/* Function Name:
 *      rtl8367b_setAsicIGMPBypassStormCTRL
 * Description:
 *      Set the function of bypass strom control for IGMP/MLD packet
 * Input:
 *      bypass    - 1: Bypass, 0:not bypass
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicIGMPBypassStormCTRL(rtk_uint32 bypass)
{
    ret_t   retVal;

    retVal = rtl8367b_setAsicRegBit(RTL8367B_REG_IGMP_MLD_CFG0, RTL8367B_IGMP_MLD_DISCARD_STORM_FILTER_OFFSET, bypass);
    if(retVal != RT_ERR_OK)
		return retVal;

	return RT_ERR_OK;
}
Ejemplo n.º 29
0
/* Function Name:
 *      rtl8367b_setAsicIGMPVLANLeaky
 * Description:
 *      Set VLAN leaky for IGMP/MLD packet
 * Input:
 *      leaky    - 1: Leaky, 0:not leaky
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicIGMPVLANLeaky(rtk_uint32 leaky)
{
    ret_t   retVal;

    retVal = rtl8367b_setAsicRegBit(RTL8367B_REG_IGMP_MLD_CFG0, RTL8367B_IGMP_MLD_VLAN_LEAKY_OFFSET, leaky);
    if(retVal != RT_ERR_OK)
		return retVal;

	return RT_ERR_OK;
}
Ejemplo n.º 30
0
/* Function Name:
 *      rtl8367b_setAsicIGMPReportFlood
 * Description:
 *      Set IGMPv1/v2 MLD v1 Report flood
 * Input:
 *      flood 	- 1: flooding to all port, 0: forward to router ports only
 * Output:
 *      None
 * Return:
 *      RT_ERR_OK 		- Success
 *      RT_ERR_SMI  	- SMI access error
 * Note:
 *      None
 */
ret_t rtl8367b_setAsicIGMPReportFlood(rtk_uint32 flood)
{
    ret_t   retVal;

    retVal = rtl8367b_setAsicRegBit(RTL8367B_REG_IGMP_MLD_CFG0, RTL8367B_REPORT_FORWARD_OFFSET, flood);
    if(retVal != RT_ERR_OK)
		return retVal;

	return RT_ERR_OK;
}