Skip to content

Commit 6e6f472

Browse files
julianwiedmanndavem330
authored andcommitted
s390/qeth: clean up initial MTU determination
1. Drop the support for Token Ring, 2. use the ETH_DATA_LEN macro for the default L2 MTU, 3. handle OSM via the default case (as OSM is L2-only), and 4. document why the L3 MTU is reduced. Signed-off-by: Julian Wiedmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 83cf79a commit 6e6f472

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

drivers/s390/net/qeth_core_main.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,18 +2219,12 @@ static int qeth_get_initial_mtu_for_card(struct qeth_card *card)
22192219
case QETH_CARD_TYPE_IQD:
22202220
return card->info.max_mtu;
22212221
case QETH_CARD_TYPE_OSD:
2222-
switch (card->info.link_type) {
2223-
case QETH_LINK_TYPE_HSTR:
2224-
case QETH_LINK_TYPE_LANE_TR:
2225-
return 2000;
2226-
default:
2227-
return card->options.layer2 ? 1500 : 1492;
2228-
}
2229-
case QETH_CARD_TYPE_OSM:
22302222
case QETH_CARD_TYPE_OSX:
2231-
return card->options.layer2 ? 1500 : 1492;
2223+
if (!card->options.layer2)
2224+
return ETH_DATA_LEN - 8; /* L3: allow for LLC + SNAP */
2225+
/* fall through */
22322226
default:
2233-
return 1500;
2227+
return ETH_DATA_LEN;
22342228
}
22352229
}
22362230

0 commit comments

Comments
 (0)