aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/hdlc_ppp.c14
-rw-r--r--drivers/net/wan/hdlc_x25.c16
-rw-r--r--drivers/net/wan/lapbether.c3
-rw-r--r--drivers/net/wan/sbni.c2
-rw-r--r--drivers/net/wan/x25_asy.c3
5 files changed, 18 insertions, 20 deletions
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c
index 055a918067e6..0d7645581f91 100644
--- a/drivers/net/wan/hdlc_ppp.c
+++ b/drivers/net/wan/hdlc_ppp.c
@@ -515,37 +515,37 @@ static int ppp_rx(struct sk_buff *skb)
515 switch (cp->code) { 515 switch (cp->code) {
516 case CP_CONF_REQ: 516 case CP_CONF_REQ:
517 ppp_cp_parse_cr(dev, pid, cp->id, len, skb->data); 517 ppp_cp_parse_cr(dev, pid, cp->id, len, skb->data);
518 goto out; 518 break;
519 519
520 case CP_CONF_ACK: 520 case CP_CONF_ACK:
521 if (cp->id == proto->cr_id) 521 if (cp->id == proto->cr_id)
522 ppp_cp_event(dev, pid, RCA, 0, 0, 0, NULL); 522 ppp_cp_event(dev, pid, RCA, 0, 0, 0, NULL);
523 goto out; 523 break;
524 524
525 case CP_CONF_REJ: 525 case CP_CONF_REJ:
526 case CP_CONF_NAK: 526 case CP_CONF_NAK:
527 if (cp->id == proto->cr_id) 527 if (cp->id == proto->cr_id)
528 ppp_cp_event(dev, pid, RCN, 0, 0, 0, NULL); 528 ppp_cp_event(dev, pid, RCN, 0, 0, 0, NULL);
529 goto out; 529 break;
530 530
531 case CP_TERM_REQ: 531 case CP_TERM_REQ:
532 ppp_cp_event(dev, pid, RTR, 0, cp->id, 0, NULL); 532 ppp_cp_event(dev, pid, RTR, 0, cp->id, 0, NULL);
533 goto out; 533 break;
534 534
535 case CP_TERM_ACK: 535 case CP_TERM_ACK:
536 ppp_cp_event(dev, pid, RTA, 0, 0, 0, NULL); 536 ppp_cp_event(dev, pid, RTA, 0, 0, 0, NULL);
537 goto out; 537 break;
538 538
539 case CP_CODE_REJ: 539 case CP_CODE_REJ:
540 ppp_cp_event(dev, pid, RXJ_BAD, 0, 0, 0, NULL); 540 ppp_cp_event(dev, pid, RXJ_BAD, 0, 0, 0, NULL);
541 goto out; 541 break;
542 542
543 default: 543 default:
544 len += sizeof(struct cp_header); 544 len += sizeof(struct cp_header);
545 if (len > dev->mtu) 545 if (len > dev->mtu)
546 len = dev->mtu; 546 len = dev->mtu;
547 ppp_cp_event(dev, pid, RUC, 0, 0, len, cp); 547 ppp_cp_event(dev, pid, RUC, 0, 0, len, cp);
548 goto out; 548 break;
549 } 549 }
550 goto out; 550 goto out;
551 551
diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
index 56aeb011cb3d..a49aec5efd20 100644
--- a/drivers/net/wan/hdlc_x25.c
+++ b/drivers/net/wan/hdlc_x25.c
@@ -134,15 +134,15 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev)
134 134
135static int x25_open(struct net_device *dev) 135static int x25_open(struct net_device *dev)
136{ 136{
137 struct lapb_register_struct cb;
138 int result; 137 int result;
139 138 static const struct lapb_register_struct cb = {
140 cb.connect_confirmation = x25_connected; 139 .connect_confirmation = x25_connected,
141 cb.connect_indication = x25_connected; 140 .connect_indication = x25_connected,
142 cb.disconnect_confirmation = x25_disconnected; 141 .disconnect_confirmation = x25_disconnected,
143 cb.disconnect_indication = x25_disconnected; 142 .disconnect_indication = x25_disconnected,
144 cb.data_indication = x25_data_indication; 143 .data_indication = x25_data_indication,
145 cb.data_transmit = x25_data_transmit; 144 .data_transmit = x25_data_transmit,
145 };
146 146
147 result = lapb_register(dev, &cb); 147 result = lapb_register(dev, &cb);
148 if (result != LAPB_OK) 148 if (result != LAPB_OK)
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index a817081737a0..7beeb9b88a3b 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -259,14 +259,13 @@ static int lapbeth_set_mac_address(struct net_device *dev, void *addr)
259} 259}
260 260
261 261
262static struct lapb_register_struct lapbeth_callbacks = { 262static const struct lapb_register_struct lapbeth_callbacks = {
263 .connect_confirmation = lapbeth_connected, 263 .connect_confirmation = lapbeth_connected,
264 .connect_indication = lapbeth_connected, 264 .connect_indication = lapbeth_connected,
265 .disconnect_confirmation = lapbeth_disconnected, 265 .disconnect_confirmation = lapbeth_disconnected,
266 .disconnect_indication = lapbeth_disconnected, 266 .disconnect_indication = lapbeth_disconnected,
267 .data_indication = lapbeth_data_indication, 267 .data_indication = lapbeth_data_indication,
268 .data_transmit = lapbeth_data_transmit, 268 .data_transmit = lapbeth_data_transmit,
269
270}; 269};
271 270
272/* 271/*
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index 86127bcc9f7a..783168cce077 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -212,7 +212,7 @@ static const struct net_device_ops sbni_netdev_ops = {
212 .ndo_open = sbni_open, 212 .ndo_open = sbni_open,
213 .ndo_stop = sbni_close, 213 .ndo_stop = sbni_close,
214 .ndo_start_xmit = sbni_start_xmit, 214 .ndo_start_xmit = sbni_start_xmit,
215 .ndo_set_multicast_list = set_multicast_list, 215 .ndo_set_rx_mode = set_multicast_list,
216 .ndo_do_ioctl = sbni_ioctl, 216 .ndo_do_ioctl = sbni_ioctl,
217 .ndo_change_mtu = eth_change_mtu, 217 .ndo_change_mtu = eth_change_mtu,
218 .ndo_set_mac_address = eth_mac_addr, 218 .ndo_set_mac_address = eth_mac_addr,
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 46ceb3ae9073..8a10bb730d5a 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -434,14 +434,13 @@ static void x25_asy_disconnected(struct net_device *dev, int reason)
434 netif_rx(skb); 434 netif_rx(skb);
435} 435}
436 436
437static struct lapb_register_struct x25_asy_callbacks = { 437static const struct lapb_register_struct x25_asy_callbacks = {
438 .connect_confirmation = x25_asy_connected, 438 .connect_confirmation = x25_asy_connected,
439 .connect_indication = x25_asy_connected, 439 .connect_indication = x25_asy_connected,
440 .disconnect_confirmation = x25_asy_disconnected, 440 .disconnect_confirmation = x25_asy_disconnected,
441 .disconnect_indication = x25_asy_disconnected, 441 .disconnect_indication = x25_asy_disconnected,
442 .data_indication = x25_asy_data_indication, 442 .data_indication = x25_asy_data_indication,
443 .data_transmit = x25_asy_data_transmit, 443 .data_transmit = x25_asy_data_transmit,
444
445}; 444};
446 445
447 446