Changeset 7a68fe5 in mainline for uspace/drv/nic/ne2k/dp8390.h
- Timestamp:
- 2011-10-10T06:58:55Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2ea6392
- Parents:
- e68c834 (diff), 80099c19 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/ne2k/dp8390.h
re68c834 r7a68fe5 2 2 * Copyright (c) 2009 Lukas Mejdrech 3 3 * Copyright (c) 2011 Martin Decky 4 * Copyright (c) 2011 Radim Vansa 4 5 * All rights reserved. 5 6 * … … 38 39 */ 39 40 40 /** @addtogroup ne200041 /** @addtogroup drv_ne2k 41 42 * @{ 42 43 */ … … 50 51 51 52 #include <fibril_synch.h> 52 #include <adt/list.h> 53 #include <net/packet.h> 54 #include <netif_skel.h> 55 56 /** Module name */ 57 #define NAME "ne2000" 53 #include <nic.h> 54 #include <ddf/interrupt.h> 58 55 59 56 /** Input/output size */ 60 57 #define NE2K_IO_SIZE 0x0020 61 58 62 /** Ethernet address length */ 63 #define ETH_ADDR 6 59 /* NE2000 implementation. */ 60 61 /** NE2000 Data Register */ 62 #define NE2K_DATA 0x0010 63 64 /** NE2000 Reset register */ 65 #define NE2K_RESET 0x001f 66 67 /** NE2000 data start */ 68 #define NE2K_START 0x4000 69 70 /** NE2000 data size */ 71 #define NE2K_SIZE 0x4000 72 73 /** NE2000 retry count */ 74 #define NE2K_RETRY 0x1000 75 76 /** NE2000 error messages rate limiting */ 77 #define NE2K_ERL 10 78 79 /** Minimum Ethernet packet size in bytes */ 80 #define ETH_MIN_PACK_SIZE 60 81 82 /** Maximum Ethernet packet size in bytes */ 83 #define ETH_MAX_PACK_SIZE_TAGGED 1518 64 84 65 85 /* National Semiconductor DP8390 Network Interface Controller. */ … … 204 224 typedef struct { 205 225 /* Device configuration */ 226 void *base_port; /**< Port assigned from ISA configuration **/ 206 227 void *port; 207 228 void *data_port; 208 229 int irq; 209 uint8_t mac[ETH_ADDR];230 nic_address_t mac; 210 231 211 232 uint8_t start_page; /**< Ring buffer start page */ … … 224 245 bool probed; 225 246 bool up; 226 247 248 /* Irq code with assigned addresses for this device */ 249 irq_code_t code; 250 251 /* Copy of the receive configuration register */ 252 uint8_t receive_configuration; 253 227 254 /* Device statistics */ 228 device_stats_t stats;255 // TODO: shouldn't be these directly in device.h - nic_device_stats? 229 256 uint64_t misses; /**< Receive frame misses */ 230 257 uint64_t underruns; /**< FIFO underruns */ … … 232 259 } ne2k_t; 233 260 234 typedef struct { 235 link_t link; 236 packet_t *packet; 237 } frame_t; 238 239 extern int ne2k_probe(ne2k_t *, void *, int); 261 extern int ne2k_probe(ne2k_t *); 240 262 extern int ne2k_up(ne2k_t *); 241 263 extern void ne2k_down(ne2k_t *); 242 extern void ne2k_send(ne2k_t *, packet_t *); 243 extern list_t *ne2k_interrupt(ne2k_t *, uint8_t, uint8_t); 264 extern void ne2k_send(nic_t *, packet_t *); 265 extern void ne2k_interrupt(nic_t *, uint8_t, uint8_t); 266 extern packet_t *ne2k_alloc_packet(nic_t *, size_t); 267 268 extern void ne2k_set_accept_mcast(ne2k_t *, int); 269 extern void ne2k_set_accept_bcast(ne2k_t *, int); 270 extern void ne2k_set_promisc_phys(ne2k_t *, int); 271 extern void ne2k_set_mcast_hash(ne2k_t *, uint64_t); 272 extern void ne2k_set_physical_address(ne2k_t *, const nic_address_t *address); 244 273 245 274 #endif
Note:
See TracChangeset
for help on using the changeset viewer.