Lines Matching refs:entr
506 struct lan9303_alr_cache_entry *entr = chip->alr_cache; in lan9303_alr_cache_find_free() local
508 for (i = 0; i < LAN9303_NUM_ALR_RECORDS; i++, entr++) in lan9303_alr_cache_find_free()
509 if (entr->port_map == 0) in lan9303_alr_cache_find_free()
510 return entr; in lan9303_alr_cache_find_free()
520 struct lan9303_alr_cache_entry *entr = chip->alr_cache; in lan9303_alr_cache_find_mac() local
525 for (i = 0; i < LAN9303_NUM_ALR_RECORDS; i++, entr++) in lan9303_alr_cache_find_mac()
526 if (ether_addr_equal(entr->mac_addr, mac_addr)) in lan9303_alr_cache_find_mac()
527 return entr; in lan9303_alr_cache_find_mac()
678 struct lan9303_alr_cache_entry *entr; in lan9303_alr_add_port() local
681 entr = lan9303_alr_cache_find_mac(chip, mac); in lan9303_alr_add_port()
682 if (!entr) { /*New entry */ in lan9303_alr_add_port()
683 entr = lan9303_alr_cache_find_free(chip); in lan9303_alr_add_port()
684 if (!entr) { in lan9303_alr_add_port()
688 ether_addr_copy(entr->mac_addr, mac); in lan9303_alr_add_port()
690 entr->port_map |= BIT(port); in lan9303_alr_add_port()
691 entr->stp_override = stp_override; in lan9303_alr_add_port()
692 lan9303_alr_set_entry(chip, mac, entr->port_map, stp_override); in lan9303_alr_add_port()
701 struct lan9303_alr_cache_entry *entr; in lan9303_alr_del_port() local
704 entr = lan9303_alr_cache_find_mac(chip, mac); in lan9303_alr_del_port()
705 if (!entr) in lan9303_alr_del_port()
708 entr->port_map &= ~BIT(port); in lan9303_alr_del_port()
709 if (entr->port_map == 0) /* zero means its free again */ in lan9303_alr_del_port()
710 eth_zero_addr(entr->mac_addr); in lan9303_alr_del_port()
711 lan9303_alr_set_entry(chip, mac, entr->port_map, entr->stp_override); in lan9303_alr_del_port()