Lines Matching defs:counter

1020 static t_Error BmiRxPortCheckAndGetCounterPtr(t_FmPort *p_FmPort, e_FmPortCounters counter, volatile uint32_t **p_Ptr)
1025 switch(counter)
1044 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter was not enabled"));
1047 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for Rx ports"));
1050 /* Set counter */
1051 switch(counter)
1092 RETURN_ERROR(MINOR, E_NOT_SUPPORTED, ("Requested counter is not available in rev1"));
1104 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for Rx ports"));
1110 static t_Error BmiTxPortCheckAndGetCounterPtr(t_FmPort *p_FmPort, e_FmPortCounters counter, volatile uint32_t **p_Ptr)
1115 switch(counter)
1130 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter was not enabled"));
1133 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for Tx ports"));
1136 /* Set counter */
1137 switch(counter)
1170 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for Tx ports"));
1176 static t_Error BmiOhPortCheckAndGetCounterPtr(t_FmPort *p_FmPort, e_FmPortCounters counter, volatile uint32_t **p_Ptr)
1181 switch(counter)
1197 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter was not enabled"));
1201 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for Host Command ports"));
1203 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter was not enabled"));
1206 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for O/H ports"));
1209 /* Set counter */
1210 switch(counter)
1239 RETURN_ERROR(MINOR, E_NOT_SUPPORTED, ("Requested counter is not available in rev1"));
1257 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for O/H ports"));
3864 uint32_t FM_PORT_GetCounter(t_Handle h_FmPort, e_FmPortCounters counter)
3873 switch(counter)
3878 /* check that counter is available for the port type */
3881 REPORT_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for Rx ports"));
3899 if(BmiRxPortCheckAndGetCounterPtr(p_FmPort, counter, &p_Reg))
3907 if(BmiTxPortCheckAndGetCounterPtr(p_FmPort, counter, &p_Reg))
3915 if(BmiOhPortCheckAndGetCounterPtr(p_FmPort, counter, &p_Reg))
3927 else /* QMI counter */
3933 REPORT_ERROR(MINOR, E_INVALID_STATE, ("Requested counter was not enabled"));
3937 /* Set counter */
3938 switch(counter)
3949 REPORT_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available"));
3957 t_Error FM_PORT_ModifyCounter(t_Handle h_FmPort, e_FmPortCounters counter, uint32_t value)
3966 switch(counter)
3971 /* check that counter is available for the port type */
3973 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for Rx ports"));
3988 if(BmiRxPortCheckAndGetCounterPtr(p_FmPort, counter, &p_Reg))
3993 if(BmiTxPortCheckAndGetCounterPtr(p_FmPort, counter, &p_Reg))
3998 if(BmiOhPortCheckAndGetCounterPtr(p_FmPort, counter, &p_Reg))
4006 else /* QMI counter */
4011 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter was not enabled"));
4013 /* Set counter */
4014 switch(counter)
4029 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available"));
4048 REPORT_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for non-Rx ports"));
4064 REPORT_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not enabled"));
4085 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not available for non-Rx ports"));
4102 RETURN_ERROR(MINOR, E_INVALID_STATE, ("Requested counter is not enabled"));