Lines Matching defs:nic
45 #include "nic.h"
280 static int mdio_read(struct nic *nic __unused, int phy_id, int reg_num);
282 static void mdio_write(struct nic *nic __unused, int phy_id, int reg_num,
404 static int pcnet32_init_ring(struct nic *nic)
428 lp->init_block.phys_addr[i] = nic->node_addr[i];
437 static void pcnet32_reset(struct nic *nic)
514 pcnet32_init_ring(nic);
542 static int pcnet32_poll(struct nic *nic __unused, int retrieve)
545 /* nic->packet should contain data on return */
546 /* nic->packetlen should contain length of data */
560 nic->packetlen =
562 memcpy(nic->packet, &rxb[entry], nic->packetlen);
581 static void pcnet32_transmit(struct nic *nic __unused, const char *d, /* Destination */
599 memcpy(ptxb + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */
652 static void pcnet32_irq(struct nic *nic __unused, irq_action_t action __unused)
670 struct nic *nic = (struct nic *) dev;
687 nic->irqno = 0;
688 nic->ioaddr = pci->ioaddr & ~3;
798 /* Update the nic structure with the MAC Address */
800 nic->node_addr[i] = promaddr[i];
803 printf("%s: %! at ioaddr %hX, ", pci->name, nic->node_addr,
873 if (nic->node_addr[0] == 0x00 && nic->node_addr[1] == 0xe0
874 && nic->node_addr[2] == 0x75)
881 lp->init_block.phys_addr[i] = nic->node_addr[i];
907 pcnet32_reset(nic);
914 int mii_status = mdio_read(nic, phy, MII_BMSR);
918 mdio_read(nic, phy, MII_ADVERTISE);
932 mdio_read(nic, lp->phys[0], MII_ADVERTISE);
934 mii_lpa = mdio_read(nic, lp->phys[0], MII_LPA);
948 nic->poll = pcnet32_poll;
949 nic->transmit = pcnet32_transmit;
951 nic->irq = pcnet32_irq;
955 static int mdio_read(struct nic *nic __unused, int phy_id, int reg_num)
974 static void mdio_write(struct nic *nic __unused, int phy_id, int reg_num,