diff options
author | Ursula Braun <ursula.braun@de.ibm.com> | 2009-01-04 20:34:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-04 20:34:52 -0500 |
commit | fe94e2e0a63a49d23753f56eacb446c4f73c1dea (patch) | |
tree | 6c337b142af1eefef4d2b63f6ef7868503308822 /drivers/s390/net | |
parent | 906f1f0768c736368244ac8fe6023c2b0c31b9ea (diff) |
qeth: exploit source MAC address for inbound layer3 packets
OSA-devices operating in layer3 mode offer adding of the source MAC
address to the QDIO header of inbound packets. The qeth driver can
exploit this functionality to replace FAKELL-entries in the ethernet
header of received packets.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@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.h | 1 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 1 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 16 |
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index d5ccce1643e4..e0c45574b0c8 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h | |||
@@ -643,7 +643,6 @@ struct qeth_card_options { | |||
643 | int macaddr_mode; | 643 | int macaddr_mode; |
644 | int fake_broadcast; | 644 | int fake_broadcast; |
645 | int add_hhlen; | 645 | int add_hhlen; |
646 | int fake_ll; | ||
647 | int layer2; | 646 | int layer2; |
648 | enum qeth_large_send_types large_send; | 647 | enum qeth_large_send_types large_send; |
649 | int performance_stats; | 648 | int performance_stats; |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index ef6c225227cb..89867bc43f7a 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -1072,7 +1072,6 @@ static void qeth_set_intial_options(struct qeth_card *card) | |||
1072 | card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL; | 1072 | card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL; |
1073 | card->options.fake_broadcast = 0; | 1073 | card->options.fake_broadcast = 0; |
1074 | card->options.add_hhlen = DEFAULT_ADD_HHLEN; | 1074 | card->options.add_hhlen = DEFAULT_ADD_HHLEN; |
1075 | card->options.fake_ll = 0; | ||
1076 | card->options.performance_stats = 0; | 1075 | card->options.performance_stats = 0; |
1077 | card->options.rx_sg_cb = QETH_RX_SG_CB; | 1076 | card->options.rx_sg_cb = QETH_RX_SG_CB; |
1078 | } | 1077 | } |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index c0b30b25a5f1..cdd6ab9c894d 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -1207,12 +1207,9 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card) | |||
1207 | 1207 | ||
1208 | QETH_DBF_TEXT(TRACE, 3, "stsrcmac"); | 1208 | QETH_DBF_TEXT(TRACE, 3, "stsrcmac"); |
1209 | 1209 | ||
1210 | if (!card->options.fake_ll) | ||
1211 | return -EOPNOTSUPP; | ||
1212 | |||
1213 | if (!qeth_is_supported(card, IPA_SOURCE_MAC)) { | 1210 | if (!qeth_is_supported(card, IPA_SOURCE_MAC)) { |
1214 | dev_info(&card->gdev->dev, | 1211 | dev_info(&card->gdev->dev, |
1215 | "Inbound source address not supported on %s\n", | 1212 | "Inbound source MAC-address not supported on %s\n", |
1216 | QETH_CARD_IFNAME(card)); | 1213 | QETH_CARD_IFNAME(card)); |
1217 | return -EOPNOTSUPP; | 1214 | return -EOPNOTSUPP; |
1218 | } | 1215 | } |
@@ -1221,7 +1218,7 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card) | |||
1221 | IPA_CMD_ASS_START, 0); | 1218 | IPA_CMD_ASS_START, 0); |
1222 | if (rc) | 1219 | if (rc) |
1223 | dev_warn(&card->gdev->dev, | 1220 | dev_warn(&card->gdev->dev, |
1224 | "Starting proxy ARP support for %s failed\n", | 1221 | "Starting source MAC-address support for %s failed\n", |
1225 | QETH_CARD_IFNAME(card)); | 1222 | QETH_CARD_IFNAME(card)); |
1226 | return rc; | 1223 | return rc; |
1227 | } | 1224 | } |
@@ -1921,8 +1918,13 @@ static inline __u16 qeth_l3_rebuild_skb(struct qeth_card *card, | |||
1921 | memcpy(tg_addr, card->dev->dev_addr, | 1918 | memcpy(tg_addr, card->dev->dev_addr, |
1922 | card->dev->addr_len); | 1919 | card->dev->addr_len); |
1923 | } | 1920 | } |
1924 | card->dev->header_ops->create(skb, card->dev, prot, tg_addr, | 1921 | if (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_SRC_MAC_ADDR) |
1925 | "FAKELL", card->dev->addr_len); | 1922 | card->dev->header_ops->create(skb, card->dev, prot, |
1923 | tg_addr, &hdr->hdr.l3.dest_addr[2], | ||
1924 | card->dev->addr_len); | ||
1925 | else | ||
1926 | card->dev->header_ops->create(skb, card->dev, prot, | ||
1927 | tg_addr, "FAKELL", card->dev->addr_len); | ||
1926 | } | 1928 | } |
1927 | 1929 | ||
1928 | #ifdef CONFIG_TR | 1930 | #ifdef CONFIG_TR |