Lines Matching defs:mac_node

878 	struct hclgevf_mac_addr_node *mac_node, *tmp;
880 list_for_each_entry_safe(mac_node, tmp, list, node)
881 if (ether_addr_equal(mac_addr, mac_node->mac_addr))
882 return mac_node;
887 static void hclgevf_update_mac_node(struct hclgevf_mac_addr_node *mac_node,
893 if (mac_node->state == HCLGEVF_MAC_TO_DEL)
894 mac_node->state = HCLGEVF_MAC_ACTIVE;
898 if (mac_node->state == HCLGEVF_MAC_TO_ADD) {
899 list_del(&mac_node->node);
900 kfree(mac_node);
902 mac_node->state = HCLGEVF_MAC_TO_DEL;
905 /* only from tmp_add_list, the mac_node->state won't be
909 if (mac_node->state == HCLGEVF_MAC_TO_ADD)
910 mac_node->state = HCLGEVF_MAC_ACTIVE;
921 struct hclgevf_mac_addr_node *mac_node;
933 mac_node = hclgevf_find_mac_node(list, addr);
934 if (mac_node) {
935 hclgevf_update_mac_node(mac_node, state);
945 mac_node = kzalloc(sizeof(*mac_node), GFP_ATOMIC);
946 if (!mac_node) {
951 mac_node->state = state;
952 ether_addr_copy(mac_node->mac_addr, addr);
953 list_add_tail(&mac_node->node, list);
988 struct hclgevf_mac_addr_node *mac_node,
996 if (mac_node->state == HCLGEVF_MAC_TO_ADD)
1002 if (mac_node->state == HCLGEVF_MAC_TO_ADD)
1009 ether_addr_copy(send_msg.data, mac_node->mac_addr);
1018 struct hclgevf_mac_addr_node *mac_node, *tmp;
1021 list_for_each_entry_safe(mac_node, tmp, list, node) {
1022 ret = hclgevf_add_del_mac_addr(hdev, mac_node, mac_type);
1025 mac_node->mac_addr);
1028 format_mac_addr, mac_node->state, ret);
1031 if (mac_node->state == HCLGEVF_MAC_TO_ADD) {
1032 mac_node->state = HCLGEVF_MAC_ACTIVE;
1034 list_del(&mac_node->node);
1035 kfree(mac_node);
1043 struct hclgevf_mac_addr_node *mac_node, *tmp, *new_node;
1045 list_for_each_entry_safe(mac_node, tmp, add_list, node) {
1049 * If mac_node state is ACTIVE, then change its state to TO_DEL,
1053 new_node = hclgevf_find_mac_node(mac_list, mac_node->mac_addr);
1055 hclgevf_update_mac_node(new_node, mac_node->state);
1056 list_del(&mac_node->node);
1057 kfree(mac_node);
1058 } else if (mac_node->state == HCLGEVF_MAC_ACTIVE) {
1059 mac_node->state = HCLGEVF_MAC_TO_DEL;
1060 list_move_tail(&mac_node->node, mac_list);
1062 list_del(&mac_node->node);
1063 kfree(mac_node);
1071 struct hclgevf_mac_addr_node *mac_node, *tmp, *new_node;
1073 list_for_each_entry_safe(mac_node, tmp, del_list, node) {
1074 new_node = hclgevf_find_mac_node(mac_list, mac_node->mac_addr);
1082 list_del(&mac_node->node);
1083 kfree(mac_node);
1085 list_move_tail(&mac_node->node, mac_list);
1092 struct hclgevf_mac_addr_node *mac_node, *tmp;
1094 list_for_each_entry_safe(mac_node, tmp, list, node) {
1095 list_del(&mac_node->node);
1096 kfree(mac_node);
1103 struct hclgevf_mac_addr_node *mac_node, *tmp, *new_node;
1118 list_for_each_entry_safe(mac_node, tmp, list, node) {
1119 switch (mac_node->state) {
1121 list_move_tail(&mac_node->node, &tmp_del_list);
1128 ether_addr_copy(new_node->mac_addr, mac_node->mac_addr);
1129 new_node->state = mac_node->state;