if (!(skb = qeth_get_skb(skb_len + QETH_FAKE_LL_LEN))) goto no_mem; skb_pull(skb, QETH_FAKE_LL_LEN); 
if(card->dev->type == ARPHRD_IEEE802_TR){ if (!(skb = qeth_get_skb(skb_len+QETH_FAKE_LL_LEN_TR))) goto no_mem; skb_reserve(skb,QETH_FAKE_LL_LEN_TR); } else { if (!(skb = qeth_get_skb(skb_len+QETH_FAKE_LL_LEN_ETH))) goto no_mem; skb_reserve(skb,QETH_FAKE_LL_LEN_ETH); } 
qeth_get_next_skb(struct qeth_card *card, struct qdio_buffer *buffer,		  struct qdio_buffer_element **__element, int *__offset,		  struct qeth_hdr **hdr){	struct qdio_buffer_element *element = *__element;	int offset = *__offset;	struct sk_buff *skb = NULL;	int skb_len;	void *data_ptr;	int data_len;	QETH_DBF_TEXT(trace,6,"nextskb");	/* qeth_hdr must not cross element boundaries */	if (element->length < offset + sizeof(struct qeth_hdr)){		if (qeth_is_last_sbale(element))			return NULL;		element++;		offset = 0;		if (element->length < sizeof(struct qeth_hdr))			return NULL;	}	*hdr = element->addr + offset;	offset += sizeof(struct qeth_hdr);	if (card->options.layer2)		skb_len = (*hdr)->hdr.l2.pkt_length;	else		skb_len = (*hdr)->hdr.l3.length;	if (!skb_len)		return NULL;	if (card->options.fake_ll){		if (!(skb = qeth_get_skb(skb_len + QETH_FAKE_LL_LEN)))			goto no_mem;		skb_pull(skb, QETH_FAKE_LL_LEN);	} else if (!(skb = qeth_get_skb(skb_len)))		goto no_mem;	data_ptr = element->addr + offset;	while (skb_len) {		data_len = min(skb_len, (int)(element->length - offset));		if (data_len)			memcpy(skb_put(skb, data_len), data_ptr, data_len);		skb_len -= data_len;		if (skb_len){			if (qeth_is_last_sbale(element)){				QETH_DBF_TEXT(trace,4,"unexeob");				QETH_DBF_TEXT_(trace,4,"%s",CARD_BUS_ID(card));				QETH_DBF_TEXT(qerr,2,"unexeob");				QETH_DBF_TEXT_(qerr,2,"%s",CARD_BUS_ID(card));				QETH_DBF_HEX(misc,4,buffer,sizeof(*buffer));				dev_kfree_skb_any(skb);				card->stats.rx_errors++;				return NULL;			}			element++;			offset = 0;			data_ptr = element->addr;		} else {			offset += data_len;		}	}	*__element = element;	*__offset = offset;	return skb;no_mem:	if (net_ratelimit()){		PRINT_WARN("No memory for packet received on %s.\n",			   QETH_CARD_IFNAME(card));		QETH_DBF_TEXT(trace,2,"noskbmem");		QETH_DBF_TEXT_(trace,2,"%s",CARD_BUS_ID(card));	}	card->stats.rx_dropped++;	return NULL;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e23dd9cdd676323c95fab47dc55123ba18f7e1ff/qeth_main.c/clean/drivers/s390/net/qeth_main.c