aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorandrew hendry <andrew.hendry@gmail.com>2010-04-19 09:30:24 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-22 19:12:51 -0400
commit90b3e030370dba721e141e85661881f5e342e1ab (patch)
treedbc6e7da77bc50ac6b931b31e9325742e75410f4 /drivers/net/wan
parent5d74731437b8c8914d2d2956c497c66af3bd6a52 (diff)
X25: Use identifiers for hdlc x25 device to x25 interface
Change magic numbers to identifiers for X25 interface. Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com> Acked-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/hdlc_x25.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
index c7adbb79f7cc..70527e5a54a2 100644
--- a/drivers/net/wan/hdlc_x25.c
+++ b/drivers/net/wan/hdlc_x25.c
@@ -49,14 +49,14 @@ static void x25_connect_disconnect(struct net_device *dev, int reason, int code)
49 49
50static void x25_connected(struct net_device *dev, int reason) 50static void x25_connected(struct net_device *dev, int reason)
51{ 51{
52 x25_connect_disconnect(dev, reason, 1); 52 x25_connect_disconnect(dev, reason, X25_IFACE_CONNECT);
53} 53}
54 54
55 55
56 56
57static void x25_disconnected(struct net_device *dev, int reason) 57static void x25_disconnected(struct net_device *dev, int reason)
58{ 58{
59 x25_connect_disconnect(dev, reason, 2); 59 x25_connect_disconnect(dev, reason, X25_IFACE_DISCONNECT);
60} 60}
61 61
62 62
@@ -71,7 +71,7 @@ static int x25_data_indication(struct net_device *dev, struct sk_buff *skb)
71 return NET_RX_DROP; 71 return NET_RX_DROP;
72 72
73 ptr = skb->data; 73 ptr = skb->data;
74 *ptr = 0; 74 *ptr = X25_IFACE_DATA;
75 75
76 skb->protocol = x25_type_trans(skb, dev); 76 skb->protocol = x25_type_trans(skb, dev);
77 return netif_rx(skb); 77 return netif_rx(skb);
@@ -94,13 +94,13 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev)
94 94
95 /* X.25 to LAPB */ 95 /* X.25 to LAPB */
96 switch (skb->data[0]) { 96 switch (skb->data[0]) {
97 case 0: /* Data to be transmitted */ 97 case X25_IFACE_DATA: /* Data to be transmitted */
98 skb_pull(skb, 1); 98 skb_pull(skb, 1);
99 if ((result = lapb_data_request(dev, skb)) != LAPB_OK) 99 if ((result = lapb_data_request(dev, skb)) != LAPB_OK)
100 dev_kfree_skb(skb); 100 dev_kfree_skb(skb);
101 return NETDEV_TX_OK; 101 return NETDEV_TX_OK;
102 102
103 case 1: 103 case X25_IFACE_CONNECT:
104 if ((result = lapb_connect_request(dev))!= LAPB_OK) { 104 if ((result = lapb_connect_request(dev))!= LAPB_OK) {
105 if (result == LAPB_CONNECTED) 105 if (result == LAPB_CONNECTED)
106 /* Send connect confirm. msg to level 3 */ 106 /* Send connect confirm. msg to level 3 */
@@ -112,7 +112,7 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev)
112 } 112 }
113 break; 113 break;
114 114
115 case 2: 115 case X25_IFACE_DISCONNECT:
116 if ((result = lapb_disconnect_request(dev)) != LAPB_OK) { 116 if ((result = lapb_disconnect_request(dev)) != LAPB_OK) {
117 if (result == LAPB_NOTCONNECTED) 117 if (result == LAPB_NOTCONNECTED)
118 /* Send disconnect confirm. msg to level 3 */ 118 /* Send disconnect confirm. msg to level 3 */