net: usb: Use eth_<foo>_addr instead of memset
authorJoe Perches <joe@perches.com>
Tue, 3 Mar 2015 03:54:48 +0000 (19:54 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Mar 2015 22:01:36 +0000 (17:01 -0500)
Use the built-in function instead of memset.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/catc.c
drivers/net/usb/cdc_mbim.c
drivers/net/usb/lg-vl600.c
drivers/net/usb/qmi_wwan.c

index 8cfc3bb0c6a672a288784ab0dd5f09597265c39d..4e2b26a88b15f03ba8302d5d7a83d1a5b1a4d4ea 100644 (file)
@@ -641,7 +641,7 @@ static void catc_set_multicast_list(struct net_device *netdev)
        u8 broadcast[ETH_ALEN];
        u8 rx = RxEnable | RxPolarity | RxMultiCast;
 
-       memset(broadcast, 0xff, ETH_ALEN);
+       eth_broadcast_addr(broadcast);
        memset(catc->multicast, 0, 64);
 
        catc_multicast(broadcast, catc->multicast);
@@ -880,7 +880,7 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
                
                dev_dbg(dev, "Filling the multicast list.\n");
          
-               memset(broadcast, 0xff, ETH_ALEN);
+               eth_broadcast_addr(broadcast);
                catc_multicast(broadcast, catc->multicast);
                catc_multicast(netdev->dev_addr, catc->multicast);
                catc_write_mem(catc, 0xfa80, catc->multicast, 64);
index 96fc8a5bde8416a471ed4cd07e657025bc222fab..e4b7a47a825c7f686e48992b23d3f1ee30555d71 100644 (file)
@@ -394,7 +394,7 @@ static struct sk_buff *cdc_mbim_process_dgram(struct usbnet *dev, u8 *buf, size_
        skb_put(skb, ETH_HLEN);
        skb_reset_mac_header(skb);
        eth_hdr(skb)->h_proto = proto;
-       memset(eth_hdr(skb)->h_source, 0, ETH_ALEN);
+       eth_zero_addr(eth_hdr(skb)->h_source);
        memcpy(eth_hdr(skb)->h_dest, dev->net->dev_addr, ETH_ALEN);
 
        /* add datagram */
index 8f37efd2d2fbb3ec05fcde896b8b9e88136c2f35..5714107533bb4292b94c85d064726ac4f89f496b 100644 (file)
@@ -201,7 +201,7 @@ static int vl600_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
                                        &buf->data[sizeof(*ethhdr) + 0x12],
                                        ETH_ALEN);
                } else {
-                       memset(ethhdr->h_source, 0, ETH_ALEN);
+                       eth_zero_addr(ethhdr->h_source);
                        memcpy(ethhdr->h_dest, dev->net->dev_addr, ETH_ALEN);
 
                        /* Inbound IPv6 packets have an IPv4 ethertype (0x800)
index 602dc6668c3af7ce9f6cc4ddd61437ba2f6adf29..f603f362504bce0c1cb2656e1d29232eb05db846 100644 (file)
@@ -108,7 +108,7 @@ static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
        skb_push(skb, ETH_HLEN);
        skb_reset_mac_header(skb);
        eth_hdr(skb)->h_proto = proto;
-       memset(eth_hdr(skb)->h_source, 0, ETH_ALEN);
+       eth_zero_addr(eth_hdr(skb)->h_source);
 fix_dest:
        memcpy(eth_hdr(skb)->h_dest, dev->net->dev_addr, ETH_ALEN);
        return 1;