patch-2.4.10 linux/drivers/net/wan/sbni.c
Next file: linux/drivers/net/wan/sdla.c
Previous file: linux/drivers/net/wan/n2.c
Back to the patch index
Back to the overall index
- Lines: 81
- Date:
Fri Sep 14 14:40:00 2001
- Orig file:
v2.4.9/linux/drivers/net/wan/sbni.c
- Orig date:
Mon Aug 27 12:41:43 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/net/wan/sbni.c linux/drivers/net/wan/sbni.c
@@ -11,7 +11,7 @@
* at http://www.granch.com (English) or http://www.granch.ru (Russian)
*
* This software may be used and distributed according to the terms
- * of the GNU Public License.
+ * of the GNU General Public License.
*
*
* 5.0.1 Jun 22 2001
@@ -155,7 +155,9 @@
static int emancipate( struct net_device * );
#endif
+#ifdef __i386__
#define ASM_CRC 1
+#endif
static const char version[] =
"Granch SBNI12 driver ver 5.0.1 Jun 22 2001 Denis I.Timofeev.\n";
@@ -361,7 +363,7 @@
/* store MAC address (generate if that isn't known) */
*(u16 *)dev->dev_addr = htons( 0x00ff );
*(u32 *)(dev->dev_addr + 2) = htonl( 0x01000000 |
- ( (mac[num] ? mac[num] : (u32)dev->priv) & 0x00ffffff) );
+ ( (mac[num] ? mac[num] : (u32)((long)dev->priv)) & 0x00ffffff) );
/* store link settings (speed, receive level ) */
nl->maxframe = DEFAULT_FRAME_LEN;
@@ -659,7 +661,7 @@
struct net_local *nl = (struct net_local *) dev->priv;
struct sk_buff *skb = nl->tx_buf_p;
- unsigned len = min(unsigned int, skb->len - nl->outpos, nl->framelen);
+ unsigned len = min_t(unsigned int, skb->len - nl->outpos, nl->framelen);
outsb( dev->base_addr + DAT, skb->data + nl->outpos, len );
*crc_p = calc_crc32( *crc_p, skb->data + nl->outpos, len );
@@ -760,7 +762,7 @@
nl->outpos += nl->framelen;
if( --nl->tx_frameno )
- nl->framelen = min(unsigned int,
+ nl->framelen = min_t(unsigned int,
nl->maxframe,
nl->tx_buf_p->len - nl->outpos);
else
@@ -1474,6 +1476,8 @@
MODULE_PARM( skip_pci_probe, "i" );
+MODULE_LICENSE("GPL");
+
int
init_module( void )
@@ -1517,7 +1521,7 @@
#else /* MODULE */
-void __init
+static int __init
sbni_setup( char *p )
{
int n, parm;
@@ -1528,7 +1532,7 @@
for( n = 0, parm = 0; *p && n < 8; ) {
(*dest[ parm ])[ n ] = simple_strtol( p, &p, 0 );
if( !*p || *p == ')' )
- return;
+ return 1;
if( *p == ';' )
++p, ++n, parm = 0;
else if( *p++ != ',' )
@@ -1539,6 +1543,7 @@
}
bad_param:
printk( KERN_ERR "Error in sbni kernel parameter!\n" );
+ return 0;
}
__setup( "sbni=", sbni_setup );
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)