diff options
author | David Brownell <david-b@pacbell.net> | 2006-11-13 03:09:44 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-01 23:23:30 +0100 |
commit | d8126a0c23b95d8f49a8f4b49191691f9a09ae4a (patch) | |
tree | 57eab5bf9c995c45b7361ac3a4aea45a7bbcfc6e /drivers | |
parent | USB: Move private hub declarations out of public header file (diff) | |
download | linux-d8126a0c23b95d8f49a8f4b49191691f9a09ae4a.tar.xz linux-d8126a0c23b95d8f49a8f4b49191691f9a09ae4a.zip |
usb/gadget/ether.c minor manycast tweaks
Minor cleanup/clarification in the ethernet gadget driver, using standard
calls to test for Ethernet multicast and broadcast addresses.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/ether.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 1c17d26d03b8..3bd1dfe565c1 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -1894,13 +1894,13 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net) 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; |