Same code to generate random_ether_address is in ether_device.h (patch1)
so use it for usbnet.

diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c  Fri Apr  9 11:41:19 2004
+++ b/drivers/usb/net/usbnet.c  Fri Apr  9 11:41:19 2004
@@ -3414,9 +3414,7 @@
                        < sizeof (struct cdc_state)));
 #endif
 
-       get_random_bytes (node_id, sizeof node_id);
-       node_id [0] &= 0xfe;    // clear multicast bit
-       node_id [0] |= 0x02;    // set local assignment bit (IEEE802)
+       random_ether_addr(node_id);
 
        return usb_register(&usbnet_driver);
 }


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to