patch-2.4.21 linux-2.4.21/net/bluetooth/bnep/netdev.c
Next file: linux-2.4.21/net/bluetooth/bnep/sock.c
Previous file: linux-2.4.21/net/bluetooth/bnep/core.c
Back to the patch index
Back to the overall index
- Lines: 81
- Date:
2003-06-13 07:51:39.000000000 -0700
- Orig file:
linux-2.4.20/net/bluetooth/bnep/netdev.c
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.20/net/bluetooth/bnep/netdev.c linux-2.4.21/net/bluetooth/bnep/netdev.c
@@ -46,7 +46,7 @@
#include "bnep.h"
-#ifndef CONFIG_BNEP_DEBUG
+#ifndef CONFIG_BLUEZ_BNEP_DEBUG
#undef BT_DBG
#define BT_DBG( A... )
#endif
@@ -73,7 +73,7 @@
static void bnep_net_set_mc_list(struct net_device *dev)
{
-#ifdef CONFIG_BNEP_MC_FILTER
+#ifdef CONFIG_BLUEZ_BNEP_MC_FILTER
struct bnep_session *s = dev->priv;
struct sock *sk = s->sock->sk;
struct bnep_set_filter_req *r;
@@ -143,27 +143,31 @@
return -EINVAL;
}
-#ifdef CONFIG_BNEP_MC_FILTER
+#ifdef CONFIG_BLUEZ_BNEP_MC_FILTER
static inline int bnep_net_mc_filter(struct sk_buff *skb, struct bnep_session *s)
{
struct ethhdr *eh = (void *) skb->data;
- if ((eh->h_dest[0] & 1) && !test_bit(bnep_mc_hash(eh->h_dest), &s->mc_filter))
+ if ((eh->h_dest[0] & 1) && !test_bit(bnep_mc_hash(eh->h_dest), &s->mc_filter)) {
+ BT_DBG("BNEP: filtered skb %p, dst %.2x:%.2x:%.2x:%.2x:%.2x:%.2x", skb,
+ eh->h_dest[0], eh->h_dest[1], eh->h_dest[2],
+ eh->h_dest[3], eh->h_dest[4], eh->h_dest[5]);
return 1;
+ }
return 0;
}
#endif
-#ifdef CONFIG_BNEP_PROTO_FILTER
+#ifdef CONFIG_BLUEZ_BNEP_PROTO_FILTER
/* Determine ether protocol. Based on eth_type_trans. */
-static inline __u16 bnep_net_eth_proto(struct sk_buff *skb)
+static inline u16 bnep_net_eth_proto(struct sk_buff *skb)
{
struct ethhdr *eh = (void *) skb->data;
if (ntohs(eh->h_proto) >= 1536)
return eh->h_proto;
- if (get_unaligned((__u16 *) skb->data) == 0xFFFF)
+ if (get_unaligned((u16 *) skb->data) == 0xFFFF)
return htons(ETH_P_802_3);
return htons(ETH_P_802_2);
@@ -171,7 +175,7 @@
static inline int bnep_net_proto_filter(struct sk_buff *skb, struct bnep_session *s)
{
- __u16 proto = bnep_net_eth_proto(skb);
+ u16 proto = bnep_net_eth_proto(skb);
struct bnep_proto_filter *f = s->proto_filter;
int i;
@@ -192,14 +196,14 @@
BT_DBG("skb %p, dev %p", skb, dev);
-#ifdef CONFIG_BNEP_MC_FILTER
+#ifdef CONFIG_BLUEZ_BNEP_MC_FILTER
if (bnep_net_mc_filter(skb, s)) {
kfree_skb(skb);
return 0;
}
#endif
-#ifdef CONFIG_BNEP_PROTO_FILTER
+#ifdef CONFIG_BLUEZ_BNEP_PROTO_FILTER
if (bnep_net_proto_filter(skb, s)) {
kfree_skb(skb);
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)