X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=net%2Fatm%2Fbr2684.c;h=d00cca97eb33bea4895be72c88abea6ca4293a7e;hb=0f45d7f36b766cb668cebfb5d4d2f67b4a8676ba;hp=bdb4d89730d21da0ad945d7873f040e4f1633d42;hpb=5367f2d67c7d0bf1faae90e6e7b4e2ac3c9b5e0f;p=powerpc.git diff --git a/net/atm/br2684.c b/net/atm/br2684.c index bdb4d89730..d00cca97eb 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c @@ -5,7 +5,6 @@ Author: Marcell GAL, 2000, XDSL Ltd, Hungary */ #include -#include #include #include #include @@ -18,6 +17,7 @@ Author: Marcell GAL, 2000, XDSL Ltd, Hungary #include #include #include +#include #include #include @@ -296,13 +296,13 @@ static inline __be16 br_type_trans(struct sk_buff *skb, struct net_device *dev) eth = eth_hdr(skb); if (is_multicast_ether_addr(eth->h_dest)) { - if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) + if (!compare_ether_addr(eth->h_dest, dev->broadcast)) skb->pkt_type = PACKET_BROADCAST; else skb->pkt_type = PACKET_MULTICAST; } - else if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN)) + else if (compare_ether_addr(eth->h_dest, dev->dev_addr)) skb->pkt_type = PACKET_OTHERHOST; if (ntohs(eth->h_proto) >= 1536) @@ -508,10 +508,9 @@ Note: we do not have explicit unassign, but look at _push() if (copy_from_user(&be, arg, sizeof be)) return -EFAULT; - brvcc = kmalloc(sizeof(struct br2684_vcc), GFP_KERNEL); + brvcc = kzalloc(sizeof(struct br2684_vcc), GFP_KERNEL); if (!brvcc) return -ENOMEM; - memset(brvcc, 0, sizeof(struct br2684_vcc)); write_lock_irq(&devs_lock); net_dev = br2684_find_dev(&be.ifspec); if (net_dev == NULL) {