#ifndef CONFIG_2BUFF_MODE sp->stats.rx_bytes += len; #else sp->stats.rx_bytes += buf0_len + buf2_len; #endif 
if (sp->rxd_mode == RXD_MODE_1) { int len = RXD_GET_BUFFER0_SIZE_1(rxdp->Control_2); 
static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp){	nic_t *sp = ring_data->nic;	struct net_device *dev = (struct net_device *) sp->dev;	struct sk_buff *skb = (struct sk_buff *)		((unsigned long) rxdp->Host_Control);	int ring_no = ring_data->ring_no;	u16 l3_csum, l4_csum;#ifdef CONFIG_2BUFF_MODE	int buf0_len = RXD_GET_BUFFER0_SIZE(rxdp->Control_2);	int buf2_len = RXD_GET_BUFFER2_SIZE(rxdp->Control_2);	int get_block = ring_data->rx_curr_get_info.block_index;	int get_off = ring_data->rx_curr_get_info.offset;	buffAdd_t *ba = &ring_data->ba[get_block][get_off];	unsigned char *buff;#else	u16 len = (u16) ((RXD_GET_BUFFER0_SIZE(rxdp->Control_2)) >> 48);;#endif	skb->dev = dev;	if (rxdp->Control_1 & RXD_T_CODE) {		unsigned long long err = rxdp->Control_1 & RXD_T_CODE;		DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n",			  dev->name, err);		dev_kfree_skb(skb);		sp->stats.rx_crc_errors++;		atomic_dec(&sp->rx_bufs_left[ring_no]);		rxdp->Host_Control = 0;		return 0;	}	/* Updating statistics */	rxdp->Host_Control = 0;	sp->rx_pkt_count++;	sp->stats.rx_packets++;#ifndef CONFIG_2BUFF_MODE	sp->stats.rx_bytes += len;#else	sp->stats.rx_bytes += buf0_len + buf2_len;#endif#ifndef CONFIG_2BUFF_MODE	skb_put(skb, len);#else	buff = skb_push(skb, buf0_len);	memcpy(buff, ba->ba_0, buf0_len);	skb_put(skb, buf2_len);#endif	if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) &&	    (sp->rx_csum)) {		l3_csum = RXD_GET_L3_CKSUM(rxdp->Control_1);		l4_csum = RXD_GET_L4_CKSUM(rxdp->Control_1);		if ((l3_csum == L3_CKSUM_OK) && (l4_csum == L4_CKSUM_OK)) {			/*			 * NIC verifies if the Checksum of the received			 * frame is Ok or not and accordingly returns			 * a flag in the RxD.			 */			skb->ip_summed = CHECKSUM_UNNECESSARY;		} else {			/*			 * Packet with erroneous checksum, let the			 * upper layers deal with it.			 */			skb->ip_summed = CHECKSUM_NONE;		}	} else {		skb->ip_summed = CHECKSUM_NONE;	}	skb->protocol = eth_type_trans(skb, dev);#ifdef CONFIG_S2IO_NAPI	if (sp->vlgrp && RXD_GET_VLAN_TAG(rxdp->Control_2)) {		/* Queueing the vlan frame to the upper layer */		vlan_hwaccel_receive_skb(skb, sp->vlgrp,			RXD_GET_VLAN_TAG(rxdp->Control_2));	} else {		netif_receive_skb(skb);	}#else	if (sp->vlgrp && RXD_GET_VLAN_TAG(rxdp->Control_2)) {		/* Queueing the vlan frame to the upper layer */		vlan_hwaccel_rx(skb, sp->vlgrp,			RXD_GET_VLAN_TAG(rxdp->Control_2));	} else {		netif_rx(skb);	}#endif	dev->last_rx = jiffies;	atomic_dec(&sp->rx_bufs_left[ring_no]);	return SUCCESS;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/da6971d8ece2ec9762509e20dda6808335b5a10b/s2io.c/clean/drivers/net/s2io.c