aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/lapbether.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-05-21 18:31:36 -0400
committerNeilBrown <neilb@suse.de>2010-05-21 18:31:36 -0400
commit19fdb9eefb21b72edbc365b838502780c392bad6 (patch)
treedeae04c48532d6eab64ed4b0396737bb854b5506 /drivers/net/wan/lapbether.c
parentbe6800a73aa2f3dc14744c3b80e676d189789f04 (diff)
parent3ff195b011d7decf501a4d55aeed312731094796 (diff)
Merge commit '3ff195b011d7decf501a4d55aeed312731094796' into for-linus
Conflicts: drivers/md/md.c - Resolved conflict in md_update_sb - Added extra 'NULL' arg to new instance of sysfs_get_dirent. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/net/wan/lapbether.c')
-rw-r--r--drivers/net/wan/lapbether.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index d1e3c673e9b2..4d4dc38c7290 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -24,6 +24,7 @@
24#include <linux/types.h> 24#include <linux/types.h>
25#include <linux/socket.h> 25#include <linux/socket.h>
26#include <linux/in.h> 26#include <linux/in.h>
27#include <linux/slab.h>
27#include <linux/kernel.h> 28#include <linux/kernel.h>
28#include <linux/string.h> 29#include <linux/string.h>
29#include <linux/net.h> 30#include <linux/net.h>
@@ -138,7 +139,7 @@ static int lapbeth_data_indication(struct net_device *dev, struct sk_buff *skb)
138 return NET_RX_DROP; 139 return NET_RX_DROP;
139 140
140 ptr = skb->data; 141 ptr = skb->data;
141 *ptr = 0x00; 142 *ptr = X25_IFACE_DATA;
142 143
143 skb->protocol = x25_type_trans(skb, dev); 144 skb->protocol = x25_type_trans(skb, dev);
144 return netif_rx(skb); 145 return netif_rx(skb);
@@ -160,14 +161,14 @@ static netdev_tx_t lapbeth_xmit(struct sk_buff *skb,
160 goto drop; 161 goto drop;
161 162
162 switch (skb->data[0]) { 163 switch (skb->data[0]) {
163 case 0x00: 164 case X25_IFACE_DATA:
164 break; 165 break;
165 case 0x01: 166 case X25_IFACE_CONNECT:
166 if ((err = lapb_connect_request(dev)) != LAPB_OK) 167 if ((err = lapb_connect_request(dev)) != LAPB_OK)
167 printk(KERN_ERR "lapbeth: lapb_connect_request " 168 printk(KERN_ERR "lapbeth: lapb_connect_request "
168 "error: %d\n", err); 169 "error: %d\n", err);
169 goto drop; 170 goto drop;
170 case 0x02: 171 case X25_IFACE_DISCONNECT:
171 if ((err = lapb_disconnect_request(dev)) != LAPB_OK) 172 if ((err = lapb_disconnect_request(dev)) != LAPB_OK)
172 printk(KERN_ERR "lapbeth: lapb_disconnect_request " 173 printk(KERN_ERR "lapbeth: lapb_disconnect_request "
173 "err: %d\n", err); 174 "err: %d\n", err);
@@ -224,7 +225,7 @@ static void lapbeth_connected(struct net_device *dev, int reason)
224 } 225 }
225 226
226 ptr = skb_put(skb, 1); 227 ptr = skb_put(skb, 1);
227 *ptr = 0x01; 228 *ptr = X25_IFACE_CONNECT;
228 229
229 skb->protocol = x25_type_trans(skb, dev); 230 skb->protocol = x25_type_trans(skb, dev);
230 netif_rx(skb); 231 netif_rx(skb);
@@ -241,7 +242,7 @@ static void lapbeth_disconnected(struct net_device *dev, int reason)
241 } 242 }
242 243
243 ptr = skb_put(skb, 1); 244 ptr = skb_put(skb, 1);
244 *ptr = 0x02; 245 *ptr = X25_IFACE_DISCONNECT;
245 246
246 skb->protocol = x25_type_trans(skb, dev); 247 skb->protocol = x25_type_trans(skb, dev);
247 netif_rx(skb); 248 netif_rx(skb);