Lines Matching refs:naddr
1320 struct netcp_addr *naddr; in netcp_addr_find() local
1322 list_for_each_entry(naddr, &netcp->addr_list, node) { in netcp_addr_find()
1323 if (naddr->type != type) in netcp_addr_find()
1325 if (addr && memcmp(addr, naddr->addr, ETH_ALEN)) in netcp_addr_find()
1327 return naddr; in netcp_addr_find()
1337 struct netcp_addr *naddr; in netcp_addr_add() local
1339 naddr = devm_kmalloc(netcp->dev, sizeof(*naddr), GFP_ATOMIC); in netcp_addr_add()
1340 if (!naddr) in netcp_addr_add()
1343 naddr->type = type; in netcp_addr_add()
1344 naddr->flags = 0; in netcp_addr_add()
1345 naddr->netcp = netcp; in netcp_addr_add()
1347 ether_addr_copy(naddr->addr, addr); in netcp_addr_add()
1349 eth_zero_addr(naddr->addr); in netcp_addr_add()
1350 list_add_tail(&naddr->node, &netcp->addr_list); in netcp_addr_add()
1352 return naddr; in netcp_addr_add()
1355 static void netcp_addr_del(struct netcp_intf *netcp, struct netcp_addr *naddr) in netcp_addr_del() argument
1357 list_del(&naddr->node); in netcp_addr_del()
1358 devm_kfree(netcp->dev, naddr); in netcp_addr_del()
1363 struct netcp_addr *naddr; in netcp_addr_clear_mark() local
1365 list_for_each_entry(naddr, &netcp->addr_list, node) in netcp_addr_clear_mark()
1366 naddr->flags = 0; in netcp_addr_clear_mark()
1372 struct netcp_addr *naddr; in netcp_addr_add_mark() local
1374 naddr = netcp_addr_find(netcp, addr, type); in netcp_addr_add_mark()
1375 if (naddr) { in netcp_addr_add_mark()
1376 naddr->flags |= ADDR_VALID; in netcp_addr_add_mark()
1380 naddr = netcp_addr_add(netcp, addr, type); in netcp_addr_add_mark()
1381 if (!WARN_ON(!naddr)) in netcp_addr_add_mark()
1382 naddr->flags |= ADDR_NEW; in netcp_addr_add_mark()
1387 struct netcp_addr *naddr, *tmp; in netcp_addr_sweep_del() local
1392 list_for_each_entry_safe(naddr, tmp, &netcp->addr_list, node) { in netcp_addr_sweep_del()
1393 if (naddr->flags & (ADDR_VALID | ADDR_NEW)) in netcp_addr_sweep_del()
1396 naddr->addr, naddr->type); in netcp_addr_sweep_del()
1402 naddr); in netcp_addr_sweep_del()
1405 netcp_addr_del(netcp, naddr); in netcp_addr_sweep_del()
1411 struct netcp_addr *naddr, *tmp; in netcp_addr_sweep_add() local
1416 list_for_each_entry_safe(naddr, tmp, &netcp->addr_list, node) { in netcp_addr_sweep_add()
1417 if (!(naddr->flags & ADDR_NEW)) in netcp_addr_sweep_add()
1420 naddr->addr, naddr->type); in netcp_addr_sweep_add()
1426 error = module->add_addr(priv->module_priv, naddr); in netcp_addr_sweep_add()