Minor cleanup/clarification in the ethernet gadget driver, using standard
calls to test for Ethernet multicast and broadcast addresses.

Signed-off-by: David Brownell <[EMAIL PROTECTED]>

Index: g26/drivers/usb/gadget/ether.c
===================================================================
--- g26.orig/drivers/usb/gadget/ether.c 2006-10-13 15:30:35.000000000 -0700
+++ g26/drivers/usb/gadget/ether.c      2006-11-06 14:15:52.000000000 -0800
@@ -1894,13 +1894,13 @@ static int eth_start_xmit (struct sk_buf
        if (!eth_is_promisc (dev)) {
                u8              *dest = skb->data;
 
-               if (dest [0] & 0x01) {
+               if (is_multicast_ether_addr(dest)) {
                        u16     type;
 
                        /* ignores USB_CDC_PACKET_TYPE_MULTICAST and host
                         * SET_ETHERNET_MULTICAST_FILTERS requests
                         */
-                       if (memcmp (dest, net->broadcast, ETH_ALEN) == 0)
+                       if (is_broadcast_ether_addr(dest))
                                type = USB_CDC_PACKET_TYPE_BROADCAST;
                        else
                                type = USB_CDC_PACKET_TYPE_ALL_MULTICAST;

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to