Re: 2.5.69-mm5: sb1000.c: undefined reference to `alloc_netdev'

From: Andrew Morton (akpm@digeo.com)
Date: Wed May 14 2003 - 14:41:06 EST


Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> Its far from bogus. Its an rx only cable modem device. Your uplink is
> modem and you dont want to arp on it

diff -puN drivers/net/sb1000.c~sb1000-fix drivers/net/sb1000.c
--- 25/drivers/net/sb1000.c~sb1000-fix Wed May 14 12:39:10 2003
+++ 25-akpm/drivers/net/sb1000.c Wed May 14 12:40:20 2003
@@ -137,17 +137,6 @@ static const struct pnp_device_id sb1000
 };
 MODULE_DEVICE_TABLE(pnp, sb1000_pnp_ids);
 
-static void
-sb1000_setup(struct net_device *dev)
-{
- dev->type = ARPHRD_ETHER;
- dev->mtu = 1500;
- dev->addr_len = ETH_ALEN;
-
- /* New-style flags. */
- dev->flags = IFF_POINTOPOINT|IFF_NOARP;
-}
-
 static int
 sb1000_probe_one(struct pnp_dev *pdev, const struct pnp_device_id *id)
 {
@@ -188,11 +177,18 @@ sb1000_probe_one(struct pnp_dev *pdev, c
                         "S/N %#8.8x, IRQ %d.\n", dev->name, dev->base_addr,
                         dev->mem_start, serial_number, dev->irq);
 
- dev = alloc_netdev(sizeof(struct sb1000_private), "cm%d", sb1000_setup);
+ dev = alloc_etherdev(sizeof(struct sb1000_private));
         if (!dev) {
                 error = -ENOMEM;
                 goto out_release_regions;
         }
+
+ /*
+ * The SB1000 is an rx-only cable modem device. The uplink is a modem
+ * and we do not want to arp on it.
+ */
+ dev->flags = IFF_POINTOPOINT|IFF_NOARP;
+
         SET_MODULE_OWNER(dev);
 
         if (sb1000_debug > 0)

_

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



This archive was generated by hypermail 2b29 : Thu May 15 2003 - 22:00:53 EST