Lines Matching refs:mac_node

915 	struct hclgevf_mac_addr_node *mac_node, *tmp;  in hclgevf_find_mac_node()  local
917 list_for_each_entry_safe(mac_node, tmp, list, node) in hclgevf_find_mac_node()
918 if (ether_addr_equal(mac_addr, mac_node->mac_addr)) in hclgevf_find_mac_node()
919 return mac_node; in hclgevf_find_mac_node()
924 static void hclgevf_update_mac_node(struct hclgevf_mac_addr_node *mac_node, in hclgevf_update_mac_node() argument
930 if (mac_node->state == HCLGEVF_MAC_TO_DEL) in hclgevf_update_mac_node()
931 mac_node->state = HCLGEVF_MAC_ACTIVE; in hclgevf_update_mac_node()
935 if (mac_node->state == HCLGEVF_MAC_TO_ADD) { in hclgevf_update_mac_node()
936 list_del(&mac_node->node); in hclgevf_update_mac_node()
937 kfree(mac_node); in hclgevf_update_mac_node()
939 mac_node->state = HCLGEVF_MAC_TO_DEL; in hclgevf_update_mac_node()
946 if (mac_node->state == HCLGEVF_MAC_TO_ADD) in hclgevf_update_mac_node()
947 mac_node->state = HCLGEVF_MAC_ACTIVE; in hclgevf_update_mac_node()
958 struct hclgevf_mac_addr_node *mac_node; in hclgevf_update_mac_list() local
970 mac_node = hclgevf_find_mac_node(list, addr); in hclgevf_update_mac_list()
971 if (mac_node) { in hclgevf_update_mac_list()
972 hclgevf_update_mac_node(mac_node, state); in hclgevf_update_mac_list()
982 mac_node = kzalloc(sizeof(*mac_node), GFP_ATOMIC); in hclgevf_update_mac_list()
983 if (!mac_node) { in hclgevf_update_mac_list()
988 mac_node->state = state; in hclgevf_update_mac_list()
989 ether_addr_copy(mac_node->mac_addr, addr); in hclgevf_update_mac_list()
990 list_add_tail(&mac_node->node, list); in hclgevf_update_mac_list()
1025 struct hclgevf_mac_addr_node *mac_node, in hclgevf_add_del_mac_addr() argument
1033 if (mac_node->state == HCLGEVF_MAC_TO_ADD) in hclgevf_add_del_mac_addr()
1039 if (mac_node->state == HCLGEVF_MAC_TO_ADD) in hclgevf_add_del_mac_addr()
1046 ether_addr_copy(send_msg.data, mac_node->mac_addr); in hclgevf_add_del_mac_addr()
1055 struct hclgevf_mac_addr_node *mac_node, *tmp; in hclgevf_config_mac_list() local
1058 list_for_each_entry_safe(mac_node, tmp, list, node) { in hclgevf_config_mac_list()
1059 ret = hclgevf_add_del_mac_addr(hdev, mac_node, mac_type); in hclgevf_config_mac_list()
1062 mac_node->mac_addr); in hclgevf_config_mac_list()
1065 format_mac_addr, mac_node->state, ret); in hclgevf_config_mac_list()
1068 if (mac_node->state == HCLGEVF_MAC_TO_ADD) { in hclgevf_config_mac_list()
1069 mac_node->state = HCLGEVF_MAC_ACTIVE; in hclgevf_config_mac_list()
1071 list_del(&mac_node->node); in hclgevf_config_mac_list()
1072 kfree(mac_node); in hclgevf_config_mac_list()
1080 struct hclgevf_mac_addr_node *mac_node, *tmp, *new_node; in hclgevf_sync_from_add_list() local
1082 list_for_each_entry_safe(mac_node, tmp, add_list, node) { in hclgevf_sync_from_add_list()
1090 new_node = hclgevf_find_mac_node(mac_list, mac_node->mac_addr); in hclgevf_sync_from_add_list()
1092 hclgevf_update_mac_node(new_node, mac_node->state); in hclgevf_sync_from_add_list()
1093 list_del(&mac_node->node); in hclgevf_sync_from_add_list()
1094 kfree(mac_node); in hclgevf_sync_from_add_list()
1095 } else if (mac_node->state == HCLGEVF_MAC_ACTIVE) { in hclgevf_sync_from_add_list()
1096 mac_node->state = HCLGEVF_MAC_TO_DEL; in hclgevf_sync_from_add_list()
1097 list_move_tail(&mac_node->node, mac_list); in hclgevf_sync_from_add_list()
1099 list_del(&mac_node->node); in hclgevf_sync_from_add_list()
1100 kfree(mac_node); in hclgevf_sync_from_add_list()
1108 struct hclgevf_mac_addr_node *mac_node, *tmp, *new_node; in hclgevf_sync_from_del_list() local
1110 list_for_each_entry_safe(mac_node, tmp, del_list, node) { in hclgevf_sync_from_del_list()
1111 new_node = hclgevf_find_mac_node(mac_list, mac_node->mac_addr); in hclgevf_sync_from_del_list()
1119 list_del(&mac_node->node); in hclgevf_sync_from_del_list()
1120 kfree(mac_node); in hclgevf_sync_from_del_list()
1122 list_move_tail(&mac_node->node, mac_list); in hclgevf_sync_from_del_list()
1129 struct hclgevf_mac_addr_node *mac_node, *tmp; in hclgevf_clear_list() local
1131 list_for_each_entry_safe(mac_node, tmp, list, node) { in hclgevf_clear_list()
1132 list_del(&mac_node->node); in hclgevf_clear_list()
1133 kfree(mac_node); in hclgevf_clear_list()
1140 struct hclgevf_mac_addr_node *mac_node, *tmp, *new_node; in hclgevf_sync_mac_list() local
1155 list_for_each_entry_safe(mac_node, tmp, list, node) { in hclgevf_sync_mac_list()
1156 switch (mac_node->state) { in hclgevf_sync_mac_list()
1158 list_move_tail(&mac_node->node, &tmp_del_list); in hclgevf_sync_mac_list()
1165 ether_addr_copy(new_node->mac_addr, mac_node->mac_addr); in hclgevf_sync_mac_list()
1166 new_node->state = mac_node->state; in hclgevf_sync_mac_list()