From: Luis R. Rodriguez Date: Mon, 11 Jan 2010 20:08:54 +0000 (-0800) Subject: Remove duplicate __dev_addr_delete() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=050e4900331f5d34e077bed4b2deb2f2d82aca86;p=openwrt%2Fstaging%2Fblogic.git Remove duplicate __dev_addr_delete() This is already implemented on compat-2.6.32.c Signed-off-by: Luis R. Rodriguez --- diff --git a/compat/compat-2.6.24.c b/compat/compat-2.6.24.c index e496236e0a7e..347f6f7d65fe 100644 --- a/compat/compat-2.6.24.c +++ b/compat/compat-2.6.24.c @@ -24,67 +24,6 @@ char *print_mac(char *buf, const u8 *addr) } EXPORT_SYMBOL(print_mac); -/* On net/core/dev.c as of 2.6.24 */ -int __dev_addr_delete(struct dev_addr_list **list, int *count, - void *addr, int alen, int glbl) -{ - struct dev_addr_list *da; - - for (; (da = *list) != NULL; list = &da->next) { - if (memcmp(da->da_addr, addr, da->da_addrlen) == 0 && - alen == da->da_addrlen) { - if (glbl) { - int old_glbl = da->da_gusers; - da->da_gusers = 0; - if (old_glbl == 0) - break; - } - if (--da->da_users) - return 0; - - *list = da->next; - kfree(da); - (*count)--; - return 0; - } - } - return -ENOENT; -} - -/* On net/core/dev.c as of 2.6.24. This is not yet used by mac80211 but - * might as well add it */ -int __dev_addr_add(struct dev_addr_list **list, int *count, - void *addr, int alen, int glbl) -{ - struct dev_addr_list *da; - - for (da = *list; da != NULL; da = da->next) { - if (memcmp(da->da_addr, addr, da->da_addrlen) == 0 && - da->da_addrlen == alen) { - if (glbl) { - int old_glbl = da->da_gusers; - da->da_gusers = 1; - if (old_glbl) - return 0; - } - da->da_users++; - return 0; - } - } - - da = kmalloc(sizeof(*da), GFP_ATOMIC); - if (da == NULL) - return -ENOMEM; - memcpy(da->da_addr, addr, alen); - da->da_addrlen = alen; - da->da_users = 1; - da->da_gusers = glbl ? 1 : 0; - da->next = *list; - *list = da; - (*count)++; - return 0; -} - /* 2.6.22 and 2.6.23 have eth_header_cache_update defined as extern in include/linux/etherdevice.h * and actually defined in net/ethernet/eth.c but 2.6.24 exports it. Lets export it here */