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>
This commit is contained in:
parent
9010bc3364
commit
32e7bfc411
14 changed files with 38 additions and 33 deletions
|
@ -263,6 +263,11 @@ struct netdev_hw_addr_list {
|
|||
int count;
|
||||
};
|
||||
|
||||
#define netdev_uc_count(dev) ((dev)->uc.count)
|
||||
#define netdev_uc_empty(dev) ((dev)->uc.count == 0)
|
||||
#define netdev_for_each_uc_addr(ha, dev) \
|
||||
list_for_each_entry(ha, &dev->uc.list, list)
|
||||
|
||||
struct hh_cache {
|
||||
struct hh_cache *hh_next; /* Next entry */
|
||||
atomic_t hh_refcnt; /* number of users */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue