本文整理汇总了C++中rtl8370_setAsicRegBits函数的典型用法代码示例。如果您正苦于以下问题:C++ rtl8370_setAsicRegBits函数的具体用法?C++ rtl8370_setAsicRegBits怎么用?C++ rtl8370_setAsicRegBits使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rtl8370_setAsicRegBits函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: number
/*
@func ret_t | rtl8370_setAsicVlanPortBasedVID | Set port based VID which is indexed to 32 VLAN member configurations.
@parm uint32 | port | Physical port number (0~15).
@parm uint32 | index | Index to VLAN member configuration (0~31).
@parm uint32 | pri | 1Q Port based VLAN priority (0~7).
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_VLAN_PRIORITY | Invalid priority
@rvalue RT_ERR_VLAN_ENTRY_NOT_FOUND | Invalid VLAN member configuration index (0~31).
@rvalue RT_ERR_PORT_ID | Invalid port number.
@comm
This API can Set Port-Based VLAN setting
In port based VLAN, untagged packets recieved by port N are forwarded to a VLAN according to the setting VID of port N.
Usage of VLAN 4k table is enabled and there are only VID and 802.1q priority retrieved from 32 member configurations .
Member set, untag set and FID of port based VLAN are be retrieved from 4K mapped VLAN entry.
*/
ret_t rtl8370_setAsicVlanPortBasedVID(uint32 port, uint32 index, uint32 pri)
{
uint32 regAddr, bit_mask;
ret_t retVal;
if(port > RTL8370_PORTIDMAX)
return RT_ERR_PORT_ID;
if(index > RTL8370_CVIDXMAX)
return RT_ERR_VLAN_ENTRY_NOT_FOUND;
if(pri > RTL8370_PRIMAX)
return RT_ERR_VLAN_PRIORITY;
regAddr = RTL8370_VLAN_PVID_CTRL_REG(port);
bit_mask = RTL8370_PORT_VIDX_MASK(port);
retVal = rtl8370_setAsicRegBits(regAddr, bit_mask, index);
if(retVal != RT_ERR_OK)
return retVal;
regAddr = RTL8370_VLAN_PORTBASED_PRIORITY_REG(port);
bit_mask = RTL8370_VLAN_PORTBASED_PRIORITY_MASK(port);
retVal = rtl8370_setAsicRegBits(regAddr, bit_mask, pri);
if(retVal != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
开发者ID:schidler,项目名称:flyzjhz-rt-n56u,代码行数:45,代码来源:rtl8370_asicdrv_vlan.c
示例2: Monitor
/*
@func ret_t | rtl8370_setAsicPortMirror | Configure port mirror function.
@parm uint32 | source | Source port no.
@parm uint32 | monitor | Monitor (destination) port.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_PORT_ID | Invalid port number.
@comm
System supports one set of port mirror function. Mirrored port will be checked if mirror receiving frame or mirror transmitting frame to monitor port.
*/
ret_t rtl8370_setAsicPortMirror(uint32 source, uint32 monitor)
{
ret_t retVal;
if((source > RTL8370_PORTIDMAX) || (monitor > RTL8370_PORTIDMAX))
return RT_ERR_PORT_ID;
retVal = rtl8370_setAsicRegBits(RTL8370_MIRROR_CTRL_REG, RTL8370_MIRROR_SOURCE_PORT_MASK, source);
if(retVal != RT_ERR_OK)
return retVal;
return rtl8370_setAsicRegBits(RTL8370_MIRROR_CTRL_REG, RTL8370_MIRROR_MONITOR_PORT_MASK, monitor);
}
开发者ID:LXiong,项目名称:openwrt-rtk,代码行数:23,代码来源:rtl8370_asicdrv_mirror.c
示例3: priority
/*
@func ret_t | rtl8370_setAsicUnknownMulticastTrapPriority | Set trap priority of unknown multicast frame
@parm uint32 | priority | priority (0~7)
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_QOS_INT_PRIORITY | Invalid priority.
@comm
*/
ret_t rtl8370_setAsicUnknownMulticastTrapPriority(uint32 priority)
{
if(priority > RTL8370_PRIMAX)
return RT_ERR_QOS_INT_PRIORITY;
return rtl8370_setAsicRegBits(RTL8370SG_QOS_TRAP_PRIORITY_CTRL0_REG, RTL8370_UNKNOWN_MC_PRIORTY_MASK, priority);
}
开发者ID:LXiong,项目名称:openwrt-rtk,代码行数:15,代码来源:rtl8370_asicdrv_unknownMulticast.c
示例4: rtl8370_setAsicOamCpuPri
ret_t rtl8370_setAsicOamCpuPri(uint32 priority)
{
if(priority > RTL8370_PRIMAX)
return RT_ERR_QOS_INT_PRIORITY;
return rtl8370_setAsicRegBits(RTL8370_REG_QOS_TRAP_PRIORITY0, RTL8370_OAM_PRIOIRTY_MASK, priority);
}
开发者ID:mausvt,项目名称:seagate_central_cns3420_2-6-35,代码行数:7,代码来源:rtl8370_asicdrv_oam.c
示例5: rtl8370_setAsicPortUnknownDaBehavior
/*
@func ret_t | rtl8370_setAsicPortUnknownDaBehavior | Set UNDA behavior
@parm uint32 | behavior | 0: flooding; 1: drop; 2:trap
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_NOT_ALLOWED | Invalid behavior.
@comm
The API set the behavior switch when the DA of received packet is unknown
*/
ret_t rtl8370_setAsicPortUnknownDaBehavior(uint32 behavior)
{
if(behavior >= L2_BEHAV_MAX)
return RT_ERR_NOT_ALLOWED;
return rtl8370_setAsicRegBits(RTL8370_PORT_SECURIT_CTRL_REG, RTL8370_UNKNOWN_UNICAST_DA_BEHAVE_MASK, behavior);
}
开发者ID:xtra72,项目名称:s805,代码行数:15,代码来源:rtl8370_asicdrv_port.c
示例6: rtl8370_setAsicSvlanTrapPriority
/*
@func ret_t | rtl8370_setAsicSvlanTrapPriority | Trap to CPU priority assignment
@parm uint32 | priority | Priority assignment
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
The API can set trapping priority to packet from uplink port.
*/
ret_t rtl8370_setAsicSvlanTrapPriority(uint32 priority)
{
if(priority > RTL8370_PRIMAX)
return RT_ERR_QOS_INT_PRIORITY;
return rtl8370_setAsicRegBits(RTL8370_REG_QOS_TRAP_PRIORITY0, RTL8370_SVLAN_PRIOIRTY_MASK,priority);
}
开发者ID:appleorange1,项目名称:asus-rt-n12-lx,代码行数:17,代码来源:rtl8370_asicdrv_svlan.c
示例7: _rtl8370_setAsicEeelldpFrameDataReg
ret_t _rtl8370_setAsicEeelldpFrameDataReg(uint32 regAddr, uint32 dataLength, int8 *writeDataPtr)
{
ret_t ret;
uint32 i;
uint32 regData;
uint16 *accessPtr;
accessPtr = (uint16*)writeDataPtr;
for(i=0; i < dataLength / 2; i++)
{
regData = *accessPtr;
ret = rtl8370_setAsicReg(regAddr + i, regData);
if(RT_ERR_OK != ret)
return ret;
accessPtr++;
}
if (dataLength & 0x1)
{
regData = *accessPtr;
ret = rtl8370_setAsicRegBits(regAddr + dataLength / 2, 0xFF, regData);
if(RT_ERR_OK != ret)
return ret;
}
return RT_ERR_OK;
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:29,代码来源:rtl8370_asicdrv_eeelldp.c
示例8: priority
/*
@func ret_t | rtl8370_setAsic1xTrapPriority | Set 802.1x Trap priority
@parm uint32 | priority | priority (0~7)
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_QOS_INT_PRIORITY | Invalid priority.
@comm
The API can update the 802.1x trap priority.
*/
ret_t rtl8370_setAsic1xTrapPriority(uint32 priority)
{
if(priority > RTL8370_PRIMAX)
return RT_ERR_QOS_INT_PRIORITY;
return rtl8370_setAsicRegBits(RTL8370SG_QOS_TRAP_PRIORITY_CTRL0_REG, RTL8370_DOT1X_PRIORTY_MASK,priority);
}
开发者ID:alessiocarrafa,项目名称:dsl-n55u-bender,代码行数:16,代码来源:rtl8370_asicdrv_dot1x.c
示例9: index
/*
@func ret_t | rtl8370_setAsicGVIndexConfig | Set 802.1x guest vlan index
@parm uint32 | index | 802.1x guest vlan index (0~31)
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_DOT1X_GVLANIDX | Invalid guest vlan index
@comm
The API can update the 802.1x guest vlan index content.
*/
ret_t rtl8370_setAsic1xGuestVidx(uint32 index)
{
if(index >= RTL8370_CVLANMCNO)
return RT_ERR_DOT1X_GVLANIDX;
return rtl8370_setAsicRegBits(RTL8370_DOT1X_CFG_REG, RTL8370_DOT1X_GVIDX_MASK, index);
}
开发者ID:alessiocarrafa,项目名称:dsl-n55u-bender,代码行数:16,代码来源:rtl8370_asicdrv_dot1x.c
示例10: rtl8370_setAsicLutLearnOverAct
/*
@func ret_t | rtl8370_setAsicLutLearnOverAct | Configure auto learn over limit number action.
@parm uint32 | action | Learn over action 0:normal, 1:drop 2:trap.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_NOT_ALLOWED | Invalid learn over action
@common
The API can set ASIC treat SA unknown packet while auto learn limit number is over
*/
ret_t rtl8370_setAsicLutLearnOverAct(uint32 action)
{
if(action >= LRNOVERACT_MAX)
return RT_ERR_NOT_ALLOWED;
return rtl8370_setAsicRegBits(RTL8370_REG_PORT_SECURITY_CTRL, RTL8370_LUT_LEARN_OVER_ACT_MASK, action);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:16,代码来源:rtl8370_asicdrv_lut.c
示例11: rtl8370_setAsicSvlanDefaultVlan
/*
@func ret_t | rtl8370_setAsicSvlanDefaultVlan | Configure default egress SVLAN.
@parm uint32 | index | index SVLAN member configuration
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_SVLAN_ENTRY_INDEX | Invalid input SVLAN index.
@comm
The API can set port n S-tag format index while receiving frame from port n
is transmit through uplink port with s-tag field
*/
ret_t rtl8370_setAsicSvlanDefaultVlan(uint32 index)
{
if(index > RTL8370_SVIDXMAX)
return RT_ERR_SVLAN_ENTRY_INDEX;
return rtl8370_setAsicRegBits(RTL8370_REG_SVLAN_CFG, RTL8370_VS_CPSVIDX_MASK,index);
}
开发者ID:appleorange1,项目名称:asus-rt-n12-lx,代码行数:18,代码来源:rtl8370_asicdrv_svlan.c
示例12: rtl8370_setAsicLedForceBlinkRate
/*
@func ret_t | rtl8370_setAsicLedForceBlinkRate | Set led blinking rate for force mode led.
@parm enum RTL8370_LEDBLINKRATE | blinkRate | Support 4 blink rates.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@comm
The API can set LED blink rate for force mode LED at 512ms, 1024ms, 2048ms, or identical to normal mode LED.
*/
ret_t rtl8370_setAsicLedForceBlinkRate(enum RTL8370_LEDFORCERATE blinkRate)
{
if(blinkRate >=LEDFORCERATE_MAX)
return RT_ERR_INPUT;
return rtl8370_setAsicRegBits(RTL8370_REG_LED_MODE, RTL8370_FORCE_RATE_MASK,blinkRate);
}
开发者ID:mausvt,项目名称:seagate_central_cns3420_2-6-35,代码行数:15,代码来源:rtl8370_asicdrv_led.c
示例13: number
/*
@func ret_t | rtl8370_setAsicCputagTrapPort | Set cpu tag trap port
@parm uint32 | port | port number (0~15)
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_PORT_ID Invalid port number.
@comm
This API can set destination port of trapping frame
*/
ret_t rtl8370_setAsicCputagTrapPort(uint32 port)
{
if(port >= RTL8370_PORTNO)
return RT_ERR_PORT_ID;
return rtl8370_setAsicRegBits(RTL8370_CPU_CTRL_REG, RTL8370_CPU_TRAP_PORT_MASK, port);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:16,代码来源:rtl8370_asicdrv_cputag.c
示例14: rtl8370_setAsicLedBlinkRate
/*
@func ret_t | rtl8370_setAsicLedBlinkRate | Set led blinking rate ate mode 0 to mode 3
@parm enum RTL8370_LEDBLINKRATE | blinkRate | Support 6 blink rates.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@comm
The API can set LED blink rate at 43ms, 84ms, 120ms, 170ms, 340ms and 670ms.
*/
ret_t rtl8370_setAsicLedBlinkRate(enum RTL8370_LEDBLINKRATE blinkRate)
{
if(blinkRate >=LEDBLINKRATE_MAX)
return RT_ERR_INPUT;
return rtl8370_setAsicRegBits(RTL8370_REG_LED_MODE, RTL8370_SEL_LEDRATE_MASK,blinkRate);
}
开发者ID:mausvt,项目名称:seagate_central_cns3420_2-6-35,代码行数:15,代码来源:rtl8370_asicdrv_led.c
示例15: rtl8370_setAsicCputagInsertMode
/*
@func ret_t | rtl8370_setAsicCputagInsertMode | Set ports that can parse CPU tag
@parm uint32 | mode | 0: insert to all packets; 1: insert to trapped packets; 2: don't insert
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_NOT_ALLOWED | Invalid action.
@comm
This API can set the decision of which frames should be inserted
with CPU tage.
*/
ret_t rtl8370_setAsicCputagInsertMode(uint32 mode)
{
if(mode >= CPUTAG_INSERT_MAX)
return RT_ERR_NOT_ALLOWED;
return rtl8370_setAsicRegBits(RTL8370_CPU_CTRL_REG, RTL8370_CPU_INSERTMODE_MASK, mode);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:17,代码来源:rtl8370_asicdrv_cputag.c
示例16: priority
/*
@func ret_t | rtl8370_setAsicCputagPriorityRemapping | Set queue assignment of CPU port
@parm uint32 | srcPri | internal priority (0~7)
@parm uint32 | newPri | internal priority after remapping (0~7)
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_QOS_INT_PRIORITY | Invalid priority.
@comm
This API can set the priority remapping of frames to CPU port
*/
ret_t rtl8370_setAsicCputagPriorityRemapping(uint32 srcPri, uint32 newPri)
{
if(srcPri > RTL8370_PRIMAX || newPri > RTL8370_PRIMAX)
return RT_ERR_QOS_INT_PRIORITY;
return rtl8370_setAsicRegBits(RTL8370_QOS_PRIPORITY_REMAPPING_IN_CPU_REG(srcPri), RTL8370_QOS_PRIPORITY_REMAPPING_IN_CPU_MASK(srcPri), newPri);
}
开发者ID:jing-git,项目名称:rt-n56u,代码行数:17,代码来源:rtl8370_asicdrv_cputag.c
示例17: group
/*
@func ret_t | rtl8370_setAsicTrunkingGroup | Set trunking group available port mask
@parm uint32 | group | Port trunking group (0~3).
@parm uint32 | portmask | Logic trunking enable port mask, max 4 ports
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_LA_TRUNK_ID | Invalid trunking group
@comm
The API can set 4 port trunking group enabled port mask. Each port trunking group has max 4 ports.
If enabled port mask has less than 2 ports available setting, then this trunking group function is disabled.
*/
ret_t rtl8370_setAsicTrunkingGroup(uint32 group,uint32 portmask)
{
if(group > RTL8370_TRUNKING_GROUPMAX)
return RT_ERR_LA_TRUNK_ID;
return rtl8370_setAsicRegBits(RTL8370_PORT_TRUNK_GROUP_MASK_REG, RTL8370_PORT_TRUNK_GROUP_MASK_MASK(group), portmask);
}
开发者ID:LXiong,项目名称:openwrt-rtk,代码行数:18,代码来源:rtl8370_asicdrv_trunking.c
示例18: rtl8370_setAsicSvlanPrioritySel
/*
@func ret_t | rtl8370_setAsicSvlanPrioritySel | SVLAN priority field setting
@parm uint32 | prisel | S-priority assignment method, 0:internal priority 1:C-tag priority 2:using Svlan member configuration
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_INPUT | Invalid input parameter.
@comm
The API can set S-priority assignment method for S-tag frame output from uplink port
*/
ret_t rtl8370_setAsicSvlanPrioritySel(uint32 prisel)
{
if(prisel >= SPRISEL_MAX)
return RT_ERR_INPUT;
return rtl8370_setAsicRegBits(RTL8370_REG_SVLAN_CFG, RTL8370_VS_SPRISEL_MASK, prisel);
}
开发者ID:appleorange1,项目名称:asus-rt-n12-lx,代码行数:16,代码来源:rtl8370_asicdrv_svlan.c
示例19: rtl8370_setAsicPortUnmatchedSaBehavior
/*
@func ret_t | rtl8370_setAsicPortUnmatchedSaBehavior | Set Unmatched SA behavior
@parm uint32 | behavior | 0: flooding; 1: drop; 2:trap
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_NOT_ALLOWED | Invalid behavior.
@comm
The API set the behavior switch when the SA and SPA of received packet are unmatched
*/
ret_t rtl8370_setAsicPortUnmatchedSaBehavior(uint32 behavior)
{
if(behavior >= L2_BEHAV_MAX)
return RT_ERR_NOT_ALLOWED;
return rtl8370_setAsicRegBits(RTL8370_PORT_SECURIT_CTRL_REG, RTL8370_UNMATCHED_SA_BEHAVE_MASK, behavior);
}
开发者ID:xtra72,项目名称:s805,代码行数:15,代码来源:rtl8370_asicdrv_port.c
示例20: rtl8370_setAsicTrunkingHashSelect
/*
@func ret_t | rtl8370_setAsicTrunkingHashSelect | Set port trunking hash select sources
@parm uint32 | hashsel | hash sources mask
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_LA_HASHMASK | Hash algorithm selection error.
@comm
The API can set port trunking hash algorithm sources.
7 bits mask for link aggregation group0 hash parameter selection {DIP, SIP, DMAC, SMAC, SPA}
0b0000001: SPA
0b0000010: SMAC
0b0000100: DMAC
0b0001000: SIP
0b0010000: DIP
0b0100000: TCP/UDP Source Port
0b1000000: TCP/UDP Destination Port
Example:
0b0000011: SMAC & SPA
Note that it could be an arbitrary combination or independent set
*/
ret_t rtl8370_setAsicTrunkingHashSelect(uint32 hashsel)
{
if (hashsel > RTL8370_PORT_TRUNK_HASH_MASK)
return RT_ERR_LA_HASHMASK;
return rtl8370_setAsicRegBits(RTL8370_REG_PORT_TRUNK_CTRL, RTL8370_PORT_TRUNK_HASH_MASK, hashsel);
}
开发者ID:LXiong,项目名称:openwrt-rtk,代码行数:27,代码来源:rtl8370_asicdrv_trunking.c
注:本文中的rtl8370_setAsicRegBits函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论