aboutsummaryrefslogtreecommitdiffstats
path: root/net/x25/af_x25.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /net/x25/af_x25.c
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'net/x25/af_x25.c')
-rw-r--r--net/x25/af_x25.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index a306bc66000..5f03e4ea65b 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -232,7 +232,7 @@ static int x25_device_event(struct notifier_block *this, unsigned long event,
232 return NOTIFY_DONE; 232 return NOTIFY_DONE;
233 233
234 if (dev->type == ARPHRD_X25 234 if (dev->type == ARPHRD_X25
235#if IS_ENABLED(CONFIG_LLC) 235#if defined(CONFIG_LLC) || defined(CONFIG_LLC_MODULE)
236 || dev->type == ARPHRD_ETHER 236 || dev->type == ARPHRD_ETHER
237#endif 237#endif
238 ) { 238 ) {
@@ -1261,19 +1261,14 @@ static int x25_recvmsg(struct kiocb *iocb, struct socket *sock,
1261 struct x25_sock *x25 = x25_sk(sk); 1261 struct x25_sock *x25 = x25_sk(sk);
1262 struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)msg->msg_name; 1262 struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)msg->msg_name;
1263 size_t copied; 1263 size_t copied;
1264 int qbit, header_len; 1264 int qbit, header_len = x25->neighbour->extended ?
1265 X25_EXT_MIN_LEN : X25_STD_MIN_LEN;
1266
1265 struct sk_buff *skb; 1267 struct sk_buff *skb;
1266 unsigned char *asmptr; 1268 unsigned char *asmptr;
1267 int rc = -ENOTCONN; 1269 int rc = -ENOTCONN;
1268 1270
1269 lock_sock(sk); 1271 lock_sock(sk);
1270
1271 if (x25->neighbour == NULL)
1272 goto out;
1273
1274 header_len = x25->neighbour->extended ?
1275 X25_EXT_MIN_LEN : X25_STD_MIN_LEN;
1276
1277 /* 1272 /*
1278 * This works for seqpacket too. The receiver has ordered the queue for 1273 * This works for seqpacket too. The receiver has ordered the queue for
1279 * us! We do one quick check first though 1274 * us! We do one quick check first though