• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/drivers/char/rtl8365mb/

Lines Matching refs:index

25  *      index 	- hared meter index (0-31)
37 ret_t rtl8367c_setAsicShareMeter(rtk_uint32 index, rtk_uint32 rate, rtk_uint32 ifg)
41 if(index > RTL8367C_METERMAX)
44 if(index < 32)
47 retVal = rtl8367c_setAsicReg(RTL8367C_METER_RATE_REG(index), rate&0xFFFF);
51 retVal = rtl8367c_setAsicReg(RTL8367C_METER_RATE_REG(index) + 1, (rate &0x70000) >> 16);
55 retVal = rtl8367c_setAsicRegBit(RTL8367C_METER_IFG_CTRL_REG(index), RTL8367C_METER_IFG_OFFSET(index), ifg);
62 retVal = rtl8367c_setAsicReg(RTL8367C_REG_METER32_RATE_CTRL0 + ((index-32) << 1), rate&0xFFFF);
66 retVal = rtl8367c_setAsicReg(RTL8367C_REG_METER32_RATE_CTRL0 + ((index-32) << 1) + 1, (rate &0x70000) >> 16);
70 retVal = rtl8367c_setAsicRegBit(RTL8367C_REG_METER_IFG_CTRL2 + ((index-32) >> 4), RTL8367C_METER_IFG_OFFSET(index), ifg);
82 * index - hared meter index (0-31)
94 ret_t rtl8367c_getAsicShareMeter(rtk_uint32 index, rtk_uint32 *pRate, rtk_uint32 *pIfg)
100 if(index > RTL8367C_METERMAX)
103 if(index < 32)
106 retVal = rtl8367c_getAsicReg(RTL8367C_METER_RATE_REG(index), &regData);
110 retVal = rtl8367c_getAsicReg(RTL8367C_METER_RATE_REG(index) + 1, &regData2);
116 retVal = rtl8367c_getAsicRegBit(RTL8367C_METER_IFG_CTRL_REG(index), RTL8367C_METER_IFG_OFFSET(index), pIfg);
123 retVal = rtl8367c_getAsicReg(RTL8367C_REG_METER32_RATE_CTRL0 + ((index-32) << 1), &regData);
127 retVal = rtl8367c_getAsicReg(RTL8367C_REG_METER32_RATE_CTRL0 + ((index-32) << 1) + 1, &regData2);
133 retVal = rtl8367c_getAsicRegBit(RTL8367C_REG_METER_IFG_CTRL2 + ((index-32) >> 4), RTL8367C_METER_IFG_OFFSET(index), pIfg);
143 * index - hared meter index (0-31)
154 ret_t rtl8367c_setAsicShareMeterBucketSize(rtk_uint32 index, rtk_uint32 lbthreshold)
157 if(index > RTL8367C_METERMAX)
160 if(index < 32)
161 return rtl8367c_setAsicReg(RTL8367C_METER_BUCKET_SIZE_REG(index), lbthreshold);
163 return rtl8367c_setAsicReg(RTL8367C_REG_METER32_BUCKET_SIZE + index - 32, lbthreshold);
170 * index - hared meter index (0-31)
181 ret_t rtl8367c_getAsicShareMeterBucketSize(rtk_uint32 index, rtk_uint32 *pLbthreshold)
183 if(index > RTL8367C_METERMAX)
186 if(index < 32)
187 return rtl8367c_getAsicReg(RTL8367C_METER_BUCKET_SIZE_REG(index), pLbthreshold);
189 return rtl8367c_getAsicReg(RTL8367C_REG_METER32_BUCKET_SIZE + index - 32, pLbthreshold);
197 * index - shared meter index (0-31)
208 ret_t rtl8367c_setAsicShareMeterType(rtk_uint32 index, rtk_uint32 type)
212 if(index > RTL8367C_METERMAX)
215 if(index < 32)
216 reg = RTL8367C_REG_METER_MODE_SETTING0 + (index / 16);
218 reg = RTL8367C_REG_METER_MODE_SETTING2 + ((index - 32) / 16);
219 return rtl8367c_setAsicRegBit(reg, index % 16, type);
227 * index - shared meter index (0-31)
237 ret_t rtl8367c_getAsicShareMeterType(rtk_uint32 index, rtk_uint32 *pType)
241 if(index > RTL8367C_METERMAX)
247 if(index < 32)
248 reg = RTL8367C_REG_METER_MODE_SETTING0 + (index / 16);
250 reg = RTL8367C_REG_METER_MODE_SETTING2 + ((index - 32) / 16);
251 return rtl8367c_getAsicRegBit(reg, index % 16, pType);
260 * index - hared meter index (0-31)
270 ret_t rtl8367c_setAsicMeterExceedStatus(rtk_uint32 index)
272 if(index > RTL8367C_METERMAX)
275 if(index < 32)
276 return rtl8367c_setAsicRegBit(RTL8367C_METER_OVERRATE_INDICATOR_REG(index), RTL8367C_METER_EXCEED_OFFSET(index), 1);
278 return rtl8367c_setAsicRegBit(RTL8367C_REG_METER_OVERRATE_INDICATOR2 + ((index - 32) >> 4), RTL8367C_METER_EXCEED_OFFSET(index), 1);
286 * index - hared meter index (0-31)
297 ret_t rtl8367c_getAsicMeterExceedStatus(rtk_uint32 index, rtk_uint32* pStatus)
299 if(index > RTL8367C_METERMAX)
302 if(index < 32)
303 return rtl8367c_getAsicRegBit(RTL8367C_METER_OVERRATE_INDICATOR_REG(index), RTL8367C_METER_EXCEED_OFFSET(index), pStatus);
305 return rtl8367c_getAsicRegBit(RTL8367C_REG_METER_OVERRATE_INDICATOR2 + ((index - 32) >> 4), RTL8367C_METER_EXCEED_OFFSET(index), pStatus);