aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net
diff options
context:
space:
mode:
authorFrank Blaschka <frank.blaschka@de.ibm.com>2010-03-08 15:36:54 -0500
committerDavid S. Miller <davem@davemloft.net>2010-03-10 10:32:25 -0500
commit21fde749cbf71d03e8cf87a7a9a45349597e138a (patch)
treeffa1ff4a346a9b94b0013d7b45839a82f124e407 /drivers/s390/net
parentfe7a26257a4191de6047f7e1d38832472eb22f85 (diff)
qeth: l3 send dhcp in non pass thru mode
dhcp frames are valid IPv4 packets so there is no need to send them in pass thru mode. This allows dhcp packets to pass HiperSockets. Also the dhcp release frame is send out correctly with this patch. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net')
-rw-r--r--drivers/s390/net/qeth_core.h3
-rw-r--r--drivers/s390/net/qeth_l3_main.c10
2 files changed, 6 insertions, 7 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index a3ac4456e0b1..fcd005aad989 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -763,7 +763,8 @@ static inline int qeth_get_micros(void)
763 763
764static inline int qeth_get_ip_version(struct sk_buff *skb) 764static inline int qeth_get_ip_version(struct sk_buff *skb)
765{ 765{
766 switch (skb->protocol) { 766 struct ethhdr *ehdr = (struct ethhdr *)skb->data;
767 switch (ehdr->h_proto) {
767 case ETH_P_IPV6: 768 case ETH_P_IPV6:
768 return 6; 769 return 6;
769 case ETH_P_IP: 770 case ETH_P_IP:
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 5475834ab916..42fe92c08c29 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -2900,10 +2900,8 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
2900 int data_offset = -1; 2900 int data_offset = -1;
2901 int nr_frags; 2901 int nr_frags;
2902 2902
2903 if ((card->info.type == QETH_CARD_TYPE_IQD) && 2903 if (((card->info.type == QETH_CARD_TYPE_IQD) && (!ipv)) ||
2904 (((skb->protocol != htons(ETH_P_IPV6)) && 2904 card->options.sniffer)
2905 (skb->protocol != htons(ETH_P_IP))) ||
2906 card->options.sniffer))
2907 goto tx_drop; 2905 goto tx_drop;
2908 2906
2909 if ((card->state != CARD_STATE_UP) || !card->lan_online) { 2907 if ((card->state != CARD_STATE_UP) || !card->lan_online) {
@@ -2949,14 +2947,14 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
2949 if (data_offset < 0) 2947 if (data_offset < 0)
2950 skb_pull(new_skb, ETH_HLEN); 2948 skb_pull(new_skb, ETH_HLEN);
2951 } else { 2949 } else {
2952 if (new_skb->protocol == htons(ETH_P_IP)) { 2950 if (ipv == 4) {
2953 if (card->dev->type == ARPHRD_IEEE802_TR) 2951 if (card->dev->type == ARPHRD_IEEE802_TR)
2954 skb_pull(new_skb, TR_HLEN); 2952 skb_pull(new_skb, TR_HLEN);
2955 else 2953 else
2956 skb_pull(new_skb, ETH_HLEN); 2954 skb_pull(new_skb, ETH_HLEN);
2957 } 2955 }
2958 2956
2959 if (new_skb->protocol == ETH_P_IPV6 && card->vlangrp && 2957 if (ipv == 6 && card->vlangrp &&
2960 vlan_tx_tag_present(new_skb)) { 2958 vlan_tx_tag_present(new_skb)) {
2961 skb_push(new_skb, VLAN_HLEN); 2959 skb_push(new_skb, VLAN_HLEN);
2962 skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4); 2960 skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4);