Commit fe94e2e0 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller

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: default avatarUrsula Braun <ursula.braun@de.ibm.com>
Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 906f1f07
...@@ -643,7 +643,6 @@ struct qeth_card_options { ...@@ -643,7 +643,6 @@ struct qeth_card_options {
int macaddr_mode; int macaddr_mode;
int fake_broadcast; int fake_broadcast;
int add_hhlen; int add_hhlen;
int fake_ll;
int layer2; int layer2;
enum qeth_large_send_types large_send; enum qeth_large_send_types large_send;
int performance_stats; int performance_stats;
......
...@@ -1072,7 +1072,6 @@ static void qeth_set_intial_options(struct qeth_card *card) ...@@ -1072,7 +1072,6 @@ static void qeth_set_intial_options(struct qeth_card *card)
card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL; card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL;
card->options.fake_broadcast = 0; card->options.fake_broadcast = 0;
card->options.add_hhlen = DEFAULT_ADD_HHLEN; card->options.add_hhlen = DEFAULT_ADD_HHLEN;
card->options.fake_ll = 0;
card->options.performance_stats = 0; card->options.performance_stats = 0;
card->options.rx_sg_cb = QETH_RX_SG_CB; card->options.rx_sg_cb = QETH_RX_SG_CB;
} }
......
...@@ -1207,12 +1207,9 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card) ...@@ -1207,12 +1207,9 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card)
QETH_DBF_TEXT(TRACE, 3, "stsrcmac"); QETH_DBF_TEXT(TRACE, 3, "stsrcmac");
if (!card->options.fake_ll)
return -EOPNOTSUPP;
if (!qeth_is_supported(card, IPA_SOURCE_MAC)) { if (!qeth_is_supported(card, IPA_SOURCE_MAC)) {
dev_info(&card->gdev->dev, dev_info(&card->gdev->dev,
"Inbound source address not supported on %s\n", "Inbound source MAC-address not supported on %s\n",
QETH_CARD_IFNAME(card)); QETH_CARD_IFNAME(card));
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
...@@ -1221,7 +1218,7 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card) ...@@ -1221,7 +1218,7 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card)
IPA_CMD_ASS_START, 0); IPA_CMD_ASS_START, 0);
if (rc) if (rc)
dev_warn(&card->gdev->dev, dev_warn(&card->gdev->dev,
"Starting proxy ARP support for %s failed\n", "Starting source MAC-address support for %s failed\n",
QETH_CARD_IFNAME(card)); QETH_CARD_IFNAME(card));
return rc; return rc;
} }
...@@ -1921,8 +1918,13 @@ static inline __u16 qeth_l3_rebuild_skb(struct qeth_card *card, ...@@ -1921,8 +1918,13 @@ static inline __u16 qeth_l3_rebuild_skb(struct qeth_card *card,
memcpy(tg_addr, card->dev->dev_addr, memcpy(tg_addr, card->dev->dev_addr,
card->dev->addr_len); card->dev->addr_len);
} }
card->dev->header_ops->create(skb, card->dev, prot, tg_addr, if (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_SRC_MAC_ADDR)
"FAKELL", card->dev->addr_len); card->dev->header_ops->create(skb, card->dev, prot,
tg_addr, &hdr->hdr.l3.dest_addr[2],
card->dev->addr_len);
else
card->dev->header_ops->create(skb, card->dev, prot,
tg_addr, "FAKELL", card->dev->addr_len);
} }
#ifdef CONFIG_TR #ifdef CONFIG_TR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment