diff options
Diffstat (limited to 'net/bluetooth/bnep/netdev.c')
-rw-r--r-- | net/bluetooth/bnep/netdev.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c index 26fb831ef7e0..5643a2391e76 100644 --- a/net/bluetooth/bnep/netdev.c +++ b/net/bluetooth/bnep/netdev.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <linux/socket.h> | 31 | #include <linux/socket.h> |
31 | #include <linux/netdevice.h> | 32 | #include <linux/netdevice.h> |
@@ -64,7 +65,7 @@ static void bnep_net_set_mc_list(struct net_device *dev) | |||
64 | struct sk_buff *skb; | 65 | struct sk_buff *skb; |
65 | int size; | 66 | int size; |
66 | 67 | ||
67 | BT_DBG("%s mc_count %d", dev->name, dev->mc_count); | 68 | BT_DBG("%s mc_count %d", dev->name, netdev_mc_count(dev)); |
68 | 69 | ||
69 | size = sizeof(*r) + (BNEP_MAX_MULTICAST_FILTERS + 1) * ETH_ALEN * 2; | 70 | size = sizeof(*r) + (BNEP_MAX_MULTICAST_FILTERS + 1) * ETH_ALEN * 2; |
70 | skb = alloc_skb(size, GFP_ATOMIC); | 71 | skb = alloc_skb(size, GFP_ATOMIC); |
@@ -97,7 +98,9 @@ static void bnep_net_set_mc_list(struct net_device *dev) | |||
97 | 98 | ||
98 | /* FIXME: We should group addresses here. */ | 99 | /* FIXME: We should group addresses here. */ |
99 | 100 | ||
100 | for (i = 0; i < dev->mc_count && i < BNEP_MAX_MULTICAST_FILTERS; i++) { | 101 | for (i = 0; |
102 | i < netdev_mc_count(dev) && i < BNEP_MAX_MULTICAST_FILTERS; | ||
103 | i++) { | ||
101 | memcpy(__skb_put(skb, ETH_ALEN), dmi->dmi_addr, ETH_ALEN); | 104 | memcpy(__skb_put(skb, ETH_ALEN), dmi->dmi_addr, ETH_ALEN); |
102 | memcpy(__skb_put(skb, ETH_ALEN), dmi->dmi_addr, ETH_ALEN); | 105 | memcpy(__skb_put(skb, ETH_ALEN), dmi->dmi_addr, ETH_ALEN); |
103 | dmi = dmi->next; | 106 | dmi = dmi->next; |