X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fbluetooth%2Fbnep%2Fcore.c;h=d908d49dc9f857cf753035badfba2c8785e285b9;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=a87cc64e9bafbc03363f8d29ac96cadcf8dd329f;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index a87cc64e9..d908d49dc 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c @@ -75,7 +75,7 @@ static struct bnep_session *__bnep_get_session(u8 *dst) list_for_each(p, &bnep_session_list) { s = list_entry(p, struct bnep_session, list); - if (!memcmp(dst, s->eh.h_source, ETH_ALEN)) + if (!compare_ether_addr(dst, s->eh.h_source)) return s; } return NULL; @@ -384,7 +384,7 @@ static inline int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb) s->stats.rx_packets++; nskb->dev = dev; - nskb->ip_summed = CHECKSUM_UNNECESSARY; + nskb->ip_summed = CHECKSUM_NONE; nskb->protocol = eth_type_trans(nskb, dev); netif_rx_ni(nskb); return 0; @@ -420,10 +420,10 @@ static inline int bnep_tx_frame(struct bnep_session *s, struct sk_buff *skb) iv[il++] = (struct kvec) { &type, 1 }; len++; - if (!memcmp(eh->h_dest, s->eh.h_source, ETH_ALEN)) + if (!compare_ether_addr(eh->h_dest, s->eh.h_source)) type |= 0x01; - if (!memcmp(eh->h_source, s->eh.h_dest, ETH_ALEN)) + if (!compare_ether_addr(eh->h_source, s->eh.h_dest)) type |= 0x02; if (type) @@ -532,8 +532,8 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) dev = alloc_netdev(sizeof(struct bnep_session), (*req->device) ? req->device : "bnep%d", bnep_net_setup); - if (!dev) - return ENOMEM; + if (!dev) + return -ENOMEM; down_write(&bnep_session_sem);