diff options
author | andrew hendry <andrew.hendry@gmail.com> | 2010-04-19 09:29:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-22 19:12:49 -0400 |
commit | 7eeeacf0b5b8c0a0badced506388c02b9422d508 (patch) | |
tree | fb22a569e4f1be514106f1989a3ffb592f1ad3da /drivers/net/wan/x25_asy.c | |
parent | 4150bbf3388eba2c9d2cb7a345134e363cc6e34f (diff) |
X25: Use identifiers for x25 async device to x25 interface
Change magic numbers to identifiers for X25 interface.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/x25_asy.c')
-rw-r--r-- | drivers/net/wan/x25_asy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 80d5c5834a0b..166e77dfffda 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -29,12 +29,12 @@ | |||
29 | #include <linux/etherdevice.h> | 29 | #include <linux/etherdevice.h> |
30 | #include <linux/skbuff.h> | 30 | #include <linux/skbuff.h> |
31 | #include <linux/if_arp.h> | 31 | #include <linux/if_arp.h> |
32 | #include <linux/x25.h> | ||
33 | #include <linux/lapb.h> | 32 | #include <linux/lapb.h> |
34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
35 | #include <linux/rtnetlink.h> | 34 | #include <linux/rtnetlink.h> |
36 | #include <linux/compat.h> | 35 | #include <linux/compat.h> |
37 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <net/x25device.h> | ||
38 | #include "x25_asy.h" | 38 | #include "x25_asy.h" |
39 | 39 | ||
40 | #include <net/x25device.h> | 40 | #include <net/x25device.h> |
@@ -315,15 +315,15 @@ static netdev_tx_t x25_asy_xmit(struct sk_buff *skb, | |||
315 | } | 315 | } |
316 | 316 | ||
317 | switch (skb->data[0]) { | 317 | switch (skb->data[0]) { |
318 | case 0x00: | 318 | case X25_IFACE_DATA: |
319 | break; | 319 | break; |
320 | case 0x01: /* Connection request .. do nothing */ | 320 | case X25_IFACE_CONNECT: /* Connection request .. do nothing */ |
321 | err = lapb_connect_request(dev); | 321 | err = lapb_connect_request(dev); |
322 | if (err != LAPB_OK) | 322 | if (err != LAPB_OK) |
323 | printk(KERN_ERR "x25_asy: lapb_connect_request error - %d\n", err); | 323 | printk(KERN_ERR "x25_asy: lapb_connect_request error - %d\n", err); |
324 | kfree_skb(skb); | 324 | kfree_skb(skb); |
325 | return NETDEV_TX_OK; | 325 | return NETDEV_TX_OK; |
326 | case 0x02: /* Disconnect request .. do nothing - hang up ?? */ | 326 | case X25_IFACE_DISCONNECT: /* do nothing - hang up ?? */ |
327 | err = lapb_disconnect_request(dev); | 327 | err = lapb_disconnect_request(dev); |
328 | if (err != LAPB_OK) | 328 | if (err != LAPB_OK) |
329 | printk(KERN_ERR "x25_asy: lapb_disconnect_request error - %d\n", err); | 329 | printk(KERN_ERR "x25_asy: lapb_disconnect_request error - %d\n", err); |
@@ -411,7 +411,7 @@ static void x25_asy_connected(struct net_device *dev, int reason) | |||
411 | } | 411 | } |
412 | 412 | ||
413 | ptr = skb_put(skb, 1); | 413 | ptr = skb_put(skb, 1); |
414 | *ptr = 0x01; | 414 | *ptr = X25_IFACE_CONNECT; |
415 | 415 | ||
416 | skb->protocol = x25_type_trans(skb, sl->dev); | 416 | skb->protocol = x25_type_trans(skb, sl->dev); |
417 | netif_rx(skb); | 417 | netif_rx(skb); |
@@ -430,7 +430,7 @@ static void x25_asy_disconnected(struct net_device *dev, int reason) | |||
430 | } | 430 | } |
431 | 431 | ||
432 | ptr = skb_put(skb, 1); | 432 | ptr = skb_put(skb, 1); |
433 | *ptr = 0x02; | 433 | *ptr = X25_IFACE_DISCONNECT; |
434 | 434 | ||
435 | skb->protocol = x25_type_trans(skb, sl->dev); | 435 | skb->protocol = x25_type_trans(skb, sl->dev); |
436 | netif_rx(skb); | 436 | netif_rx(skb); |