eth                62 arch/arm/mach-mmp/clock-pxa168.c static APMU_CLK(eth, ETH, 0x09, 0);
eth               110 arch/arm/mach-mmp/pxa168.c PXA168_DEVICE(eth, "pxa168-eth", -1, MFU, 0xc0800000, 0x0fff);
eth               478 arch/mips/cavium-octeon/octeon-platform.c static void __init octeon_fdt_set_phy(int eth, int phy_addr)
eth               490 arch/mips/cavium-octeon/octeon-platform.c 	phy_handle = fdt_getprop(initial_boot_params, eth, "phy-handle", NULL);
eth               497 arch/mips/cavium-octeon/octeon-platform.c 	alt_phy_handle = fdt_getprop(initial_boot_params, eth, "cavium,alt-phy-handle", NULL);
eth               508 arch/mips/cavium-octeon/octeon-platform.c 		fdt_nop_property(initial_boot_params, eth, "phy-handle");
eth               510 arch/mips/cavium-octeon/octeon-platform.c 		fdt_nop_property(initial_boot_params, eth, "cavium,alt-phy-handle");
eth               524 arch/mips/cavium-octeon/octeon-platform.c 		phy_prop = fdt_get_property(initial_boot_params, eth, "phy-handle", NULL);
eth               527 arch/mips/cavium-octeon/octeon-platform.c 		fdt_nop_property(initial_boot_params, eth, "phy-handle");
eth               528 arch/mips/cavium-octeon/octeon-platform.c 		alt_prop = fdt_get_property_w(initial_boot_params, eth, "cavium,alt-phy-handle", NULL);
eth               606 arch/mips/cavium-octeon/octeon-platform.c static void __init _octeon_rx_tx_delay(int eth, int rx_delay, int tx_delay)
eth               608 arch/mips/cavium-octeon/octeon-platform.c 	fdt_setprop_inplace_cell(initial_boot_params, eth, "rx-delay",
eth               610 arch/mips/cavium-octeon/octeon-platform.c 	fdt_setprop_inplace_cell(initial_boot_params, eth, "tx-delay",
eth               614 arch/mips/cavium-octeon/octeon-platform.c static void __init octeon_rx_tx_delay(int eth, int iface, int port)
eth               625 arch/mips/cavium-octeon/octeon-platform.c 				_octeon_rx_tx_delay(eth, 0xc, 0x0c);
eth               629 arch/mips/cavium-octeon/octeon-platform.c 				_octeon_rx_tx_delay(eth, 0x0, 0x0);
eth               636 arch/mips/cavium-octeon/octeon-platform.c 			_octeon_rx_tx_delay(eth, 0x0, 0x10);
eth               641 arch/mips/cavium-octeon/octeon-platform.c 	fdt_nop_property(initial_boot_params, eth, "rx-delay");
eth               642 arch/mips/cavium-octeon/octeon-platform.c 	fdt_nop_property(initial_boot_params, eth, "tx-delay");
eth               648 arch/mips/cavium-octeon/octeon-platform.c 	int eth;
eth               654 arch/mips/cavium-octeon/octeon-platform.c 	eth = fdt_subnode_offset(initial_boot_params, iface, name_buffer);
eth               655 arch/mips/cavium-octeon/octeon-platform.c 	if (eth < 0)
eth               659 arch/mips/cavium-octeon/octeon-platform.c 		octeon_fdt_rm_ethernet(eth);
eth               668 arch/mips/cavium-octeon/octeon-platform.c 	octeon_fdt_set_phy(eth, phy_addr);
eth               670 arch/mips/cavium-octeon/octeon-platform.c 	fixed_link = fdt_subnode_offset(initial_boot_params, eth, "fixed-link");
eth               675 arch/mips/cavium-octeon/octeon-platform.c 	octeon_rx_tx_delay(eth, i, p);
eth               750 arch/mips/cavium-octeon/octeon-platform.c 			int eth;
eth               754 arch/mips/cavium-octeon/octeon-platform.c 			eth = fdt_subnode_offset(initial_boot_params, iface,
eth               756 arch/mips/cavium-octeon/octeon-platform.c 			if (eth < 0)
eth               758 arch/mips/cavium-octeon/octeon-platform.c 			octeon_fdt_set_mac_addr(eth, &mac_addr_base);
eth               353 arch/mips/include/asm/ip32/mace.h 	struct mace_ethernet eth;
eth               152 arch/mips/include/asm/sn/ioc3.h 	struct ioc3_ethregs	eth;
eth               559 arch/um/drivers/net_kern.c static int check_transport(struct transport *transport, char *eth, int n,
eth               565 arch/um/drivers/net_kern.c 	if (strncmp(eth, transport->name, len))
eth               568 arch/um/drivers/net_kern.c 	eth += len;
eth               569 arch/um/drivers/net_kern.c 	if (*eth == ',')
eth               570 arch/um/drivers/net_kern.c 		eth++;
eth               571 arch/um/drivers/net_kern.c 	else if (*eth != '\0')
eth               578 arch/um/drivers/net_kern.c 	if (!transport->setup(eth, mac_out, *init_out)) {
eth               588 arch/um/drivers/net_kern.c 	struct eth_init *eth;
eth               599 arch/um/drivers/net_kern.c 		eth = list_entry(ele, struct eth_init, list);
eth               600 arch/um/drivers/net_kern.c 		match = check_transport(new, eth->init, eth->index, &init,
eth               605 arch/um/drivers/net_kern.c 			eth_configure(eth->index, init, mac, new, GFP_KERNEL);
eth               608 arch/um/drivers/net_kern.c 		list_del(&eth->list);
eth               671 arch/xtensa/platforms/iss/network.c 		struct iss_net_init *eth;
eth               672 arch/xtensa/platforms/iss/network.c 		eth = list_entry(ele, struct iss_net_init, list);
eth               673 arch/xtensa/platforms/iss/network.c 		iss_net_configure(eth->index, eth->init);
eth               143 arch/xtensa/platforms/xtfpga/setup.c 	struct device_node *eth = NULL;
eth               145 arch/xtensa/platforms/xtfpga/setup.c 	if ((eth = of_find_compatible_node(eth, NULL, "opencores,ethoc")))
eth               146 arch/xtensa/platforms/xtfpga/setup.c 		update_local_mac(eth);
eth               519 drivers/firewire/net.c 		struct fwnet_header *eth;
eth               524 drivers/firewire/net.c 		skb_pull(skb, sizeof(*eth));
eth               525 drivers/firewire/net.c 		eth = (struct fwnet_header *)skb_mac_header(skb);
eth               526 drivers/firewire/net.c 		if (fwnet_hwaddr_is_multicast(eth->h_dest)) {
eth               527 drivers/firewire/net.c 			if (memcmp(eth->h_dest, net->broadcast,
eth               535 drivers/firewire/net.c 			if (memcmp(eth->h_dest, net->dev_addr, net->addr_len))
eth               538 drivers/firewire/net.c 		if (ntohs(eth->h_proto) >= ETH_P_802_3_MIN) {
eth               539 drivers/firewire/net.c 			protocol = eth->h_proto;
eth                87 drivers/infiniband/core/ud_header.c 	{ STRUCT_FIELD(eth, dmac_h),
eth                91 drivers/infiniband/core/ud_header.c 	{ STRUCT_FIELD(eth, dmac_l),
eth                95 drivers/infiniband/core/ud_header.c 	{ STRUCT_FIELD(eth, smac_h),
eth                99 drivers/infiniband/core/ud_header.c 	{ STRUCT_FIELD(eth, smac_l),
eth               103 drivers/infiniband/core/ud_header.c 	{ STRUCT_FIELD(eth, type),
eth               353 drivers/infiniband/core/ud_header.c 		header->eth.type = cpu_to_be16(ETH_P_8021Q);
eth               425 drivers/infiniband/core/ud_header.c 			&header->eth, buf + len);
eth               261 drivers/infiniband/core/uverbs.h 		struct ib_uverbs_flow_spec_eth     eth;
eth              2756 drivers/infiniband/core/uverbs_cmd.c 		memcpy(&ib_spec->eth.val, kern_spec_val, actual_filter_sz);
eth              2757 drivers/infiniband/core/uverbs_cmd.c 		memcpy(&ib_spec->eth.mask, kern_spec_mask, actual_filter_sz);
eth              1899 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	ether_addr_copy(qp->qp1_hdr.eth.dmac_h, ah->qplib_ah.dmac);
eth              1900 drivers/infiniband/hw/bnxt_re/ib_verbs.c 	ether_addr_copy(qp->qp1_hdr.eth.smac_h, qp->qplib_qp.smac);
eth              1905 drivers/infiniband/hw/bnxt_re/ib_verbs.c 		qp->qp1_hdr.eth.type = cpu_to_be16(ether_type);
eth                93 drivers/infiniband/hw/mlx4/ah.c 	memcpy(ah->av.eth.mac, ah_attr->roce.dmac, ETH_ALEN);
eth                94 drivers/infiniband/hw/mlx4/ah.c 	eth_zero_addr(ah->av.eth.s_mac);
eth               103 drivers/infiniband/hw/mlx4/ah.c 					      &ah->av.eth.s_mac[0]);
eth               110 drivers/infiniband/hw/mlx4/ah.c 		ah->av.eth.gid_index = ret;
eth               113 drivers/infiniband/hw/mlx4/ah.c 		ah->av.eth.gid_index = ah_attr->grh.sgid_index;
eth               118 drivers/infiniband/hw/mlx4/ah.c 	ah->av.eth.port_pd = cpu_to_be32(to_mpd(ib_ah->pd)->pdn |
eth               120 drivers/infiniband/hw/mlx4/ah.c 	ah->av.eth.vlan = cpu_to_be16(vlan_tag);
eth               121 drivers/infiniband/hw/mlx4/ah.c 	ah->av.eth.hop_limit = grh->hop_limit;
eth               123 drivers/infiniband/hw/mlx4/ah.c 		ah->av.eth.stat_rate = rdma_ah_get_static_rate(ah_attr) +
eth               125 drivers/infiniband/hw/mlx4/ah.c 		while (ah->av.eth.stat_rate > IB_RATE_2_5_GBPS + MLX4_STAT_RATE_OFFSET &&
eth               126 drivers/infiniband/hw/mlx4/ah.c 		       !(1 << ah->av.eth.stat_rate & dev->caps.stat_rate_support))
eth               127 drivers/infiniband/hw/mlx4/ah.c 			--ah->av.eth.stat_rate;
eth               129 drivers/infiniband/hw/mlx4/ah.c 	ah->av.eth.sl_tclass_flowlabel |=
eth               138 drivers/infiniband/hw/mlx4/ah.c 	memcpy(ah->av.eth.dgid, grh->dgid.raw, 16);
eth               139 drivers/infiniband/hw/mlx4/ah.c 	ah->av.eth.sl_tclass_flowlabel |= cpu_to_be32(rdma_ah_get_sl(ah_attr)
eth               185 drivers/infiniband/hw/mlx4/ah.c 		memcpy(mah->av.eth.s_mac, s_mac, 6);
eth               189 drivers/infiniband/hw/mlx4/ah.c 	mah->av.eth.vlan = cpu_to_be16(vlan_tag);
eth               205 drivers/infiniband/hw/mlx4/ah.c 			       be32_to_cpu(ah->av.eth.sl_tclass_flowlabel)
eth              1358 drivers/infiniband/hw/mlx4/main.c 		if (FIELDS_NOT_SUPPORTED(ib_spec->eth.mask, LAST_ETH_FIELD))
eth              1362 drivers/infiniband/hw/mlx4/main.c 		memcpy(mlx4_spec->eth.dst_mac, ib_spec->eth.val.dst_mac,
eth              1364 drivers/infiniband/hw/mlx4/main.c 		memcpy(mlx4_spec->eth.dst_mac_msk, ib_spec->eth.mask.dst_mac,
eth              1366 drivers/infiniband/hw/mlx4/main.c 		mlx4_spec->eth.vlan_tag = ib_spec->eth.val.vlan_tag;
eth              1367 drivers/infiniband/hw/mlx4/main.c 		mlx4_spec->eth.vlan_tag_msk = ib_spec->eth.mask.vlan_tag;
eth              1648 drivers/infiniband/hw/mlx4/main.c 	err = mlx4_tunnel_steer_add(to_mdev(qp->device)->dev, ib_spec->eth.val.dst_mac,
eth              1678 drivers/infiniband/hw/mlx4/main.c 		if (is_zero_ether_addr(ib_spec->eth.mask.dst_mac)) {
eth              1682 drivers/infiniband/hw/mlx4/main.c 			u8 mac[ETH_ALEN] = {ib_spec->eth.mask.dst_mac[0] ^ 0x01,
eth              1683 drivers/infiniband/hw/mlx4/main.c 					    ib_spec->eth.mask.dst_mac[1],
eth              1684 drivers/infiniband/hw/mlx4/main.c 					    ib_spec->eth.mask.dst_mac[2],
eth              1685 drivers/infiniband/hw/mlx4/main.c 					    ib_spec->eth.mask.dst_mac[3],
eth              1686 drivers/infiniband/hw/mlx4/main.c 					    ib_spec->eth.mask.dst_mac[4],
eth              1687 drivers/infiniband/hw/mlx4/main.c 					    ib_spec->eth.mask.dst_mac[5]};
eth              1695 drivers/infiniband/hw/mlx4/main.c 			if (is_multicast_ether_addr(ib_spec->eth.val.dst_mac))
eth              3089 drivers/infiniband/hw/mlx4/qp.c 		if (ah->av.eth.vlan != cpu_to_be16(0xffff)) {
eth              3090 drivers/infiniband/hw/mlx4/qp.c 			vlan = be16_to_cpu(ah->av.eth.vlan) & 0x0fff;
eth              3141 drivers/infiniband/hw/mlx4/qp.c 		sqp->ud_header.ip4.ttl = ah->av.eth.hop_limit;
eth              3191 drivers/infiniband/hw/mlx4/qp.c 		ether_addr_copy(sqp->ud_header.eth.smac_h, ah->av.eth.s_mac);
eth              3192 drivers/infiniband/hw/mlx4/qp.c 		memcpy(sqp->ud_header.eth.dmac_h, ah->av.eth.mac, 6);
eth              3193 drivers/infiniband/hw/mlx4/qp.c 		memcpy(&ctrl->srcrb_flags16[0], ah->av.eth.mac, 2);
eth              3194 drivers/infiniband/hw/mlx4/qp.c 		memcpy(&ctrl->imm, ah->av.eth.mac + 2, 4);
eth              3198 drivers/infiniband/hw/mlx4/qp.c 		if (!memcmp(sqp->ud_header.eth.smac_h, sqp->ud_header.eth.dmac_h, 6))
eth              3201 drivers/infiniband/hw/mlx4/qp.c 			sqp->ud_header.eth.type = cpu_to_be16(ether_type);
eth              3379 drivers/infiniband/hw/mlx4/qp.c 	dseg->vlan = to_mah(wr->ah)->av.eth.vlan;
eth              3380 drivers/infiniband/hw/mlx4/qp.c 	memcpy(dseg->mac, to_mah(wr->ah)->av.eth.mac, 6);
eth              3420 drivers/infiniband/hw/mlx4/qp.c 	memcpy(hdr.mac, ah->av.eth.mac, 6);
eth              3421 drivers/infiniband/hw/mlx4/qp.c 	hdr.vlan = ah->av.eth.vlan;
eth              2717 drivers/infiniband/hw/mlx5/main.c 		if (FIELDS_NOT_SUPPORTED(ib_spec->eth.mask, LAST_ETH_FIELD))
eth              2722 drivers/infiniband/hw/mlx5/main.c 				ib_spec->eth.mask.dst_mac);
eth              2725 drivers/infiniband/hw/mlx5/main.c 				ib_spec->eth.val.dst_mac);
eth              2729 drivers/infiniband/hw/mlx5/main.c 				ib_spec->eth.mask.src_mac);
eth              2732 drivers/infiniband/hw/mlx5/main.c 				ib_spec->eth.val.src_mac);
eth              2734 drivers/infiniband/hw/mlx5/main.c 		if (ib_spec->eth.mask.vlan_tag) {
eth              2741 drivers/infiniband/hw/mlx5/main.c 				 first_vid, ntohs(ib_spec->eth.mask.vlan_tag));
eth              2743 drivers/infiniband/hw/mlx5/main.c 				 first_vid, ntohs(ib_spec->eth.val.vlan_tag));
eth              2747 drivers/infiniband/hw/mlx5/main.c 				 ntohs(ib_spec->eth.mask.vlan_tag) >> 12);
eth              2750 drivers/infiniband/hw/mlx5/main.c 				 ntohs(ib_spec->eth.val.vlan_tag) >> 12);
eth              2754 drivers/infiniband/hw/mlx5/main.c 				 ntohs(ib_spec->eth.mask.vlan_tag) >> 13);
eth              2757 drivers/infiniband/hw/mlx5/main.c 				 ntohs(ib_spec->eth.val.vlan_tag) >> 13);
eth              2760 drivers/infiniband/hw/mlx5/main.c 			 ethertype, ntohs(ib_spec->eth.mask.ether_type));
eth              2762 drivers/infiniband/hw/mlx5/main.c 			 ethertype, ntohs(ib_spec->eth.val.ether_type));
eth              3135 drivers/infiniband/hw/mlx5/main.c 		    ib_spec->eth.mask.ether_type) {
eth              3136 drivers/infiniband/hw/mlx5/main.c 			mask_valid = (ib_spec->eth.mask.ether_type ==
eth              3139 drivers/infiniband/hw/mlx5/main.c 			eth_type = ntohs(ib_spec->eth.val.ether_type);
eth                78 drivers/infiniband/hw/ocrdma/ocrdma_ah.c 	struct ocrdma_eth_vlan eth;
eth                90 drivers/infiniband/hw/ocrdma/ocrdma_ah.c 	memset(&eth, 0, sizeof(eth));
eth               108 drivers/infiniband/hw/ocrdma/ocrdma_ah.c 		eth.eth_type = cpu_to_be16(0x8100);
eth               109 drivers/infiniband/hw/ocrdma/ocrdma_ah.c 		eth.roce_eth_type = cpu_to_be16(proto_num);
eth               111 drivers/infiniband/hw/ocrdma/ocrdma_ah.c 		eth.vlan_tag = cpu_to_be16(vlan_tag);
eth               115 drivers/infiniband/hw/ocrdma/ocrdma_ah.c 		eth.eth_type = cpu_to_be16(proto_num);
eth               119 drivers/infiniband/hw/ocrdma/ocrdma_ah.c 	memcpy(&eth.smac[0], &dev->nic_info.mac_addr[0], ETH_ALEN);
eth               120 drivers/infiniband/hw/ocrdma/ocrdma_ah.c 	status = ocrdma_resolve_dmac(dev, attr, &eth.dmac[0]);
eth               126 drivers/infiniband/hw/ocrdma/ocrdma_ah.c 	memcpy(&ah->av->eth_hdr, &eth, eth_sz);
eth               437 drivers/infiniband/hw/qedr/qedr_roce_cm.c 	ether_addr_copy(udh->eth.dmac_h, ah_attr->roce.dmac);
eth               438 drivers/infiniband/hw/qedr/qedr_roce_cm.c 	ether_addr_copy(udh->eth.smac_h, dev->ndev->dev_addr);
eth               440 drivers/infiniband/hw/qedr/qedr_roce_cm.c 		udh->eth.type = htons(ETH_P_8021Q);
eth               444 drivers/infiniband/hw/qedr/qedr_roce_cm.c 		udh->eth.type = htons(ether_type);
eth               524 drivers/infiniband/hw/qedr/qedr_roce_cm.c 	if (ether_addr_equal(udh.eth.smac_h, udh.eth.dmac_h))
eth               131 drivers/media/dvb-core/dvb_net.c 	struct ethhdr *eth;
eth               136 drivers/media/dvb-core/dvb_net.c 	eth = eth_hdr(skb);
eth               138 drivers/media/dvb-core/dvb_net.c 	if (*eth->h_dest & 1) {
eth               139 drivers/media/dvb-core/dvb_net.c 		if(ether_addr_equal(eth->h_dest,dev->broadcast))
eth               145 drivers/media/dvb-core/dvb_net.c 	if (ntohs(eth->h_proto) >= ETH_P_802_3_MIN)
eth               146 drivers/media/dvb-core/dvb_net.c 		return eth->h_proto;
eth               894 drivers/media/dvb-core/dvb_net.c 	u8 *eth;
eth               947 drivers/media/dvb-core/dvb_net.c 	eth = skb_put(skb, pkt_len - 12 - 4 + 14 - snap);
eth               948 drivers/media/dvb-core/dvb_net.c 	memcpy(eth + 14, pkt + 12 + snap, pkt_len - 12 - 4 - snap);
eth               951 drivers/media/dvb-core/dvb_net.c 	eth[0]=pkt[0x0b];
eth               952 drivers/media/dvb-core/dvb_net.c 	eth[1]=pkt[0x0a];
eth               953 drivers/media/dvb-core/dvb_net.c 	eth[2]=pkt[0x09];
eth               954 drivers/media/dvb-core/dvb_net.c 	eth[3]=pkt[0x08];
eth               955 drivers/media/dvb-core/dvb_net.c 	eth[4]=pkt[0x04];
eth               956 drivers/media/dvb-core/dvb_net.c 	eth[5]=pkt[0x03];
eth               958 drivers/media/dvb-core/dvb_net.c 	eth[6]=eth[7]=eth[8]=eth[9]=eth[10]=eth[11]=0;
eth               961 drivers/media/dvb-core/dvb_net.c 		eth[12] = pkt[18];
eth               962 drivers/media/dvb-core/dvb_net.c 		eth[13] = pkt[19];
eth               968 drivers/media/dvb-core/dvb_net.c 			eth[12] = 0x86;	/* IPv6 */
eth               969 drivers/media/dvb-core/dvb_net.c 			eth[13] = 0xdd;
eth               971 drivers/media/dvb-core/dvb_net.c 			eth[12] = 0x08;	/* IPv4 */
eth               972 drivers/media/dvb-core/dvb_net.c 			eth[13] = 0x00;
eth               888 drivers/net/ethernet/amd/sunlance.c 		struct ethhdr __iomem *eth = (struct ethhdr __iomem *) packet;
eth               892 drivers/net/ethernet/amd/sunlance.c 			sbus_writeb(dev->dev_addr[i], &eth->h_dest[i]);
eth               893 drivers/net/ethernet/amd/sunlance.c 			sbus_writeb(dev->dev_addr[i], &eth->h_source[i]);
eth               901 drivers/net/ethernet/amd/sunlance.c 		struct ethhdr *eth = (struct ethhdr *) packet;
eth               904 drivers/net/ethernet/amd/sunlance.c 			eth->h_dest[i] = dev->dev_addr[i];
eth               905 drivers/net/ethernet/amd/sunlance.c 			eth->h_source[i] = dev->dev_addr[i];
eth              2978 drivers/net/ethernet/amd/xgbe/xgbe-drv.c 	struct ethhdr *eth = (struct ethhdr *)skb->data;
eth              2987 drivers/net/ethernet/amd/xgbe/xgbe-drv.c 	netdev_dbg(netdev, "Dst MAC addr: %pM\n", eth->h_dest);
eth              2988 drivers/net/ethernet/amd/xgbe/xgbe-drv.c 	netdev_dbg(netdev, "Src MAC addr: %pM\n", eth->h_source);
eth              2989 drivers/net/ethernet/amd/xgbe/xgbe-drv.c 	netdev_dbg(netdev, "Protocol: %#06hx\n", ntohs(eth->h_proto));
eth               169 drivers/net/ethernet/apm/xgene/xgene_enet_main.c 	const struct ethhdr *eth = data;
eth               171 drivers/net/ethernet/apm/xgene/xgene_enet_main.c 	return (eth->h_proto == htons(ETH_P_8021Q)) ? VLAN_ETH_HLEN : ETH_HLEN;
eth              1075 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h 	struct eth_context eth;
eth              3753 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 	struct ethhdr *eth;
eth              3802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 	eth = (struct ethhdr *)skb->data;
eth              3805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 	if (unlikely(is_multicast_ether_addr(eth->h_dest))) {
eth              3806 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 		if (is_broadcast_ether_addr(eth->h_dest))
eth              3906 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 					cpu_to_le16(ntohs(eth->h_proto));
eth              3986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 					      eth->h_source);
eth              3991 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 					      eth->h_dest);
eth              3998 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 						eth->h_dest);
eth              4006 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 					      eth->h_source);
eth              8765 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 			&bp->context[cxt_index].vcxt[cxt_offset].eth;
eth              14584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 							 vcxt[cxt_offset].eth,
eth              2092 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c 		q->cxt = &((base_cxt + i)->eth);
eth              11040 drivers/net/ethernet/broadcom/bnxt/bnxt.c 	struct ethhdr *eth = (struct ethhdr *)skb_mac_header(skb);
eth              11044 drivers/net/ethernet/broadcom/bnxt/bnxt.c 	if (!ether_addr_equal(dev->dev_addr, eth->h_dest)) {
eth              11050 drivers/net/ethernet/broadcom/bnxt/bnxt.c 			if (ether_addr_equal(eth->h_dest,
eth              11088 drivers/net/ethernet/broadcom/bnxt/bnxt.c 	memcpy(new_fltr->dst_mac_addr, eth->h_dest, ETH_ALEN);
eth              11089 drivers/net/ethernet/broadcom/bnxt/bnxt.c 	memcpy(new_fltr->src_mac_addr, eth->h_source, ETH_ALEN);
eth              3665 drivers/net/ethernet/broadcom/cnic_defs.h 	struct xstorm_fcoe_eth_context_section eth;
eth               101 drivers/net/ethernet/brocade/bna/bfa_defs_cna.h 	struct bfa_port_eth_stats eth;
eth              2333 drivers/net/ethernet/chelsio/cxgb3/sge.c 		int packet_complete, eth, ethpad = 2;
eth              2340 drivers/net/ethernet/chelsio/cxgb3/sge.c 		eth = r->rss_hdr.opcode == CPL_RX_PKT;
eth              2369 drivers/net/ethernet/chelsio/cxgb3/sge.c 			lro &= eth && is_eth_tcp(rss_hi);
eth              2389 drivers/net/ethernet/chelsio/cxgb3/sge.c 						    eth ?
eth              2394 drivers/net/ethernet/chelsio/cxgb3/sge.c 						 eth ? SGE_RX_DROP_THRES : 0);
eth              2396 drivers/net/ethernet/chelsio/cxgb3/sge.c 				if (!eth)
eth              2430 drivers/net/ethernet/chelsio/cxgb3/sge.c 			if (eth)
eth               282 drivers/net/ethernet/cisco/enic/enic_main.c 	const struct ethhdr *eth = (struct ethhdr *)skb_inner_mac_header(skb);
eth               306 drivers/net/ethernet/cisco/enic/enic_main.c 	switch (eth->h_proto) {
eth               665 drivers/net/ethernet/cisco/enic/enic_main.c 	const struct ethhdr *eth = (struct ethhdr *)skb_inner_mac_header(skb);
eth               667 drivers/net/ethernet/cisco/enic/enic_main.c 	switch (eth->h_proto) {
eth               157 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-trace.h #define TRACE_INCLUDE_FILE	dpaa2-eth-trace
eth               302 drivers/net/ethernet/intel/i40e/i40e_ethtool.c 	I40E_PF_STAT("port.rx_bytes", stats.eth.rx_bytes),
eth               303 drivers/net/ethernet/intel/i40e/i40e_ethtool.c 	I40E_PF_STAT("port.tx_bytes", stats.eth.tx_bytes),
eth               304 drivers/net/ethernet/intel/i40e/i40e_ethtool.c 	I40E_PF_STAT("port.rx_unicast", stats.eth.rx_unicast),
eth               305 drivers/net/ethernet/intel/i40e/i40e_ethtool.c 	I40E_PF_STAT("port.tx_unicast", stats.eth.tx_unicast),
eth               306 drivers/net/ethernet/intel/i40e/i40e_ethtool.c 	I40E_PF_STAT("port.rx_multicast", stats.eth.rx_multicast),
eth               307 drivers/net/ethernet/intel/i40e/i40e_ethtool.c 	I40E_PF_STAT("port.tx_multicast", stats.eth.tx_multicast),
eth               308 drivers/net/ethernet/intel/i40e/i40e_ethtool.c 	I40E_PF_STAT("port.rx_broadcast", stats.eth.rx_broadcast),
eth               309 drivers/net/ethernet/intel/i40e/i40e_ethtool.c 	I40E_PF_STAT("port.tx_broadcast", stats.eth.tx_broadcast),
eth               310 drivers/net/ethernet/intel/i40e/i40e_ethtool.c 	I40E_PF_STAT("port.tx_errors", stats.eth.tx_errors),
eth               311 drivers/net/ethernet/intel/i40e/i40e_ethtool.c 	I40E_PF_STAT("port.rx_dropped", stats.eth.rx_discards),
eth               881 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &osd->eth.rx_bytes, &nsd->eth.rx_bytes);
eth               885 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &osd->eth.tx_bytes, &nsd->eth.tx_bytes);
eth               888 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &osd->eth.rx_discards,
eth               889 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &nsd->eth.rx_discards);
eth               893 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &osd->eth.rx_unicast,
eth               894 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &nsd->eth.rx_unicast);
eth               898 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &osd->eth.rx_multicast,
eth               899 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &nsd->eth.rx_multicast);
eth               903 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &osd->eth.rx_broadcast,
eth               904 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &nsd->eth.rx_broadcast);
eth               908 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &osd->eth.tx_unicast,
eth               909 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &nsd->eth.tx_unicast);
eth               913 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &osd->eth.tx_multicast,
eth               914 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &nsd->eth.tx_multicast);
eth               918 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &osd->eth.tx_broadcast,
eth               919 drivers/net/ethernet/intel/i40e/i40e_main.c 			   &nsd->eth.tx_broadcast);
eth              1253 drivers/net/ethernet/intel/i40e/i40e_type.h 	struct i40e_eth_stats eth;
eth                92 drivers/net/ethernet/intel/ice/ice_ethtool.c 	ICE_PF_STAT("rx_bytes.nic", stats.eth.rx_bytes),
eth                93 drivers/net/ethernet/intel/ice/ice_ethtool.c 	ICE_PF_STAT("tx_bytes.nic", stats.eth.tx_bytes),
eth                94 drivers/net/ethernet/intel/ice/ice_ethtool.c 	ICE_PF_STAT("rx_unicast.nic", stats.eth.rx_unicast),
eth                95 drivers/net/ethernet/intel/ice/ice_ethtool.c 	ICE_PF_STAT("tx_unicast.nic", stats.eth.tx_unicast),
eth                96 drivers/net/ethernet/intel/ice/ice_ethtool.c 	ICE_PF_STAT("rx_multicast.nic", stats.eth.rx_multicast),
eth                97 drivers/net/ethernet/intel/ice/ice_ethtool.c 	ICE_PF_STAT("tx_multicast.nic", stats.eth.tx_multicast),
eth                98 drivers/net/ethernet/intel/ice/ice_ethtool.c 	ICE_PF_STAT("rx_broadcast.nic", stats.eth.rx_broadcast),
eth                99 drivers/net/ethernet/intel/ice/ice_ethtool.c 	ICE_PF_STAT("tx_broadcast.nic", stats.eth.tx_broadcast),
eth               100 drivers/net/ethernet/intel/ice/ice_ethtool.c 	ICE_PF_STAT("tx_errors.nic", stats.eth.tx_errors),
eth               126 drivers/net/ethernet/intel/ice/ice_ethtool.c 	ICE_PF_STAT("rx_dropped.nic", stats.eth.rx_discards),
eth              3693 drivers/net/ethernet/intel/ice/ice_main.c 		cur_ns->rx_missed_errors = pf->stats.eth.rx_discards;
eth              3712 drivers/net/ethernet/intel/ice/ice_main.c 			  &prev_ps->eth.rx_bytes,
eth              3713 drivers/net/ethernet/intel/ice/ice_main.c 			  &cur_ps->eth.rx_bytes);
eth              3716 drivers/net/ethernet/intel/ice/ice_main.c 			  &prev_ps->eth.rx_unicast,
eth              3717 drivers/net/ethernet/intel/ice/ice_main.c 			  &cur_ps->eth.rx_unicast);
eth              3720 drivers/net/ethernet/intel/ice/ice_main.c 			  &prev_ps->eth.rx_multicast,
eth              3721 drivers/net/ethernet/intel/ice/ice_main.c 			  &cur_ps->eth.rx_multicast);
eth              3724 drivers/net/ethernet/intel/ice/ice_main.c 			  &prev_ps->eth.rx_broadcast,
eth              3725 drivers/net/ethernet/intel/ice/ice_main.c 			  &cur_ps->eth.rx_broadcast);
eth              3728 drivers/net/ethernet/intel/ice/ice_main.c 			  &prev_ps->eth.rx_discards,
eth              3729 drivers/net/ethernet/intel/ice/ice_main.c 			  &cur_ps->eth.rx_discards);
eth              3732 drivers/net/ethernet/intel/ice/ice_main.c 			  &prev_ps->eth.tx_bytes,
eth              3733 drivers/net/ethernet/intel/ice/ice_main.c 			  &cur_ps->eth.tx_bytes);
eth              3736 drivers/net/ethernet/intel/ice/ice_main.c 			  &prev_ps->eth.tx_unicast,
eth              3737 drivers/net/ethernet/intel/ice/ice_main.c 			  &cur_ps->eth.tx_unicast);
eth              3740 drivers/net/ethernet/intel/ice/ice_main.c 			  &prev_ps->eth.tx_multicast,
eth              3741 drivers/net/ethernet/intel/ice/ice_main.c 			  &cur_ps->eth.tx_multicast);
eth              3744 drivers/net/ethernet/intel/ice/ice_main.c 			  &prev_ps->eth.tx_broadcast,
eth              3745 drivers/net/ethernet/intel/ice/ice_main.c 			  &cur_ps->eth.tx_broadcast);
eth               519 drivers/net/ethernet/intel/ice/ice_type.h 	struct ice_eth_stats eth;
eth                18 drivers/net/ethernet/mediatek/mtk_eth_path.c 	int		(*set_path)(struct mtk_eth *eth, int path);
eth                43 drivers/net/ethernet/mediatek/mtk_eth_path.c static int set_mux_gdm1_to_gmac1_esw(struct mtk_eth *eth, int path)
eth                63 drivers/net/ethernet/mediatek/mtk_eth_path.c 		val = mtk_r32(eth, MTK_MAC_MISC);
eth                65 drivers/net/ethernet/mediatek/mtk_eth_path.c 		mtk_w32(eth, val, MTK_MAC_MISC);
eth                68 drivers/net/ethernet/mediatek/mtk_eth_path.c 	dev_dbg(eth->dev, "path %s in %s updated = %d\n",
eth                74 drivers/net/ethernet/mediatek/mtk_eth_path.c static int set_mux_gmac2_gmac0_to_gephy(struct mtk_eth *eth, int path)
eth                89 drivers/net/ethernet/mediatek/mtk_eth_path.c 		regmap_update_bits(eth->infra, INFRA_MISC2, GEPHY_MAC_SEL, val);
eth                91 drivers/net/ethernet/mediatek/mtk_eth_path.c 	dev_dbg(eth->dev, "path %s in %s updated = %d\n",
eth                97 drivers/net/ethernet/mediatek/mtk_eth_path.c static int set_mux_u3_gmac2_to_qphy(struct mtk_eth *eth, int path)
eth               112 drivers/net/ethernet/mediatek/mtk_eth_path.c 		regmap_update_bits(eth->infra, INFRA_MISC2, CO_QPHY_SEL, val);
eth               114 drivers/net/ethernet/mediatek/mtk_eth_path.c 	dev_dbg(eth->dev, "path %s in %s updated = %d\n",
eth               120 drivers/net/ethernet/mediatek/mtk_eth_path.c static int set_mux_gmac1_gmac2_to_sgmii_rgmii(struct mtk_eth *eth, int path)
eth               134 drivers/net/ethernet/mediatek/mtk_eth_path.c 		regmap_read(eth->ethsys, ETHSYS_SYSCFG0, &val);
eth               149 drivers/net/ethernet/mediatek/mtk_eth_path.c 		regmap_update_bits(eth->ethsys, ETHSYS_SYSCFG0,
eth               152 drivers/net/ethernet/mediatek/mtk_eth_path.c 	dev_dbg(eth->dev, "path %s in %s updated = %d\n",
eth               158 drivers/net/ethernet/mediatek/mtk_eth_path.c static int set_mux_gmac12_to_gephy_sgmii(struct mtk_eth *eth, int path)
eth               163 drivers/net/ethernet/mediatek/mtk_eth_path.c 	regmap_read(eth->ethsys, ETHSYS_SYSCFG0, &val);
eth               180 drivers/net/ethernet/mediatek/mtk_eth_path.c 		regmap_update_bits(eth->ethsys, ETHSYS_SYSCFG0,
eth               183 drivers/net/ethernet/mediatek/mtk_eth_path.c 	dev_dbg(eth->dev, "path %s in %s updated = %d\n",
eth               213 drivers/net/ethernet/mediatek/mtk_eth_path.c static int mtk_eth_mux_setup(struct mtk_eth *eth, int path)
eth               217 drivers/net/ethernet/mediatek/mtk_eth_path.c 	if (!MTK_HAS_CAPS(eth->soc->caps, path)) {
eth               218 drivers/net/ethernet/mediatek/mtk_eth_path.c 		dev_err(eth->dev, "path %s isn't support on the SoC\n",
eth               223 drivers/net/ethernet/mediatek/mtk_eth_path.c 	if (!MTK_HAS_CAPS(eth->soc->caps, MTK_MUX))
eth               228 drivers/net/ethernet/mediatek/mtk_eth_path.c 		if (MTK_HAS_CAPS(eth->soc->caps, mtk_eth_muxc[i].cap_bit)) {
eth               229 drivers/net/ethernet/mediatek/mtk_eth_path.c 			err = mtk_eth_muxc[i].set_path(eth, path);
eth               233 drivers/net/ethernet/mediatek/mtk_eth_path.c 			dev_dbg(eth->dev, "mux %s isn't present on the SoC\n",
eth               242 drivers/net/ethernet/mediatek/mtk_eth_path.c int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id)
eth               250 drivers/net/ethernet/mediatek/mtk_eth_path.c 	err = mtk_eth_mux_setup(eth, path);
eth               257 drivers/net/ethernet/mediatek/mtk_eth_path.c int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id)
eth               268 drivers/net/ethernet/mediatek/mtk_eth_path.c 	err = mtk_eth_mux_setup(eth, path);
eth               275 drivers/net/ethernet/mediatek/mtk_eth_path.c int mtk_gmac_rgmii_path_setup(struct mtk_eth *eth, int mac_id)
eth               283 drivers/net/ethernet/mediatek/mtk_eth_path.c 	err = mtk_eth_mux_setup(eth, path);
eth                58 drivers/net/ethernet/mediatek/mtk_eth_soc.c void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg)
eth                60 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	__raw_writel(val, eth->base + reg);
eth                63 drivers/net/ethernet/mediatek/mtk_eth_soc.c u32 mtk_r32(struct mtk_eth *eth, unsigned reg)
eth                65 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	return __raw_readl(eth->base + reg);
eth                68 drivers/net/ethernet/mediatek/mtk_eth_soc.c u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned reg)
eth                72 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	val = mtk_r32(eth, reg);
eth                75 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, val, reg);
eth                79 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_mdio_busy_wait(struct mtk_eth *eth)
eth                84 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!(mtk_r32(eth, MTK_PHY_IAC) & PHY_IAC_ACCESS))
eth                91 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dev_err(eth->dev, "mdio: MDIO timeout\n");
eth                95 drivers/net/ethernet/mediatek/mtk_eth_soc.c static u32 _mtk_mdio_write(struct mtk_eth *eth, u32 phy_addr,
eth                98 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (mtk_mdio_busy_wait(eth))
eth               103 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_WRITE |
eth               108 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (mtk_mdio_busy_wait(eth))
eth               114 drivers/net/ethernet/mediatek/mtk_eth_soc.c static u32 _mtk_mdio_read(struct mtk_eth *eth, int phy_addr, int phy_reg)
eth               118 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (mtk_mdio_busy_wait(eth))
eth               121 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_READ |
eth               126 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (mtk_mdio_busy_wait(eth))
eth               129 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	d = mtk_r32(eth, MTK_PHY_IAC) & 0xffff;
eth               137 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = bus->priv;
eth               139 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	return _mtk_mdio_write(eth, phy_addr, phy_reg, val);
eth               144 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = bus->priv;
eth               146 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	return _mtk_mdio_read(eth, phy_addr, phy_reg);
eth               149 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mt7621_gmac0_rgmii_adjust(struct mtk_eth *eth,
eth               157 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	regmap_read(eth->ethsys, ETHSYS_SYSCFG, &val);
eth               160 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev,
eth               168 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	regmap_update_bits(eth->ethsys, ETHSYS_CLKCFG0,
eth               174 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_gmac0_rgmii_adjust(struct mtk_eth *eth, int speed)
eth               181 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, val, INTF_MODE);
eth               183 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	regmap_update_bits(eth->ethsys, ETHSYS_CLKCFG0,
eth               188 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	ret = clk_set_rate(eth->clks[MTK_CLK_TRGPLL], val);
eth               190 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev, "Failed to set trgmii pll: %d\n", ret);
eth               194 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, val, TRGMII_RCK_CTRL);
eth               198 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, val, TRGMII_TCK_CTRL);
eth               206 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth               211 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628) &&
eth               229 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			if (MTK_HAS_CAPS(eth->soc->caps, MTK_RGMII)) {
eth               230 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				err = mtk_gmac_rgmii_path_setup(eth, mac->id);
eth               238 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
eth               239 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				err = mtk_gmac_sgmii_path_setup(eth, mac->id);
eth               245 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			if (MTK_HAS_CAPS(eth->soc->caps, MTK_GEPHY)) {
eth               246 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				err = mtk_gmac_gephy_path_setup(eth, mac->id);
eth               302 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		regmap_read(eth->ethsys, ETHSYS_SYSCFG0, &val);
eth               305 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		regmap_write(eth->ethsys, ETHSYS_SYSCFG0, val);
eth               316 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		regmap_read(eth->ethsys, ETHSYS_SYSCFG0, &val);
eth               318 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		regmap_update_bits(eth->ethsys, ETHSYS_SYSCFG0,
eth               323 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
eth               328 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			err = mtk_sgmii_setup_mode_force(eth->sgmii, sid,
eth               331 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			err = mtk_sgmii_setup_mode_an(eth->sgmii, sid);
eth               336 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		regmap_update_bits(eth->ethsys, ETHSYS_SYSCFG0,
eth               339 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev,
eth               377 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dev_err(eth->dev, "%s: GMAC%d mode %s not supported!\n", __func__,
eth               382 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dev_err(eth->dev, "%s: GMAC%d mode %s err: %d!\n", __func__,
eth               546 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_mdio_init(struct mtk_eth *eth)
eth               551 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mii_np = of_get_child_by_name(eth->dev->of_node, "mdio-bus");
eth               553 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev, "no %s child node found", "mdio-bus");
eth               562 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->mii_bus = devm_mdiobus_alloc(eth->dev);
eth               563 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!eth->mii_bus) {
eth               568 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->mii_bus->name = "mdio";
eth               569 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->mii_bus->read = mtk_mdio_read;
eth               570 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->mii_bus->write = mtk_mdio_write;
eth               571 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->mii_bus->priv = eth;
eth               572 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->mii_bus->parent = eth->dev;
eth               574 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
eth               575 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	ret = of_mdiobus_register(eth->mii_bus, mii_np);
eth               582 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_mdio_cleanup(struct mtk_eth *eth)
eth               584 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!eth->mii_bus)
eth               587 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mdiobus_unregister(eth->mii_bus);
eth               590 drivers/net/ethernet/mediatek/mtk_eth_soc.c static inline void mtk_tx_irq_disable(struct mtk_eth *eth, u32 mask)
eth               595 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_lock_irqsave(&eth->tx_irq_lock, flags);
eth               596 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	val = mtk_r32(eth, eth->tx_int_mask_reg);
eth               597 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, val & ~mask, eth->tx_int_mask_reg);
eth               598 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_unlock_irqrestore(&eth->tx_irq_lock, flags);
eth               601 drivers/net/ethernet/mediatek/mtk_eth_soc.c static inline void mtk_tx_irq_enable(struct mtk_eth *eth, u32 mask)
eth               606 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_lock_irqsave(&eth->tx_irq_lock, flags);
eth               607 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	val = mtk_r32(eth, eth->tx_int_mask_reg);
eth               608 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, val | mask, eth->tx_int_mask_reg);
eth               609 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_unlock_irqrestore(&eth->tx_irq_lock, flags);
eth               612 drivers/net/ethernet/mediatek/mtk_eth_soc.c static inline void mtk_rx_irq_disable(struct mtk_eth *eth, u32 mask)
eth               617 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_lock_irqsave(&eth->rx_irq_lock, flags);
eth               618 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	val = mtk_r32(eth, MTK_PDMA_INT_MASK);
eth               619 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, val & ~mask, MTK_PDMA_INT_MASK);
eth               620 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_unlock_irqrestore(&eth->rx_irq_lock, flags);
eth               623 drivers/net/ethernet/mediatek/mtk_eth_soc.c static inline void mtk_rx_irq_enable(struct mtk_eth *eth, u32 mask)
eth               628 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_lock_irqsave(&eth->rx_irq_lock, flags);
eth               629 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	val = mtk_r32(eth, MTK_PDMA_INT_MASK);
eth               630 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, val | mask, MTK_PDMA_INT_MASK);
eth               631 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_unlock_irqrestore(&eth->rx_irq_lock, flags);
eth               638 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth               648 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
eth               698 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_stats_update(struct mtk_eth *eth)
eth               703 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->mac[i] || !eth->mac[i]->hw_stats)
eth               705 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (spin_trylock(&eth->mac[i]->hw_stats->stats_lock)) {
eth               706 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			mtk_stats_update_mac(eth->mac[i]);
eth               707 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			spin_unlock(&eth->mac[i]->hw_stats->stats_lock);
eth               776 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_init_fq_dma(struct mtk_eth *eth)
eth               783 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->scratch_ring = dma_alloc_coherent(eth->dev,
eth               785 drivers/net/ethernet/mediatek/mtk_eth_soc.c 					       &eth->phy_scratch_ring,
eth               787 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (unlikely(!eth->scratch_ring))
eth               790 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->scratch_head = kcalloc(cnt, MTK_QDMA_PAGE_SIZE,
eth               792 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (unlikely(!eth->scratch_head))
eth               795 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dma_addr = dma_map_single(eth->dev,
eth               796 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				  eth->scratch_head, cnt * MTK_QDMA_PAGE_SIZE,
eth               798 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (unlikely(dma_mapping_error(eth->dev, dma_addr)))
eth               801 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	phy_ring_tail = eth->phy_scratch_ring +
eth               805 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->scratch_ring[i].txd1 =
eth               808 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			eth->scratch_ring[i].txd2 = (eth->phy_scratch_ring +
eth               810 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->scratch_ring[i].txd3 = TX_DMA_SDL(MTK_QDMA_PAGE_SIZE);
eth               813 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, eth->phy_scratch_ring, MTK_QDMA_FQ_HEAD);
eth               814 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, phy_ring_tail, MTK_QDMA_FQ_TAIL);
eth               815 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, (cnt << 16) | cnt, MTK_QDMA_FQ_CNT);
eth               816 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_QDMA_PAGE_SIZE << 16, MTK_QDMA_FQ_BLEN);
eth               847 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_tx_unmap(struct mtk_eth *eth, struct mtk_tx_buf *tx_buf)
eth               849 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth               851 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			dma_unmap_single(eth->dev,
eth               856 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			dma_unmap_page(eth->dev,
eth               863 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			dma_unmap_page(eth->dev,
eth               870 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			dma_unmap_page(eth->dev,
eth               884 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void setup_tx_buf(struct mtk_eth *eth, struct mtk_tx_buf *tx_buf,
eth               888 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth               911 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth               944 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mapped_addr = dma_map_single(eth->dev, skb->data,
eth               946 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (unlikely(dma_mapping_error(eth->dev, mapped_addr)))
eth               953 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	setup_tx_buf(eth, itx_buf, itxd_pdma, mapped_addr, skb_headlen(skb),
eth               971 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA) ||
eth               985 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			mapped_addr = skb_frag_dma_map(eth->dev, frag, offset,
eth               988 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			if (unlikely(dma_mapping_error(eth->dev, mapped_addr)))
eth              1009 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			setup_tx_buf(eth, tx_buf, txd_pdma, mapped_addr,
eth              1023 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth              1041 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth              1044 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			mtk_w32(eth, txd->txd2, MTK_QTX_CTX_PTR);
eth              1048 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, next_idx, MT7628_TX_CTX_IDX0);
eth              1058 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_tx_unmap(eth, tx_buf);
eth              1061 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
eth              1090 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_queue_stopped(struct mtk_eth *eth)
eth              1095 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->netdev[i])
eth              1097 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (netif_queue_stopped(eth->netdev[i]))
eth              1104 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_wake_queue(struct mtk_eth *eth)
eth              1109 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->netdev[i])
eth              1111 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		netif_wake_queue(eth->netdev[i]);
eth              1115 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_stop_queue(struct mtk_eth *eth)
eth              1120 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->netdev[i])
eth              1122 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		netif_stop_queue(eth->netdev[i]);
eth              1129 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth              1130 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_tx_ring *ring = &eth->tx_ring;
eth              1139 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_lock(&eth->page_lock);
eth              1141 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (unlikely(test_bit(MTK_RESETTING, &eth->state)))
eth              1146 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_stop_queue(eth);
eth              1147 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		netif_err(eth, tx_queued, dev,
eth              1149 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		spin_unlock(&eth->page_lock);
eth              1156 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			netif_warn(eth, tx_err, dev,
eth              1172 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_stop_queue(eth);
eth              1174 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_unlock(&eth->page_lock);
eth              1179 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_unlock(&eth->page_lock);
eth              1185 drivers/net/ethernet/mediatek/mtk_eth_soc.c static struct mtk_rx_ring *mtk_get_rx_ring(struct mtk_eth *eth)
eth              1191 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!eth->hwlro)
eth              1192 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		return &eth->rx_ring[0];
eth              1195 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		ring = &eth->rx_ring[i];
eth              1206 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_update_rx_cpu_idx(struct mtk_eth *eth)
eth              1211 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!eth->hwlro) {
eth              1212 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		ring = &eth->rx_ring[0];
eth              1213 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, ring->calc_idx, ring->crx_idx_reg);
eth              1216 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			ring = &eth->rx_ring[i];
eth              1219 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				mtk_w32(eth, ring->calc_idx, ring->crx_idx_reg);
eth              1226 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		       struct mtk_eth *eth)
eth              1241 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		ring = mtk_get_rx_ring(eth);
eth              1254 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
eth              1263 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			     !eth->netdev[mac]))
eth              1266 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		netdev = eth->netdev[mac];
eth              1268 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (unlikely(test_bit(MTK_RESETTING, &eth->state)))
eth              1277 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dma_addr = dma_map_single(eth->dev,
eth              1279 drivers/net/ethernet/mediatek/mtk_eth_soc.c 					  eth->ip_align,
eth              1282 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (unlikely(dma_mapping_error(eth->dev, dma_addr))) {
eth              1297 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dma_unmap_single(eth->dev, trxd.rxd1,
eth              1302 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (trxd.rxd4 & eth->rx_dma_l4_valid)
eth              1319 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
eth              1335 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_update_rx_cpu_idx(eth);
eth              1341 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_poll_tx_qdma(struct mtk_eth *eth, int budget,
eth              1344 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_tx_ring *ring = &eth->tx_ring;
eth              1350 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	cpu = mtk_r32(eth, MTK_QTX_CRX_PTR);
eth              1351 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dma = mtk_r32(eth, MTK_QTX_DRX_PTR);
eth              1376 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_tx_unmap(eth, tx_buf);
eth              1384 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, cpu, MTK_QTX_CRX_PTR);
eth              1389 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget,
eth              1392 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_tx_ring *ring = &eth->tx_ring;
eth              1399 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dma = mtk_r32(eth, MT7628_TX_DTX_IDX0);
eth              1413 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_tx_unmap(eth, tx_buf);
eth              1427 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_poll_tx(struct mtk_eth *eth, int budget)
eth              1429 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_tx_ring *ring = &eth->tx_ring;
eth              1437 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
eth              1438 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		budget = mtk_poll_tx_qdma(eth, budget, done, bytes);
eth              1440 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		budget = mtk_poll_tx_pdma(eth, budget, done, bytes);
eth              1443 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->netdev[i] || !done[i])
eth              1445 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		netdev_completed_queue(eth->netdev[i], done[i], bytes[i]);
eth              1449 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (mtk_queue_stopped(eth) &&
eth              1451 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_wake_queue(eth);
eth              1456 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_handle_status_irq(struct mtk_eth *eth)
eth              1458 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	u32 status2 = mtk_r32(eth, MTK_INT_STATUS2);
eth              1461 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_stats_update(eth);
eth              1462 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, (MTK_GDM1_AF | MTK_GDM2_AF),
eth              1469 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = container_of(napi, struct mtk_eth, tx_napi);
eth              1473 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
eth              1474 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_handle_status_irq(eth);
eth              1475 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_TX_DONE_INT, eth->tx_int_status_reg);
eth              1476 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	tx_done = mtk_poll_tx(eth, budget);
eth              1478 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (unlikely(netif_msg_intr(eth))) {
eth              1479 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		status = mtk_r32(eth, eth->tx_int_status_reg);
eth              1480 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mask = mtk_r32(eth, eth->tx_int_mask_reg);
eth              1481 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_info(eth->dev,
eth              1489 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	status = mtk_r32(eth, eth->tx_int_status_reg);
eth              1494 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
eth              1501 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = container_of(napi, struct mtk_eth, rx_napi);
eth              1506 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_handle_status_irq(eth);
eth              1509 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_RX_DONE_INT, MTK_PDMA_INT_STATUS);
eth              1510 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	rx_done = mtk_poll_rx(napi, remain_budget, eth);
eth              1512 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (unlikely(netif_msg_intr(eth))) {
eth              1513 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		status = mtk_r32(eth, MTK_PDMA_INT_STATUS);
eth              1514 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mask = mtk_r32(eth, MTK_PDMA_INT_MASK);
eth              1515 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_info(eth->dev,
eth              1522 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	status = mtk_r32(eth, MTK_PDMA_INT_STATUS);
eth              1528 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
eth              1533 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_tx_alloc(struct mtk_eth *eth)
eth              1535 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_tx_ring *ring = &eth->tx_ring;
eth              1543 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	ring->dma = dma_alloc_coherent(eth->dev, MTK_DMA_SIZE * sz,
eth              1560 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth              1561 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		ring->dma_pdma = dma_alloc_coherent(eth->dev, MTK_DMA_SIZE * sz,
eth              1584 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth              1585 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, ring->phys, MTK_QTX_CTX_PTR);
eth              1586 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, ring->phys, MTK_QTX_DTX_PTR);
eth              1587 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth,
eth              1590 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth,
eth              1593 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, (QDMA_RES_THRES << 8) | QDMA_RES_THRES,
eth              1596 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0);
eth              1597 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, MTK_DMA_SIZE, MT7628_TX_MAX_CNT0);
eth              1598 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, 0, MT7628_TX_CTX_IDX0);
eth              1599 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, MT7628_PST_DTX_IDX0, MTK_PDMA_RST_IDX);
eth              1608 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_tx_clean(struct mtk_eth *eth)
eth              1610 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_tx_ring *ring = &eth->tx_ring;
eth              1615 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			mtk_tx_unmap(eth, &ring->buf[i]);
eth              1621 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dma_free_coherent(eth->dev,
eth              1629 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dma_free_coherent(eth->dev,
eth              1637 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_rx_alloc(struct mtk_eth *eth, int ring_no, int rx_flag)
eth              1647 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		ring = &eth->rx_ring_qdma;
eth              1650 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		ring = &eth->rx_ring[ring_no];
eth              1674 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	ring->dma = dma_alloc_coherent(eth->dev,
eth              1681 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dma_addr_t dma_addr = dma_map_single(eth->dev,
eth              1682 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				ring->data[i] + NET_SKB_PAD + eth->ip_align,
eth              1685 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (unlikely(dma_mapping_error(eth->dev, dma_addr)))
eth              1689 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
eth              1703 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, ring->phys, MTK_PRX_BASE_PTR_CFG(ring_no) + offset);
eth              1704 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, rx_dma_size, MTK_PRX_MAX_CNT_CFG(ring_no) + offset);
eth              1705 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, ring->calc_idx, ring->crx_idx_reg + offset);
eth              1706 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_PST_DRX_IDX_CFG(ring_no), MTK_PDMA_RST_IDX + offset);
eth              1711 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_rx_clean(struct mtk_eth *eth, struct mtk_rx_ring *ring)
eth              1721 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			dma_unmap_single(eth->dev,
eth              1732 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dma_free_coherent(eth->dev,
eth              1740 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_hwlro_rx_init(struct mtk_eth *eth)
eth              1764 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, ring_ctrl_dw1, MTK_LRO_CTRL_DW1_CFG(i));
eth              1765 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, ring_ctrl_dw2, MTK_LRO_CTRL_DW2_CFG(i));
eth              1766 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, ring_ctrl_dw3, MTK_LRO_CTRL_DW3_CFG(i));
eth              1776 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_HW_LRO_BW_THRE, MTK_PDMA_LRO_CTRL_DW2);
eth              1779 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_HW_LRO_REPLACE_DELTA, MTK_PDMA_LRO_ALT_SCORE_DELTA);
eth              1782 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, (MTK_HW_LRO_TIMER_UNIT << 16) | MTK_HW_LRO_REFRESH_TIME,
eth              1794 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, lro_ctrl_dw3, MTK_PDMA_LRO_CTRL_DW3);
eth              1795 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, lro_ctrl_dw0, MTK_PDMA_LRO_CTRL_DW0);
eth              1800 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_hwlro_rx_uninit(struct mtk_eth *eth)
eth              1806 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_LRO_RING_RELINQUISH_REQ, MTK_PDMA_LRO_CTRL_DW0);
eth              1810 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		val = mtk_r32(eth, MTK_PDMA_LRO_CTRL_DW0);
eth              1820 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, 0, MTK_LRO_CTRL_DW2_CFG(i));
eth              1823 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, 0, MTK_PDMA_LRO_CTRL_DW0);
eth              1826 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_hwlro_val_ipaddr(struct mtk_eth *eth, int idx, __be32 ip)
eth              1830 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	reg_val = mtk_r32(eth, MTK_LRO_CTRL_DW2_CFG(idx));
eth              1833 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, (reg_val & ~MTK_RING_MYIP_VLD), MTK_LRO_CTRL_DW2_CFG(idx));
eth              1835 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, ip, MTK_LRO_DIP_DW0_CFG(idx));
eth              1838 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, (reg_val | MTK_RING_MYIP_VLD), MTK_LRO_CTRL_DW2_CFG(idx));
eth              1841 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_hwlro_inval_ipaddr(struct mtk_eth *eth, int idx)
eth              1845 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	reg_val = mtk_r32(eth, MTK_LRO_CTRL_DW2_CFG(idx));
eth              1848 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, (reg_val & ~MTK_RING_MYIP_VLD), MTK_LRO_CTRL_DW2_CFG(idx));
eth              1850 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, 0, MTK_LRO_DIP_DW0_CFG(idx));
eth              1872 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth              1885 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_hwlro_val_ipaddr(eth, hwlro_idx, mac->hwlro_ip[fsp->location]);
eth              1896 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth              1907 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_hwlro_inval_ipaddr(eth, hwlro_idx);
eth              1915 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth              1922 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_hwlro_inval_ipaddr(eth, hwlro_idx);
eth              2003 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_dma_busy_wait(struct mtk_eth *eth)
eth              2008 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth              2009 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			if (!(mtk_r32(eth, MTK_QDMA_GLO_CFG) &
eth              2013 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			if (!(mtk_r32(eth, MTK_PDMA_GLO_CFG) &
eth              2022 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dev_err(eth->dev, "DMA init timeout\n");
eth              2026 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_dma_init(struct mtk_eth *eth)
eth              2031 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (mtk_dma_busy_wait(eth))
eth              2034 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth              2038 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = mtk_init_fq_dma(eth);
eth              2043 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	err = mtk_tx_alloc(eth);
eth              2047 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth              2048 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = mtk_rx_alloc(eth, 0, MTK_RX_FLAGS_QDMA);
eth              2053 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	err = mtk_rx_alloc(eth, 0, MTK_RX_FLAGS_NORMAL);
eth              2057 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (eth->hwlro) {
eth              2059 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			err = mtk_rx_alloc(eth, i, MTK_RX_FLAGS_HWLRO);
eth              2063 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = mtk_hwlro_rx_init(eth);
eth              2068 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth              2072 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, FC_THRES_DROP_MODE | FC_THRES_DROP_EN |
eth              2074 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, 0x0, MTK_QDMA_HRED2);
eth              2080 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_dma_free(struct mtk_eth *eth)
eth              2085 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (eth->netdev[i])
eth              2086 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			netdev_reset_queue(eth->netdev[i]);
eth              2087 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (eth->scratch_ring) {
eth              2088 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dma_free_coherent(eth->dev,
eth              2090 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				  eth->scratch_ring,
eth              2091 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				  eth->phy_scratch_ring);
eth              2092 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->scratch_ring = NULL;
eth              2093 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->phy_scratch_ring = 0;
eth              2095 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_tx_clean(eth);
eth              2096 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_rx_clean(eth, &eth->rx_ring[0]);
eth              2097 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_rx_clean(eth, &eth->rx_ring_qdma);
eth              2099 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (eth->hwlro) {
eth              2100 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_hwlro_rx_uninit(eth);
eth              2102 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			mtk_rx_clean(eth, &eth->rx_ring[i]);
eth              2105 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	kfree(eth->scratch_head);
eth              2111 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth              2113 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[mac->id]->stats.tx_errors++;
eth              2114 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	netif_err(eth, tx_err, dev,
eth              2116 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	schedule_work(&eth->pending_work);
eth              2121 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = _eth;
eth              2123 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (likely(napi_schedule_prep(&eth->rx_napi))) {
eth              2124 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		__napi_schedule(&eth->rx_napi);
eth              2125 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_rx_irq_disable(eth, MTK_RX_DONE_INT);
eth              2133 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = _eth;
eth              2135 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (likely(napi_schedule_prep(&eth->tx_napi))) {
eth              2136 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		__napi_schedule(&eth->tx_napi);
eth              2137 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
eth              2145 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = _eth;
eth              2147 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (mtk_r32(eth, MTK_PDMA_INT_MASK) & MTK_RX_DONE_INT) {
eth              2148 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (mtk_r32(eth, MTK_PDMA_INT_STATUS) & MTK_RX_DONE_INT)
eth              2151 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (mtk_r32(eth, eth->tx_int_mask_reg) & MTK_TX_DONE_INT) {
eth              2152 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (mtk_r32(eth, eth->tx_int_status_reg) & MTK_TX_DONE_INT)
eth              2163 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth              2165 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
eth              2166 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_rx_irq_disable(eth, MTK_RX_DONE_INT);
eth              2167 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_handle_irq_rx(eth->irq[2], dev);
eth              2168 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
eth              2169 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
eth              2173 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_start_dma(struct mtk_eth *eth)
eth              2178 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	err = mtk_dma_init(eth);
eth              2180 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_dma_free(eth);
eth              2184 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth              2185 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth,
eth              2192 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth,
eth              2197 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, MTK_TX_WB_DDONE | MTK_TX_DMA_EN | MTK_RX_DMA_EN |
eth              2208 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth              2219 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!refcount_read(&eth->dma_refcnt)) {
eth              2220 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		int err = mtk_start_dma(eth);
eth              2225 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		napi_enable(&eth->tx_napi);
eth              2226 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		napi_enable(&eth->rx_napi);
eth              2227 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
eth              2228 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
eth              2229 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		refcount_set(&eth->dma_refcnt, 1);
eth              2232 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		refcount_inc(&eth->dma_refcnt);
eth              2239 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_stop_dma(struct mtk_eth *eth, u32 glo_cfg)
eth              2245 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_lock_bh(&eth->page_lock);
eth              2246 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	val = mtk_r32(eth, glo_cfg);
eth              2247 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, val & ~(MTK_TX_WB_DDONE | MTK_RX_DMA_EN | MTK_TX_DMA_EN),
eth              2249 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_unlock_bh(&eth->page_lock);
eth              2253 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		val = mtk_r32(eth, glo_cfg);
eth              2265 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth              2274 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!refcount_dec_and_test(&eth->dma_refcnt))
eth              2277 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
eth              2278 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_rx_irq_disable(eth, MTK_RX_DONE_INT);
eth              2279 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	napi_disable(&eth->tx_napi);
eth              2280 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	napi_disable(&eth->rx_napi);
eth              2282 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
eth              2283 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_stop_dma(eth, MTK_QDMA_GLO_CFG);
eth              2284 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_stop_dma(eth, MTK_PDMA_GLO_CFG);
eth              2286 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_dma_free(eth);
eth              2291 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void ethsys_reset(struct mtk_eth *eth, u32 reset_bits)
eth              2293 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL,
eth              2298 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL,
eth              2304 drivers/net/ethernet/mediatek/mtk_eth_soc.c static void mtk_clk_disable(struct mtk_eth *eth)
eth              2309 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		clk_disable_unprepare(eth->clks[clk]);
eth              2312 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_clk_enable(struct mtk_eth *eth)
eth              2317 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		ret = clk_prepare_enable(eth->clks[clk]);
eth              2326 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		clk_disable_unprepare(eth->clks[clk]);
eth              2331 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_hw_init(struct mtk_eth *eth)
eth              2335 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (test_and_set_bit(MTK_HW_INIT, &eth->state))
eth              2338 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	pm_runtime_enable(eth->dev);
eth              2339 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	pm_runtime_get_sync(eth->dev);
eth              2341 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	ret = mtk_clk_enable(eth);
eth              2345 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
eth              2346 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		ret = device_reset(eth->dev);
eth              2348 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			dev_err(eth->dev, "MAC reset failed!\n");
eth              2353 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, MTK_PDMA_DELAY_RX_DELAY, MTK_PDMA_DELAY_INT);
eth              2356 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_tx_irq_disable(eth, ~0);
eth              2357 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_rx_irq_disable(eth, ~0);
eth              2363 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	ethsys_reset(eth, RSTCTRL_FE);
eth              2364 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	ethsys_reset(eth, RSTCTRL_PPE);
eth              2366 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (eth->pctl) {
eth              2368 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		regmap_write(eth->pctl, GPIO_DRV_SEL10, 0xa00);
eth              2371 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		regmap_write(eth->pctl, GPIO_OD33_CTRL8, 0x5);
eth              2374 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		regmap_write(eth->pctl, GPIO_BIAS_CTRL, 0x0);
eth              2382 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, MAC_MCR_FORCE_LINK_DOWN, MTK_MAC_MCR(i));
eth              2387 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
eth              2388 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
eth              2391 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
eth              2394 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_PDMA_DELAY_RX_DELAY, MTK_PDMA_DELAY_INT);
eth              2397 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, 0, MTK_QDMA_DELAY_INT);
eth              2398 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_tx_irq_disable(eth, ~0);
eth              2399 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_rx_irq_disable(eth, ~0);
eth              2400 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, RST_GL_PSE, MTK_RST_GL);
eth              2401 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, 0, MTK_RST_GL);
eth              2404 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_TX_DONE_INT, MTK_PDMA_INT_GRP1);
eth              2405 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_RX_DONE_INT, MTK_PDMA_INT_GRP2);
eth              2406 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_TX_DONE_INT, MTK_QDMA_INT_GRP1);
eth              2407 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, MTK_RX_DONE_INT, MTK_QDMA_INT_GRP2);
eth              2408 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
eth              2411 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		u32 val = mtk_r32(eth, MTK_GDMA_FWD_CFG(i));
eth              2420 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i));
eth              2426 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	pm_runtime_put_sync(eth->dev);
eth              2427 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	pm_runtime_disable(eth->dev);
eth              2432 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_hw_deinit(struct mtk_eth *eth)
eth              2434 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!test_and_clear_bit(MTK_HW_INIT, &eth->state))
eth              2437 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_clk_disable(eth);
eth              2439 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	pm_runtime_put_sync(eth->dev);
eth              2440 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	pm_runtime_disable(eth->dev);
eth              2448 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth              2458 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev, "generated random MAC address %pM\n",
eth              2468 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = mac->hw;
eth              2471 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_tx_irq_disable(eth, ~0);
eth              2472 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_rx_irq_disable(eth, ~0);
eth              2493 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = container_of(work, struct mtk_eth, pending_work);
eth              2499 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__);
eth              2501 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	while (test_and_set_bit_lock(MTK_RESETTING, &eth->state))
eth              2504 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dev_dbg(eth->dev, "[%s][%d] mtk_stop starts\n", __func__, __LINE__);
eth              2507 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->netdev[i])
eth              2509 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_stop(eth->netdev[i]);
eth              2512 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dev_dbg(eth->dev, "[%s][%d] mtk_stop ends\n", __func__, __LINE__);
eth              2517 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_hw_deinit(eth);
eth              2519 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (eth->dev->pins)
eth              2520 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		pinctrl_select_state(eth->dev->pins->p,
eth              2521 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				     eth->dev->pins->default_state);
eth              2522 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_hw_init(eth);
eth              2528 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = mtk_open(eth->netdev[i]);
eth              2530 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			netif_alert(eth, ifup, eth->netdev[i],
eth              2532 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			dev_close(eth->netdev[i]);
eth              2536 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__);
eth              2538 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	clear_bit_unlock(MTK_RESETTING, &eth->state);
eth              2543 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_free_dev(struct mtk_eth *eth)
eth              2548 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->netdev[i])
eth              2550 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		free_netdev(eth->netdev[i]);
eth              2556 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_unreg_dev(struct mtk_eth *eth)
eth              2561 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->netdev[i])
eth              2563 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		unregister_netdev(eth->netdev[i]);
eth              2569 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_cleanup(struct mtk_eth *eth)
eth              2571 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_unreg_dev(eth);
eth              2572 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_free_dev(eth);
eth              2573 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	cancel_work_sync(&eth->pending_work);
eth              2780 drivers/net/ethernet/mediatek/mtk_eth_soc.c static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
eth              2788 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev, "missing mac id\n");
eth              2794 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev, "%d is not a valid mac id\n", id);
eth              2798 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (eth->netdev[id]) {
eth              2799 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev, "duplicate mac id found: %d\n", id);
eth              2803 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[id] = alloc_etherdev(sizeof(*mac));
eth              2804 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!eth->netdev[id]) {
eth              2805 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev, "alloc_etherdev failed\n");
eth              2808 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mac = netdev_priv(eth->netdev[id]);
eth              2809 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->mac[id] = mac;
eth              2811 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mac->hw = eth;
eth              2817 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mac->hw_stats = devm_kzalloc(eth->dev,
eth              2821 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev, "failed to allocate counter memory\n");
eth              2832 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		dev_err(eth->dev, "incorrect phy-mode\n");
eth              2842 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mac->phylink_config.dev = &eth->netdev[id]->dev;
eth              2855 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	SET_NETDEV_DEV(eth->netdev[id], eth->dev);
eth              2856 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[id]->watchdog_timeo = 5 * HZ;
eth              2857 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[id]->netdev_ops = &mtk_netdev_ops;
eth              2858 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[id]->base_addr = (unsigned long)eth->base;
eth              2860 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[id]->hw_features = eth->soc->hw_features;
eth              2861 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (eth->hwlro)
eth              2862 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->netdev[id]->hw_features |= NETIF_F_LRO;
eth              2864 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[id]->vlan_features = eth->soc->hw_features &
eth              2866 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[id]->features |= eth->soc->hw_features;
eth              2867 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[id]->ethtool_ops = &mtk_ethtool_ops;
eth              2869 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[id]->irq = eth->irq[0];
eth              2870 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->netdev[id]->dev.of_node = np;
eth              2875 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	free_netdev(eth->netdev[id]);
eth              2882 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth;
eth              2885 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth = devm_kzalloc(&pdev->dev, sizeof(*eth), GFP_KERNEL);
eth              2886 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!eth)
eth              2889 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->soc = of_device_get_match_data(&pdev->dev);
eth              2891 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->dev = &pdev->dev;
eth              2892 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->base = devm_platform_ioremap_resource(pdev, 0);
eth              2893 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (IS_ERR(eth->base))
eth              2894 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		return PTR_ERR(eth->base);
eth              2896 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
eth              2897 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->tx_int_mask_reg = MTK_QDMA_INT_MASK;
eth              2898 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->tx_int_status_reg = MTK_QDMA_INT_STATUS;
eth              2900 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->tx_int_mask_reg = MTK_PDMA_INT_MASK;
eth              2901 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->tx_int_status_reg = MTK_PDMA_INT_STATUS;
eth              2904 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
eth              2905 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA;
eth              2906 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->ip_align = NET_IP_ALIGN;
eth              2908 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->rx_dma_l4_valid = RX_DMA_L4_VALID;
eth              2911 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_lock_init(&eth->page_lock);
eth              2912 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_lock_init(&eth->tx_irq_lock);
eth              2913 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	spin_lock_init(&eth->rx_irq_lock);
eth              2915 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
eth              2916 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->ethsys = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
eth              2918 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (IS_ERR(eth->ethsys)) {
eth              2920 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			return PTR_ERR(eth->ethsys);
eth              2924 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_INFRA)) {
eth              2925 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->infra = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
eth              2927 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (IS_ERR(eth->infra)) {
eth              2929 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			return PTR_ERR(eth->infra);
eth              2933 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
eth              2934 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->sgmii = devm_kzalloc(eth->dev, sizeof(*eth->sgmii),
eth              2936 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->sgmii)
eth              2939 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = mtk_sgmii_init(eth->sgmii, pdev->dev.of_node,
eth              2940 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				     eth->soc->ana_rgc3);
eth              2946 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (eth->soc->required_pctl) {
eth              2947 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->pctl = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
eth              2949 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (IS_ERR(eth->pctl)) {
eth              2951 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			return PTR_ERR(eth->pctl);
eth              2956 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT) && i > 0)
eth              2957 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			eth->irq[i] = eth->irq[0];
eth              2959 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			eth->irq[i] = platform_get_irq(pdev, i);
eth              2960 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (eth->irq[i] < 0) {
eth              2965 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	for (i = 0; i < ARRAY_SIZE(eth->clks); i++) {
eth              2966 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		eth->clks[i] = devm_clk_get(eth->dev,
eth              2968 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (IS_ERR(eth->clks[i])) {
eth              2969 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			if (PTR_ERR(eth->clks[i]) == -EPROBE_DEFER)
eth              2971 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			if (eth->soc->required_clks & BIT(i)) {
eth              2976 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			eth->clks[i] = NULL;
eth              2980 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
eth              2981 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	INIT_WORK(&eth->pending_work, mtk_pending_work);
eth              2983 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	err = mtk_hw_init(eth);
eth              2987 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	eth->hwlro = MTK_HAS_CAPS(eth->soc->caps, MTK_HWLRO);
eth              2997 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = mtk_add_mac(eth, mac_np);
eth              3004 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
eth              3005 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = devm_request_irq(eth->dev, eth->irq[0],
eth              3007 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				       dev_name(eth->dev), eth);
eth              3009 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = devm_request_irq(eth->dev, eth->irq[1],
eth              3011 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				       dev_name(eth->dev), eth);
eth              3015 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = devm_request_irq(eth->dev, eth->irq[2],
eth              3017 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				       dev_name(eth->dev), eth);
eth              3023 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
eth              3024 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = mtk_mdio_init(eth);
eth              3030 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->netdev[i])
eth              3033 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		err = register_netdev(eth->netdev[i]);
eth              3035 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			dev_err(eth->dev, "error bringing up device\n");
eth              3038 drivers/net/ethernet/mediatek/mtk_eth_soc.c 			netif_info(eth, probe, eth->netdev[i],
eth              3040 drivers/net/ethernet/mediatek/mtk_eth_soc.c 				   eth->netdev[i]->base_addr, eth->irq[0]);
eth              3046 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	init_dummy_netdev(&eth->dummy_dev);
eth              3047 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	netif_napi_add(&eth->dummy_dev, &eth->tx_napi, mtk_napi_tx,
eth              3049 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	netif_napi_add(&eth->dummy_dev, &eth->rx_napi, mtk_napi_rx,
eth              3052 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	platform_set_drvdata(pdev, eth);
eth              3057 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_mdio_cleanup(eth);
eth              3059 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_free_dev(eth);
eth              3061 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_hw_deinit(eth);
eth              3068 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	struct mtk_eth *eth = platform_get_drvdata(pdev);
eth              3074 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		if (!eth->netdev[i])
eth              3076 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mtk_stop(eth->netdev[i]);
eth              3077 drivers/net/ethernet/mediatek/mtk_eth_soc.c 		mac = netdev_priv(eth->netdev[i]);
eth              3081 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_hw_deinit(eth);
eth              3083 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	netif_napi_del(&eth->tx_napi);
eth              3084 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	netif_napi_del(&eth->rx_napi);
eth              3085 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_cleanup(eth);
eth              3086 drivers/net/ethernet/mediatek/mtk_eth_soc.c 	mtk_mdio_cleanup(eth);
eth               926 drivers/net/ethernet/mediatek/mtk_eth_soc.h void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg);
eth               927 drivers/net/ethernet/mediatek/mtk_eth_soc.h u32 mtk_r32(struct mtk_eth *eth, unsigned reg);
eth               934 drivers/net/ethernet/mediatek/mtk_eth_soc.h void mtk_sgmii_restart_an(struct mtk_eth *eth, int mac_id);
eth               936 drivers/net/ethernet/mediatek/mtk_eth_soc.h int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id);
eth               937 drivers/net/ethernet/mediatek/mtk_eth_soc.h int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id);
eth               938 drivers/net/ethernet/mediatek/mtk_eth_soc.h int mtk_gmac_rgmii_path_setup(struct mtk_eth *eth, int mac_id);
eth               111 drivers/net/ethernet/mediatek/mtk_sgmii.c void mtk_sgmii_restart_an(struct mtk_eth *eth, int mac_id)
eth               113 drivers/net/ethernet/mediatek/mtk_sgmii.c 	struct mtk_sgmii *ss = eth->sgmii;
eth               117 drivers/net/ethernet/mediatek/mtk_sgmii.c 	sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
eth              1400 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c 	memcpy(spec_l2->eth.dst_mac_msk, &mac_msk, ETH_ALEN);
eth              1401 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c 	memcpy(spec_l2->eth.dst_mac, mac, ETH_ALEN);
eth              1405 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c 		spec_l2->eth.vlan_id = cmd->fs.h_ext.vlan_tci;
eth              1406 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c 		spec_l2->eth.vlan_id_msk = cpu_to_be16(VLAN_VID_MASK);
eth              1566 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c 		spec_l2->eth.ether_type = eth_spec->h_proto;
eth              1568 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c 			spec_l2->eth.ether_type_enable = 1;
eth               250 drivers/net/ethernet/mellanox/mlx4/en_netdev.c 	memcpy(spec_eth.eth.dst_mac, priv->dev->dev_addr, ETH_ALEN);
eth               251 drivers/net/ethernet/mellanox/mlx4/en_netdev.c 	memcpy(spec_eth.eth.dst_mac_msk, &mac_mask, ETH_ALEN);
eth               593 drivers/net/ethernet/mellanox/mlx4/en_netdev.c 		memcpy(spec_eth.eth.dst_mac, mac, ETH_ALEN);
eth               594 drivers/net/ethernet/mellanox/mlx4/en_netdev.c 		memcpy(spec_eth.eth.dst_mac_msk, &mac_mask, ETH_ALEN);
eth               827 drivers/net/ethernet/mellanox/mlx4/main.c 	if (is_multicast_ether_addr(eth_header->eth.dst_mac) ||
eth               828 drivers/net/ethernet/mellanox/mlx4/main.c 	    is_broadcast_ether_addr(eth_header->eth.dst_mac)) {
eth               829 drivers/net/ethernet/mellanox/mlx4/main.c 		struct mlx4_net_trans_rule_hw_eth *eth =
eth               831 drivers/net/ethernet/mellanox/mlx4/main.c 		struct _rule_hw *next_rule = (struct _rule_hw *)(eth + 1);
eth               847 drivers/net/ethernet/mellanox/mlx4/mcg.c 		memcpy(rule_hw->eth.dst_mac, spec->eth.dst_mac, ETH_ALEN);
eth               848 drivers/net/ethernet/mellanox/mlx4/mcg.c 		memcpy(rule_hw->eth.dst_mac_msk, spec->eth.dst_mac_msk,
eth               850 drivers/net/ethernet/mellanox/mlx4/mcg.c 		memcpy(rule_hw->eth.src_mac, spec->eth.src_mac, ETH_ALEN);
eth               851 drivers/net/ethernet/mellanox/mlx4/mcg.c 		memcpy(rule_hw->eth.src_mac_msk, spec->eth.src_mac_msk,
eth               853 drivers/net/ethernet/mellanox/mlx4/mcg.c 		if (spec->eth.ether_type_enable) {
eth               854 drivers/net/ethernet/mellanox/mlx4/mcg.c 			rule_hw->eth.ether_type_enable = 1;
eth               855 drivers/net/ethernet/mellanox/mlx4/mcg.c 			rule_hw->eth.ether_type = spec->eth.ether_type;
eth               857 drivers/net/ethernet/mellanox/mlx4/mcg.c 		rule_hw->eth.vlan_tag = spec->eth.vlan_id;
eth               858 drivers/net/ethernet/mellanox/mlx4/mcg.c 		rule_hw->eth.vlan_tag_msk = spec->eth.vlan_id_msk;
eth               917 drivers/net/ethernet/mellanox/mlx4/mcg.c 					"dmac = %pM ", &cur->eth.dst_mac);
eth               918 drivers/net/ethernet/mellanox/mlx4/mcg.c 			if (cur->eth.ether_type)
eth               921 drivers/net/ethernet/mellanox/mlx4/mcg.c 						be16_to_cpu(cur->eth.ether_type));
eth               922 drivers/net/ethernet/mellanox/mlx4/mcg.c 			if (cur->eth.vlan_id)
eth               925 drivers/net/ethernet/mellanox/mlx4/mcg.c 						be16_to_cpu(cur->eth.vlan_id));
eth              1072 drivers/net/ethernet/mellanox/mlx4/mcg.c 	memcpy(spec_eth_outer.eth.dst_mac, addr, ETH_ALEN);
eth              1073 drivers/net/ethernet/mellanox/mlx4/mcg.c 	memcpy(spec_eth_outer.eth.dst_mac_msk, &mac_mask, ETH_ALEN);
eth              1390 drivers/net/ethernet/mellanox/mlx4/mcg.c 			memcpy(spec.eth.dst_mac, &gid[10], ETH_ALEN);
eth              1391 drivers/net/ethernet/mellanox/mlx4/mcg.c 			memcpy(spec.eth.dst_mac_msk, &mac_mask, ETH_ALEN);
eth              4206 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	if (!is_multicast_ether_addr(eth_header->eth.dst_mac) &&
eth              4207 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 	    !is_broadcast_ether_addr(eth_header->eth.dst_mac)) {
eth              4210 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 			if (ether_addr_equal((u8 *)&be_mac, eth_header->eth.dst_mac))
eth              4214 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 		       eth_header->eth.dst_mac, slave);
eth               198 drivers/net/ethernet/mellanox/mlx5/core/en.h 			struct mlx5_wqe_eth_seg  eth;
eth               188 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	struct ethhdr *eth = (struct ethhdr *)buf;
eth               191 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	ether_addr_copy(eth->h_dest, e->h_dest);
eth               192 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 	ether_addr_copy(eth->h_source, dev->dev_addr);
eth               195 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 					((char *)eth + ETH_HLEN);
eth               197 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 		eth->h_proto = vlan_dev_vlan_proto(dev);
eth               201 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 		eth->h_proto = htons(proto);
eth               202 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 		ip = (char *)eth + ETH_HLEN;
eth               309 drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c 	struct mlx5_wqe_eth_seg  *eseg = &wqe->eth;
eth                91 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c 	struct ethhdr *eth;
eth                96 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c 	eth = (struct ethhdr *)skb_push(skb, sizeof(*mdata));
eth                98 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c 	mdata = (struct mlx5e_ipsec_metadata *)(eth + 1);
eth               103 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c 	eth->h_proto = cpu_to_be16(MLX5E_METADATA_ETHER_TYPE);
eth               279 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c 	mlx5e_ipsec_set_swp(skb, &wqe->eth, x->props.mode, xo);
eth                82 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c 	struct ethhdr *eth;
eth                87 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c 	eth = (struct ethhdr *)skb_push(skb, sizeof(struct mlx5e_tls_metadata));
eth                89 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c 	pet = (struct mlx5e_tls_metadata *)(eth + 1);
eth                94 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c 	eth->h_proto = cpu_to_be16(MLX5E_METADATA_ETHER_TYPE);
eth              1498 drivers/net/ethernet/mellanox/mlx5/core/en_main.c 			struct mlx5_wqe_eth_seg  *eseg = &wqe->eth;
eth               602 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c 	struct ethhdr *eth = (struct ethhdr *)e->encap_header;
eth               626 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c 		ether_addr_copy(eth->h_dest, ha);
eth               630 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c 		ether_addr_copy(eth->h_source, e->route_dev->dev_addr);
eth               730 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c 	struct ethhdr	*eth = (struct ethhdr *)(skb->data);
eth               738 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c 	proto = __vlan_get_protocol(skb, eth->h_proto, &network_depth);
eth              2201 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 	struct ethhdr  eth;
eth              2216 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 	[FLOW_ACT_MANGLE_HDR_TYPE_ETH] = offsetof(struct pedit_headers, eth),
eth              2291 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 	OFFLOAD(DMAC_47_16, 4, eth.h_dest[0], 0, dmac_47_16),
eth              2292 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 	OFFLOAD(DMAC_15_0,  2, eth.h_dest[4], 0, dmac_15_0),
eth              2293 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 	OFFLOAD(SMAC_47_16, 4, eth.h_source[0], 0, smac_47_16),
eth              2294 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 	OFFLOAD(SMAC_15_0,  2, eth.h_source[4], 0, smac_15_0),
eth              2295 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 	OFFLOAD(ETHERTYPE,  2, eth.h_proto, 0, ethertype),
eth               322 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c 		struct mlx5_wqe_eth_seg cur_eth = wqe->eth;
eth               330 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c 		wqe->eth = cur_eth;
eth               340 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c 	eseg = &wqe->eth;
eth               653 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c 	eseg     = &wqe->eth;
eth               109 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h 	struct mlx5_wqe_eth_seg      eth;
eth               521 drivers/net/ethernet/netronome/nfp/flower/offload.c 	struct nfp_fl_set_eth *eth;
eth               555 drivers/net/ethernet/netronome/nfp/flower/offload.c 			eth = (struct nfp_fl_set_eth *)a;
eth               557 drivers/net/ethernet/netronome/nfp/flower/offload.c 				merge->l2.mac_dst[i] |= eth->eth_addr_mask[i];
eth               560 drivers/net/ethernet/netronome/nfp/flower/offload.c 					eth->eth_addr_mask[ETH_ALEN + i];
eth                50 drivers/net/ethernet/pensando/ionic/ionic_debugfs.c 	seq_printf(seq, "max_ucast_filters:  %d\n", ident->lif.eth.max_ucast_filters);
eth                51 drivers/net/ethernet/pensando/ionic/ionic_debugfs.c 	seq_printf(seq, "max_mcast_filters:  %d\n", ident->lif.eth.max_mcast_filters);
eth                70 drivers/net/ethernet/pensando/ionic/ionic_debugfs.c 			   (u32 *)&ionic->ident.lif.eth.config.queue_count[IONIC_QTYPE_TXQ]);
eth                72 drivers/net/ethernet/pensando/ionic/ionic_debugfs.c 			   (u32 *)&ionic->ident.lif.eth.config.queue_count[IONIC_QTYPE_RXQ]);
eth               580 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c 	return le16_to_cpu(lif->ionic->ident.lif.eth.rss_ind_tbl_sz);
eth               595 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c 		tbl_sz = le16_to_cpu(lif->ionic->ident.lif.eth.rss_ind_tbl_sz);
eth               416 drivers/net/ethernet/pensando/ionic/ionic_if.h 		} eth;
eth               868 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		nmfilters = le32_to_cpu(ionic->ident.lif.eth.max_mcast_filters);
eth               869 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		nufilters = le32_to_cpu(ionic->ident.lif.eth.max_ucast_filters);
eth               998 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	nfilters = le32_to_cpu(ident->lif.eth.max_ucast_filters);
eth              1010 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	nfilters = le32_to_cpu(ident->lif.eth.max_mcast_filters);
eth              1354 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		tbl_sz = le16_to_cpu(lif->ionic->ident.lif.eth.rss_ind_tbl_sz);
eth              1378 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	tbl_sz = le16_to_cpu(lif->ionic->ident.lif.eth.rss_ind_tbl_sz);
eth              1389 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	tbl_sz = le16_to_cpu(lif->ionic->ident.lif.eth.rss_ind_tbl_sz);
eth              1705 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	tbl_sz = le16_to_cpu(lif->ionic->ident.lif.eth.rss_ind_tbl_sz);
eth              2186 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		le32_to_cpu(lid->eth.max_ucast_filters));
eth              2188 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		le32_to_cpu(lid->eth.max_mcast_filters));
eth              2190 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		le64_to_cpu(lid->eth.config.features));
eth              2192 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		le32_to_cpu(lid->eth.config.queue_count[IONIC_QTYPE_ADMINQ]));
eth              2194 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		le32_to_cpu(lid->eth.config.queue_count[IONIC_QTYPE_NOTIFYQ]));
eth              2196 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		le32_to_cpu(lid->eth.config.queue_count[IONIC_QTYPE_RXQ]));
eth              2198 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		le32_to_cpu(lid->eth.config.queue_count[IONIC_QTYPE_TXQ]));
eth              2199 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	dev_dbg(ionic->dev, "eth.config.name %s\n", lid->eth.config.name);
eth              2200 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	dev_dbg(ionic->dev, "eth.config.mac %pM\n", lid->eth.config.mac);
eth              2202 drivers/net/ethernet/pensando/ionic/ionic_lif.c 		le32_to_cpu(lid->eth.config.mtu));
eth              2220 drivers/net/ethernet/pensando/ionic/ionic_lif.c 	lc = &ident->lif.eth.config;
eth               847 drivers/net/ethernet/qlogic/qed/qed.h 		struct qed_eth_cb_ops		*eth;
eth               472 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		p_prio->eth = p_results->arr[DCBX_PROTOCOL_ETH].priority;
eth               477 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		   p_prio->eth);
eth              10456 drivers/net/ethernet/qlogic/qed/qed_hsi.h 	struct pstorm_fcoe_eth_context_section eth;
eth              11917 drivers/net/ethernet/qlogic/qed/qed_hsi.h 	struct eth_stats eth;
eth               304 drivers/net/ethernet/qlogic/qed/qed_hw.h 	}	eth;
eth              1794 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_64_byte_packets += port_stats.eth.r64;
eth              1795 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_65_to_127_byte_packets += port_stats.eth.r127;
eth              1796 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_128_to_255_byte_packets += port_stats.eth.r255;
eth              1797 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_256_to_511_byte_packets += port_stats.eth.r511;
eth              1798 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_512_to_1023_byte_packets += port_stats.eth.r1023;
eth              1799 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_1024_to_1518_byte_packets += port_stats.eth.r1518;
eth              1800 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_crc_errors += port_stats.eth.rfcs;
eth              1801 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_mac_crtl_frames += port_stats.eth.rxcf;
eth              1802 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_pause_frames += port_stats.eth.rxpf;
eth              1803 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_pfc_frames += port_stats.eth.rxpp;
eth              1804 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_align_errors += port_stats.eth.raln;
eth              1805 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_carrier_errors += port_stats.eth.rfcr;
eth              1806 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_oversize_packets += port_stats.eth.rovr;
eth              1807 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_jabbers += port_stats.eth.rjbr;
eth              1808 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_undersize_packets += port_stats.eth.rund;
eth              1809 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_fragments += port_stats.eth.rfrg;
eth              1810 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_64_byte_packets += port_stats.eth.t64;
eth              1811 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_65_to_127_byte_packets += port_stats.eth.t127;
eth              1812 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_128_to_255_byte_packets += port_stats.eth.t255;
eth              1813 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_256_to_511_byte_packets += port_stats.eth.t511;
eth              1814 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_512_to_1023_byte_packets += port_stats.eth.t1023;
eth              1815 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_1024_to_1518_byte_packets += port_stats.eth.t1518;
eth              1816 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_pause_frames += port_stats.eth.txpf;
eth              1817 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_pfc_frames += port_stats.eth.txpp;
eth              1818 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_mac_bytes += port_stats.eth.rbyte;
eth              1819 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_mac_uc_packets += port_stats.eth.rxuca;
eth              1820 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_mac_mc_packets += port_stats.eth.rxmca;
eth              1821 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_mac_bc_packets += port_stats.eth.rxbca;
eth              1822 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->rx_mac_frames_ok += port_stats.eth.rxpok;
eth              1823 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_mac_bytes += port_stats.eth.tbyte;
eth              1824 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_mac_uc_packets += port_stats.eth.txuca;
eth              1825 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_mac_mc_packets += port_stats.eth.txmca;
eth              1826 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_mac_bc_packets += port_stats.eth.txbca;
eth              1827 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->tx_mac_ctrl_frames += port_stats.eth.txcf;
eth              1837 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u0.bb0.r1522;
eth              1839 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u0.bb0.r2047;
eth              1841 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u0.bb0.r4095;
eth              1843 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u0.bb0.r9216;
eth              1845 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u0.bb0.r16383;
eth              1847 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u1.bb1.t2047;
eth              1849 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u1.bb1.t4095;
eth              1851 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u1.bb1.t9216;
eth              1853 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u1.bb1.t16383;
eth              1854 drivers/net/ethernet/qlogic/qed/qed_l2.c 		p_bb->tx_lpi_entry_count += port_stats.eth.u2.bb2.tlpiec;
eth              1855 drivers/net/ethernet/qlogic/qed/qed_l2.c 		p_bb->tx_total_collisions += port_stats.eth.u2.bb2.tncl;
eth              1860 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u0.ah0.r1519_to_max;
eth              1862 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    port_stats.eth.u1.ah1.t1519_to_max;
eth              2301 drivers/net/ethernet/qlogic/qed/qed_l2.c 	cdev->protocol_ops.eth = ops;
eth              2797 drivers/net/ethernet/qlogic/qed/qed_main.c 		ops->get_protocol_tlv_data(cdev->ops_cookie, &tlv_buf->eth);
eth               249 drivers/net/ethernet/qlogic/qed/qed_mcp.h 	struct qed_mfw_tlv_eth eth;
eth              1214 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 							&p_tlv_data->eth,
eth              2261 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_eth_cb_ops *ops = p_hwfn->cdev->protocol_ops.eth;
eth              1687 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_eth_cb_ops *ops = hwfn->cdev->protocol_ops.eth;
eth               459 drivers/net/ethernet/qlogic/qede/qede_filter.c 	struct ethhdr *eth;
eth               534 drivers/net/ethernet/qlogic/qede/qede_filter.c 	eth = (struct ethhdr *)n->data;
eth               535 drivers/net/ethernet/qlogic/qede/qede_filter.c 	eth->h_proto = skb->protocol;
eth              1514 drivers/net/ethernet/qlogic/qede/qede_filter.c 	struct ethhdr *eth = (struct ethhdr *)header;
eth              1516 drivers/net/ethernet/qlogic/qede/qede_filter.c 	eth->h_proto = t->eth_proto;
eth              1561 drivers/net/ethernet/qlogic/qede/qede_filter.c 	struct ethhdr *eth = (struct ethhdr *)header;
eth              1563 drivers/net/ethernet/qlogic/qede/qede_filter.c 	eth->h_proto = t->eth_proto;
eth              1231 drivers/net/ethernet/sgi/ioc3-eth.c 	ip->regs = &ioc3->eth;
eth               109 drivers/net/ethernet/sgi/meth.c 	mace->eth.mac_addr = macaddr;
eth               116 drivers/net/ethernet/sgi/meth.c 	while ((___rval = mace->eth.phy_data) & MDIO_BUSY) {	\
eth               124 drivers/net/ethernet/sgi/meth.c 	mace->eth.phy_regs = (priv->phy_addr << 5) | (phyreg & 0x1f);
eth               126 drivers/net/ethernet/sgi/meth.c 	mace->eth.phy_trans_go = 1;
eth               195 drivers/net/ethernet/sgi/meth.c 		mace->eth.mac_ctrl = priv->mac_ctrl;
eth               204 drivers/net/ethernet/sgi/meth.c 		mace->eth.mac_ctrl = priv->mac_ctrl;
eth               218 drivers/net/ethernet/sgi/meth.c 	mace->eth.tx_ring_base = priv->tx_ring_dma;
eth               239 drivers/net/ethernet/sgi/meth.c 		mace->eth.rx_fifo = priv->rx_ring_dmas[i];
eth               276 drivers/net/ethernet/sgi/meth.c 	mace->eth.mac_ctrl = SGI_MAC_RESET;
eth               278 drivers/net/ethernet/sgi/meth.c 	mace->eth.mac_ctrl = 0;
eth               295 drivers/net/ethernet/sgi/meth.c 	mace->eth.mac_ctrl = priv->mac_ctrl;
eth               303 drivers/net/ethernet/sgi/meth.c 	mace->eth.dma_ctrl = priv->dma_ctrl;
eth               342 drivers/net/ethernet/sgi/meth.c 	mace->eth.dma_ctrl = priv->dma_ctrl;
eth               366 drivers/net/ethernet/sgi/meth.c 	mace->eth.dma_ctrl = priv->dma_ctrl;
eth               386 drivers/net/ethernet/sgi/meth.c 	mace->eth.dma_ctrl = priv->dma_ctrl;
eth               458 drivers/net/ethernet/sgi/meth.c 		mace->eth.rx_fifo = priv->rx_ring_dmas[priv->rx_write];
eth               464 drivers/net/ethernet/sgi/meth.c 	mace->eth.dma_ctrl = priv->dma_ctrl;
eth               465 drivers/net/ethernet/sgi/meth.c 	mace->eth.int_stat = METH_INT_RX_THRESHOLD;
eth               487 drivers/net/ethernet/sgi/meth.c 	mace->eth.dma_ctrl = priv->dma_ctrl;
eth               535 drivers/net/ethernet/sgi/meth.c 	mace->eth.int_stat = METH_INT_TX_EMPTY | METH_INT_TX_PKT;
eth               558 drivers/net/ethernet/sgi/meth.c 		mace->eth.int_stat = METH_INT_RX_UNDERFLOW;
eth               563 drivers/net/ethernet/sgi/meth.c 		mace->eth.dma_ctrl = priv->dma_ctrl;
eth               567 drivers/net/ethernet/sgi/meth.c 	mace->eth.int_stat = METH_INT_ERROR;
eth               579 drivers/net/ethernet/sgi/meth.c 	status = mace->eth.int_stat;
eth               598 drivers/net/ethernet/sgi/meth.c 		status = mace->eth.int_stat;
eth               692 drivers/net/ethernet/sgi/meth.c 	mace->eth.tx_info = priv->tx_write;
eth               707 drivers/net/ethernet/sgi/meth.c 	mace->eth.dma_ctrl = priv->dma_ctrl;
eth               720 drivers/net/ethernet/sgi/meth.c 	mace->eth.dma_ctrl = priv->dma_ctrl;
eth               753 drivers/net/ethernet/sgi/meth.c 	mace->eth.dma_ctrl = priv->dma_ctrl;
eth               803 drivers/net/ethernet/sgi/meth.c 	mace->eth.mac_ctrl = priv->mac_ctrl;
eth               804 drivers/net/ethernet/sgi/meth.c 	mace->eth.mcast_filter = priv->mcast_filter;
eth               838 drivers/net/ethernet/sgi/meth.c 	dev->base_addr		= (unsigned long)&mace->eth;
eth               853 drivers/net/ethernet/sgi/meth.c 	       dev->name, (unsigned int)(mace->eth.mac_ctrl >> 29));
eth               335 drivers/net/ethernet/synopsys/dwc-xlgmac-common.c 	struct ethhdr *eth = (struct ethhdr *)skb->data;
eth               344 drivers/net/ethernet/synopsys/dwc-xlgmac-common.c 	netdev_dbg(netdev, "Dst MAC addr: %pM\n", eth->h_dest);
eth               345 drivers/net/ethernet/synopsys/dwc-xlgmac-common.c 	netdev_dbg(netdev, "Src MAC addr: %pM\n", eth->h_source);
eth               346 drivers/net/ethernet/synopsys/dwc-xlgmac-common.c 	netdev_dbg(netdev, "Protocol: %#06hx\n", ntohs(eth->h_proto));
eth               636 drivers/net/fjes/fjes_main.c 	struct ethhdr *eth;
eth               647 drivers/net/fjes/fjes_main.c 	eth = (struct ethhdr *)skb->data;
eth               655 drivers/net/fjes/fjes_main.c 	if (is_multicast_ether_addr(eth->h_dest)) {
eth               659 drivers/net/fjes/fjes_main.c 	} else if (is_local_ether_addr(eth->h_dest)) {
eth               660 drivers/net/fjes/fjes_main.c 		dest_epid = eth->h_dest[ETH_ALEN - 1];
eth               663 drivers/net/fjes/fjes_main.c 		if ((eth->h_dest[0] == 0x02) &&
eth               664 drivers/net/fjes/fjes_main.c 		    (0x00 == (eth->h_dest[1] | eth->h_dest[2] |
eth               665 drivers/net/fjes/fjes_main.c 			      eth->h_dest[3] | eth->h_dest[4])) &&
eth               912 drivers/net/geneve.c 			struct ethhdr *eth = eth_hdr(skb);
eth               914 drivers/net/geneve.c 			if (ntohs(eth->h_proto) == ETH_P_IPV6) {
eth               916 drivers/net/geneve.c 			} else if (ntohs(eth->h_proto) == ETH_P_IP) {
eth               153 drivers/net/hamradio/bpqether.c 	struct ethhdr *eth;
eth               178 drivers/net/hamradio/bpqether.c 	eth = eth_hdr(skb);
eth               181 drivers/net/hamradio/bpqether.c 	    !ether_addr_equal(eth->h_source, bpq->acpt_addr))
eth               593 drivers/net/ipvlan/ipvlan_core.c 	struct ethhdr *eth = eth_hdr(skb);
eth               599 drivers/net/ipvlan/ipvlan_core.c 	    ether_addr_equal(eth->h_dest, eth->h_source)) {
eth               622 drivers/net/ipvlan/ipvlan_core.c 	} else if (is_multicast_ether_addr(eth->h_dest)) {
eth               663 drivers/net/ipvlan/ipvlan_core.c 	struct ethhdr *eth = eth_hdr(skb);
eth               668 drivers/net/ipvlan/ipvlan_core.c 	if (ether_addr_equal(eth->h_source, skb->dev->dev_addr)) {
eth               706 drivers/net/ipvlan/ipvlan_core.c 	struct ethhdr *eth = eth_hdr(skb);
eth               709 drivers/net/ipvlan/ipvlan_core.c 	if (is_multicast_ether_addr(eth->h_dest)) {
eth                31 drivers/net/macsec.c 	struct ethhdr eth;
eth               426 drivers/net/macsec.c 		sci = make_sci(hdr->eth.h_source, MACSEC_PORT_ES);
eth               454 drivers/net/macsec.c 	h->eth.h_proto = htons(ETH_P_MACSEC);
eth               653 drivers/net/macsec.c 	struct ethhdr *eth;
eth               698 drivers/net/macsec.c 	eth = eth_hdr(skb);
eth               701 drivers/net/macsec.c 	memmove(hh, eth, 2 * ETH_ALEN);
eth              1095 drivers/net/macsec.c 	if (hdr->eth.h_proto != htons(ETH_P_MACSEC)) {
eth               226 drivers/net/macvlan.c 				 const struct ethhdr *eth, bool local)
eth               234 drivers/net/macvlan.c 	if (ether_addr_equal_64bits(eth->h_dest, dev->broadcast))
eth               262 drivers/net/macvlan.c 	const struct ethhdr *eth = eth_hdr(skb);
eth               277 drivers/net/macvlan.c 			hash = mc_hash(vlan, eth->h_dest);
eth               285 drivers/net/macvlan.c 					nskb, vlan, eth,
eth               442 drivers/net/macvlan.c 	const struct ethhdr *eth = eth_hdr(skb);
eth               451 drivers/net/macvlan.c 	if (is_multicast_ether_addr(eth->h_dest)) {
eth               458 drivers/net/macvlan.c 		eth = eth_hdr(skb);
eth               459 drivers/net/macvlan.c 		macvlan_forward_source(skb, port, eth->h_source);
eth               460 drivers/net/macvlan.c 		src = macvlan_hash_lookup(port, eth->h_source);
eth               465 drivers/net/macvlan.c 			ret = macvlan_broadcast_one(skb, vlan, eth, 0) ?:
eth               471 drivers/net/macvlan.c 		hash = mc_hash(NULL, eth->h_dest);
eth               478 drivers/net/macvlan.c 	macvlan_forward_source(skb, port, eth->h_source);
eth               483 drivers/net/macvlan.c 		vlan = macvlan_hash_lookup(port, eth->h_dest);
eth               518 drivers/net/macvlan.c 		const struct ethhdr *eth = skb_eth_hdr(skb);
eth               521 drivers/net/macvlan.c 		if (is_multicast_ether_addr(eth->h_dest)) {
eth               527 drivers/net/macvlan.c 		dest = macvlan_hash_lookup(port, eth->h_dest);
eth               369 drivers/net/netdevsim/dev.c 	struct ethhdr *eth;
eth               378 drivers/net/netdevsim/dev.c 	eth = skb_put(skb, sizeof(struct ethhdr));
eth               379 drivers/net/netdevsim/dev.c 	eth_random_addr(eth->h_dest);
eth               380 drivers/net/netdevsim/dev.c 	eth_random_addr(eth->h_source);
eth               381 drivers/net/netdevsim/dev.c 	eth->h_proto = htons(ETH_P_IP);
eth               539 drivers/net/plip/plip.c 	struct ethhdr *eth;
eth               544 drivers/net/plip/plip.c 	eth = eth_hdr(skb);
eth               546 drivers/net/plip/plip.c 	if(is_multicast_ether_addr(eth->h_dest))
eth               548 drivers/net/plip/plip.c 		if(ether_addr_equal_64bits(eth->h_dest, dev->broadcast))
eth               559 drivers/net/plip/plip.c 	if (ntohs(eth->h_proto) >= ETH_P_802_3_MIN)
eth               560 drivers/net/plip/plip.c 		return eth->h_proto;
eth              1003 drivers/net/plip/plip.c plip_rewrite_address(const struct net_device *dev, struct ethhdr *eth)
eth              1013 drivers/net/plip/plip.c 			memcpy(eth->h_source, dev->dev_addr, ETH_ALEN);
eth              1014 drivers/net/plip/plip.c 			memset(eth->h_dest, 0xfc, 2);
eth              1015 drivers/net/plip/plip.c 			memcpy(eth->h_dest+2, &ifa->ifa_address, 4);
eth              1042 drivers/net/plip/plip.c 		struct ethhdr *eth;
eth              1044 drivers/net/plip/plip.c 		eth = (struct ethhdr*)(((u8*)hh->hh_data) +
eth              1045 drivers/net/plip/plip.c 				       HH_DATA_OFF(sizeof(*eth)));
eth              1046 drivers/net/plip/plip.c 		plip_rewrite_address (neigh->dev, eth);
eth               173 drivers/net/rionet.c 	struct ethhdr *eth = (struct ethhdr *)skb->data;
eth               180 drivers/net/rionet.c 	if (is_multicast_ether_addr(eth->h_dest))
eth               191 drivers/net/rionet.c 	if (is_multicast_ether_addr(eth->h_dest)) {
eth               203 drivers/net/rionet.c 	} else if (RIONET_MAC_MATCH(eth->h_dest)) {
eth               204 drivers/net/rionet.c 		destid = RIONET_GET_DESTID(eth->h_dest);
eth              1229 drivers/net/vmxnet3/vmxnet3_drv.c 		struct ethhdr *eth;
eth              1247 drivers/net/vmxnet3/vmxnet3_drv.c 	hdr.eth = eth_hdr(skb);
eth              1249 drivers/net/vmxnet3/vmxnet3_drv.c 		BUG_ON(hdr.eth->h_proto != htons(ETH_P_IP) &&
eth              1256 drivers/net/vmxnet3/vmxnet3_drv.c 		BUG_ON(hdr.eth->h_proto != htons(ETH_P_IPV6) &&
eth               342 drivers/net/vrf.c 		struct ethhdr *eth = skb_push(skb, ETH_HLEN);
eth               344 drivers/net/vrf.c 		ether_addr_copy(eth->h_source, vrf_dev->dev_addr);
eth               345 drivers/net/vrf.c 		eth_zero_addr(eth->h_dest);
eth               346 drivers/net/vrf.c 		eth->h_proto = skb->protocol;
eth              2535 drivers/net/vxlan.c 				struct ethhdr *eth = eth_hdr(skb);
eth              2537 drivers/net/vxlan.c 				if (ntohs(eth->h_proto) == ETH_P_IPV6 ||
eth              2538 drivers/net/vxlan.c 				    (ntohs(eth->h_proto) == ETH_P_IP &&
eth              2636 drivers/net/vxlan.c 	struct ethhdr *eth;
eth              2657 drivers/net/vxlan.c 		eth = eth_hdr(skb);
eth              2658 drivers/net/vxlan.c 		if (ntohs(eth->h_proto) == ETH_P_ARP)
eth              2661 drivers/net/vxlan.c 		else if (ntohs(eth->h_proto) == ETH_P_IPV6 &&
eth              2674 drivers/net/vxlan.c 	eth = eth_hdr(skb);
eth              2675 drivers/net/vxlan.c 	f = vxlan_find_mac(vxlan, eth->h_dest, vni);
eth              2679 drivers/net/vxlan.c 	    (ntohs(eth->h_proto) == ETH_P_IP ||
eth              2680 drivers/net/vxlan.c 	     ntohs(eth->h_proto) == ETH_P_IPV6)) {
eth              2683 drivers/net/vxlan.c 			f = vxlan_find_mac(vxlan, eth->h_dest, vni);
eth              2690 drivers/net/vxlan.c 			    !is_multicast_ether_addr(eth->h_dest))
eth              2691 drivers/net/vxlan.c 				vxlan_fdb_miss(vxlan, eth->h_dest);
eth              1557 drivers/net/wireless/ath/ath10k/htt_rx.c 	struct ethhdr *eth;
eth              1581 drivers/net/wireless/ath/ath10k/htt_rx.c 	eth = (struct ethhdr *)msdu->data;
eth              1582 drivers/net/wireless/ath/ath10k/htt_rx.c 	ether_addr_copy(da, eth->h_dest);
eth              1583 drivers/net/wireless/ath/ath10k/htt_rx.c 	ether_addr_copy(sa, eth->h_source);
eth              3530 drivers/net/wireless/ath/ath10k/mac.c 	struct ethhdr *eth;
eth              3545 drivers/net/wireless/ath/ath10k/mac.c 	skb_push(skb, sizeof(*eth));
eth              3547 drivers/net/wireless/ath/ath10k/mac.c 	eth = (void *)skb->data;
eth              3548 drivers/net/wireless/ath/ath10k/mac.c 	ether_addr_copy(eth->h_dest, da);
eth              3549 drivers/net/wireless/ath/ath10k/mac.c 	ether_addr_copy(eth->h_source, sa);
eth              3550 drivers/net/wireless/ath/ath10k/mac.c 	eth->h_proto = type;
eth               612 drivers/net/wireless/ath/wil6210/txrx.h 	struct ethhdr *eth = (void *)skb->data;
eth               614 drivers/net/wireless/ath/wil6210/txrx.h 	return eth->h_dest;
eth               619 drivers/net/wireless/ath/wil6210/txrx.h 	struct ethhdr *eth = (void *)skb->data;
eth               621 drivers/net/wireless/ath/wil6210/txrx.h 	return eth->h_source;
eth              1184 drivers/net/wireless/ath/wil6210/wmi.c 	struct ethhdr *eth;
eth              1206 drivers/net/wireless/ath/wil6210/wmi.c 	eth = skb_put(skb, ETH_HLEN);
eth              1207 drivers/net/wireless/ath/wil6210/wmi.c 	ether_addr_copy(eth->h_dest, ndev->dev_addr);
eth              1208 drivers/net/wireless/ath/wil6210/wmi.c 	ether_addr_copy(eth->h_source, evt->src_mac);
eth              1209 drivers/net/wireless/ath/wil6210/wmi.c 	eth->h_proto = cpu_to_be16(ETH_P_PAE);
eth               428 drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c 	memcpy(event->ifaddr, event_packet->eth.h_dest, ETH_ALEN);
eth               244 drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h 	struct ethhdr eth;
eth              1454 drivers/net/wireless/cisco/airo.c static int decapsulate(struct airo_info *ai, MICBuffer *mic, etherHead *eth, u16 payLen)
eth              1466 drivers/net/wireless/cisco/airo.c 		if (memcmp ((u8*)eth + 14, micsnap, sizeof(micsnap)) == 0) {
eth              1494 drivers/net/wireless/cisco/airo.c 		int mcast = eth->da[0] & 1;
eth              1510 drivers/net/wireless/cisco/airo.c 		emmh32_update(&context->seed, eth->da, ETH_ALEN*2); 
eth              1513 drivers/net/wireless/cisco/airo.c 		emmh32_update(&context->seed, (u8 *)(eth + 1),payLen);	
eth               211 drivers/net/wireless/intel/ipw2x00/libipw_tx.c 	struct ethhdr *eth;
eth               214 drivers/net/wireless/intel/ipw2x00/libipw_tx.c 	eth = (struct ethhdr *)skb->data;
eth               215 drivers/net/wireless/intel/ipw2x00/libipw_tx.c 	if (eth->h_proto != htons(ETH_P_IP))
eth               380 drivers/net/wireless/intersil/orinoco/main.c 			struct ethhdr eth;	/* 802.3 header */
eth               394 drivers/net/wireless/intersil/orinoco/main.c 		memcpy(&hdr.eth, eh, 2 * ETH_ALEN);
eth               395 drivers/net/wireless/intersil/orinoco/main.c 		hdr.eth.h_proto = htons(len);
eth                39 drivers/net/wireless/marvell/mwifiex/sta_rx.c 	struct ethhdr *eth;
eth                43 drivers/net/wireless/marvell/mwifiex/sta_rx.c 	eth = (struct ethhdr *)skb->data;
eth                44 drivers/net/wireless/marvell/mwifiex/sta_rx.c 	switch (ntohs(eth->h_proto)) {
eth                90 drivers/net/wireless/marvell/mwifiex/sta_rx.c 	struct ethhdr *eth;
eth               116 drivers/net/wireless/marvell/mwifiex/sta_rx.c 		eth = (struct ethhdr *)
eth               124 drivers/net/wireless/marvell/mwifiex/sta_rx.c 		memcpy(eth->h_source, rx_pkt_hdr->eth803_hdr.h_source,
eth               125 drivers/net/wireless/marvell/mwifiex/sta_rx.c 		       sizeof(eth->h_source));
eth               126 drivers/net/wireless/marvell/mwifiex/sta_rx.c 		memcpy(eth->h_dest, rx_pkt_hdr->eth803_hdr.h_dest,
eth               127 drivers/net/wireless/marvell/mwifiex/sta_rx.c 		       sizeof(eth->h_dest));
eth               131 drivers/net/wireless/marvell/mwifiex/sta_rx.c 		hdr_chop = (u8 *) eth - (u8 *) local_rx_pd;
eth               211 drivers/net/xen-netback/interface.c 		struct ethhdr *eth = (struct ethhdr *)skb->data;
eth               213 drivers/net/xen-netback/interface.c 		if (!xenvif_mcast_match(vif, eth->h_dest))
eth               973 drivers/pinctrl/meson/pinctrl-meson-axg.c 	FUNCTION(eth),
eth              1269 drivers/pinctrl/meson/pinctrl-meson-g12a.c 	FUNCTION(eth),
eth               782 drivers/pinctrl/meson/pinctrl-meson-gxbb.c 	FUNCTION(eth),
eth               754 drivers/pinctrl/meson/pinctrl-meson-gxl.c 	FUNCTION(eth),
eth               592 drivers/pinctrl/pinctrl-pistachio.c 	FUNCTION(eth),
eth              4699 drivers/pinctrl/sh-pfc/pfc-r8a7790.c 	SH_PFC_FUNCTION(eth),
eth              5373 drivers/pinctrl/sh-pfc/pfc-r8a7791.c 		SH_PFC_FUNCTION(eth),
eth              4570 drivers/pinctrl/sh-pfc/pfc-r8a7794.c 	SH_PFC_FUNCTION(eth),
eth              1090 drivers/scsi/bfa/bfa_defs.h 	union sfp_xcvr_eth_code_u	eth;
eth              1325 drivers/scsi/bfa/bfa_defs_svc.h 	struct bfa_port_eth_stats_s     eth;
eth               567 drivers/scsi/fcoe/fcoe.c 		struct ethhdr eth;
eth               575 drivers/scsi/fcoe/fcoe.c 	if (ntohs(frame->eth.h_proto) == ETH_P_FIP &&
eth               379 drivers/scsi/fcoe/fcoe_ctlr.c 		struct ethhdr eth;
eth               396 drivers/scsi/fcoe/fcoe_ctlr.c 	memcpy(sol->eth.h_dest, fcf ? fcf->fcf_mac : fcoe_all_fcfs, ETH_ALEN);
eth               397 drivers/scsi/fcoe/fcoe_ctlr.c 	memcpy(sol->eth.h_source, fip->ctl_src_addr, ETH_ALEN);
eth               398 drivers/scsi/fcoe/fcoe_ctlr.c 	sol->eth.h_proto = htons(ETH_P_FIP);
eth               534 drivers/scsi/fcoe/fcoe_ctlr.c 		struct ethhdr eth;
eth               555 drivers/scsi/fcoe/fcoe_ctlr.c 	memcpy(kal->eth.h_dest, fcf->fcf_mac, ETH_ALEN);
eth               556 drivers/scsi/fcoe/fcoe_ctlr.c 	memcpy(kal->eth.h_source, sa, ETH_ALEN);
eth               557 drivers/scsi/fcoe/fcoe_ctlr.c 	kal->eth.h_proto = htons(ETH_P_FIP);
eth               606 drivers/scsi/fcoe/fcoe_ctlr.c 		struct ethhdr eth;
eth               624 drivers/scsi/fcoe/fcoe_ctlr.c 		if (fcoe_ctlr_vn_lookup(fip, d_id, cap->eth.h_dest))
eth               636 drivers/scsi/fcoe/fcoe_ctlr.c 		memcpy(cap->eth.h_dest, fcf->fcf_mac, ETH_ALEN);
eth               638 drivers/scsi/fcoe/fcoe_ctlr.c 	memcpy(cap->eth.h_source, fip->ctl_src_addr, ETH_ALEN);
eth               639 drivers/scsi/fcoe/fcoe_ctlr.c 	cap->eth.h_proto = htons(ETH_P_FIP);
eth              2024 drivers/scsi/fcoe/fcoe_ctlr.c 		struct ethhdr eth;
eth              2052 drivers/scsi/fcoe/fcoe_ctlr.c 	memcpy(frame->eth.h_dest, dest, ETH_ALEN);
eth              2055 drivers/scsi/fcoe/fcoe_ctlr.c 		hton24(frame->eth.h_source, FIP_VN_FC_MAP);
eth              2056 drivers/scsi/fcoe/fcoe_ctlr.c 		hton24(frame->eth.h_source + 3, fip->port_id);
eth              2058 drivers/scsi/fcoe/fcoe_ctlr.c 		memcpy(frame->eth.h_source, fip->ctl_src_addr, ETH_ALEN);
eth              2060 drivers/scsi/fcoe/fcoe_ctlr.c 	frame->eth.h_proto = htons(ETH_P_FIP);
eth              2903 drivers/scsi/fcoe/fcoe_ctlr.c 		struct ethhdr eth;
eth              2925 drivers/scsi/fcoe/fcoe_ctlr.c 	memcpy(frame->eth.h_dest, dest, ETH_ALEN);
eth              2927 drivers/scsi/fcoe/fcoe_ctlr.c 	memcpy(frame->eth.h_source, fip->ctl_src_addr, ETH_ALEN);
eth              2928 drivers/scsi/fcoe/fcoe_ctlr.c 	frame->eth.h_proto = htons(ETH_P_FIP);
eth               399 drivers/scsi/fnic/fnic_fcs.c 	memcpy(vlan->eth.h_source, fip->ctl_src_addr, ETH_ALEN);
eth               400 drivers/scsi/fnic/fnic_fcs.c 	memcpy(vlan->eth.h_dest, fcoe_all_fcfs, ETH_ALEN);
eth               401 drivers/scsi/fnic/fnic_fcs.c 	vlan->eth.h_proto = htons(ETH_P_FIP);
eth                52 drivers/scsi/fnic/fnic_fip.h 	struct ethhdr eth;
eth               545 drivers/scsi/qedf/qedf.h 	struct ethhdr eth;
eth                36 drivers/scsi/qedf/qedf_fip.c 	ether_addr_copy(vlan->eth.h_source, qedf->mac);
eth                37 drivers/scsi/qedf/qedf_fip.c 	ether_addr_copy(vlan->eth.h_dest, my_fcoe_all_fcfs);
eth                38 drivers/scsi/qedf/qedf_fip.c 	vlan->eth.h_proto = htons(ETH_P_FIP);
eth                96 drivers/staging/gdm724x/gdm_lte.c 	struct ethhdr eth;
eth               122 drivers/staging/gdm724x/gdm_lte.c 		memcpy(&eth, skb_in->data, sizeof(struct ethhdr));
eth               123 drivers/staging/gdm724x/gdm_lte.c 		mac_header_data = &eth;
eth               216 drivers/staging/gdm724x/gdm_lte.c 	struct ethhdr eth;
eth               245 drivers/staging/gdm724x/gdm_lte.c 		memcpy(&eth, skb_in->data, sizeof(struct ethhdr));
eth               246 drivers/staging/gdm724x/gdm_lte.c 		if (ntohs(eth.h_proto) != ETH_P_IPV6)
eth               248 drivers/staging/gdm724x/gdm_lte.c 		mac_header_data = &eth;
eth               338 drivers/staging/gdm724x/gdm_lte.c 	struct ethhdr *eth;
eth               350 drivers/staging/gdm724x/gdm_lte.c 	eth = (struct ethhdr *)skb->data;
eth               351 drivers/staging/gdm724x/gdm_lte.c 	if (ntohs(eth->h_proto) == ETH_P_8021Q) {
eth               357 drivers/staging/gdm724x/gdm_lte.c 		mac_proto = ntohs(eth->h_proto);
eth               567 drivers/staging/gdm724x/gdm_lte.c 	struct ethhdr eth;
eth               625 drivers/staging/gdm724x/gdm_lte.c 		mac_header_data = (void *)&eth;
eth               640 drivers/staging/gdm724x/gdm_lte.c 		eth.h_proto = htons(ETH_P_ARP);
eth               645 drivers/staging/gdm724x/gdm_lte.c 			eth.h_proto = htons(ETH_P_IP);
eth               648 drivers/staging/gdm724x/gdm_lte.c 			eth.h_proto = htons(ETH_P_IPV6);
eth              1075 drivers/staging/ks7010/ks_hostif.c 	struct ethhdr *eth;
eth              1116 drivers/staging/ks7010/ks_hostif.c 	eth = (struct ethhdr *)skb->data;
eth              1117 drivers/staging/ks7010/ks_hostif.c 	if (!ether_addr_equal(&priv->eth_addr[0], eth->h_source)) {
eth              1120 drivers/staging/ks7010/ks_hostif.c 			   eth->h_source);
eth               236 drivers/staging/rtl8192e/rtllib_tx.c 	struct ethhdr *eth;
eth               239 drivers/staging/rtl8192e/rtllib_tx.c 	eth = (struct ethhdr *)skb->data;
eth               240 drivers/staging/rtl8192e/rtllib_tx.c 	if (eth->h_proto != htons(ETH_P_IP))
eth               263 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c 	struct ethhdr *eth;
eth               265 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c 	eth = (struct ethhdr *)skb->data;
eth               266 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c 	if (eth->h_proto != htons(ETH_P_IP))
eth              1198 drivers/staging/unisys/visornic/visornic_main.c 	struct ethhdr *eth;
eth              1326 drivers/staging/unisys/visornic/visornic_main.c 	eth = eth_hdr(skb);
eth              1348 drivers/staging/unisys/visornic/visornic_main.c 					if (ether_addr_equal(eth->h_dest,
eth              1365 drivers/staging/unisys/visornic/visornic_main.c 				netdev->name, eth->h_dest, netdev->dev_addr);
eth               453 drivers/usb/gadget/function/f_subset.c 	struct f_gether *eth;
eth               455 drivers/usb/gadget/function/f_subset.c 	eth = func_to_geth(f);
eth               456 drivers/usb/gadget/function/f_subset.c 	kfree(eth);
eth               116 drivers/usb/gadget/legacy/g_ffs.c 	int (*eth)(struct usb_configuration *c);
eth               123 drivers/usb/gadget/legacy/g_ffs.c 		.eth		= bind_rndis_config,
eth               129 drivers/usb/gadget/legacy/g_ffs.c 		.eth		= eth_bind_config,
eth               493 drivers/usb/gadget/legacy/g_ffs.c 	if (gc->eth) {
eth               494 drivers/usb/gadget/legacy/g_ffs.c 		ret = gc->eth(c);
eth               819 include/linux/mlx4/device.h 	struct mlx4_eth_av	eth;
eth              1253 include/linux/mlx4/device.h 		struct mlx4_spec_eth eth;
eth              1360 include/linux/mlx4/device.h 		struct mlx4_net_trans_rule_hw_eth eth;
eth               760 include/linux/qed/common_hsi.h 	struct ustorm_eth_queue_zone eth;
eth                87 include/linux/qed/qed_if.h 	u8 eth;
eth               159 include/net/erspan.h 	struct ethhdr *eth = (struct ethhdr *)skb->data;
eth               179 include/net/erspan.h 	if (eth->h_proto == htons(ETH_P_8021Q)) {
eth               253 include/net/erspan.h 	struct ethhdr *eth = (struct ethhdr *)skb->data;
eth               273 include/net/erspan.h 	if (eth->h_proto == htons(ETH_P_8021Q)) {
eth               268 include/rdma/ib_pack.h 	struct ib_unpacked_eth	eth;
eth              2034 include/rdma/ib_verbs.h 	struct ib_flow_spec_eth		eth;
eth                82 include/uapi/linux/if_arcnet.h 	struct ethhdr eth;	/* standard ethernet header (yuck!)	*/
eth               574 net/atm/mpc.c  	struct ethhdr *eth;
eth               583 net/atm/mpc.c  	eth = (struct ethhdr *)skb->data;
eth               584 net/atm/mpc.c  	if (eth->h_proto != htons(ETH_P_IP))
eth               595 net/atm/mpc.c  		if (ether_addr_equal(eth->h_dest, mpc->mps_macs + i * ETH_ALEN))
eth               406 net/bpf/test_run.c 	const struct ethhdr *eth;
eth               423 net/bpf/test_run.c 	eth = (struct ethhdr *)data;
eth               448 net/bpf/test_run.c 		retval = bpf_flow_dissect(prog, &ctx, eth->h_proto, ETH_HLEN,
eth                36 net/bridge/br_device.c 	struct ethhdr *eth;
eth                56 net/bridge/br_device.c 	eth = eth_hdr(skb);
eth                63 net/bridge/br_device.c 	    (eth->h_proto == htons(ETH_P_ARP) ||
eth                64 net/bridge/br_device.c 	     eth->h_proto == htons(ETH_P_RARP)) &&
eth               224 net/bridge/br_multicast.c 	struct ethhdr *eth;
eth               230 net/bridge/br_multicast.c 	skb = netdev_alloc_skb_ip_align(br->dev, sizeof(*eth) + sizeof(*iph) +
eth               238 net/bridge/br_multicast.c 	eth = eth_hdr(skb);
eth               240 net/bridge/br_multicast.c 	ether_addr_copy(eth->h_source, br->dev->dev_addr);
eth               241 net/bridge/br_multicast.c 	eth->h_dest[0] = 1;
eth               242 net/bridge/br_multicast.c 	eth->h_dest[1] = 0;
eth               243 net/bridge/br_multicast.c 	eth->h_dest[2] = 0x5e;
eth               244 net/bridge/br_multicast.c 	eth->h_dest[3] = 0;
eth               245 net/bridge/br_multicast.c 	eth->h_dest[4] = 0;
eth               246 net/bridge/br_multicast.c 	eth->h_dest[5] = 1;
eth               247 net/bridge/br_multicast.c 	eth->h_proto = htons(ETH_P_IP);
eth               248 net/bridge/br_multicast.c 	skb_put(skb, sizeof(*eth));
eth               303 net/bridge/br_multicast.c 	__skb_pull(skb, sizeof(*eth));
eth               320 net/bridge/br_multicast.c 	struct ethhdr *eth;
eth               326 net/bridge/br_multicast.c 	skb = netdev_alloc_skb_ip_align(br->dev, sizeof(*eth) + sizeof(*ip6h) +
eth               335 net/bridge/br_multicast.c 	eth = eth_hdr(skb);
eth               337 net/bridge/br_multicast.c 	ether_addr_copy(eth->h_source, br->dev->dev_addr);
eth               338 net/bridge/br_multicast.c 	eth->h_proto = htons(ETH_P_IPV6);
eth               339 net/bridge/br_multicast.c 	skb_put(skb, sizeof(*eth));
eth               358 net/bridge/br_multicast.c 	ipv6_eth_mc_map(&ip6h->daddr, eth->h_dest);
eth               416 net/bridge/br_multicast.c 	__skb_pull(skb, sizeof(*eth));
eth              2239 net/bridge/br_multicast.c 	struct ethhdr eth;
eth              2252 net/bridge/br_multicast.c 	memset(&eth, 0, sizeof(eth));
eth              2253 net/bridge/br_multicast.c 	eth.h_proto = htons(proto);
eth              2255 net/bridge/br_multicast.c 	ret = br_multicast_querier_exists(br, &eth);
eth               739 net/bridge/br_private.h 					       struct ethhdr *eth)
eth               741 net/bridge/br_private.h 	switch (eth->h_proto) {
eth               819 net/bridge/br_private.h 					       struct ethhdr *eth)
eth                26 net/bridge/netfilter/nft_reject_bridge.c 	struct ethhdr *eth;
eth                28 net/bridge/netfilter/nft_reject_bridge.c 	eth = skb_push(nskb, ETH_HLEN);
eth                30 net/bridge/netfilter/nft_reject_bridge.c 	ether_addr_copy(eth->h_source, eth_hdr(oldskb)->h_dest);
eth                31 net/bridge/netfilter/nft_reject_bridge.c 	ether_addr_copy(eth->h_dest, eth_hdr(oldskb)->h_source);
eth                32 net/bridge/netfilter/nft_reject_bridge.c 	eth->h_proto = eth_hdr(oldskb)->h_proto;
eth              2924 net/core/dev.c 		struct ethhdr *eth;
eth              2929 net/core/dev.c 		eth = (struct ethhdr *)skb->data;
eth              2930 net/core/dev.c 		type = eth->h_proto;
eth              4235 net/core/dev.c 	struct ethhdr *eth;
eth              4277 net/core/dev.c 	eth = (struct ethhdr *)xdp->data;
eth              4278 net/core/dev.c 	orig_bcast = is_multicast_ether_addr_64bits(eth->h_dest);
eth              4279 net/core/dev.c 	orig_eth_type = eth->h_proto;
eth              4309 net/core/dev.c 	eth = (struct ethhdr *)xdp->data;
eth              4310 net/core/dev.c 	if ((orig_eth_type != eth->h_proto) ||
eth              4311 net/core/dev.c 	    (orig_bcast != is_multicast_ether_addr_64bits(eth->h_dest))) {
eth              5729 net/core/dev.c 	const struct ethhdr *eth;
eth              5730 net/core/dev.c 	unsigned int hlen = sizeof(*eth);
eth              5738 net/core/dev.c 		eth = skb_gro_header_slow(skb, hlen, 0);
eth              5739 net/core/dev.c 		if (unlikely(!eth)) {
eth              5746 net/core/dev.c 		eth = (const struct ethhdr *)skb->data;
eth              5758 net/core/dev.c 	skb->protocol = eth->h_proto;
eth               573 net/core/flow_dissector.c 			const struct ethhdr *eth;
eth               576 net/core/flow_dissector.c 			eth = __skb_header_pointer(skb, *p_nhoff + offset,
eth               579 net/core/flow_dissector.c 			if (!eth)
eth               581 net/core/flow_dissector.c 			*p_proto = eth->h_proto;
eth               582 net/core/flow_dissector.c 			offset += sizeof(*eth);
eth               654 net/core/flow_dissector.c 		struct ethhdr eth;
eth               668 net/core/flow_dissector.c 	*p_proto = hdr->eth.h_proto;
eth               993 net/core/flow_dissector.c 		struct ethhdr *eth = eth_hdr(skb);
eth               999 net/core/flow_dissector.c 		memcpy(key_eth_addrs, &eth->h_dest, sizeof(*key_eth_addrs));
eth               368 net/core/netpoll.c 	struct ethhdr *eth;
eth               422 net/core/netpoll.c 		eth = skb_push(skb, ETH_HLEN);
eth               424 net/core/netpoll.c 		skb->protocol = eth->h_proto = htons(ETH_P_IPV6);
eth               451 net/core/netpoll.c 		eth = skb_push(skb, ETH_HLEN);
eth               453 net/core/netpoll.c 		skb->protocol = eth->h_proto = htons(ETH_P_IP);
eth               456 net/core/netpoll.c 	ether_addr_copy(eth->h_source, np->dev->dev_addr);
eth               457 net/core/netpoll.c 	ether_addr_copy(eth->h_dest, np->remote_mac);
eth              2558 net/core/pktgen.c 			struct ethhdr *eth;
eth              2580 net/core/pktgen.c 			eth = skb_push(skb, ETH_HLEN);
eth              2581 net/core/pktgen.c 			memcpy(eth, pkt_dev->hh, 2 * ETH_ALEN);
eth              2582 net/core/pktgen.c 			eth->h_proto = protocol;
eth              2723 net/core/pktgen.c 	__u8 *eth;
eth              2757 net/core/pktgen.c 	eth = skb_push(skb, 14);
eth              2789 net/core/pktgen.c 	memcpy(eth, pkt_dev->hh, 12);
eth              2790 net/core/pktgen.c 	*(__be16 *) & eth[12] = protocol;
eth              2851 net/core/pktgen.c 	__u8 *eth;
eth              2885 net/core/pktgen.c 	eth = skb_push(skb, 14);
eth              2917 net/core/pktgen.c 	memcpy(eth, pkt_dev->hh, 12);
eth              2918 net/core/pktgen.c 	*(__be16 *) &eth[12] = protocol;
eth                83 net/ethernet/eth.c 	struct ethhdr *eth = skb_push(skb, ETH_HLEN);
eth                86 net/ethernet/eth.c 		eth->h_proto = htons(type);
eth                88 net/ethernet/eth.c 		eth->h_proto = htons(len);
eth                96 net/ethernet/eth.c 	memcpy(eth->h_source, saddr, ETH_ALEN);
eth                99 net/ethernet/eth.c 		memcpy(eth->h_dest, daddr, ETH_ALEN);
eth               108 net/ethernet/eth.c 		eth_zero_addr(eth->h_dest);
eth               128 net/ethernet/eth.c 	const struct ethhdr *eth = (const struct ethhdr *)data;
eth               132 net/ethernet/eth.c 	if (unlikely(len < sizeof(*eth)))
eth               137 net/ethernet/eth.c 					      eth->h_proto, sizeof(*eth),
eth               139 net/ethernet/eth.c 		return max_t(u32, keys.control.thoff, sizeof(*eth));
eth               159 net/ethernet/eth.c 	const struct ethhdr *eth;
eth               164 net/ethernet/eth.c 	eth = (struct ethhdr *)skb->data;
eth               167 net/ethernet/eth.c 	if (unlikely(!ether_addr_equal_64bits(eth->h_dest,
eth               169 net/ethernet/eth.c 		if (unlikely(is_multicast_ether_addr_64bits(eth->h_dest))) {
eth               170 net/ethernet/eth.c 			if (ether_addr_equal_64bits(eth->h_dest, dev->broadcast))
eth               192 net/ethernet/eth.c 	if (likely(eth_proto_is_802_3(eth->h_proto)))
eth               193 net/ethernet/eth.c 		return eth->h_proto;
eth               219 net/ethernet/eth.c 	const struct ethhdr *eth = eth_hdr(skb);
eth               220 net/ethernet/eth.c 	memcpy(haddr, eth->h_source, ETH_ALEN);
eth               235 net/ethernet/eth.c 	struct ethhdr *eth;
eth               238 net/ethernet/eth.c 	eth = (struct ethhdr *)
eth               239 net/ethernet/eth.c 	    (((u8 *) hh->hh_data) + (HH_DATA_OFF(sizeof(*eth))));
eth               244 net/ethernet/eth.c 	eth->h_proto = type;
eth               245 net/ethernet/eth.c 	memcpy(eth->h_source, dev->dev_addr, ETH_ALEN);
eth               246 net/ethernet/eth.c 	memcpy(eth->h_dest, neigh->ha, ETH_ALEN);
eth               280 net/ethernet/eth.c 	const struct ethhdr *eth = eth_hdr(skb);
eth               282 net/ethernet/eth.c 	return eth->h_proto;
eth               269 net/ipv6/seg6_local.c 	struct ethhdr *eth;
eth               278 net/ipv6/seg6_local.c 	eth = (struct ethhdr *)skb->data;
eth               284 net/ipv6/seg6_local.c 	if (!eth_proto_is_802_3(eth->h_proto))
eth               311 net/ipv6/seg6_local.c 	skb->protocol = eth->h_proto;
eth              3431 net/mac80211/tx.c 	struct ethhdr eth;
eth              3490 net/mac80211/tx.c 	memcpy(&eth, skb->data, ETH_HLEN - 2);
eth              3493 net/mac80211/tx.c 	memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN);
eth              3494 net/mac80211/tx.c 	memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN);
eth              3934 net/mac80211/tx.c 	struct ethhdr *eth;
eth              3941 net/mac80211/tx.c 	eth = (void *)skb->data;
eth              3942 net/mac80211/tx.c 	ether_addr_copy(eth->h_dest, sta->sta.addr);
eth              3951 net/mac80211/tx.c 	const struct ethhdr *eth = (void *)skb->data;
eth              3955 net/mac80211/tx.c 	if (likely(!is_multicast_ether_addr(eth->h_dest)))
eth              3975 net/mac80211/tx.c 	ethertype = eth->h_proto;
eth              3996 net/mac80211/tx.c 	const struct ethhdr *eth = (struct ethhdr *)skb->data;
eth              4006 net/mac80211/tx.c 		if (unlikely(ether_addr_equal(eth->h_source, sta->sta.addr)))
eth               217 net/openvswitch/actions.c 		key->eth.vlan.tci = 0;
eth               218 net/openvswitch/actions.c 		key->eth.vlan.tpid = 0;
eth               229 net/openvswitch/actions.c 		key->eth.vlan.tci = vlan->vlan_tci;
eth               230 net/openvswitch/actions.c 		key->eth.vlan.tpid = vlan->vlan_tpid;
eth               267 net/openvswitch/actions.c 	ether_addr_copy(flow_key->eth.src, eth_hdr(skb)->h_source);
eth               268 net/openvswitch/actions.c 	ether_addr_copy(flow_key->eth.dst, eth_hdr(skb)->h_dest);
eth               830 net/openvswitch/actions.c 	if (key->eth.type == htons(ETH_P_IP)) {
eth               846 net/openvswitch/actions.c 	} else if (key->eth.type == htons(ETH_P_IPV6)) {
eth               869 net/openvswitch/actions.c 			  ovs_vport_name(vport), ntohs(key->eth.type), mru,
eth               107 net/openvswitch/conntrack.c 	switch (ntohs(key->eth.type)) {
eth               207 net/openvswitch/conntrack.c 		if (key->eth.type == htons(ETH_P_IP) &&
eth               213 net/openvswitch/conntrack.c 		} else if (key->eth.type == htons(ETH_P_IPV6) &&
eth               303 net/openvswitch/conntrack.c 		if (swkey->eth.type == htons(ETH_P_IP)) {
eth               314 net/openvswitch/conntrack.c 		} else if (swkey->eth.type == htons(ETH_P_IPV6)) {
eth               499 net/openvswitch/conntrack.c 	if (key->eth.type == htons(ETH_P_IP)) {
eth               509 net/openvswitch/conntrack.c 	} else if (key->eth.type == htons(ETH_P_IPV6)) {
eth               822 net/openvswitch/conntrack.c 		if (key->eth.type == htons(ETH_P_IP))
eth               824 net/openvswitch/conntrack.c 		else if (key->eth.type == htons(ETH_P_IPV6))
eth               844 net/openvswitch/conntrack.c 		if (key->eth.type == htons(ETH_P_IP))
eth               846 net/openvswitch/conntrack.c 		else if (key->eth.type == htons(ETH_P_IPV6))
eth               339 net/openvswitch/flow.c 	key->eth.vlan.tci = 0;
eth               340 net/openvswitch/flow.c 	key->eth.vlan.tpid = 0;
eth               341 net/openvswitch/flow.c 	key->eth.cvlan.tci = 0;
eth               342 net/openvswitch/flow.c 	key->eth.cvlan.tpid = 0;
eth               350 net/openvswitch/flow.c 		key->eth.vlan.tci = htons(skb->vlan_tci) | htons(VLAN_CFI_MASK);
eth               351 net/openvswitch/flow.c 		key->eth.vlan.tpid = skb->vlan_proto;
eth               354 net/openvswitch/flow.c 		res = parse_vlan_tag(skb, &key->eth.vlan, true);
eth               360 net/openvswitch/flow.c 	res = parse_vlan_tag(skb, &key->eth.cvlan, false);
eth               537 net/openvswitch/flow.c 	if (key->eth.type == htons(ETH_P_IP)) {
eth               612 net/openvswitch/flow.c 	} else if (key->eth.type == htons(ETH_P_ARP) ||
eth               613 net/openvswitch/flow.c 		   key->eth.type == htons(ETH_P_RARP)) {
eth               639 net/openvswitch/flow.c 	} else if (eth_p_mpls(key->eth.type)) {
eth               661 net/openvswitch/flow.c 	} else if (key->eth.type == htons(ETH_P_IPV6)) {
eth               723 net/openvswitch/flow.c 	} else if (key->eth.type == htons(ETH_P_NSH)) {
eth               758 net/openvswitch/flow.c 	struct ethhdr *eth;
eth               772 net/openvswitch/flow.c 		key->eth.type = skb->protocol;
eth               774 net/openvswitch/flow.c 		eth = eth_hdr(skb);
eth               775 net/openvswitch/flow.c 		ether_addr_copy(key->eth.src, eth->h_source);
eth               776 net/openvswitch/flow.c 		ether_addr_copy(key->eth.dst, eth->h_dest);
eth               786 net/openvswitch/flow.c 		key->eth.type = parse_ethertype(skb);
eth               787 net/openvswitch/flow.c 		if (unlikely(key->eth.type == htons(0)))
eth               794 net/openvswitch/flow.c 		if (key->eth.cvlan.tci & htons(VLAN_CFI_MASK))
eth               795 net/openvswitch/flow.c 			skb->protocol = key->eth.cvlan.tpid;
eth               797 net/openvswitch/flow.c 			skb->protocol = key->eth.type;
eth               924 net/openvswitch/flow.c 	skb->protocol = key->eth.type;
eth               934 net/openvswitch/flow.c 	    key->eth.type != htons(ETH_P_IP))
eth               937 net/openvswitch/flow.c 	    (key->eth.type != htons(ETH_P_IPV6) ||
eth                80 net/openvswitch/flow.h 	} eth;
eth               154 net/openvswitch/flow.h 	return key->eth.type == htons(ETH_P_IPV6) &&
eth               179 net/openvswitch/flow_netlink.c 	if (match->key->eth.type == htons(ETH_P_ARP)
eth               180 net/openvswitch/flow_netlink.c 			|| match->key->eth.type == htons(ETH_P_RARP)) {
eth               182 net/openvswitch/flow_netlink.c 		if (match->mask && (match->mask->key.eth.type == htons(0xffff)))
eth               186 net/openvswitch/flow_netlink.c 	if (eth_p_mpls(match->key->eth.type)) {
eth               188 net/openvswitch/flow_netlink.c 		if (match->mask && (match->mask->key.eth.type == htons(0xffff)))
eth               192 net/openvswitch/flow_netlink.c 	if (match->key->eth.type == htons(ETH_P_IP)) {
eth               194 net/openvswitch/flow_netlink.c 		if (match->mask && match->mask->key.eth.type == htons(0xffff)) {
eth               229 net/openvswitch/flow_netlink.c 	if (match->key->eth.type == htons(ETH_P_IPV6)) {
eth               231 net/openvswitch/flow_netlink.c 		if (match->mask && match->mask->key.eth.type == htons(0xffff)) {
eth               280 net/openvswitch/flow_netlink.c 	if (match->key->eth.type == htons(ETH_P_NSH)) {
eth               283 net/openvswitch/flow_netlink.c 		    match->mask->key.eth.type == htons(0xffff)) {
eth               974 net/openvswitch/flow_netlink.c 		SW_FLOW_KEY_PUT(match, eth.vlan.tpid, tpid, is_mask);
eth               975 net/openvswitch/flow_netlink.c 		SW_FLOW_KEY_PUT(match, eth.vlan.tci, tci, is_mask);
eth               977 net/openvswitch/flow_netlink.c 		SW_FLOW_KEY_PUT(match, eth.cvlan.tpid, tpid, is_mask);
eth               978 net/openvswitch/flow_netlink.c 		SW_FLOW_KEY_PUT(match, eth.cvlan.tci, tci, is_mask);
eth              1027 net/openvswitch/flow_netlink.c 	bool encap_valid = !!(match->key->eth.vlan.tci &
eth              1029 net/openvswitch/flow_netlink.c 	bool i_encap_valid = !!(match->key->eth.cvlan.tci &
eth              1110 net/openvswitch/flow_netlink.c 	encap_valid = !!(match->key->eth.vlan.tci & htons(VLAN_CFI_MASK));
eth              1137 net/openvswitch/flow_netlink.c 	SW_FLOW_KEY_PUT(match, eth.type, eth_type, is_mask);
eth              1509 net/openvswitch/flow_netlink.c 		SW_FLOW_KEY_MEMCPY(match, eth.src,
eth              1511 net/openvswitch/flow_netlink.c 		SW_FLOW_KEY_MEMCPY(match, eth.dst,
eth              1529 net/openvswitch/flow_netlink.c 			SW_FLOW_KEY_PUT(match, eth.type, htons(ETH_P_802_2), is_mask);
eth              1531 net/openvswitch/flow_netlink.c 	} else if (!match->key->eth.type) {
eth              1816 net/openvswitch/flow_netlink.c 		SW_FLOW_KEY_PUT(match, eth.vlan.tci, htons(0xffff), true);
eth              1817 net/openvswitch/flow_netlink.c 		SW_FLOW_KEY_PUT(match, eth.cvlan.tci, htons(0xffff), true);
eth              2024 net/openvswitch/flow_netlink.c 		ether_addr_copy(eth_key->eth_src, output->eth.src);
eth              2025 net/openvswitch/flow_netlink.c 		ether_addr_copy(eth_key->eth_dst, output->eth.dst);
eth              2027 net/openvswitch/flow_netlink.c 		if (swkey->eth.vlan.tci || eth_type_vlan(swkey->eth.type)) {
eth              2028 net/openvswitch/flow_netlink.c 			if (ovs_nla_put_vlan(skb, &output->eth.vlan, is_mask))
eth              2031 net/openvswitch/flow_netlink.c 			if (!swkey->eth.vlan.tci)
eth              2034 net/openvswitch/flow_netlink.c 			if (swkey->eth.cvlan.tci || eth_type_vlan(swkey->eth.type)) {
eth              2035 net/openvswitch/flow_netlink.c 				if (ovs_nla_put_vlan(skb, &output->eth.cvlan, is_mask))
eth              2039 net/openvswitch/flow_netlink.c 				if (!swkey->eth.cvlan.tci)
eth              2044 net/openvswitch/flow_netlink.c 		if (swkey->eth.type == htons(ETH_P_802_2)) {
eth              2051 net/openvswitch/flow_netlink.c 			if (is_mask && output->eth.type)
eth              2053 net/openvswitch/flow_netlink.c 							output->eth.type))
eth              2059 net/openvswitch/flow_netlink.c 	if (nla_put_be16(skb, OVS_KEY_ATTR_ETHERTYPE, output->eth.type))
eth              2062 net/openvswitch/flow_netlink.c 	if (eth_type_vlan(swkey->eth.type)) {
eth              2070 net/openvswitch/flow_netlink.c 	if (swkey->eth.type == htons(ETH_P_IP)) {
eth              2083 net/openvswitch/flow_netlink.c 	} else if (swkey->eth.type == htons(ETH_P_IPV6)) {
eth              2099 net/openvswitch/flow_netlink.c 	} else if (swkey->eth.type == htons(ETH_P_NSH)) {
eth              2102 net/openvswitch/flow_netlink.c 	} else if (swkey->eth.type == htons(ETH_P_ARP) ||
eth              2103 net/openvswitch/flow_netlink.c 		   swkey->eth.type == htons(ETH_P_RARP)) {
eth              2116 net/openvswitch/flow_netlink.c 	} else if (eth_p_mpls(swkey->eth.type)) {
eth              2126 net/openvswitch/flow_netlink.c 	if ((swkey->eth.type == htons(ETH_P_IP) ||
eth              2127 net/openvswitch/flow_netlink.c 	     swkey->eth.type == htons(ETH_P_IPV6)) &&
eth              2160 net/openvswitch/flow_netlink.c 		} else if (swkey->eth.type == htons(ETH_P_IP) &&
eth              2170 net/openvswitch/flow_netlink.c 		} else if (swkey->eth.type == htons(ETH_P_IPV6) &&
eth              3228 net/openvswitch/flow_netlink.c 	err = __ovs_nla_copy_actions(net, attr, key, sfa, key->eth.type,
eth              3229 net/openvswitch/flow_netlink.c 				     key->eth.vlan.tci, log);
eth                36 net/sched/cls_flower.c 	struct flow_dissector_key_eth_addrs eth;
eth              1067 net/sched/cls_flower.c 	fl_set_key_val(tb, key->eth.dst, TCA_FLOWER_KEY_ETH_DST,
eth              1068 net/sched/cls_flower.c 		       mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK,
eth              1069 net/sched/cls_flower.c 		       sizeof(key->eth.dst));
eth              1070 net/sched/cls_flower.c 	fl_set_key_val(tb, key->eth.src, TCA_FLOWER_KEY_ETH_SRC,
eth              1071 net/sched/cls_flower.c 		       mask->eth.src, TCA_FLOWER_KEY_ETH_SRC_MASK,
eth              1072 net/sched/cls_flower.c 		       sizeof(key->eth.src));
eth              1327 net/sched/cls_flower.c 			     FLOW_DISSECTOR_KEY_ETH_ADDRS, eth);
eth              2242 net/sched/cls_flower.c 	if (fl_dump_key_val(skb, key->eth.dst, TCA_FLOWER_KEY_ETH_DST,
eth              2243 net/sched/cls_flower.c 			    mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK,
eth              2244 net/sched/cls_flower.c 			    sizeof(key->eth.dst)) ||
eth              2245 net/sched/cls_flower.c 	    fl_dump_key_val(skb, key->eth.src, TCA_FLOWER_KEY_ETH_SRC,
eth              2246 net/sched/cls_flower.c 			    mask->eth.src, TCA_FLOWER_KEY_ETH_SRC_MASK,
eth              2247 net/sched/cls_flower.c 			    sizeof(key->eth.src)) ||
eth               663 net/wireless/util.c 	struct ethhdr eth;
eth               673 net/wireless/util.c 		skb_copy_bits(skb, offset, &eth, sizeof(eth));
eth               674 net/wireless/util.c 		len = ntohs(eth.h_proto);
eth               687 net/wireless/util.c 		if ((check_da && !is_multicast_ether_addr(eth.h_dest) &&
eth               688 net/wireless/util.c 		     !ether_addr_equal(check_da, eth.h_dest)) ||
eth               689 net/wireless/util.c 		    (check_sa && !ether_addr_equal(check_sa, eth.h_source))) {
eth               717 net/wireless/util.c 			eth.h_proto = htons(ethertype);
eth               721 net/wireless/util.c 		memcpy(skb_push(frame, sizeof(eth)), &eth, sizeof(eth));
eth                30 samples/bpf/parse_simple.c 	struct eth_hdr *eth = data;
eth                31 samples/bpf/parse_simple.c 	struct iphdr *iph = data + sizeof(*eth);
eth                32 samples/bpf/parse_simple.c 	struct udphdr *udp = data + sizeof(*eth) + sizeof(*iph);
eth                36 samples/bpf/parse_simple.c 	if (data + sizeof(*eth) + sizeof(*iph) + sizeof(*udp) > data_end)
eth                39 samples/bpf/parse_simple.c 	if (eth->h_proto != htons(ETH_P_IP))
eth               116 samples/bpf/parse_varlen.c 	struct ethhdr *eth = data;
eth               120 samples/bpf/parse_varlen.c 	nh_off = sizeof(*eth);
eth               124 samples/bpf/parse_varlen.c 	h_proto = eth->h_proto;
eth                63 samples/bpf/tc_l2_redirect_kern.c 	struct eth_hdr *eth = data;
eth                69 samples/bpf/tc_l2_redirect_kern.c 	if (data + sizeof(*eth) > data_end)
eth                76 samples/bpf/tc_l2_redirect_kern.c 	if (eth->h_proto == htons(ETH_P_IP)) {
eth                78 samples/bpf/tc_l2_redirect_kern.c 		struct iphdr *iph = data + sizeof(*eth);
eth                80 samples/bpf/tc_l2_redirect_kern.c 		if (data + sizeof(*eth) + sizeof(*iph) > data_end)
eth                89 samples/bpf/tc_l2_redirect_kern.c 	} else if (eth->h_proto == htons(ETH_P_IPV6)) {
eth                91 samples/bpf/tc_l2_redirect_kern.c 		struct ipv6hdr *ip6h = data + sizeof(*eth);
eth                93 samples/bpf/tc_l2_redirect_kern.c 		if (data + sizeof(*eth) + sizeof(*ip6h) > data_end)
eth               114 samples/bpf/tc_l2_redirect_kern.c 	struct eth_hdr *eth = data;
eth               120 samples/bpf/tc_l2_redirect_kern.c 	if (data + sizeof(*eth) > data_end)
eth               127 samples/bpf/tc_l2_redirect_kern.c 	if (eth->h_proto == htons(ETH_P_IP)) {
eth               129 samples/bpf/tc_l2_redirect_kern.c 		struct iphdr *iph = data + sizeof(*eth);
eth               132 samples/bpf/tc_l2_redirect_kern.c 		if (data + sizeof(*eth) + sizeof(*iph) > data_end)
eth               135 samples/bpf/tc_l2_redirect_kern.c 		if (!is_vip_addr(eth->h_proto, daddr))
eth               155 samples/bpf/tc_l2_redirect_kern.c 	struct eth_hdr *eth = data;
eth               159 samples/bpf/tc_l2_redirect_kern.c 	if (data + sizeof(*eth) > data_end)
eth               166 samples/bpf/tc_l2_redirect_kern.c 	if (eth->h_proto == htons(ETH_P_IP)) {
eth               168 samples/bpf/tc_l2_redirect_kern.c 		struct iphdr *iph = data + sizeof(*eth);
eth               170 samples/bpf/tc_l2_redirect_kern.c 		if (data + sizeof(*eth) + sizeof(*iph) > data_end)
eth               173 samples/bpf/tc_l2_redirect_kern.c 		if (!is_vip_addr(eth->h_proto, iph->daddr))
eth               178 samples/bpf/tc_l2_redirect_kern.c 	} else if (eth->h_proto == htons(ETH_P_IPV6)) {
eth               180 samples/bpf/tc_l2_redirect_kern.c 		struct ipv6hdr *ip6h = data + sizeof(*eth);
eth               182 samples/bpf/tc_l2_redirect_kern.c 		if (data + sizeof(*eth) + sizeof(*ip6h) > data_end)
eth               185 samples/bpf/tc_l2_redirect_kern.c 		if (!is_vip_addr(eth->h_proto, ip6h->daddr.s6_addr32[0]))
eth               210 samples/bpf/tc_l2_redirect_kern.c 	struct eth_hdr *eth = data;
eth               213 samples/bpf/tc_l2_redirect_kern.c 	if (data + sizeof(*eth) > data_end)
eth               216 samples/bpf/tc_l2_redirect_kern.c 	if (eth->h_proto == htons(ETH_P_IP)) {
eth               217 samples/bpf/tc_l2_redirect_kern.c 		struct iphdr *iph = data + sizeof(*eth);
eth               219 samples/bpf/tc_l2_redirect_kern.c 		if (data + sizeof(*eth) + sizeof(*iph) > data_end)
eth               222 samples/bpf/tc_l2_redirect_kern.c 		if (is_vip_addr(eth->h_proto, iph->daddr))
eth               224 samples/bpf/tc_l2_redirect_kern.c 	} else if (eth->h_proto == htons(ETH_P_IPV6)) {
eth               225 samples/bpf/tc_l2_redirect_kern.c 		struct ipv6hdr *ip6h = data + sizeof(*eth);
eth               227 samples/bpf/tc_l2_redirect_kern.c 		if (data + sizeof(*eth) + sizeof(*ip6h) > data_end)
eth               230 samples/bpf/tc_l2_redirect_kern.c 		if (is_vip_addr(eth->h_proto, ip6h->daddr.s6_addr32[0]))
eth                45 samples/bpf/test_cgrp2_tc_kern.c 	struct eth_hdr *eth = data;
eth                46 samples/bpf/test_cgrp2_tc_kern.c 	struct ipv6hdr *ip6h = data + sizeof(*eth);
eth                53 samples/bpf/test_cgrp2_tc_kern.c 	if (data + sizeof(*eth) + sizeof(*ip6h) > data_end)
eth                56 samples/bpf/test_cgrp2_tc_kern.c 	if (eth->h_proto != htons(ETH_P_IPV6) ||
eth                59 samples/bpf/test_cgrp2_tc_kern.c 				 eth->h_proto, ip6h->nexthdr);
eth                47 samples/bpf/xdp1_kern.c 	struct ethhdr *eth = data;
eth                54 samples/bpf/xdp1_kern.c 	nh_off = sizeof(*eth);
eth                58 samples/bpf/xdp1_kern.c 	h_proto = eth->h_proto;
eth                63 samples/bpf/xdp2_kern.c 	struct ethhdr *eth = data;
eth                70 samples/bpf/xdp2_kern.c 	nh_off = sizeof(*eth);
eth                74 samples/bpf/xdp2_kern.c 	h_proto = eth->h_proto;
eth                47 samples/bpf/xdp_adjust_tail_kern.c 	struct ethhdr *eth;
eth                49 samples/bpf/xdp_adjust_tail_kern.c 	eth = data;
eth                50 samples/bpf/xdp_adjust_tail_kern.c 	memcpy(eth->h_source, orig_eth->h_dest, ETH_ALEN);
eth                51 samples/bpf/xdp_adjust_tail_kern.c 	memcpy(eth->h_dest, orig_eth->h_source, ETH_ALEN);
eth                52 samples/bpf/xdp_adjust_tail_kern.c 	eth->h_proto = orig_eth->h_proto;
eth               138 samples/bpf/xdp_adjust_tail_kern.c 	struct ethhdr *eth = data;
eth               141 samples/bpf/xdp_adjust_tail_kern.c 	if (eth + 1 > data_end)
eth               144 samples/bpf/xdp_adjust_tail_kern.c 	h_proto = eth->h_proto;
eth                48 samples/bpf/xdp_fwd_kern.c 	struct ethhdr *eth = data;
eth                55 samples/bpf/xdp_fwd_kern.c 	nh_off = sizeof(*eth);
eth                61 samples/bpf/xdp_fwd_kern.c 	h_proto = eth->h_proto;
eth               138 samples/bpf/xdp_fwd_kern.c 		memcpy(eth->h_dest, fib_params.dmac, ETH_ALEN);
eth               139 samples/bpf/xdp_fwd_kern.c 		memcpy(eth->h_source, fib_params.smac, ETH_ALEN);
eth               112 samples/bpf/xdp_redirect_cpu_kern.c bool parse_eth(struct ethhdr *eth, void *data_end,
eth               118 samples/bpf/xdp_redirect_cpu_kern.c 	offset = sizeof(*eth);
eth               119 samples/bpf/xdp_redirect_cpu_kern.c 	if ((void *)eth + offset > data_end)
eth               122 samples/bpf/xdp_redirect_cpu_kern.c 	eth_type = eth->h_proto;
eth               132 samples/bpf/xdp_redirect_cpu_kern.c 		vlan_hdr = (void *)eth + offset;
eth               134 samples/bpf/xdp_redirect_cpu_kern.c 		if ((void *)eth + offset > data_end)
eth               142 samples/bpf/xdp_redirect_cpu_kern.c 		vlan_hdr = (void *)eth + offset;
eth               144 samples/bpf/xdp_redirect_cpu_kern.c 		if ((void *)eth + offset > data_end)
eth               235 samples/bpf/xdp_redirect_cpu_kern.c 	struct ethhdr *eth = data;
eth               249 samples/bpf/xdp_redirect_cpu_kern.c 	if (eth + 1 > data_end)
eth               259 samples/bpf/xdp_redirect_cpu_kern.c 	eth_type = eth->h_proto;
eth               278 samples/bpf/xdp_redirect_cpu_kern.c 	struct ethhdr *eth = data;
eth               326 samples/bpf/xdp_redirect_cpu_kern.c 	struct ethhdr *eth = data;
eth               342 samples/bpf/xdp_redirect_cpu_kern.c 	if (!(parse_eth(eth, data_end, &eth_proto, &l3_offset)))
eth               394 samples/bpf/xdp_redirect_cpu_kern.c 	struct ethhdr *eth = data;
eth               411 samples/bpf/xdp_redirect_cpu_kern.c 	if (!(parse_eth(eth, data_end, &eth_proto, &l3_offset)))
eth               514 samples/bpf/xdp_redirect_cpu_kern.c 	struct ethhdr *eth = data;
eth               536 samples/bpf/xdp_redirect_cpu_kern.c 	if (!(parse_eth(eth, data_end, &eth_proto, &l3_offset)))
eth                60 samples/bpf/xdp_redirect_kern.c 	struct ethhdr *eth = data;
eth                67 samples/bpf/xdp_redirect_kern.c 	nh_off = sizeof(*eth);
eth                60 samples/bpf/xdp_redirect_map_kern.c 	struct ethhdr *eth = data;
eth                67 samples/bpf/xdp_redirect_map_kern.c 	nh_off = sizeof(*eth);
eth               116 samples/bpf/xdp_router_ipv4_kern.c 	struct ethhdr *eth = data;
eth               123 samples/bpf/xdp_router_ipv4_kern.c 	nh_off = sizeof(*eth);
eth               127 samples/bpf/xdp_router_ipv4_kern.c 	h_proto = eth->h_proto;
eth               121 samples/bpf/xdp_rxq_info_kern.c 		struct ethhdr *eth = data;
eth               123 samples/bpf/xdp_rxq_info_kern.c 		if (eth + 1 > data_end)
eth               127 samples/bpf/xdp_rxq_info_kern.c 		if (ntohs(eth->h_proto) < ETH_P_802_3_MIN)
eth               220 samples/bpf/xdp_tx_iptunnel_kern.c 	struct ethhdr *eth = data;
eth               223 samples/bpf/xdp_tx_iptunnel_kern.c 	if (eth + 1 > data_end)
eth               226 samples/bpf/xdp_tx_iptunnel_kern.c 	h_proto = eth->h_proto;
eth               231 samples/bpf/xdpsock_user.c 	struct ether_header *eth = (struct ether_header *)data;
eth               232 samples/bpf/xdpsock_user.c 	struct ether_addr *src_addr = (struct ether_addr *)&eth->ether_shost;
eth               233 samples/bpf/xdpsock_user.c 	struct ether_addr *dst_addr = (struct ether_addr *)&eth->ether_dhost;
eth                39 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 	struct ethhdr eth;
eth                45 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 	struct ethhdr eth;
eth                52 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 	struct ethhdr eth;
eth                60 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 	struct ethhdr eth;
eth                66 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 	struct ethhdr eth;
eth                78 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 	struct ethhdr eth;
eth               107 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_IP),
eth               128 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_IPV6),
eth               148 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_8021Q),
eth               170 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_8021AD),
eth               193 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_IP),
eth               219 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_IP),
eth               241 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_IPV6),
eth               267 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_IPV6),
eth               289 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_IPV6),
eth               311 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_IPV6),
eth               333 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_IP),
eth               361 tools/testing/selftests/bpf/prog_tests/flow_dissector.c 			.eth.h_proto = __bpf_constant_htons(ETH_P_IP),
eth               157 tools/testing/selftests/bpf/progs/bpf_flow.c 	struct ethhdr *eth, _eth;
eth               201 tools/testing/selftests/bpf/progs/bpf_flow.c 			eth = bpf_flow_dissect_get_header(skb, sizeof(*eth),
eth               203 tools/testing/selftests/bpf/progs/bpf_flow.c 			if (!eth)
eth               206 tools/testing/selftests/bpf/progs/bpf_flow.c 			keys->thoff += sizeof(*eth);
eth               208 tools/testing/selftests/bpf/progs/bpf_flow.c 			return parse_eth_proto(skb, eth->h_proto);
eth               329 tools/testing/selftests/bpf/progs/test_l4lb.c 	struct eth_hdr *eth = pkt_start;
eth               449 tools/testing/selftests/bpf/progs/test_l4lb.c 	*(u32 *)eth->eth_dest = tkey.remote_ipv4;
eth               458 tools/testing/selftests/bpf/progs/test_l4lb.c 	struct eth_hdr *eth = data;
eth               465 tools/testing/selftests/bpf/progs/test_l4lb.c 	eth_proto = eth->eth_proto;
eth               329 tools/testing/selftests/bpf/progs/test_l4lb_noinline.c 	struct eth_hdr *eth = pkt_start;
eth               449 tools/testing/selftests/bpf/progs/test_l4lb_noinline.c 	*(u32 *)eth->eth_dest = tkey.remote_ipv4;
eth               458 tools/testing/selftests/bpf/progs/test_l4lb_noinline.c 	struct eth_hdr *eth = data;
eth               465 tools/testing/selftests/bpf/progs/test_l4lb_noinline.c 	eth_proto = eth->eth_proto;
eth                25 tools/testing/selftests/bpf/progs/test_pkt_access.c 	struct ethhdr *eth = (struct ethhdr *)(data);
eth                30 tools/testing/selftests/bpf/progs/test_pkt_access.c 	if (eth + 1 > data_end)
eth                33 tools/testing/selftests/bpf/progs/test_pkt_access.c 	if (eth->h_proto == bpf_htons(ETH_P_IP)) {
eth                34 tools/testing/selftests/bpf/progs/test_pkt_access.c 		struct iphdr *iph = (struct iphdr *)(eth + 1);
eth                41 tools/testing/selftests/bpf/progs/test_pkt_access.c 	} else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) {
eth                42 tools/testing/selftests/bpf/progs/test_pkt_access.c 		struct ipv6hdr *ip6h = (struct ipv6hdr *)(eth + 1);
eth                61 tools/testing/selftests/bpf/progs/test_sk_lookup_kern.c 	struct ethhdr *eth = (struct ethhdr *)(data);
eth                67 tools/testing/selftests/bpf/progs/test_sk_lookup_kern.c 	if (eth + 1 > data_end)
eth                70 tools/testing/selftests/bpf/progs/test_sk_lookup_kern.c 	tuple = get_tuple(data, sizeof(*eth), data_end, eth->h_proto, &ipv4);
eth               205 tools/testing/selftests/bpf/progs/test_tc_tunnel.c 		struct ethhdr eth;
eth               207 tools/testing/selftests/bpf/progs/test_tc_tunnel.c 		if (bpf_skb_load_bytes(skb, 0, &eth, sizeof(eth)) < 0)
eth               209 tools/testing/selftests/bpf/progs/test_tc_tunnel.c 		eth.h_proto = bpf_htons(ETH_P_IP);
eth               210 tools/testing/selftests/bpf/progs/test_tc_tunnel.c 		if (bpf_skb_store_bytes(skb, 0, &eth, sizeof(eth), 0) < 0)
eth               218 tools/testing/selftests/bpf/progs/test_xdp.c 	struct ethhdr *eth = data;
eth               221 tools/testing/selftests/bpf/progs/test_xdp.c 	if (eth + 1 > data_end)
eth               224 tools/testing/selftests/bpf/progs/test_xdp.c 	h_proto = eth->h_proto;
eth               214 tools/testing/selftests/bpf/progs/test_xdp_loop.c 	struct ethhdr *eth = data;
eth               217 tools/testing/selftests/bpf/progs/test_xdp_loop.c 	if (eth + 1 > data_end)
eth               220 tools/testing/selftests/bpf/progs/test_xdp_loop.c 	h_proto = eth->h_proto;
eth               417 tools/testing/selftests/bpf/progs/test_xdp_noinline.c 	struct eth_hdr *eth;
eth               419 tools/testing/selftests/bpf/progs/test_xdp_noinline.c 	eth = data;
eth               420 tools/testing/selftests/bpf/progs/test_xdp_noinline.c 	memcpy(tmp_mac, eth->eth_source, 6);
eth               421 tools/testing/selftests/bpf/progs/test_xdp_noinline.c 	memcpy(eth->eth_source, eth->eth_dest, 6);
eth               422 tools/testing/selftests/bpf/progs/test_xdp_noinline.c 	memcpy(eth->eth_dest, tmp_mac, 6);
eth               699 tools/testing/selftests/bpf/progs/test_xdp_noinline.c 	struct eth_hdr *eth = data;
eth               805 tools/testing/selftests/bpf/progs/test_xdp_noinline.c 	struct eth_hdr *eth = data;
eth               812 tools/testing/selftests/bpf/progs/test_xdp_noinline.c 	eth_proto = bpf_ntohs(eth->eth_proto);
eth                57 tools/testing/selftests/bpf/progs/test_xdp_vlan.c bool parse_eth_frame(struct ethhdr *eth, void *data_end, struct parse_pkt *pkt)
eth                62 tools/testing/selftests/bpf/progs/test_xdp_vlan.c 	offset = sizeof(*eth);
eth                64 tools/testing/selftests/bpf/progs/test_xdp_vlan.c 	if ((void *)eth + offset + (2*sizeof(struct _vlan_hdr)) > data_end)
eth                67 tools/testing/selftests/bpf/progs/test_xdp_vlan.c 	eth_type = eth->h_proto;
eth                74 tools/testing/selftests/bpf/progs/test_xdp_vlan.c 		vlan_hdr = (void *)eth + offset;
eth                87 tools/testing/selftests/bpf/progs/test_xdp_vlan.c 		vlan_hdr = (void *)eth + offset;
eth                63 tools/testing/selftests/bpf/progs/xdping_kern.c 	struct ethhdr *eth = data;
eth                67 tools/testing/selftests/bpf/progs/xdping_kern.c 	if (data + sizeof(*eth) + sizeof(*iph) + ICMP_ECHO_LEN > data_end)
eth                70 tools/testing/selftests/bpf/progs/xdping_kern.c 	if (eth->h_proto != bpf_htons(ETH_P_IP))
eth                73 tools/testing/selftests/bpf/progs/xdping_kern.c 	iph = data + sizeof(*eth);
eth                81 tools/testing/selftests/bpf/progs/xdping_kern.c 	icmph = data + sizeof(*eth) + sizeof(*iph);
eth                95 tools/testing/selftests/bpf/progs/xdping_kern.c 	struct ethhdr *eth = data;
eth               109 tools/testing/selftests/bpf/progs/xdping_kern.c 	iph = data + sizeof(*eth);
eth               110 tools/testing/selftests/bpf/progs/xdping_kern.c 	icmph = data + sizeof(*eth) + sizeof(*iph);
eth               158 tools/testing/selftests/bpf/progs/xdping_kern.c 	struct ethhdr *eth = data;
eth               169 tools/testing/selftests/bpf/progs/xdping_kern.c 	iph = data + sizeof(*eth);
eth               170 tools/testing/selftests/bpf/progs/xdping_kern.c 	icmph = data + sizeof(*eth) + sizeof(*iph);
eth               168 tools/testing/selftests/bpf/test_progs.c 	.eth.h_proto = __bpf_constant_htons(ETH_P_IP),
eth               177 tools/testing/selftests/bpf/test_progs.c 	.eth.h_proto = __bpf_constant_htons(ETH_P_IPV6),
eth                81 tools/testing/selftests/bpf/test_progs.h 	struct ethhdr eth;
eth                89 tools/testing/selftests/bpf/test_progs.h 	struct ethhdr eth;
eth                34 tools/testing/selftests/bpf/test_queue_stack_map.h 	struct ethhdr *eth = (struct ethhdr *)(data);
eth                38 tools/testing/selftests/bpf/test_queue_stack_map.h 	if (eth + 1 > data_end)
eth                41 tools/testing/selftests/bpf/test_queue_stack_map.h 	struct iphdr *iph = (struct iphdr *)(eth + 1);
eth               487 tools/testing/selftests/net/msg_zerocopy.c 	struct ethhdr eth;
eth               502 tools/testing/selftests/net/msg_zerocopy.c 			memset(eth.h_dest, 0x06, ETH_ALEN);
eth               503 tools/testing/selftests/net/msg_zerocopy.c 			memset(eth.h_source, 0x02, ETH_ALEN);
eth               504 tools/testing/selftests/net/msg_zerocopy.c 			eth.h_proto = htons(proto);
eth               505 tools/testing/selftests/net/msg_zerocopy.c 			iov[0].iov_base = &eth;
eth               506 tools/testing/selftests/net/msg_zerocopy.c 			iov[0].iov_len = sizeof(eth);
eth               103 tools/testing/selftests/net/psock_snd.c 	struct ethhdr *eth = header;
eth               108 tools/testing/selftests/net/psock_snd.c 		eth->h_proto = htons(ETH_P_8021Q);
eth               113 tools/testing/selftests/net/psock_snd.c 	eth->h_proto = htons(ETH_P_IP);
eth               126 tools/testing/selftests/net/psock_tpacket.c 	struct ethhdr *eth = pay;
eth               134 tools/testing/selftests/net/psock_tpacket.c 	if (eth->h_proto != htons(ETH_P_IP)) {
eth               136 tools/testing/selftests/net/psock_tpacket.c 			"type: 0x%x!\n", ntohs(eth->h_proto));
eth               144 tools/testing/selftests/net/psock_tpacket.c 	struct ethhdr *eth = pay;
eth               145 tools/testing/selftests/net/psock_tpacket.c 	struct iphdr *ip = pay + sizeof(*eth);
eth               154 tools/testing/selftests/net/psock_tpacket.c 	eth->h_proto = htons(ETH_P_IP);
eth               157 tools/testing/selftests/net/psock_tpacket.c 		((uint8_t *) pay)[i + sizeof(*eth)] = (uint8_t) rand();
eth               164 tools/testing/selftests/net/psock_tpacket.c 	ip->tot_len = htons((uint16_t) *len - sizeof(*eth));
eth               169 tools/testing/selftests/net/psock_tpacket.c 	memset(pay + sizeof(*eth) + sizeof(*ip),
eth                44 tools/testing/selftests/net/txring_overwrite.c 	struct ethhdr *eth;
eth                50 tools/testing/selftests/net/txring_overwrite.c 	eth = buffer;
eth                51 tools/testing/selftests/net/txring_overwrite.c 	eth->h_proto = htons(ETH_P_IP);
eth                53 tools/testing/selftests/net/txring_overwrite.c 	off += sizeof(*eth);