static int netbk_count_requests(struct xenvif *vif,
                                struct xen_netif_tx_request *first,
-                               RING_IDX first_idx,
                                struct xen_netif_tx_request *txp,
                                int work_to_do)
 {
        } while ((txp++)->flags & XEN_NETTXF_more_data);
 
        if (drop_err) {
-               netbk_tx_err(vif, first, first_idx + slots);
+               netbk_tx_err(vif, first, cons + slots);
                return drop_err;
        }
 
                                continue;
                }
 
-               ret = netbk_count_requests(vif, &txreq, idx,
-                                          txfrags, work_to_do);
+               ret = netbk_count_requests(vif, &txreq, txfrags, work_to_do);
                if (unlikely(ret < 0))
                        continue;