PATCH: support for firmwares sizes up to 128000 bytes

Arnaldo Carvalho de Melo (acme@conectiva.com.br)
Tue, 22 Dec 1998 13:44:50 -0200 (EDT)


Hi,

Please apply this patch to support firmwares sizes up to 128000 bytes
in the wanrouter. This is needed for a sync card that we're developing
a wanrouter driver.

----------------------------------- 8< ===================================
diff -ur linux.orig/CREDITS linux/CREDITS
--- linux.orig/CREDITS Mon Dec 7 17:20:59 1998
+++ linux/CREDITS Tue Dec 22 13:21:59 1998
@@ -1211,6 +1211,14 @@
S: D-90453 Nuernberg
S: Germany

+N: Arnaldo Carvalho de Melo
+E: acme@conectiva.com.br
+D: wanrouter hacking
+D: cyclades 2X sync card driver (still in early devel stage)
+S: R. Prof. Rubens Elke Braga, 558 - Parolin
+S: 80220-320 Curitiba - Parana
+S: Brazil
+
N: Michael Meskes
E: meskes@debian.org
P: 1024/04B6E8F5 6C 77 33 CA CC D6 22 03 AB AB 15 A3 AE AD 39 7D
diff -ur linux.orig/net/wanrouter/wanmain.c linux/net/wanrouter/wanmain.c
--- linux.orig/net/wanrouter/wanmain.c Fri Sep 4 16:10:19 1998
+++ linux/net/wanrouter/wanmain.c Tue Dec 22 13:21:59 1998
@@ -25,6 +25,8 @@
* Oct 15, 1997 Farhan Thawar changed wan_encapsulate to add a pad byte of 0
* Apr 20, 1998 Alan Cox Fixed 2.1 symbols
* May 17, 1998 K. Baranowski Fixed SNAP encapsulation in wan_encapsulate
+* Dec 15, 1998 Arnaldo Melo support for firmwares of up to 128000 bytes
+* check wandev->setup return value
*****************************************************************************/

#include <linux/stddef.h> /* offsetof(), etc. */
@@ -459,7 +461,7 @@

if (conf->data_size && conf->data)
{
- if(conf->data_size > 64000 || conf->data_size < 0){
+ if(conf->data_size > 128000 || conf->data_size < 0){
goto bail;
}
data = kmalloc(conf->data_size, GFP_KERNEL);
@@ -468,8 +470,7 @@
if(!copy_from_user(data, conf->data, conf->data_size))
{
conf->data=data;
- wandev->setup(wandev,conf);
- err = 0;
+ err = wandev->setup(wandev,conf);
}
else
err = -ENOBUFS;
----------------------------------- 8< ===================================

- Arnaldo

"These are questions for action,
not speculation, which is idle." - Noam Chomsky

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/