Lines Matching defs:nic
14 #include "nic.h"
1642 addr_high = ((tp->nic->node_addr[0] << 8) |
1643 tp->nic->node_addr[1]);
1644 addr_low = ((tp->nic->node_addr[2] << 24) |
1645 (tp->nic->node_addr[3] << 16) |
1646 (tp->nic->node_addr[4] << 8) |
1647 (tp->nic->node_addr[5] << 0));
1661 addr_high = (tp->nic->node_addr[0] +
1662 tp->nic->node_addr[1] +
1663 tp->nic->node_addr[2] +
1664 tp->nic->node_addr[3] +
1665 tp->nic->node_addr[4] +
1666 tp->nic->node_addr[5]) &
1899 * TG3_BDINFO_NIC_ADDR: location of descriptors in nic SRAM
2813 struct nic *nic = tp->nic;
2824 nic->node_addr[0] = (hi >> 8) & 0xff;
2825 nic->node_addr[1] = (hi >> 0) & 0xff;
2828 nic->node_addr[2] = (lo >> 24) & 0xff;
2829 nic->node_addr[3] = (lo >> 16) & 0xff;
2830 nic->node_addr[4] = (lo >> 8) & 0xff;
2831 nic->node_addr[5] = (lo >> 0) & 0xff;
2836 nic->node_addr[0] = ((hi >> 16) & 0xff);
2837 nic->node_addr[1] = ((hi >> 24) & 0xff);
2838 nic->node_addr[2] = ((lo >> 0) & 0xff);
2839 nic->node_addr[3] = ((lo >> 8) & 0xff);
2840 nic->node_addr[4] = ((lo >> 16) & 0xff);
2841 nic->node_addr[5] = ((lo >> 24) & 0xff);
2848 nic->node_addr[5] = lo & 0xff;
2849 nic->node_addr[4] = (lo >> 8) & 0xff;
2850 nic->node_addr[3] = (lo >> 16) & 0xff;
2851 nic->node_addr[2] = (lo >> 24) & 0xff;
2852 nic->node_addr[1] = hi & 0xff;
2853 nic->node_addr[0] = (hi >> 8) & 0xff;
2992 static int tg3_poll(struct nic *nic, int retrieve)
2995 /* nic->packet should contain data on return */
2996 /* nic->packetlen should contain length of data */
3015 nic->packetlen = len;
3016 memcpy(nic->packet, bus_to_virt(desc->addr_lo), len);
3055 static void tg3_transmit(struct nic *nic, const char *dst_addr,
3093 memcpy(&frame[frame_idx].src_addr, nic->node_addr, ETH_ALEN);
3140 static void tg3_irq(struct nic *nic __unused, irq_action_t action __unused)
3158 struct nic *nic = (struct nic *)dev;
3170 nic->irqno = 0;
3171 nic->ioaddr = pdev->ioaddr & ~3;
3187 tp->nic = nic;
3234 printf("Ethernet addr: %!\n", nic->node_addr);
3273 nic->poll = tg3_poll;
3274 nic->transmit = tg3_transmit;
3275 nic->irq = tg3_irq;