1N/A /*
1N/A * This program is free software; you can redistribute it and/or
1N/A * modify it under the terms of the GNU General Public License as
1N/A * published by the Free Software Foundation; either version 2, or (at
1N/A * your option) any later version.
1N/A */
1N/A
1N/A#ifndef NIC_H
1N/A#define NIC_H
1N/A
1N/A#include "dev.h"
1N/A
1N/Atypedef enum {
1N/A DISABLE = 0,
1N/A ENABLE,
1N/A FORCE
1N/A} irq_action_t;
1N/A
1N/A/*
1N/A * Structure returned from eth_probe and passed to other driver
1N/A * functions.
1N/A */
1N/Astruct nic
1N/A{
1N/A struct dev dev; /* This must come first */
1N/A int (*poll)P((struct nic *, int retrieve));
1N/A void (*transmit)P((struct nic *, const char *d,
1N/A unsigned int t, unsigned int s, const char *p));
1N/A void (*irq)P((struct nic *, irq_action_t));
1N/A int flags; /* driver specific flags */
1N/A struct rom_info *rom_info; /* -> rom_info from main */
1N/A unsigned char *node_addr;
1N/A unsigned char *packet;
1N/A unsigned int packetlen;
1N/A unsigned int ioaddr;
1N/A unsigned char irqno;
1N/A void *priv_data; /* driver can hang private data here */
1N/A};
1N/A
1N/Aextern int eth_probe(struct dev *dev);
1N/Aextern int eth_poll(int retrieve);
1N/Aextern void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p);
1N/Aextern void eth_disable(void);
1N/Aextern void eth_irq(irq_action_t action);
1N/A#endif /* NIC_H */