64 #define NIC_FAKE_BSS_PTR( type ) ( ( type * ) legacy_nic.fake_bss ) 65 #define NIC_FAKE_BSS( type ) ( * NIC_FAKE_BSS_PTR ( type ) ) 70 int ( *
poll ) (
struct nic *,
int retrieve );
72 unsigned int,
unsigned int,
const char * );
96 void ( * set_drvdata ) (
void *hwdev,
void *
priv ),
98 int ( * probe ) (
struct nic *
nic,
void *hwdev ),
99 void ( * disable ) (
struct nic *
nic,
void *hwdev ),
102 void * ( * get_drvdata ) (
void *hwdev ),
103 void ( * disable ) (
struct nic *
nic,
void *hwdev ) );
105 #define PCI_DRIVER(_name,_ids,_class) \ 107 _name ## _pci_legacy_probe ( struct pci_device *pci ); \ 109 _name ## _pci_legacy_remove ( struct pci_device *pci ); \ 110 struct pci_driver _name __pci_driver = { \ 112 .id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \ 113 .probe = _name ## _pci_legacy_probe, \ 114 .remove = _name ## _pci_legacy_remove, \ 116 REQUIRE_OBJECT ( pci ); 125 #define ISAPNP_DRIVER(_name,_ids) \ 127 _name ## _isapnp_legacy_probe ( struct isapnp_device *isapnp, \ 128 const struct isapnp_device_id *id ); \ 130 _name ## _isapnp_legacy_remove ( struct isapnp_device *isapnp ); \ 131 struct isapnp_driver _name __isapnp_driver = { \ 133 .id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \ 134 .probe = _name ## _isapnp_legacy_probe, \ 135 .remove = _name ## _isapnp_legacy_remove, \ 137 REQUIRE_OBJECT ( isapnp ); 146 #define EISA_DRIVER(_name,_ids) \ 148 _name ## _eisa_legacy_probe ( struct eisa_device *eisa, \ 149 const struct eisa_device_id *id ); \ 151 _name ## _eisa_legacy_remove ( struct eisa_device *eisa ); \ 152 struct eisa_driver _name __eisa_driver = { \ 154 .id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \ 155 .probe = _name ## _eisa_legacy_probe, \ 156 .remove = _name ## _eisa_legacy_remove, \ 158 REQUIRE_OBJECT ( eisa ); 167 #define MCA_DRIVER(_name,_ids) \ 169 _name ## _mca_legacy_probe ( struct mca_device *mca, \ 170 const struct mca_device_id *id ); \ 172 _name ## _mca_legacy_remove ( struct mca_device *mca ); \ 173 struct mca_driver _name __mca_driver = { \ 175 .id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \ 176 .probe = _name ## _mca_legacy_probe, \ 177 .remove = _name ## _mca_legacy_remove, \ 179 REQUIRE_OBJECT ( mca ); 188 #define ISA_DRIVER(_name,_probe_addrs,_probe_addr,_vendor_id,_prod_id) \ 190 _name ## _isa_legacy_probe ( struct isa_device *isa ); \ 192 _name ## _isa_legacy_probe_at_addr ( struct isa_device *isa ) { \ 193 if ( ! _probe_addr ( isa->ioaddr ) ) \ 195 return _name ## _isa_legacy_probe ( isa ); \ 198 _name ## _isa_legacy_remove ( struct isa_device *isa ); \ 199 static const char _name ## _text[]; \ 200 struct isa_driver _name __isa_driver = { \ 201 .name = _name ## _text, \ 202 .probe_addrs = _probe_addrs, \ 203 .addr_count = ( sizeof ( _probe_addrs ) / \ 204 sizeof ( _probe_addrs[0] ) ), \ 205 .vendor_id = _vendor_id, \ 206 .prod_id = _prod_id, \ 207 .probe = _name ## _isa_legacy_probe_at_addr, \ 208 .remove = _name ## _isa_legacy_remove, \ 210 REQUIRE_OBJECT ( isa ); 220 #define DRIVER( _name_text, _unused2, _unused3, _name, _probe, _disable, \ 222 static __attribute__ (( unused )) const char \ 223 _name ## _text[] = _name_text; \ 225 _name ## _probe ( struct nic *nic, void *hwdev ) { \ 226 return _probe ( nic, hwdev ); \ 229 _name ## _disable ( struct nic *nic, void *hwdev ) { \ 230 _disable ( nic, hwdev ); \ 233 _name ## _pci_legacy_probe ( struct pci_device *pci ) { \ 234 return legacy_probe ( pci, legacy_pci_set_drvdata, \ 235 &pci->dev, _name ## _probe, \ 237 sizeof ( _fake_bss ) ); \ 240 _name ## _pci_legacy_remove ( struct pci_device *pci ) { \ 241 return legacy_remove ( pci, legacy_pci_get_drvdata, \ 242 _name ## _disable ); \ 245 _name ## _isapnp_legacy_probe ( struct isapnp_device *isapnp, \ 246 const struct isapnp_device_id *id __unused ) { \ 247 return legacy_probe ( isapnp, legacy_isapnp_set_drvdata, \ 248 &isapnp->dev, _name ## _probe, \ 250 sizeof ( _fake_bss ) ); \ 253 _name ## _isapnp_legacy_remove ( struct isapnp_device *isapnp ) { \ 254 return legacy_remove ( isapnp, legacy_isapnp_get_drvdata, \ 255 _name ## _disable ); \ 258 _name ## _eisa_legacy_probe ( struct eisa_device *eisa, \ 259 const struct eisa_device_id *id __unused ) { \ 260 return legacy_probe ( eisa, legacy_eisa_set_drvdata, \ 261 &eisa->dev, _name ## _probe, \ 263 sizeof ( _fake_bss ) ); \ 266 _name ## _eisa_legacy_remove ( struct eisa_device *eisa ) { \ 267 return legacy_remove ( eisa, legacy_eisa_get_drvdata, \ 268 _name ## _disable ); \ 271 _name ## _mca_legacy_probe ( struct mca_device *mca, \ 272 const struct mca_device_id *id __unused ) { \ 273 return legacy_probe ( mca, legacy_mca_set_drvdata, \ 274 &mca->dev, _name ## _probe, \ 276 sizeof ( _fake_bss ) ); \ 279 _name ## _mca_legacy_remove ( struct mca_device *mca ) { \ 280 return legacy_remove ( mca, legacy_mca_get_drvdata, \ 281 _name ## _disable ); \ 284 _name ## _isa_legacy_probe ( struct isa_device *isa ) { \ 285 return legacy_probe ( isa, legacy_isa_set_drvdata, \ 286 &isa->dev, _name ## _probe, \ 288 sizeof ( _fake_bss ) ); \ 291 _name ## _isa_legacy_remove ( struct isa_device *isa ) { \ 292 return legacy_remove ( isa, legacy_isa_get_drvdata, \ 293 _name ## _disable ); \ 295 PROVIDE_REQUIRING_SYMBOL()
int(* poll)(struct nic *, int retrieve)
static void * legacy_pci_get_drvdata(void *hwdev)
uint32_t type
Operating system type.
uint16_t size
Buffer size.
static void legacy_isapnp_set_drvdata(void *hwdev, void *priv)
void(* irq)(struct nic *, irq_action_t)
void(* transmit)(struct nic *, const char *, unsigned int, unsigned int, const char *)
static void legacy_eisa_set_drvdata(void *hwdev, void *priv)
static void * legacy_isapnp_get_drvdata(void *hwdev)
int legacy_probe(void *hwdev, void(*set_drvdata)(void *hwdev, void *priv), struct device *dev, int(*probe)(struct nic *nic, void *hwdev), void(*disable)(struct nic *nic, void *hwdev), size_t fake_bss_len)
static int eth_poll(int retrieve)
FILE_LICENCE(GPL2_OR_LATER)
static void pci_set_drvdata(struct pci_device *pci, void *priv)
Set PCI driver-private data.
static void legacy_isa_set_drvdata(void *hwdev, void *priv)
int dummy_connect(struct nic *nic)
static void * legacy_eisa_get_drvdata(void *hwdev)
static void legacy_mca_set_drvdata(void *hwdev, void *priv)
static void isa_set_drvdata(struct isa_device *isa, void *priv)
Set ISA driver-private data.
static void * isapnp_get_drvdata(struct isapnp_device *isapnp)
Get ISAPnP driver-private data.
static void mca_set_drvdata(struct mca_device *mca, void *priv)
Set MCA driver-private data.
static void isapnp_set_drvdata(struct isapnp_device *isapnp, void *priv)
Set ISAPnP driver-private data.
void legacy_remove(void *hwdev, void *(*get_drvdata)(void *hwdev), void(*disable)(struct nic *nic, void *hwdev))
static void legacy_pci_set_drvdata(void *hwdev, void *priv)
static void eisa_set_drvdata(struct eisa_device *eisa, void *priv)
Set EISA driver-private data.
static void * pci_get_drvdata(struct pci_device *pci)
Get PCI driver-private data.
static void * mca_get_drvdata(struct mca_device *mca)
Get MCA driver-private data.
static void * legacy_isa_get_drvdata(void *hwdev)
unsigned char * node_addr
static void eth_transmit(const char *dest, unsigned int type, unsigned int size, const void *packet)
static void * eisa_get_drvdata(struct eisa_device *eisa)
Get EISA driver-private data.
void dummy_irq(struct nic *nic, irq_action_t irq_action)
static struct tlan_private * priv
static void * legacy_mca_get_drvdata(void *hwdev)
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
static void * isa_get_drvdata(struct isa_device *isa)
Get ISA driver-private data.
struct nic_operations * nic_op
int(* connect)(struct nic *)