提交 95c78c8b 编写于 作者: F Frank Blaschka 提交者: Jeff Garzik

s390: qeth driver fixes: VLAN hdr, perf stats

From: Ursula Braun <braunu@de.ibm.com>
        - VLAN header reordering did not work on packets
          received through qeth interface in layer 2 mode.
          This caused dhcpcd not to work with VLAN devices.
	- set qeth performance statistics initally inactive
Signed-off-by: NFrank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 f35723ec
...@@ -1074,7 +1074,7 @@ qeth_set_intial_options(struct qeth_card *card) ...@@ -1074,7 +1074,7 @@ qeth_set_intial_options(struct qeth_card *card)
card->options.layer2 = 1; card->options.layer2 = 1;
else else
card->options.layer2 = 0; card->options.layer2 = 0;
card->options.performance_stats = 1; card->options.performance_stats = 0;
} }
/** /**
...@@ -2466,32 +2466,17 @@ qeth_rebuild_skb_fake_ll(struct qeth_card *card, struct sk_buff *skb, ...@@ -2466,32 +2466,17 @@ qeth_rebuild_skb_fake_ll(struct qeth_card *card, struct sk_buff *skb,
qeth_rebuild_skb_fake_ll_eth(card, skb, hdr); qeth_rebuild_skb_fake_ll_eth(card, skb, hdr);
} }
static inline __u16 static inline void
qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb,
struct qeth_hdr *hdr) struct qeth_hdr *hdr)
{ {
unsigned short vlan_id = 0;
#ifdef CONFIG_QETH_VLAN
struct vlan_hdr *vhdr;
#endif
skb->pkt_type = PACKET_HOST; skb->pkt_type = PACKET_HOST;
skb->protocol = qeth_type_trans(skb, skb->dev); skb->protocol = qeth_type_trans(skb, skb->dev);
if (card->options.checksum_type == NO_CHECKSUMMING) if (card->options.checksum_type == NO_CHECKSUMMING)
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
else else
skb->ip_summed = CHECKSUM_NONE; skb->ip_summed = CHECKSUM_NONE;
#ifdef CONFIG_QETH_VLAN
if (hdr->hdr.l2.flags[2] & (QETH_LAYER2_FLAG_VLAN)) {
vhdr = (struct vlan_hdr *) skb->data;
skb->protocol =
__constant_htons(vhdr->h_vlan_encapsulated_proto);
vlan_id = hdr->hdr.l2.vlan_id;
skb_pull(skb, VLAN_HLEN);
}
#endif
*((__u32 *)skb->cb) = ++card->seqno.pkt_seqno; *((__u32 *)skb->cb) = ++card->seqno.pkt_seqno;
return vlan_id;
} }
static inline __u16 static inline __u16
...@@ -2570,7 +2555,7 @@ qeth_process_inbound_buffer(struct qeth_card *card, ...@@ -2570,7 +2555,7 @@ qeth_process_inbound_buffer(struct qeth_card *card,
&offset, &hdr))) { &offset, &hdr))) {
skb->dev = card->dev; skb->dev = card->dev;
if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2)
vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); qeth_layer2_rebuild_skb(card, skb, hdr);
else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3)
vlan_tag = qeth_rebuild_skb(card, skb, hdr); vlan_tag = qeth_rebuild_skb(card, skb, hdr);
else { /*in case of OSN*/ else { /*in case of OSN*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册