/* Called after some received data has been read. It returns RX credits to the HW for the amount of data processed.  */
void cxgb3i_c3cn_rx_credits(struct s3_conn *c3cn, int copied)
/* Called after some received data has been read. It returns RX credits to the HW for the amount of data processed.  */
void cxgb3i_c3cn_rx_credits(struct s3_conn *c3cn, int copied)
{
	struct t3cdev *cdev;
	int must_send;
	u32 credits, dack = 0;
	if (c3cn->state != C3CN_STATE_ESTABLISHED)
		return;
	credits = c3cn->copied_seq - c3cn->rcv_wup;
	if (unlikely(!credits))
		return;
	cdev = c3cn->cdev;
	if (unlikely(cxgb3_rx_credit_thres == 0))
		return;
	dack = F_RX_DACK_CHANGE | V_RX_DACK_MODE(1);
	must_send = credits + 16384 >= cxgb3_rcv_win;
	if (must_send || credits >= cxgb3_rx_credit_thres)
		c3cn->rcv_wup += send_rx_credits(c3cn, credits, dack);
}