aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net')
-rw-r--r--drivers/s390/net/ctcm_main.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
index 2678573becec..8f2a888d0a0a 100644
--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -1099,12 +1099,24 @@ static void ctcm_free_netdevice(struct net_device *dev)
1099 1099
1100struct mpc_group *ctcmpc_init_mpc_group(struct ctcm_priv *priv); 1100struct mpc_group *ctcmpc_init_mpc_group(struct ctcm_priv *priv);
1101 1101
1102static const struct net_device_ops ctcm_netdev_ops = {
1103 .ndo_open = ctcm_open,
1104 .ndo_stop = ctcm_close,
1105 .ndo_get_stats = ctcm_stats,
1106 .ndo_change_mtu = ctcm_change_mtu,
1107 .ndo_start_xmit = ctcm_tx,
1108};
1109
1110static const struct net_device_ops ctcm_mpc_netdev_ops = {
1111 .ndo_open = ctcm_open,
1112 .ndo_stop = ctcm_close,
1113 .ndo_get_stats = ctcm_stats,
1114 .ndo_change_mtu = ctcm_change_mtu,
1115 .ndo_start_xmit = ctcmpc_tx,
1116};
1117
1102void static ctcm_dev_setup(struct net_device *dev) 1118void static ctcm_dev_setup(struct net_device *dev)
1103{ 1119{
1104 dev->open = ctcm_open;
1105 dev->stop = ctcm_close;
1106 dev->get_stats = ctcm_stats;
1107 dev->change_mtu = ctcm_change_mtu;
1108 dev->type = ARPHRD_SLIP; 1120 dev->type = ARPHRD_SLIP;
1109 dev->tx_queue_len = 100; 1121 dev->tx_queue_len = 100;
1110 dev->flags = IFF_POINTOPOINT | IFF_NOARP; 1122 dev->flags = IFF_POINTOPOINT | IFF_NOARP;
@@ -1157,12 +1169,12 @@ static struct net_device *ctcm_init_netdevice(struct ctcm_priv *priv)
1157 dev->mtu = MPC_BUFSIZE_DEFAULT - 1169 dev->mtu = MPC_BUFSIZE_DEFAULT -
1158 TH_HEADER_LENGTH - PDU_HEADER_LENGTH; 1170 TH_HEADER_LENGTH - PDU_HEADER_LENGTH;
1159 1171
1160 dev->hard_start_xmit = ctcmpc_tx; 1172 dev->netdev_ops = &ctcm_mpc_netdev_ops;
1161 dev->hard_header_len = TH_HEADER_LENGTH + PDU_HEADER_LENGTH; 1173 dev->hard_header_len = TH_HEADER_LENGTH + PDU_HEADER_LENGTH;
1162 priv->buffer_size = MPC_BUFSIZE_DEFAULT; 1174 priv->buffer_size = MPC_BUFSIZE_DEFAULT;
1163 } else { 1175 } else {
1164 dev->mtu = CTCM_BUFSIZE_DEFAULT - LL_HEADER_LENGTH - 2; 1176 dev->mtu = CTCM_BUFSIZE_DEFAULT - LL_HEADER_LENGTH - 2;
1165 dev->hard_start_xmit = ctcm_tx; 1177 dev->netdev_ops = &ctcm_netdev_ops;
1166 dev->hard_header_len = LL_HEADER_LENGTH + 2; 1178 dev->hard_header_len = LL_HEADER_LENGTH + 2;
1167 } 1179 }
1168 1180