aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-01-25 16:36:10 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-25 16:36:10 -0500
commit32e7bfc41110bc8f29ec0f293c3bcee6645fef34 (patch)
treeb770a040aee7a6a196514cbf5328debb33321d4d /include/linux/netdevice.h
parent9010bc3364db56dd88a1851e0797e597e322ce08 (diff)
net: use helpers to access uc list V2
This patch introduces three macros to work with uc list from net drivers. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index b5fb51d0b8b1..93a32a5ca74f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -263,6 +263,11 @@ struct netdev_hw_addr_list {
263 int count; 263 int count;
264}; 264};
265 265
266#define netdev_uc_count(dev) ((dev)->uc.count)
267#define netdev_uc_empty(dev) ((dev)->uc.count == 0)
268#define netdev_for_each_uc_addr(ha, dev) \
269 list_for_each_entry(ha, &dev->uc.list, list)
270
266struct hh_cache { 271struct hh_cache {
267 struct hh_cache *hh_next; /* Next entry */ 272 struct hh_cache *hh_next; /* Next entry */
268 atomic_t hh_refcnt; /* number of users */ 273 atomic_t hh_refcnt; /* number of users */