From 72e5a173fff3e869b26413017d109acdf450ddc4 Mon Sep 17 00:00:00 2001 From: hartkopp Date: Tue, 5 May 2009 09:00:33 +0000 Subject: [PATCH] As the original code was already under GPL the additional license information was removed. Also moved the dual license BSD/GPL to only GPL. Added some information about N_SLCAN in precompiled Kernels provided by Lionel Saugrain. git-svn-id: svn://svn.berlios.de//socketcan/trunk@972 030b6a49-0b11-0410-94ab-b0dab22257f2 --- kernel/2.6/drivers/net/can/slcan.c | 68 ++++++++++++++++-------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/kernel/2.6/drivers/net/can/slcan.c b/kernel/2.6/drivers/net/can/slcan.c index d512e41..1f6c677 100644 --- a/kernel/2.6/drivers/net/can/slcan.c +++ b/kernel/2.6/drivers/net/can/slcan.c @@ -1,28 +1,33 @@ /* * slcan.c - serial line CAN interface driver (using tty line discipline) * - * Copyright (c) 2007 Volkswagen Group Electronic Research - * All rights reserved. + * This file is derived from linux/drivers/net/slip.c + * + * Therefore it has the same (strange?) behaviour not to unregister the + * netdevice when detaching the tty. Is there any better solution? + * + * Do not try to attach, detach and re-attach a tty for this reason ... + * + * slip.c Authors : Laurence Culhane + * Fred N. van Kempen + * slcan.c Author : Oliver Hartkopp + * + * Copyright (c) 2007-2009 Volkswagen Group Electronic Research * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Volkswagen nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. * - * Alternatively, provided that this notice is retained in full, this - * software may be distributed under the terms of the GNU General - * Public License ("GPL") version 2, in which case the provisions of the - * GPL apply INSTEAD OF those given above. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. * - * The provided data structures and external interfaces from this code - * are not restricted to be used by modules with a GPL compatible license. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307. You can also get it + * at http://www.gnu.org/licenses/gpl.html * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -41,18 +46,6 @@ * */ -/* - * This file is derived from linux/drivers/net/slip.c - * - * Therefore it has the same (strange?) behaviour not to unregister the - * netdevice when detaching the tty. Is there any better solution? - * - * Do not try to attach, detach and re-attach a tty for this reason ... - * - * slip.c Authors: Laurence Culhane, - * Fred N. van Kempen, - */ - #include #include #include @@ -90,7 +83,7 @@ static __initdata const char banner[] = MODULE_ALIAS_LDISC(N_SLCAN); MODULE_DESCRIPTION("serial line CAN interface"); -MODULE_LICENSE("Dual BSD/GPL"); +MODULE_LICENSE("GPL"); MODULE_AUTHOR("Oliver Hartkopp "); #ifdef CONFIG_CAN_DEBUG_DEVICES @@ -117,6 +110,17 @@ module_param(debug, int, S_IRUGO); * * NEW: Since Kernel 2.6.21 you only have to change include/linux/tty.h * + * HACK for precompiled Kernels: + * + * In order to use the slcan driver without rebuilding the kernel, the slcan + * driver must be compiled to use an existing line discipline. + * The N_MOUSE line discipline is documented to be free for custom use and + * using it *should* not cause any side effect. + * + * Then, before compiling the slcan driver, add a -DN_SLCAN=N_MOUSE + * compilation option in its Makefile. The slcan_attach tool must(!!) also be + * rebuild to use the right value for N_SLCAN. This workaround will allow + * to use the slcan driver with an existing kernel. */ #define SLC_CHECK_TRANSMIT -- 2.39.2