aboutsummaryrefslogtreecommitdiffstats
path: root/net/netrom/af_netrom.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-09-12 18:55:09 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-12 18:55:09 -0400
commit61b22e693ea33af02f3380d3dbed9ee65a80c729 (patch)
tree4507ddcc055109e35a03820115abd7c09a5d0cdd /net/netrom/af_netrom.c
parent3a3bca5ace9123d1a6b890ceac2902ebf2b1fd50 (diff)
parent24b8e05dc1b03c1f80828e642838511c16e17250 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/netrom/af_netrom.c')
-rw-r--r--net/netrom/af_netrom.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index f4578c759ffc..e5d82d711cae 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -56,6 +56,7 @@ int sysctl_netrom_transport_requested_window_size = NR_DEFAULT_WINDOW;
56int sysctl_netrom_transport_no_activity_timeout = NR_DEFAULT_IDLE; 56int sysctl_netrom_transport_no_activity_timeout = NR_DEFAULT_IDLE;
57int sysctl_netrom_routing_control = NR_DEFAULT_ROUTING; 57int sysctl_netrom_routing_control = NR_DEFAULT_ROUTING;
58int sysctl_netrom_link_fails_count = NR_DEFAULT_FAILS; 58int sysctl_netrom_link_fails_count = NR_DEFAULT_FAILS;
59int sysctl_netrom_reset_circuit = NR_DEFAULT_RESET;
59 60
60static unsigned short circuit = 0x101; 61static unsigned short circuit = 0x101;
61 62
@@ -908,17 +909,17 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)
908 if (frametype != NR_CONNREQ) { 909 if (frametype != NR_CONNREQ) {
909 /* 910 /*
910 * Here it would be nice to be able to send a reset but 911 * Here it would be nice to be able to send a reset but
911 * NET/ROM doesn't have one. The following hack would 912 * NET/ROM doesn't have one. We've tried to extend the protocol
912 * have been a way to extend the protocol but apparently 913 * by sending NR_CONNACK | NR_CHOKE_FLAGS replies but that
913 * it kills BPQ boxes... :-( 914 * apparently kills BPQ boxes... :-(
915 * So now we try to follow the established behaviour of
916 * G8PZT's Xrouter which is sending packets with command type 7
917 * as an extension of the protocol.
914 */ 918 */
915#if 0 919 if (sysctl_netrom_reset_circuit &&
916 /* 920 (frametype != NR_RESET || flags != 0))
917 * Never reply to a CONNACK/CHOKE. 921 nr_transmit_reset(skb, 1);
918 */ 922
919 if (frametype != NR_CONNACK || flags != NR_CHOKE_FLAG)
920 nr_transmit_refusal(skb, 1);
921#endif
922 return 0; 923 return 0;
923 } 924 }
924 925
@@ -1187,9 +1188,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1187 } 1188 }
1188 1189
1189 case SIOCGSTAMP: 1190 case SIOCGSTAMP:
1190 ret = -EINVAL; 1191 ret = sock_get_timestamp(sk, argp);
1191 if (sk != NULL)
1192 ret = sock_get_timestamp(sk, argp);
1193 release_sock(sk); 1192 release_sock(sk);
1194 return ret; 1193 return ret;
1195 1194
@@ -1393,8 +1392,7 @@ static int __init nr_proto_init(void)
1393 struct net_device *dev; 1392 struct net_device *dev;
1394 1393
1395 sprintf(name, "nr%d", i); 1394 sprintf(name, "nr%d", i);
1396 dev = alloc_netdev(sizeof(struct net_device_stats), name, 1395 dev = alloc_netdev(sizeof(struct nr_private), name, nr_setup);
1397 nr_setup);
1398 if (!dev) { 1396 if (!dev) {
1399 printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device structure\n"); 1397 printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device structure\n");
1400 goto fail; 1398 goto fail;