netdev
[Top] [All Lists]

Wavelan busted in 2.4.test9?

To: "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>
Subject: Wavelan busted in 2.4.test9?
From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Date: Sun, 08 Oct 2000 01:22:51 -0700
Organization: Candela Technologies
Sender: owner-netdev@xxxxxxxxxxx
I was looking for an example of a set_mac_address method for
my VLAN code....

wavelan was at the bottom of the grep, so I took a look:

static int wavelan_set_mac_address(device * dev, void *addr)
{
        struct sockaddr *mac = addr;

        /* Copy the address. */
        memcpy(dev->dev_addr, mac->sa_data, WAVELAN_ADDR_SIZE);

        /* Reconfigure the beast. */
        wv_82586_reconfig(dev);

        return 0;
}
#endif                          /* SET_MAC_ADDRESS */


Everything should be using net_device, not device, right?


Also, some of the examples I look at cast addr to a sockaddr (ie wavelan),
but others treat addr as the MAC.  I'm guessing that both work, but can
someone explain the more 'correct' way of doing things?

Thanks,
Ben

-- 
Ben Greear (greearb@xxxxxxxxxxxxxxx)  http://www.candelatech.com
Author of ScryMUD:  scry.wanfear.com 4444        (Released under GPL)
http://scry.wanfear.com               http://scry.wanfear.com/~greear

<Prev in Thread] Current Thread [Next in Thread>
  • Wavelan busted in 2.4.test9?, Ben Greear <=